Commit c4d95541 authored by LianaHus's avatar LianaHus Committed by Liana Husikyan

updated to add message from From

parent a858c69b
...@@ -173,10 +173,12 @@ class FileManager extends Plugin { ...@@ -173,10 +173,12 @@ class FileManager extends Plugin {
toaster.hide() toaster.hide()
} }
if (this.currentRequest) { 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) this._setFileInternal(path, content)
return return
} }
let actions = (toaster) => { let actions = (toaster) => {
return yo` return yo`
<div class="container ml-1"> <div class="container ml-1">
......
...@@ -156,7 +156,6 @@ export class PermissionHandler { ...@@ -156,7 +156,6 @@ export class PermissionHandler {
<i class="fas fa-arrow-right"></i> <i class="fas fa-arrow-right"></i>
${imgTo} ${imgTo}
</article> </article>
` `
globalRegistry.get('themeModule').api.fixInvert(imgFrom) globalRegistry.get('themeModule').api.fixInvert(imgFrom)
...@@ -171,6 +170,7 @@ export class PermissionHandler { ...@@ -171,6 +170,7 @@ export class PermissionHandler {
<p>${from.description || yo`<i>No description Provided</i>`}</p> <p>${from.description || yo`<i>No description Provided</i>`}</p>
<h6>${toName} :</p> <h6>${toName} :</p>
<p>${to.description || yo`<i>No description Provided</i>`}</p> <p>${to.description || yo`<i>No description Provided</i>`}</p>
<p>${message}</p>
</article> </article>
<article class="${css.remember}"> <article class="${css.remember}">
......
...@@ -10,7 +10,7 @@ const requiredModules = [ // services + layout views + system views ...@@ -10,7 +10,7 @@ const requiredModules = [ // services + layout views + system views
'terminal', 'settings', 'pluginManager'] 'terminal', 'settings', 'pluginManager']
export function isNative (name) { export function isNative (name) {
const nativePlugins = ['vyper', 'workshops', 'ethdoc', 'etherscan'] const nativePlugins = ['workshops', 'ethdoc', 'etherscan']
return nativePlugins.includes(name) || requiredModules.includes(name) return nativePlugins.includes(name) || requiredModules.includes(name)
} }
...@@ -37,6 +37,8 @@ export class RemixAppManager extends PluginManager { ...@@ -37,6 +37,8 @@ export class RemixAppManager extends PluginManager {
if (to.name !== this.currentRequest) { if (to.name !== this.currentRequest) {
return false return false
} }
if (isNative)
return true
return await this.permissionHandler.askPermition(from, to, method, message) return await this.permissionHandler.askPermition(from, to, method, message)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment