Skip to content

Commit

Permalink
updated to add message from From
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus committed Mar 12, 2020
1 parent a858c69 commit c4d9554
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/app/files/fileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ class FileManager extends Plugin {
toaster.hide()
}
if (this.currentRequest) {
if (isNative(this.currentRequest.from)) {
const canCall = this.call('manager', 'canCall', { name: this.currentRequest.from }, this.profile, 'setFile')
if (canCall) {
this._setFileInternal(path, content)
return
}

let actions = (toaster) => {
return yo`
<div class="container ml-1">
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/persmission-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export class PermissionHandler {
<i class="fas fa-arrow-right"></i>
${imgTo}
</article>
`

globalRegistry.get('themeModule').api.fixInvert(imgFrom)
Expand All @@ -171,6 +170,7 @@ export class PermissionHandler {
<p>${from.description || yo`<i>No description Provided</i>`}</p>
<h6>${toName} :</p>
<p>${to.description || yo`<i>No description Provided</i>`}</p>
<p>${message}</p>
</article>
<article class="${css.remember}">
Expand Down
4 changes: 3 additions & 1 deletion src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const requiredModules = [ // services + layout views + system views
'terminal', 'settings', 'pluginManager']

export function isNative (name) {
const nativePlugins = ['vyper', 'workshops', 'ethdoc', 'etherscan']
const nativePlugins = ['workshops', 'ethdoc', 'etherscan']
return nativePlugins.includes(name) || requiredModules.includes(name)
}

Expand All @@ -37,6 +37,8 @@ export class RemixAppManager extends PluginManager {
if (to.name !== this.currentRequest) {
return false
}
if (isNative)
return true
return await this.permissionHandler.askPermition(from, to, method, message)
}

Expand Down

0 comments on commit c4d9554

Please sign in to comment.