|
|
@ -1,4 +1,5 @@ |
|
|
|
import React from 'react' // eslint-disable-line
|
|
|
|
import React from 'react' // eslint-disable-line
|
|
|
|
|
|
|
|
import { FormattedMessage } from 'react-intl' |
|
|
|
import { Plugin } from '@remixproject/engine' |
|
|
|
import { Plugin } from '@remixproject/engine' |
|
|
|
import { AppModal } from '@remix-ui/app' |
|
|
|
import { AppModal } from '@remix-ui/app' |
|
|
|
import { PermissionHandlerDialog, PermissionHandlerValue } from '@remix-ui/permission-handler' |
|
|
|
import { PermissionHandlerDialog, PermissionHandlerValue } from '@remix-ui/permission-handler' |
|
|
@ -103,10 +104,10 @@ export class PermissionHandlerPlugin extends Plugin { |
|
|
|
} |
|
|
|
} |
|
|
|
const modal: AppModal = { |
|
|
|
const modal: AppModal = { |
|
|
|
id: 'PermissionHandler', |
|
|
|
id: 'PermissionHandler', |
|
|
|
title: `Permission needed for ${to.displayName || to.name}`, |
|
|
|
title: <FormattedMessage id='permissionHandler.permissionNeededFor' values={{ to: to.displayName || to.name }} />, |
|
|
|
message: <PermissionHandlerDialog plugin={this} theme={await this.getTheme()} value={value}></PermissionHandlerDialog>, |
|
|
|
message: <PermissionHandlerDialog plugin={this} theme={await this.getTheme()} value={value}></PermissionHandlerDialog>, |
|
|
|
okLabel: 'Accept', |
|
|
|
okLabel: <FormattedMessage id='permissionHandler.accept' />, |
|
|
|
cancelLabel: 'Decline' |
|
|
|
cancelLabel: <FormattedMessage id='permissionHandler.decline' /> |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const result = await this.call('notification', 'modal', modal) |
|
|
|
const result = await this.call('notification', 'modal', modal) |
|
|
|