-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature/refactoring (#1574) * Update caniuse-lite * Discard duplicate CSS rules (mostly element-ui) * Add lazy loading for AppHeader heavy low priority components * Fix styles warnings during build * Fix bridge connected wallet icon * Remove not used languages * Update lang list * Update Translation.spec.ts * Feature/point system v2 (#1562) * updated_with_consts_and_calculations * updated_with_some_part_of_points * updated_with_xor_fiat_balance * added_calculate_for_all_categories * updated_with_bridge_volume_from_indexer * moves_to_service * updated_with_types * updated_with_new_data_in_consts * point_card_created * updated_component * updated * updated_with_first_trx * added_scrollbar_added_currently_to_cards * updated_loader_styles_other_css_title * updated_tabs * fixed_font * updated_with_card_task_progress * updated_for_mobile_devices * updated_colors_paddings * updated_with_dialog * styles_updated * updated_with_images_refactoring * small_refactor * updated_with_using_vxor_and_some_fixes * lang_fixed * updated_with_sora_card_banner * fixed_some_sonar_problems * getting_data_from_current_if_no_account_meta * moved_requests * removed_unnecessary_computed_properties * fixed_pr_comments * fixed_comments_added_feature_flag * updated_env_json * fixed_comments_updated_some_part_of_lang * languages_updated --------- Co-authored-by: NaghmeMohammadifar <45916098+Naghme98@users.noreply.github.com> Co-authored-by: Nikita Polyakov <53777036+Nikita-Polyakov@users.noreply.github.com> * feature/auto-switching-theme (#1573) * updated_with_theme_checking_and_switching * console_logs_added * updated_with_logs_moved_function * updated_for_telegram * changed_logic_for_tg_detected * updated_for_tg_version * removed_timeout_updated_theme_tg * fixing-problem_with_initial_light_theme * reverted_last_commit_back * updated * added_logs_to_listener * simplified_theme_detect * removed_tg_check * logic_updated * used_another_approach * reversed_previous_version * deleted_async_added_more_logs * added_additional_check * updated_new_version_check_event_tg * updated_with_received_event * logic_changed * updated_with_setting_by_bckcolor * updated_with_switching_theme_on_phone * fixed_apply_theme_condition_if_tg * updated_with_checking_is_tma * deleted_useless_info * removed_logs * update_with_switcher * logic_update_theme_changed * updated_changed_day_night_mode_from_chat_settings * updated_with_method * console_info_removed * updated_wallet_version * last_version_wallet_updated * moved_from_app_functions_language_updated * removed_unused_code * logs_added * updated_boolean * logs_removed * removed_useless_import * [Tech] Vite migration (#1570) * create basic migration * fix icons * dayjs import fix * fix redirect & element font path * add husky * check lint-staged * remove devtools plugin * update dev deps * add vite-electron-plugin * upgrade eslint to v9 * update test commands * remove jest * add vitest * remove jest files * fix SelectIndexer import * change electron package * fix dialog import * fix tsconfig * update eslint config * update dev deps * try to skip index ci step * return noIndex step * Update Jenkinsfile * Update Jenkinsfile * Update Jenkinsfile * refactor redirect.ts * update vitest config * skip coverage --------- Co-authored-by: f33r0 <95526886+f33r0@users.noreply.github.com> * Remove dirty hack for dialog re-center * Fix chart axis number format (#1578) * chart & dayjs fixes * update packages * remove console.log * fix dayjs en locale (#1581) * commented_route (#1582) * Replace blockNumber by blockNumber from wallet * Remove blockNumber types * Remove not used types import * Translate vested transfer keys * yarn lang:generate * fixed_route_with_wrapper (#1585) * Change vite vue plugin & fix App load (#1583) * use @vitejs/plugin-vue2 * refactoring App.vue * Update wallet * Update en.json * fixed_theme_switch (#1587) * added_logs * updated_with_theme_change_listener * logs_removed --------- Co-authored-by: Stefan Popov <popov@soramitsu.co.jp> Co-authored-by: Kron1749 <70746258+Kron1749@users.noreply.github.com> Co-authored-by: NaghmeMohammadifar <45916098+Naghme98@users.noreply.github.com> Co-authored-by: f33r0 <95526886+f33r0@users.noreply.github.com>
- Loading branch information
1 parent
6a50927
commit 03845e2
Showing
222 changed files
with
7,219 additions
and
21,890 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npx lint-staged |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { fileURLToPath, URL } from 'node:url'; | ||
|
||
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'; | ||
import { createVuePlugin as vue } from 'vite-plugin-vue2'; | ||
|
||
export default defineConfig({ | ||
main: { | ||
plugins: [externalizeDepsPlugin()], | ||
build: { | ||
lib: { | ||
entry: 'src/main.ts', | ||
}, | ||
}, | ||
}, | ||
preload: { | ||
plugins: [externalizeDepsPlugin()], | ||
}, | ||
renderer: { | ||
resolve: { | ||
alias: { | ||
'@': fileURLToPath(new URL('./src', import.meta.url)), | ||
}, | ||
}, | ||
plugins: [vue()], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// import { app, protocol, BrowserWindow, shell } from 'electron'; | ||
// import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'; | ||
// import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'; | ||
|
||
// const isDevelopment = process.env.NODE_ENV !== 'production'; | ||
|
||
// // Scheme must be registered before the app is ready | ||
// protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { secure: true, standard: true } }]); | ||
|
||
// async function createWindow(): Promise<void> { | ||
// const ELECTRON_NODE_INTEGRATION = !!process.env.ELECTRON_NODE_INTEGRATION; | ||
// // Create the browser window. | ||
// const win = new BrowserWindow({ | ||
// width: 800, | ||
// height: 600, | ||
// minWidth: 470, | ||
// minHeight: 470, | ||
// webPreferences: { | ||
// // Use pluginOptions.nodeIntegration, leave this alone | ||
// // See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info | ||
// nodeIntegration: ELECTRON_NODE_INTEGRATION, | ||
// contextIsolation: !ELECTRON_NODE_INTEGRATION, | ||
// }, | ||
// }); | ||
|
||
// if (process.env.VITE_DEV_SERVER_URL) { | ||
// // Load the url of the dev server if in development mode | ||
// await win.loadURL(process.env.VITE_DEV_SERVER_URL); | ||
// if (!process.env.IS_TEST) win.webContents.openDevTools(); | ||
// } else { | ||
// createProtocol('app'); | ||
// // Load the index.html when not in development | ||
// win.loadURL('app://./index.html'); | ||
// } | ||
|
||
// // It's required for external links | ||
// win.webContents.setWindowOpenHandler(({ url }) => { | ||
// // Prevent default behavior | ||
// shell.openExternal(url); | ||
// return { action: 'deny' }; | ||
// }); | ||
// } | ||
|
||
// // Quit when all windows are closed. | ||
// app.on('window-all-closed', () => { | ||
// // On macOS it is common for applications and their menu bar | ||
// // to stay active until the user quits explicitly with Cmd + Q | ||
// if (process.platform !== 'darwin') { | ||
// app.quit(); | ||
// } | ||
// }); | ||
|
||
// app.on('activate', () => { | ||
// // On macOS it's common to re-create a window in the app when the | ||
// // dock icon is clicked and there are no other windows open. | ||
// if (BrowserWindow.getAllWindows().length === 0) createWindow(); | ||
// }); | ||
|
||
// // This method will be called when Electron has finished | ||
// // initialization and is ready to create browser windows. | ||
// // Some APIs can only be used after this event occurs. | ||
// app.on('ready', async () => { | ||
// if (isDevelopment && !process.env.IS_TEST) { | ||
// // Install Vue Devtools | ||
// try { | ||
// await installExtension(VUEJS_DEVTOOLS); | ||
// } catch (e) { | ||
// console.error('Vue Devtools failed to install:', (e as Error).toString()); | ||
// } | ||
// } | ||
// createWindow(); | ||
// }); | ||
|
||
// // Exit cleanly on request from parent process in development mode. | ||
// if (isDevelopment) { | ||
// if (process.platform === 'win32') { | ||
// process.on('message', (data) => { | ||
// if (data === 'graceful-exit') { | ||
// app.quit(); | ||
// } | ||
// }); | ||
// } else { | ||
// process.on('SIGTERM', () => { | ||
// app.quit(); | ||
// }); | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { join } from 'path'; | ||
|
||
import { electronApp, optimizer, is } from '@electron-toolkit/utils'; | ||
import { app, shell, BrowserWindow, ipcMain } from 'electron'; | ||
|
||
function createWindow(): void { | ||
// Create the browser window. | ||
const mainWindow = new BrowserWindow({ | ||
width: 900, | ||
height: 670, | ||
show: false, | ||
autoHideMenuBar: true, | ||
webPreferences: { | ||
preload: join(__dirname, '../preload/index.js'), | ||
sandbox: false, | ||
}, | ||
}); | ||
|
||
mainWindow.on('ready-to-show', () => { | ||
mainWindow.show(); | ||
}); | ||
|
||
mainWindow.webContents.setWindowOpenHandler((details) => { | ||
shell.openExternal(details.url); | ||
return { action: 'deny' }; | ||
}); | ||
|
||
// HMR for renderer base on electron-vite cli. | ||
// Load the remote URL for development or the local html file for production. | ||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) { | ||
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']); | ||
} else { | ||
mainWindow.loadFile(join(__dirname, '../../index.html')); | ||
} | ||
} | ||
|
||
// This method will be called when Electron has finished | ||
// initialization and is ready to create browser windows. | ||
// Some APIs can only be used after this event occurs. | ||
app.whenReady().then(() => { | ||
// Set app user model id for windows | ||
electronApp.setAppUserModelId('com.electron'); | ||
|
||
// Default open or close DevTools by F12 in development | ||
// and ignore CommandOrControl + R in production. | ||
// see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils | ||
app.on('browser-window-created', (_, window) => { | ||
optimizer.watchWindowShortcuts(window); | ||
}); | ||
|
||
// IPC test | ||
ipcMain.on('ping', () => console.log('pong')); | ||
|
||
createWindow(); | ||
|
||
app.on('activate', function () { | ||
// On macOS it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (BrowserWindow.getAllWindows().length === 0) createWindow(); | ||
}); | ||
}); | ||
|
||
// Quit when all windows are closed, except on macOS. There, it's common | ||
// for applications and their menu bar to stay active until the user quits | ||
// explicitly with Cmd + Q. | ||
app.on('window-all-closed', () => { | ||
if (process.platform !== 'darwin') { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
// In this file you can include the rest of your app's specific main process | ||
// code. You can also put them in separate files and require them here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ElectronAPI } from '@electron-toolkit/preload'; | ||
|
||
declare global { | ||
interface Window { | ||
electron: ElectronAPI; | ||
api: unknown; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { electronAPI } from '@electron-toolkit/preload'; | ||
import { contextBridge } from 'electron'; | ||
|
||
// Custom APIs for renderer | ||
const api = {}; | ||
|
||
// Use `contextBridge` APIs to expose Electron APIs to | ||
// renderer only if context isolation is enabled, otherwise | ||
// just add to the DOM global. | ||
if (process.contextIsolated) { | ||
try { | ||
contextBridge.exposeInMainWorld('electron', electronAPI); | ||
contextBridge.exposeInMainWorld('api', api); | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
} else { | ||
// @ts-expect-error (define in dts) | ||
window.electron = electronAPI; | ||
// @ts-expect-error (define in dts) | ||
window.api = api; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.