diff --git a/apps/remixdesktop/src/menus/view.ts b/apps/remixdesktop/src/menus/view.ts deleted file mode 100644 index 0a36d5367b..0000000000 --- a/apps/remixdesktop/src/menus/view.ts +++ /dev/null @@ -1,90 +0,0 @@ -import {BrowserWindow, MenuItemConstructorOptions} from 'electron'; - -export default ( - commandKeys: Record, - execCommand: (command: string, focusedWindow?: BrowserWindow) => void -): MenuItemConstructorOptions => { - const isMac = process.platform === 'darwin'; - - return { - label: 'View', - submenu: [ - { - label: 'Toggle Developer Tools', - accelerator: (function() { - if (process.platform === 'darwin') - return 'Alt+Command+I'; - else - return 'Ctrl+Shift+I'; - })(), - click: function(item, focusedWindow) { - if (focusedWindow) - focusedWindow.webContents.toggleDevTools(); - } - }, - { - label: 'Reload', - accelerator: 'CmdOrCtrl+R', - click: function(item, focusedWindow) { - if (focusedWindow) - focusedWindow.reload(); - } - }, - { - label: 'Toggle Full Screen', - accelerator: (function() { - if (process.platform === 'darwin') - - return 'Ctrl+Command+F'; - else - return 'F11'; - })(), - click: function(item, focusedWindow) { - if (focusedWindow) - focusedWindow.setFullScreen(!focusedWindow.isFullScreen()); - } - }, - { - label: 'Zoom In', - accelerator: 'CmdOrCtrl+=', - click: function(item, focusedWindow) { - if (focusedWindow){ - let factor = focusedWindow.webContents.getZoomFactor() - if (factor < 4) { - factor = factor + 0.25 - focusedWindow.webContents.setZoomFactor(factor) - } - } - } - }, - { - label: 'Zoom Out', - accelerator: 'CmdOrCtrl+-', - click: function(item, focusedWindow) { - if (focusedWindow){ - let factor = focusedWindow.webContents.getZoomFactor() - console.log(factor) - if (factor > 1.25) { - factor = factor - 0.25 - focusedWindow.webContents.setZoomFactor(factor) - }else{ - focusedWindow.webContents.setZoomFactor(1) - } - - } - } - }, - { - label: 'Reset Zoom', - accelerator: 'CmdOrCtrl+0', - click: function(item, focusedWindow) { - if (focusedWindow) - { - focusedWindow.webContents.setZoomFactor(1) - } - } - }, - - ] - }; -}; diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index 76edfaec9f..db7e810eb7 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -131,7 +131,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { textWrapEventAction(props.config, props.editor, event.target.checked, dispatch) } - const onchangeCopilotActivate = async () => { + const onchangeCopilotActivate = () => { if (!props.useCopilot) { copilotActivate(props.config, props.useCopilot, dispatch) props.plugin.call('copilot-suggestion', 'uninstall') @@ -154,7 +154,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { props.plugin.call('terminal', 'log', {type: 'typewriterlog', value: `Solidity Copilot activated` }) }) - if (await props.plugin.call('copilot-suggestion', 'status')) { + if (props.plugin.call('copilot-suggestion', 'status')) { copilotActivate(props.config, true, dispatch) } else { startCopilot() @@ -166,7 +166,6 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { onchangeCopilotActivate() }, [props.useCopilot]) - const onchangeCopilotMaxNewToken = (event) => { copilotMaxNewToken(props.config, parseInt(event.target.value), dispatch) }