diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 14fd5013be0..3502e33bd1c 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -670,9 +670,7 @@ class AppComponent { // activate solidity plugin this.appManager.activatePlugin(['solidity', 'udapp', 'deploy-libraries', 'link-libraries', 'openzeppelin-proxy', 'scriptRunnerBridge']) - if(!isElectron()){ - - }else{ + if(isElectron()){ this.appManager.activatePlugin(['desktopHost']) } } diff --git a/apps/remix-ide/src/app/components/DesktopClientUI.tsx b/apps/remix-ide/src/app/components/DesktopClientUI.tsx index 34505921430..2899025cc99 100644 --- a/apps/remix-ide/src/app/components/DesktopClientUI.tsx +++ b/apps/remix-ide/src/app/components/DesktopClientUI.tsx @@ -11,7 +11,7 @@ interface DesktopClientState { currentContext: string; } -const DesktopClientUI = (props: DesktopClientState & { openDesktopApp: () => {} } & { onConnect: (providerName: Provider) => void }) => { +const DesktopClientUI = (props: DesktopClientState & { openDesktopApp: () => void } & { onConnect: (providerName: Provider) => void }) => { const appContext = useContext(AppContext); const { connected, providers, onConnect, disableconnect, currentContext } = props; const [title, setTitle] = React.useState('Connecting...'); @@ -84,8 +84,8 @@ const DesktopClientUI = (props: DesktopClientState & { openDesktopApp: () => {} {disableconnect ? 'please wait ...' : currentContext === provider.name - ? 'Connected' - : 'Connect'} + ? 'Connected' + : 'Connect'} diff --git a/apps/remix-ide/src/app/plugins/electron/desktopHostPlugin.ts b/apps/remix-ide/src/app/plugins/electron/desktopHostPlugin.ts index f8b831d8ec5..7dc008d0981 100644 --- a/apps/remix-ide/src/app/plugins/electron/desktopHostPlugin.ts +++ b/apps/remix-ide/src/app/plugins/electron/desktopHostPlugin.ts @@ -6,23 +6,23 @@ import { ElectronPlugin } from '@remixproject/engine-electron' const _paq = (window._paq = window._paq || []) const profile = { - name: 'desktopHost', - displayName: '', - description: '', - methods: [], - events: ['connected'], - maintainedBy: 'Remix' + name: 'desktopHost', + displayName: '', + description: '', + methods: [], + events: ['connected'], + maintainedBy: 'Remix' } export class DesktopHost extends ElectronPlugin { - constructor() { - super(profile) - } + constructor() { + super(profile) + } - onActivation() { - console.log('DesktopHost activated') - _paq.push(['trackEvent', 'plugin', 'activated', 'DesktopHost']) - } + onActivation() { + console.log('DesktopHost activated') + _paq.push(['trackEvent', 'plugin', 'activated', 'DesktopHost']) + } } \ No newline at end of file diff --git a/apps/remix-ide/src/app/udapp/run-tab.tsx b/apps/remix-ide/src/app/udapp/run-tab.tsx index f1bbe658b43..d29bfd8d9ac 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.tsx +++ b/apps/remix-ide/src/app/udapp/run-tab.tsx @@ -13,7 +13,6 @@ import { ForkedVMStateProvider } from '../providers/vm-provider' import { Recorder } from '../tabs/runTab/model/recorder' const _paq = (window._paq = window._paq || []) - export const providerDescriptions = { 'vm-cancun': 'Deploy to the in-browser virtual machine running the Cancun fork.', 'vm-shanghai': 'Deploy to the in-browser virtual machine running the Shanghai fork.', @@ -216,7 +215,7 @@ export class RunTab extends ViewPlugin { isInjected, isVM, isForkedState, - }) + }) } const addCustomInjectedProvider = async (position, event, name, displayName, networkId, urls, nativeCurrency?) => { @@ -318,7 +317,7 @@ export class RunTab extends ViewPlugin { // wallet connect await addProvider(6, 'walletconnect', 'WalletConnect', false, false, false) - if(isElectron()) { + if (isElectron()) { // desktop host await addProvider(12, 'desktopHost', 'Metamask for Remix Desktop', false, false, false) } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx index 0c2e49dc72f..214b4dd2500 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx @@ -118,16 +118,16 @@ const ModalWrapper = (props: ModalWrapperProps) => { }) break case ModalTypes.fixed: - setState({ - ...props, - okFn: null, - cancelFn: null, - okLabel: null, - cancelLabel: null, - preventBlur: true, - hideCancelIcon: true, - }) - break + setState({ + ...props, + okFn: null, + cancelFn: null, + okLabel: null, + cancelLabel: null, + preventBlur: true, + hideCancelIcon: true, + }) + break default: setState({ ...props, diff --git a/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts b/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts index abe232c1fce..2110a638997 100644 --- a/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts +++ b/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts @@ -3,44 +3,44 @@ import { AppState } from "../interface"; export const appReducer = (state: AppState, action: AppAction): AppState => { switch (action.type) { - case appActionTypes.setGitHubUser: { - return { - ...state, - gitHubUser: action.payload - } + case appActionTypes.setGitHubUser: { + return { + ...state, + gitHubUser: action.payload } - case appActionTypes.setCurrentBranch: { - return { - ...state, - currentBranch: action.payload - } + } + case appActionTypes.setCurrentBranch: { + return { + ...state, + currentBranch: action.payload } - case appActionTypes.setNeedsGitInit: { - return { - ...state, - needsGitInit: action.payload - } + } + case appActionTypes.setNeedsGitInit: { + return { + ...state, + needsGitInit: action.payload } - case appActionTypes.setCanUseGit: { - return { - ...state, - canUseGit: action.payload - } + } + case appActionTypes.setCanUseGit: { + return { + ...state, + canUseGit: action.payload } + } - case appActionTypes.setShowPopupPanel: { - return { - ...state, - showPopupPanel: action.payload - } + case appActionTypes.setShowPopupPanel: { + return { + ...state, + showPopupPanel: action.payload } + } - case appActionTypes.setConnectedToDesktop: { - console.log('setConnectedToDesktop', action.payload) - return { - ...state, - connectedToDesktop: action.payload - } + case appActionTypes.setConnectedToDesktop: { + console.log('setConnectedToDesktop', action.payload) + return { + ...state, + connectedToDesktop: action.payload } } + } } \ No newline at end of file diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 6b9ca6f7639..d80acef5218 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -54,7 +54,7 @@ const RemixApp = (props: IRemixAppUi) => { }) useEffect(() => { - if(props.app.params && props.app.params.activate && props.app.params.activate.split(',').includes('desktopClient')){ + if (props.app.params && props.app.params.activate && props.app.params.activate.split(',').includes('desktopClient')){ setHideSidePanel(true) } async function activateApp() { @@ -119,7 +119,7 @@ const RemixApp = (props: IRemixAppUi) => { },[appState.showPopupPanel]) function setListeners() { - if(!props.app.desktopClientMode){ + if (!props.app.desktopClientMode){ props.app.sidePanel.events.on('toggle', () => { setHideSidePanel((prev) => { return !prev diff --git a/libs/remix-ui/app/src/lib/remix-app/state/app.ts b/libs/remix-ui/app/src/lib/remix-app/state/app.ts index ac0e772c598..d6ce19940b3 100644 --- a/libs/remix-ui/app/src/lib/remix-app/state/app.ts +++ b/libs/remix-ui/app/src/lib/remix-app/state/app.ts @@ -8,4 +8,4 @@ export const appInitialState: AppState = { canUseGit: false, showPopupPanel: false, connectedToDesktop: desktopConnextionType.disabled -} \ No newline at end of file +} \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index 10faa11d55f..8b46147f7c5 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -73,7 +73,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { } }, []) - if(appContext.appState.connectedToDesktop != desktopConnextionType.disabled) { + if (appContext.appState.connectedToDesktop != desktopConnextionType.disabled) { return (<>) } diff --git a/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx b/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx index aa6f5ed43fd..d27671c6669 100644 --- a/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx +++ b/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx @@ -70,7 +70,7 @@ export function RemixUIStatusBar({ statusBarPlugin }: RemixUIStatusBarProps) { return aiActive } - if(platform !== appPlatformTypes.desktop && appContext.appState.connectedToDesktop !== desktopConnextionType.disabled) { + if (platform !== appPlatformTypes.desktop && appContext.appState.connectedToDesktop !== desktopConnextionType.disabled) { return (<>
) } diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx index 6a098f74585..8e4515593d0 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Home.tsx @@ -15,7 +15,7 @@ function Home({ verticalIconPlugin }: HomeProps) {
{ - if(appContext.appState.connectedToDesktop === desktopConnextionType.disabled) await verticalIconPlugin.activateHome() + if (appContext.appState.connectedToDesktop === desktopConnextionType.disabled) await verticalIconPlugin.activateHome() }} {...{ plugin: 'home' }} data-id="verticalIconsHomeIcon"