Browse Source

Pioneer: Remove unused apps-electron

Leszek Wiesner 3 years ago
parent
commit
1b5354e0b8
28 changed files with 0 additions and 618 deletions
  1. 0 1
      pioneer/README.md
  2. 0 3
      pioneer/package.json
  3. 0 3
      pioneer/packages/apps-electron/.gitignore
  4. 0 0
      pioneer/packages/apps-electron/.skip-build
  5. 0 0
      pioneer/packages/apps-electron/.skip-npm
  6. 0 3
      pioneer/packages/apps-electron/README.md
  7. 0 12
      pioneer/packages/apps-electron/appleEntitlements/entitlements.mac.plist
  8. BIN
      pioneer/packages/apps-electron/assets/icon.png
  9. 0 27
      pioneer/packages/apps-electron/package.json
  10. 0 12
      pioneer/packages/apps-electron/src/api/account-store-api.ts
  11. 0 9
      pioneer/packages/apps-electron/src/api/electron-main-api.ts
  12. 0 13
      pioneer/packages/apps-electron/src/api/global-exported-api.ts
  13. 0 19
      pioneer/packages/apps-electron/src/electron/autoUpdater.ts
  14. 0 23
      pioneer/packages/apps-electron/src/electron/contentSecurityPolicy.ts
  15. 0 27
      pioneer/packages/apps-electron/src/electron/index.ts
  16. 0 31
      pioneer/packages/apps-electron/src/electron/window.ts
  17. 0 56
      pioneer/packages/apps-electron/src/index.tsx
  18. 0 60
      pioneer/packages/apps-electron/src/main/account-store.spec.ts
  19. 0 47
      pioneer/packages/apps-electron/src/main/account-store.ts
  20. 0 7
      pioneer/packages/apps-electron/src/main/ipc-main-handler.ts
  21. 0 14
      pioneer/packages/apps-electron/src/main/register-ipc-handler.ts
  22. 0 15
      pioneer/packages/apps-electron/src/preload.ts
  23. 0 90
      pioneer/packages/apps-electron/src/renderer/remote-electron-store.spec.ts
  24. 0 41
      pioneer/packages/apps-electron/src/renderer/remote-electron-store.ts
  25. 0 55
      pioneer/packages/apps-electron/webpack.main.config.js
  26. 0 32
      pioneer/packages/apps-electron/webpack.renderer.config.js
  27. 0 17
      pioneer/packages/react-api/src/util/getEnvironment.ts
  28. 0 1
      pioneer/packages/react-components/src/i18n/index.ts

+ 0 - 1
pioneer/README.md

@@ -11,7 +11,6 @@ This can be accessed as a hosted application via [https://testnet.joystream.org]
 The repo is split into a number of packages, each representing an application. These are -
 
 - [apps](packages/apps/) This is the main entry point. It handles the selection sidebar and routing to the specific application being displayed.
-- [apps-electron](packages/apps-electron/) Desktop app running [apps](packages/apps/).
 - [page-accounts](packages/page-accounts/) A basic account management app.
 - [page-address-book](packages/page-address-book/) A basic address management app.
 - [page-explorer](packages/page-explorer/) A simple block explorer. It only shows the most recent blocks, updating as they become available.

+ 0 - 3
pioneer/package.json

@@ -57,9 +57,6 @@
     "concurrently": "^5.2.0",
     "devtron": "^1.4.0",
     "dnslink-cloudflare": "^2.0.4",
-    "electron": "^9.1.1",
-    "electron-builder": "^22.8.0",
-    "electron-builder-notarize": "^1.2.0",
     "eslint-plugin-header": "^3.0.0",
     "eslint-plugin-sort-destructure-keys": "^1.3.5",
     "i18next-scanner": "^2.11.0",

+ 0 - 3
pioneer/packages/apps-electron/.gitignore

@@ -1,3 +0,0 @@
-build
-node_modules
-release

+ 0 - 0
pioneer/packages/apps-electron/.skip-build


+ 0 - 0
pioneer/packages/apps-electron/.skip-npm


+ 0 - 3
pioneer/packages/apps-electron/README.md

@@ -1,3 +0,0 @@
-# @polkadot/apps-electron
-
-WARNING: This is not deemed stable yet for external use.

+ 0 - 12
pioneer/packages/apps-electron/appleEntitlements/entitlements.mac.plist

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-	<dict>
-		<key>com.apple.security.cs.allow-jit</key>
-		<true/>
-		<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
-		<true/>
-		<key>com.apple.security.cs.allow-dyld-environment-variables</key>
-		<true/>
-	</dict>
-</plist>

BIN
pioneer/packages/apps-electron/assets/icon.png


+ 0 - 27
pioneer/packages/apps-electron/package.json

@@ -1,27 +0,0 @@
-{
-  "name": "@polkadot/apps-electron",
-  "main": "index.js",
-  "private": true,
-  "version": "0.51.1",
-  "dependencies": {
-    "@babel/core": "^7.10.5",
-    "@babel/polyfill": "^7.10.4",
-    "@polkadot/dev": "^0.55.28",
-    "@polkadot/react-components": "0.51.1",
-    "electron-log": "^4.2.2",
-    "electron-updater": "^4.3.4"
-  },
-  "devDependencies": {
-    "@types/react": "^16.9.43",
-    "@types/react-dom": "^16.9.8",
-    "@types/tmp": "^0.2.0",
-    "babel-loader": "^8.1.0",
-    "copy-webpack-plugin": "^6.0.3",
-    "html-webpack-plugin": "^4.3.0",
-    "react": "^16.13.1",
-    "react-dom": "^16.13.1",
-    "thread-loader": "^2.1.3",
-    "tmp": "^0.2.1",
-    "webpack": "^4.44.0"
-  }
-}

+ 0 - 12
pioneer/packages/apps-electron/src/api/account-store-api.ts

@@ -1,12 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { KeyringJson } from '@polkadot/ui-keyring/types';
-
-export interface AccountStoreApi {
-  all: () => Promise<{ key: string, value: KeyringJson }[]>
-  get: (key: string) => Promise<KeyringJson>
-  remove: (key: string) => Promise<void>
-  set: (key: string, value: KeyringJson) => Promise<void>
-}

+ 0 - 9
pioneer/packages/apps-electron/src/api/electron-main-api.ts

@@ -1,9 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AccountStoreApi } from './account-store-api';
-
-export interface ElectronMainApi {
-  accountStore: AccountStoreApi
-}

+ 0 - 13
pioneer/packages/apps-electron/src/api/global-exported-api.ts

@@ -1,13 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { ElectronMainApi } from './electron-main-api';
-
-declare global {
-  interface Window {
-    ElectronMain: ElectronMainApi
-  }
-}
-
-export const electronMainApi = window.ElectronMain;

+ 0 - 19
pioneer/packages/apps-electron/src/electron/autoUpdater.ts

@@ -1,19 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { AppUpdater } from 'electron-updater';
-
-export async function setupAutoUpdater (): Promise<void> {
-  const { autoUpdater } = await import('electron-updater');
-
-  await setLogger(autoUpdater);
-  autoUpdater.checkForUpdatesAndNotify().catch(console.error);
-}
-
-async function setLogger (autoUpdater: AppUpdater): Promise<void> {
-  const log = await import('electron-log');
-
-  log.transports.file.level = 'debug';
-  autoUpdater.logger = log;
-}

+ 0 - 23
pioneer/packages/apps-electron/src/electron/contentSecurityPolicy.ts

@@ -1,23 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { HeadersReceivedResponse, session } from 'electron';
-
-export const setupContentSecurityPolicy = (environment: string): void => {
-  session.defaultSession.webRequest.onHeadersReceived((details, cb: (headersReceivedResponse: HeadersReceivedResponse) => void) => {
-    const headersReceivedResponse = {
-      responseHeaders: {
-        ...details.responseHeaders,
-        'Content-Security-Policy': [`default-src 'self' ${environment === 'development' ? "'unsafe-eval'" : ''};` +
-        " style-src-elem 'self' https://fonts.googleapis.com/css 'unsafe-inline';" +
-        " font-src data: 'self' https://fonts.gstatic.com;" +
-        " style-src 'unsafe-inline';" +
-        " connect-src 'self' wss:;" +
-        " img-src 'self' data:"]
-      }
-    };
-
-    cb(headersReceivedResponse);
-  });
-};

+ 0 - 27
pioneer/packages/apps-electron/src/electron/index.ts

@@ -1,27 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { app, shell } from 'electron';
-import { registerAccountStoreHandlers } from '../main/account-store';
-import { setupAutoUpdater } from './autoUpdater';
-import { setupContentSecurityPolicy } from './contentSecurityPolicy';
-import { createWindow } from './window';
-
-const ENV = process.env.NODE_ENV || 'production';
-
-const onReady = async () => {
-  registerAccountStoreHandlers();
-  setupContentSecurityPolicy(ENV);
-  await createWindow(ENV);
-  await setupAutoUpdater();
-};
-
-app.on('web-contents-created', (e, webContents) => {
-  webContents.on('new-window', (e, url) => {
-    e.preventDefault();
-    shell.openExternal(url).catch(console.error);
-  });
-});
-
-app.whenReady().then(onReady).catch(console.error);

+ 0 - 31
pioneer/packages/apps-electron/src/electron/window.ts

@@ -1,31 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { BrowserWindow, screen } from 'electron';
-import path from 'path';
-
-export function createWindow (environment: string): Promise<unknown> {
-  const { height, width } = screen.getPrimaryDisplay().workAreaSize;
-
-  const win = new BrowserWindow({
-    height,
-    webPreferences: {
-      contextIsolation: true,
-      enableRemoteModule: false,
-      nodeIntegration: false,
-      preload: path.join(__dirname, 'preload.js')
-    },
-    width
-  });
-
-  if (environment === 'development') {
-    win.webContents.openDevTools();
-
-    return win.loadURL('http://0.0.0.0:3000/');
-  }
-
-  const mainFilePath = path.resolve(__dirname, 'index.html');
-
-  return win.loadFile(mainFilePath);
-}

+ 0 - 56
pioneer/packages/apps-electron/src/index.tsx

@@ -1,56 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-// setup these right at front
-import '@polkadot/apps/initSettings';
-import 'semantic-ui-css/semantic.min.css';
-import '@polkadot/react-components/i18n';
-
-import React, { Suspense } from 'react';
-import ReactDOM from 'react-dom';
-import { HashRouter } from 'react-router-dom';
-import { ThemeProvider } from 'styled-components';
-import { Api } from '@polkadot/react-api';
-import Apps from '@polkadot/apps/Apps';
-import WindowDimensions from '@polkadot/apps/WindowDimensions';
-import Queue from '@polkadot/react-components/Status/Queue';
-import { BlockAuthors, Events } from '@polkadot/react-query';
-import settings from '@polkadot/ui-settings';
-
-import { electronMainApi } from './api/global-exported-api';
-import { RemoteElectronStore } from './renderer/remote-electron-store';
-
-const rootId = 'root';
-const rootElement = document.getElementById(rootId);
-const theme = { theme: settings.uiTheme };
-
-const store = new RemoteElectronStore(electronMainApi.accountStore);
-
-if (!rootElement) {
-  throw new Error(`Unable to find element with id '${rootId}'`);
-}
-
-ReactDOM.render(
-  <Suspense fallback='...'>
-    <ThemeProvider theme={theme}>
-      <Queue>
-        <Api
-          store={store}
-          url={settings.apiUrl}
-        >
-          <BlockAuthors>
-            <Events>
-              <HashRouter>
-                <WindowDimensions>
-                  <Apps />
-                </WindowDimensions>
-              </HashRouter>
-            </Events>
-          </BlockAuthors>
-        </Api>
-      </Queue>
-    </ThemeProvider>
-  </Suspense>,
-  rootElement
-);

+ 0 - 60
pioneer/packages/apps-electron/src/main/account-store.spec.ts

@@ -1,60 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { FileStore } from '@polkadot/ui-keyring/stores';
-import { accountStoreIpcHandler } from './account-store';
-import { KeyringJson } from '@polkadot/ui-keyring/types';
-import { IpcMainHandler } from './ipc-main-handler';
-import * as tmp from 'tmp';
-
-const exampleAccount = (address: string): KeyringJson => ({
-  address,
-  meta: {}
-});
-
-describe('Account store', () => {
-  let accountStore: IpcMainHandler;
-  let tmpDir: tmp.DirResult;
-
-  beforeEach(() => {
-    tmpDir = tmp.dirSync({ unsafeCleanup: true });
-    accountStore = accountStoreIpcHandler(new FileStore(tmpDir.name));
-  });
-
-  afterEach(() => {
-    tmpDir.removeCallback();
-  });
-
-  it('all returns empty array at first', () => {
-    expect(accountStore['account-store-all']()).toEqual([]);
-  });
-
-  it('after adding accounts, they become visible', async () => {
-    await accountStore['account-store-set']('1', exampleAccount('a'));
-    await accountStore['account-store-set']('2', exampleAccount('b'));
-
-    expect(accountStore['account-store-all']()).toEqual([{
-      key: '1', value: exampleAccount('a')
-    }, {
-      key: '2', value: exampleAccount('b')
-    }]);
-  });
-
-  it('get returns account if exists', async () => {
-    await accountStore['account-store-set']('1', exampleAccount('a'));
-    expect(await accountStore['account-store-get']('1')).toEqual(exampleAccount('a'));
-  });
-
-  it('get returns null if account does not exist', async () => {
-    expect(await accountStore['account-store-get']('1')).toEqual(null);
-  });
-
-  it('account disappears from list after it is removed', async () => {
-    await accountStore['account-store-set']('1', exampleAccount('a'));
-    await accountStore['account-store-remove']('1');
-
-    expect(await accountStore['account-store-get']('1')).toEqual(null);
-    expect(accountStore['account-store-all']()).toEqual([]);
-  });
-});

+ 0 - 47
pioneer/packages/apps-electron/src/main/account-store.ts

@@ -1,47 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { app } from 'electron';
-import { FileStore } from '@polkadot/ui-keyring/stores';
-import { KeyringJson } from '@polkadot/ui-keyring/types';
-import path from 'path';
-
-import { IpcMainHandler } from './ipc-main-handler';
-import { registerIpcHandler } from './register-ipc-handler';
-
-const ACCOUNTS_SUBFOLDER = 'polkadot-accounts';
-
-export const accountStoreIpcHandler = (fileStore: FileStore): IpcMainHandler => ({
-  'account-store-all': () => {
-    let result: { key: string, value: KeyringJson }[] = [];
-
-    const collect = (key: string, value: KeyringJson) => {
-      result = [...result, { key, value }];
-    };
-
-    fileStore.all(collect);
-
-    return result;
-  },
-  'account-store-get': async (key: string) => new Promise((resolve) => {
-    try {
-      fileStore.get(key, resolve);
-    } catch (err) {
-      resolve(null);
-    }
-  }),
-  'account-store-remove': async (key: string) => new Promise((resolve) =>
-    fileStore.remove(key, resolve)
-  ),
-  'account-store-set': async (key: string, value: KeyringJson) => new Promise((resolve) =>
-    fileStore.set(key, value, resolve)
-  )
-});
-
-export const registerAccountStoreHandlers = (): void => {
-  const defaultStorePath = path.join(app.getPath('userData'), ACCOUNTS_SUBFOLDER);
-  const fileStore = new FileStore(defaultStorePath);
-
-  registerIpcHandler(accountStoreIpcHandler(fileStore));
-};

+ 0 - 7
pioneer/packages/apps-electron/src/main/ipc-main-handler.ts

@@ -1,7 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-export type IpcMainHandler = {
-  [channel: string]: (...args: any[]) => Promise<void> | any
-}

+ 0 - 14
pioneer/packages/apps-electron/src/main/register-ipc-handler.ts

@@ -1,14 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { ipcMain } from 'electron';
-import { IpcMainHandler } from './ipc-main-handler';
-
-export const registerIpcHandler = (ipcHandler: IpcMainHandler): void => {
-  for (const [channel, listener] of Object.entries(ipcHandler)) {
-    ipcMain.handle(channel, (_, ...args): void => {
-      listener(...args);
-    });
-  }
-};

+ 0 - 15
pioneer/packages/apps-electron/src/preload.ts

@@ -1,15 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { KeyringJson } from '@polkadot/ui-keyring/types';
-import { contextBridge, ipcRenderer } from 'electron';
-
-contextBridge.exposeInMainWorld('ElectronMain', {
-  accountStore: {
-    all: () => ipcRenderer.invoke('account-store-all'),
-    get: (key: string) => ipcRenderer.invoke('account-store-get', key),
-    remove: (key: string) => ipcRenderer.invoke('account-store-remove', key),
-    set: (key: string, value: KeyringJson) => ipcRenderer.invoke('account-store-set', key, value)
-  }
-});

+ 0 - 90
pioneer/packages/apps-electron/src/renderer/remote-electron-store.spec.ts

@@ -1,90 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { RemoteElectronStore } from './remote-electron-store';
-
-describe('Remote Electron Store', () => {
-  const accountStore = {
-    all: jest.fn(),
-    get: jest.fn(),
-    remove: jest.fn(),
-    set: jest.fn()
-  };
-  const remoteStore = new RemoteElectronStore(accountStore);
-
-  beforeEach(() => {
-    accountStore.all.mockClear();
-    accountStore.get.mockClear();
-    accountStore.remove.mockClear();
-    accountStore.set.mockClear();
-  });
-
-  describe('all', () => {
-    it('calls callback for each returned account', async () => {
-      accountStore.all.mockResolvedValue([{
-        key: 1,
-        value: 'a'
-      }, {
-        key: 2,
-        value: 'b'
-      }]);
-      const cb = jest.fn();
-
-      remoteStore.all(cb);
-      await Promise.resolve();
-
-      expect(cb).nthCalledWith(1, 1, 'a');
-      expect(cb).nthCalledWith(2, 2, 'b');
-    });
-  });
-
-  describe('get', () => {
-    it('calls callback with returned account', async () => {
-      accountStore.get.mockResolvedValue('a');
-      const cb = jest.fn();
-
-      remoteStore.get('1', cb);
-      await Promise.resolve();
-
-      expect(accountStore.get).toBeCalledWith('1');
-      expect(cb).toBeCalledWith('a');
-    });
-
-    it('calls callback with null if no accounts found', async () => {
-      accountStore.get.mockResolvedValue(null);
-      const cb = jest.fn();
-
-      remoteStore.get('1', cb);
-      await Promise.resolve();
-
-      expect(cb).toBeCalledWith(null);
-    });
-  });
-
-  describe('remove', () => {
-    it('calls callback after success', async () => {
-      accountStore.remove.mockResolvedValue(null);
-      const cb = jest.fn();
-
-      remoteStore.remove('1', cb);
-      await Promise.resolve();
-
-      expect(accountStore.remove).toBeCalledWith('1');
-      expect(cb).toBeCalledTimes(1);
-    });
-  });
-
-  describe('set', () => {
-    it('calls callback after success', async () => {
-      accountStore.set.mockResolvedValue(null);
-      const cb = jest.fn();
-
-      remoteStore.set('1', 'a' as any, cb);
-      await Promise.resolve();
-
-      expect(accountStore.set).toBeCalledWith('1', 'a');
-      expect(cb).toBeCalledTimes(1);
-    });
-  });
-});

+ 0 - 41
pioneer/packages/apps-electron/src/renderer/remote-electron-store.ts

@@ -1,41 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-import { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types';
-import { AccountStoreApi } from '../api/account-store-api';
-
-export class RemoteElectronStore implements KeyringStore {
-  readonly #accountStore: AccountStoreApi;
-
-  constructor (accountStore: AccountStoreApi) {
-    this.#accountStore = accountStore;
-  }
-
-  all (cb: (key: string, value: KeyringJson) => void): void {
-    this.#accountStore.all()
-      .then((result: { key: string, value: KeyringJson }[]) => result?.forEach(({ key, value }) => cb(key, value)))
-      .catch((e: Error) => {
-        throw new Error(`error getting all accounts: ${e.message}`);
-      });
-  }
-
-  get (key: string, cb: (value: KeyringJson) => void): void {
-    this.#accountStore.get(key)
-      .then(cb).catch((e: Error) => {
-        throw new Error(`error storing account: ${e.message}`);
-      });
-  }
-
-  remove (key: string, cb: (() => void) | undefined): void {
-    this.#accountStore.remove(key).then(cb).catch((e: Error) => {
-      throw new Error(`error removing account: ${e.message}`);
-    });
-  }
-
-  set (key: string, value: KeyringJson, cb: (() => void) | undefined): void {
-    this.#accountStore.set(key, value).then(cb).catch((e: Error) => {
-      throw new Error(`error saving account: ${e.message}`);
-    });
-  }
-}

+ 0 - 55
pioneer/packages/apps-electron/webpack.main.config.js

@@ -1,55 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-/* eslint-disable camelcase */
-
-const TerserPlugin = require('terser-webpack-plugin');
-const path = require('path');
-
-const ENV = process.env.NODE_ENV || 'production';
-const isProd = ENV === 'production';
-
-function createWebpack () {
-  return [
-    {
-      entry: {
-        electron: './src/electron',
-        preload: './src/preload.ts'
-      },
-      mode: ENV,
-      module: {
-        rules: [
-          {
-            exclude: /(node_modules)/,
-            test: /\.(js|ts|tsx)$/,
-            use: [
-              require.resolve('thread-loader'),
-              {
-                loader: require.resolve('babel-loader'),
-                options: require('@polkadot/dev/config/babel')
-              }
-            ]
-          }
-        ]
-      },
-      node: {
-        __dirname: false
-      },
-      optimization: {
-        minimize: !!isProd,
-        minimizer: [new TerserPlugin()]
-      },
-      output: {
-        filename: '[name].js',
-        path: path.join(__dirname, '/build')
-      },
-      resolve: {
-        extensions: ['.js', '.jsx', '.json', '.ts', '.tsx']
-      },
-      target: 'electron-main'
-    }
-  ];
-}
-
-module.exports = createWebpack();

+ 0 - 32
pioneer/packages/apps-electron/webpack.renderer.config.js

@@ -1,32 +0,0 @@
-// Copyright 2017-2020 @polkadot/apps authors & contributors
-// This software may be modified and distributed under the terms
-// of the Apache-2.0 license. See the LICENSE file for details.
-
-/* eslint-disable camelcase */
-
-const path = require('path');
-const merge = require('webpack-merge');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const baseConfig = require('@polkadot/apps/webpack.base.config');
-
-const ENV = process.env.NODE_ENV || 'production';
-const isProd = ENV === 'production';
-const context = __dirname;
-
-module.exports = merge(
-  baseConfig(ENV, context),
-  {
-    devtool: isProd ? 'none' : 'source-map',
-    plugins: [
-      // It must be placed before HtmlWebpackPlugin
-      new CopyWebpackPlugin({ patterns: [{ from: '../apps/public' }] }),
-      new HtmlWebpackPlugin({
-        PAGE_TITLE: 'Polkadot/Substrate Portal',
-        inject: true,
-        template: path.join(context, '../apps/public/index.html')
-      })
-    ],
-    target: 'web'
-  }
-);

+ 0 - 17
pioneer/packages/react-api/src/util/getEnvironment.ts

@@ -4,23 +4,6 @@
 
 import { Environment } from '../types';
 
-// https://github.com/electron/electron/issues/2288
-function isElectron () {
-  if (process?.versions?.electron) {
-    return true;
-  }
-
-  if (window?.process?.type === 'renderer') {
-    return true;
-  }
-
-  return navigator?.userAgent?.indexOf('Electron') >= 0;
-}
-
 export default function getEnvironment (): Environment {
-  if (isElectron()) {
-    return 'app';
-  }
-
   return 'web';
 }

+ 0 - 1
pioneer/packages/react-components/src/i18n/index.ts

@@ -41,7 +41,6 @@ i18next
     ns: [
       'apps',
       'apps-config',
-      'apps-electron',
       'apps-routing',
       'app-accounts',
       'app-claims',