Skip to content

Commit 911e777

Browse files
LianaHusAniket-Engg
authored andcommitted
more info for permissions toaster
1 parent 074914a commit 911e777

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

apps/remix-ide/src/app/plugins/permission-handler-plugin.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,17 @@ export class PermissionHandlerPlugin extends Plugin {
9292
const {allow, hash} = sensitiveCall ? this.sessionPermissions[to.name][method][from.name] : this.permissions[to.name][method][from.name]
9393
if (!allow) {
9494
const warning = this.notAllowWarning(from, to, method)
95-
this.call('notification', 'toast', warning)
95+
const warnEl =
96+
<div className='d-flex flex-column'>
97+
<span>{ warning }</span>
98+
<div className='d-flex flex-row'>
99+
<span onClick={()=>{}}>To change the permission go to </span>
100+
<span className='px-2' style={{fontWeight: 'bolder'}}>Plugin Manager</span>
101+
<img alt="" id="permissionModalImagesFrom" src="/assets/img/pluginManager.webp" style={{height: '1rem', width: '1rem'}} />
102+
<span className='pl-1' style={{fontWeight: 'bolder'}}> / Permissions</span>
103+
</div>
104+
</div>
105+
this.call('notification', 'toast', warnEl)
96106
return false
97107
}
98108
return hash === from.hash

libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function PermisssionsSettings() {
9090
htmlFor={`permission-checkbox-${targetPlugin}-${funcName}-${targetPlugin}`}
9191
data-id={`permission-label-${targetPlugin}-${funcName}-${targetPlugin}`}
9292
>
93-
<FormattedMessage id="pluginManager.allow" /> <u>{pluginName}</u> <FormattedMessage id="pluginManager.toCall" /> <u>{funcName}</u>
93+
<FormattedMessage id="pluginManager.allow" /><u>{pluginName}</u> <FormattedMessage id="pluginManager.toCall" /> <u>{funcName}</u>
9494
</label>
9595
</span>
9696
</div>

0 commit comments

Comments
 (0)