From bede5d1178ccef5e63df17eb59f831ccda2ade07 Mon Sep 17 00:00:00 2001 From: zmzimpl Date: Sun, 10 Dec 2023 18:16:59 +0800 Subject: [PATCH] lint and ci --- .electron-builder.config.js | 2 +- .github/workflows/release.yml | 10 +- .github/workflows/tests.yml | 64 +++++----- .vscode/c_cpp_properties.json | 34 +++--- .../Extensions/external_extensions.json | 3 +- .../119.0.6045.105/MEIPreload/manifest.json | 10 +- .../119.0.6045.105/vk_swiftshader_icd.json | 5 +- logs/Api/2023-12-09.log | 0 logs/Main/2023-12-09.log | 6 - logs/Proxy/2023-12-09.log | 0 logs/Service/2023-12-09.log | 114 ------------------ logs/Window/2023-12-09.log | 1 - package.json | 2 +- packages/main/src/constants/index.ts | 2 - packages/main/src/fingerprint/index.ts | 6 +- packages/main/src/proxy-server/socksServer.ts | 1 - packages/main/src/services/groupService.ts | 2 +- packages/main/src/services/tagService.ts | 2 +- packages/main/src/sync/tile.ts | 23 ++-- packages/main/tests/unit.spec.ts | 2 +- packages/preload/src/bridges/window.ts | 4 +- packages/renderer/src/constants/status.ts | 8 +- packages/renderer/src/i18n.ts | 12 +- packages/renderer/src/store.ts | 1 - packages/renderer/tsconfig.json | 7 +- packages/shared/types/db.d.ts | 1 - packages/shared/types/ip.d.ts | 10 +- 27 files changed, 100 insertions(+), 232 deletions(-) delete mode 100644 logs/Api/2023-12-09.log delete mode 100644 logs/Main/2023-12-09.log delete mode 100644 logs/Proxy/2023-12-09.log delete mode 100644 logs/Service/2023-12-09.log delete mode 100644 logs/Window/2023-12-09.log diff --git a/.electron-builder.config.js b/.electron-builder.config.js index 1511c99..9e3cb26 100644 --- a/.electron-builder.config.js +++ b/.electron-builder.config.js @@ -30,7 +30,7 @@ module.exports = async function () { { from: 'migrations', to: 'app/migrations', - } + }, ], extraMetadata: { version: getVersion(), diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08943ef..d615bbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,11 +13,6 @@ concurrency: group: release-${{ github.ref }} cancel-in-progress: true -env: - VITE_APP_API: 'https://api.chromepower.xyz/api' - VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} - VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} # This should be set in the repository's secrets settings - defaults: run: shell: 'bash' @@ -46,6 +41,11 @@ jobs: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 - run: npm run build + env: + VITE_APP_API: 'https://api.chromepower.xyz/api' + VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }} + VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }} # This should be set in the repository's secrets settings + - name: Compile artifacts ${{ inputs.dry-run && '' || 'and upload them to github release' }} uses: nick-fields/retry@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1279c35..cbb70eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,37 +1,37 @@ -# name: Tests -# on: [ workflow_call ] +name: Tests +on: [ workflow_call ] -# concurrency: -# group: tests-${{ github.ref }} -# cancel-in-progress: true +concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true -# defaults: -# run: -# shell: 'bash' +defaults: + run: + shell: 'bash' -# jobs: -# tests: -# strategy: -# fail-fast: false -# matrix: -# os: [ windows-latest, ubuntu-latest, macos-latest ] -# runs-on: ${{ matrix.os }} -# steps: -# - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 -# - uses: actions/setup-node@v3 -# with: -# cache: 'npm' -# - run: npm ci -# env: -# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 -# - run: npm run test:main --if-present -# - run: npm run test:preload --if-present -# - run: npm run test:renderer --if-present +jobs: + tests: + strategy: + fail-fast: false + matrix: + os: [ windows-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + - uses: actions/setup-node@v3 + with: + cache: 'npm' + - run: npm ci + env: + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 + - run: npm run test:main --if-present + - run: npm run test:preload --if-present + - run: npm run test:renderer --if-present -# # I ran into problems trying to run an electron window in ubuntu due to a missing graphics server. -# # That's why this special command for Ubuntu is here -# - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e --if-present -# if: matrix.os == 'ubuntu-latest' + # I ran into problems trying to run an electron window in ubuntu due to a missing graphics server. + # That's why this special command for Ubuntu is here + # - run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e --if-present + # if: matrix.os == 'ubuntu-latest' -# - run: npm run test:e2e --if-present -# if: matrix.os != 'ubuntu-latest' + # - run: npm run test:e2e --if-present + # if: matrix.os != 'ubuntu-latest' diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index c06bbfd..b683b6d 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,21 +1,15 @@ { - "configurations": [ - { - "name": "Win32", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [ - "_DEBUG", - "UNICODE", - "_UNICODE" - ], - "windowsSdkVersion": "10.0.22621.0", - "compilerPath": "cl.exe", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "windows-msvc-x64" - } - ], - "version": 4 -} \ No newline at end of file + "configurations": [ + { + "name": "Win32", + "includePath": ["${workspaceFolder}/**"], + "defines": ["_DEBUG", "UNICODE", "_UNICODE"], + "windowsSdkVersion": "10.0.22621.0", + "compilerPath": "cl.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-msvc-x64" + } + ], + "version": 4 +} diff --git a/Chrome-bin/119.0.6045.105/Extensions/external_extensions.json b/Chrome-bin/119.0.6045.105/Extensions/external_extensions.json index 1ef50f3..4694a58 100644 --- a/Chrome-bin/119.0.6045.105/Extensions/external_extensions.json +++ b/Chrome-bin/119.0.6045.105/Extensions/external_extensions.json @@ -1,5 +1,4 @@ // This json file will contain a list of extensions that will be included // in the installer. -{ -} \ No newline at end of file +{} diff --git a/Chrome-bin/119.0.6045.105/MEIPreload/manifest.json b/Chrome-bin/119.0.6045.105/MEIPreload/manifest.json index 1b4fa8a..c298dc8 100644 --- a/Chrome-bin/119.0.6045.105/MEIPreload/manifest.json +++ b/Chrome-bin/119.0.6045.105/MEIPreload/manifest.json @@ -1,8 +1,8 @@ { - "name": "MEI Preload", - "icons": {}, - "version": "1.0.7.1652906823", - "manifest_version": 2, - "update_url": "https://clients2.google.com/service/update2/crx", + "name": "MEI Preload", + "icons": {}, + "version": "1.0.7.1652906823", + "manifest_version": 2, + "update_url": "https://clients2.google.com/service/update2/crx", "description": "Contains preloaded data for Media Engagement" } diff --git a/Chrome-bin/119.0.6045.105/vk_swiftshader_icd.json b/Chrome-bin/119.0.6045.105/vk_swiftshader_icd.json index 525fbc5..808dbc7 100644 --- a/Chrome-bin/119.0.6045.105/vk_swiftshader_icd.json +++ b/Chrome-bin/119.0.6045.105/vk_swiftshader_icd.json @@ -1 +1,4 @@ -{"file_format_version": "1.0.0", "ICD": {"library_path": ".\\vk_swiftshader.dll", "api_version": "1.0.5"}} \ No newline at end of file +{ + "file_format_version": "1.0.0", + "ICD": {"library_path": ".\\vk_swiftshader.dll", "api_version": "1.0.5"} +} diff --git a/logs/Api/2023-12-09.log b/logs/Api/2023-12-09.log deleted file mode 100644 index e69de29..0000000 diff --git a/logs/Main/2023-12-09.log b/logs/Main/2023-12-09.log deleted file mode 100644 index 2a50db5..0000000 --- a/logs/Main/2023-12-09.log +++ /dev/null @@ -1,6 +0,0 @@ -Main | 2023-12-09 16:35:27 - info: env, is prod:, false -Main | 2023-12-09 16:37:46 - info: env, is prod:, false -Main | 2023-12-09 16:48:49 - info: env, is prod:, false -Main | 2023-12-09 16:51:26 - info: env, is prod:, false -Main | 2023-12-09 16:52:42 - info: env, is prod:, false -Main | 2023-12-09 16:55:12 - info: env, is prod:, false diff --git a/logs/Proxy/2023-12-09.log b/logs/Proxy/2023-12-09.log deleted file mode 100644 index e69de29..0000000 diff --git a/logs/Service/2023-12-09.log b/logs/Service/2023-12-09.log deleted file mode 100644 index 7535c6e..0000000 --- a/logs/Service/2023-12-09.log +++ /dev/null @@ -1,114 +0,0 @@ -Service | 2023-12-09 16:35:27 - info: init common service... -Service | 2023-12-09 16:35:27 - info: init window service... -Service | 2023-12-09 16:35:27 - info: init group service... -Service | 2023-12-09 16:35:27 - info: init proxy bridge... -Service | 2023-12-09 16:35:27 - info: init tag service... -Service | 2023-12-09 16:35:27 - info: init sync service... -Service | 2023-12-09 16:37:46 - info: init common service... -Service | 2023-12-09 16:37:46 - info: init window service... -Service | 2023-12-09 16:37:46 - info: init group service... -Service | 2023-12-09 16:37:46 - info: init proxy bridge... -Service | 2023-12-09 16:37:46 - info: init tag service... -Service | 2023-12-09 16:37:46 - info: init sync service... -Service | 2023-12-09 16:48:49 - info: init common service... -Service | 2023-12-09 16:48:49 - info: init window service... -Service | 2023-12-09 16:48:49 - info: init group service... -Service | 2023-12-09 16:48:49 - info: init proxy bridge... -Service | 2023-12-09 16:48:49 - info: init tag service... -Service | 2023-12-09 16:48:49 - info: init sync service... -Service | 2023-12-09 16:51:26 - info: init common service... -Service | 2023-12-09 16:51:26 - info: init window service... -Service | 2023-12-09 16:51:26 - info: init group service... -Service | 2023-12-09 16:51:26 - info: init proxy bridge... -Service | 2023-12-09 16:51:26 - info: init tag service... -Service | 2023-12-09 16:51:26 - info: init sync service... -Service | 2023-12-09 16:52:42 - info: init common service... -Service | 2023-12-09 16:52:42 - info: init window service... -Service | 2023-12-09 16:52:42 - info: init group service... -Service | 2023-12-09 16:52:42 - info: init proxy bridge... -Service | 2023-12-09 16:52:42 - info: init tag service... -Service | 2023-12-09 16:52:42 - info: init sync service... -Service | 2023-12-09 16:55:12 - info: init common service... -Service | 2023-12-09 16:55:12 - info: init window service... -Service | 2023-12-09 16:55:12 - info: init group service... -Service | 2023-12-09 16:55:12 - info: init proxy bridge... -Service | 2023-12-09 16:55:12 - info: init tag service... -Service | 2023-12-09 16:55:12 - info: init sync service... -Service | 2023-12-09 16:55:34 - info: init common service... -Service | 2023-12-09 16:55:34 - info: init window service... -Service | 2023-12-09 16:55:34 - info: init group service... -Service | 2023-12-09 16:55:34 - info: init proxy bridge... -Service | 2023-12-09 16:55:34 - info: init tag service... -Service | 2023-12-09 16:55:34 - info: init sync service... -Service | 2023-12-09 16:56:21 - info: init common service... -Service | 2023-12-09 16:56:21 - info: init window service... -Service | 2023-12-09 16:56:21 - info: init group service... -Service | 2023-12-09 16:56:21 - info: init proxy bridge... -Service | 2023-12-09 16:56:21 - info: init tag service... -Service | 2023-12-09 16:56:21 - info: init sync service... -Service | 2023-12-09 17:55:14 - info: init common service... -Service | 2023-12-09 17:55:14 - info: init window service... -Service | 2023-12-09 17:55:14 - info: init group service... -Service | 2023-12-09 17:55:14 - info: init proxy bridge... -Service | 2023-12-09 17:55:14 - info: init tag service... -Service | 2023-12-09 17:55:14 - info: init sync service... -Service | 2023-12-09 18:03:54 - info: init common service... -Service | 2023-12-09 18:03:54 - info: init window service... -Service | 2023-12-09 18:03:54 - info: init group service... -Service | 2023-12-09 18:03:54 - info: init proxy bridge... -Service | 2023-12-09 18:03:54 - info: init tag service... -Service | 2023-12-09 18:03:54 - info: init sync service... -Service | 2023-12-09 18:04:10 - info: init common service... -Service | 2023-12-09 18:04:10 - info: init window service... -Service | 2023-12-09 18:04:10 - info: init group service... -Service | 2023-12-09 18:04:10 - info: init proxy bridge... -Service | 2023-12-09 18:04:10 - info: init tag service... -Service | 2023-12-09 18:04:10 - info: init sync service... -Service | 2023-12-09 18:04:17 - info: init common service... -Service | 2023-12-09 18:04:17 - info: init window service... -Service | 2023-12-09 18:04:17 - info: init group service... -Service | 2023-12-09 18:04:17 - info: init proxy bridge... -Service | 2023-12-09 18:04:17 - info: init tag service... -Service | 2023-12-09 18:04:17 - info: init sync service... -Service | 2023-12-09 18:24:52 - info: init common service... -Service | 2023-12-09 18:24:52 - info: init window service... -Service | 2023-12-09 18:24:52 - info: init group service... -Service | 2023-12-09 18:24:52 - info: init proxy bridge... -Service | 2023-12-09 18:24:52 - info: init tag service... -Service | 2023-12-09 18:24:52 - info: init sync service... -Service | 2023-12-09 18:45:35 - info: init common service... -Service | 2023-12-09 18:45:35 - info: init window service... -Service | 2023-12-09 18:45:35 - info: init group service... -Service | 2023-12-09 18:45:35 - info: init proxy bridge... -Service | 2023-12-09 18:45:35 - info: init tag service... -Service | 2023-12-09 18:45:35 - info: init sync service... -Service | 2023-12-09 18:45:39 - info: init common service... -Service | 2023-12-09 18:45:39 - info: init window service... -Service | 2023-12-09 18:45:39 - info: init group service... -Service | 2023-12-09 18:45:39 - info: init proxy bridge... -Service | 2023-12-09 18:45:39 - info: init tag service... -Service | 2023-12-09 18:45:39 - info: init sync service... -Service | 2023-12-09 18:54:10 - info: init common service... -Service | 2023-12-09 18:54:10 - info: init window service... -Service | 2023-12-09 18:54:10 - info: init group service... -Service | 2023-12-09 18:54:10 - info: init proxy bridge... -Service | 2023-12-09 18:54:10 - info: init tag service... -Service | 2023-12-09 18:54:10 - info: init sync service... -Service | 2023-12-09 19:10:42 - info: init common service... -Service | 2023-12-09 19:10:42 - info: init window service... -Service | 2023-12-09 19:10:42 - info: init group service... -Service | 2023-12-09 19:10:42 - info: init proxy bridge... -Service | 2023-12-09 19:10:42 - info: init tag service... -Service | 2023-12-09 19:10:42 - info: init sync service... -Service | 2023-12-09 19:11:25 - info: init common service... -Service | 2023-12-09 19:11:25 - info: init window service... -Service | 2023-12-09 19:11:25 - info: init group service... -Service | 2023-12-09 19:11:25 - info: init proxy bridge... -Service | 2023-12-09 19:11:25 - info: init tag service... -Service | 2023-12-09 19:11:25 - info: init sync service... -Service | 2023-12-09 19:11:27 - info: init common service... -Service | 2023-12-09 19:11:27 - info: init window service... -Service | 2023-12-09 19:11:27 - info: init group service... -Service | 2023-12-09 19:11:27 - info: init proxy bridge... -Service | 2023-12-09 19:11:27 - info: init tag service... -Service | 2023-12-09 19:11:27 - info: init sync service... diff --git a/logs/Window/2023-12-09.log b/logs/Window/2023-12-09.log deleted file mode 100644 index b87bcd2..0000000 --- a/logs/Window/2023-12-09.log +++ /dev/null @@ -1 +0,0 @@ -Window | 2023-12-09 16:55:59 - info: fingerprint 182 "j4gapbh" {"ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.123 Safari/537.36","platform":"Win32","pathStr":"o","webgl":0.12400250746218877,"audio":93} diff --git a/package.json b/package.json index 0f37821..fa3c961 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:renderer": "cd ./packages/renderer && vite build", "compile": "cross-env MODE=production npm run build && electron-builder build --config .electron-builder.config.js --dir --config.asar=false", "publish": "cross-env MODE=production npm run build && node_modules\\.bin\\electron-builder --config .electron-builder.config.js --publish never", - "test": "npm run test:main && npm run test:preload && npm run test:renderer && npm run test:e2e", + "test": "cross-env MODE=production npm run test:main && npm run test:preload && npm run test:renderer && npm run test:e2e", "test:e2e": "npm run build && vitest run", "test:main": "vitest run -r packages/main --passWithNoTests", "test:preload": "vitest run -r packages/preload --passWithNoTests", diff --git a/packages/main/src/constants/index.ts b/packages/main/src/constants/index.ts index d369cb3..65e9b90 100644 --- a/packages/main/src/constants/index.ts +++ b/packages/main/src/constants/index.ts @@ -17,5 +17,3 @@ export const WINDOW_LOGGER_LABEL = 'Window'; export const PROXY_LOGGER_LABEL = 'Proxy'; export const API_LOGGER_LABEL = 'Api'; export const MAIN_LOGGER_LABEL = 'Main'; - - diff --git a/packages/main/src/fingerprint/index.ts b/packages/main/src/fingerprint/index.ts index 937a837..77fa039 100644 --- a/packages/main/src/fingerprint/index.ts +++ b/packages/main/src/fingerprint/index.ts @@ -114,11 +114,7 @@ export async function openFingerprintWindow(id: number) { if (import.meta.env.DEV) { chromePath = 'Chrome-bin\\chrome.exe'; } else { - chromePath = join( - process.resourcesPath, - 'Chrome-bin', - 'chrome.exe', - ); + chromePath = join(process.resourcesPath, 'Chrome-bin', 'chrome.exe'); } let ipInfo = {timeZone: '', ip: '', ll: [], country: ''}; diff --git a/packages/main/src/proxy-server/socksServer.ts b/packages/main/src/proxy-server/socksServer.ts index 4b431ee..0b230e2 100644 --- a/packages/main/src/proxy-server/socksServer.ts +++ b/packages/main/src/proxy-server/socksServer.ts @@ -10,7 +10,6 @@ import {PROXY_LOGGER_LABEL} from '../constants'; const logger = createLogger(PROXY_LOGGER_LABEL); - interface SocketOptions { listenHost: string; listenPort: number; diff --git a/packages/main/src/services/groupService.ts b/packages/main/src/services/groupService.ts index f63a490..4c02b12 100644 --- a/packages/main/src/services/groupService.ts +++ b/packages/main/src/services/groupService.ts @@ -2,7 +2,7 @@ import {ipcMain} from 'electron'; import type {DB} from '../../../shared/types/db'; import {GroupDB} from '../db/group'; import {createLogger} from '../../../shared/utils/logger'; -import { SERVICE_LOGGER_LABEL } from '../constants'; +import {SERVICE_LOGGER_LABEL} from '../constants'; const logger = createLogger(SERVICE_LOGGER_LABEL); diff --git a/packages/main/src/services/tagService.ts b/packages/main/src/services/tagService.ts index b84148b..2900ca2 100644 --- a/packages/main/src/services/tagService.ts +++ b/packages/main/src/services/tagService.ts @@ -2,7 +2,7 @@ import {ipcMain} from 'electron'; import type {DB} from '../../../shared/types/db'; import {TagDB} from '../db/tag'; import {createLogger} from '../../../shared/utils/logger'; -import { SERVICE_LOGGER_LABEL } from '../constants'; +import {SERVICE_LOGGER_LABEL} from '../constants'; const logger = createLogger(SERVICE_LOGGER_LABEL); diff --git a/packages/main/src/sync/tile.ts b/packages/main/src/sync/tile.ts index e2435d2..d125ee0 100644 --- a/packages/main/src/sync/tile.ts +++ b/packages/main/src/sync/tile.ts @@ -3,18 +3,19 @@ import type {SafeAny} from '../../../shared/types/db'; let windowAddon: unknown; import * as path from 'path'; if (process.env.MODE === 'development') { - windowAddon = require(path.join( - __dirname, - '../src/native-addon/build/Release/window-addon.node', - )); + windowAddon = require( + path.join(__dirname, '../src/native-addon/build/Release/window-addon.node'), + ); } else { - windowAddon = require(path.join( - process.resourcesPath, - 'app.asar.unpacked', - 'node_modules', - 'window-addon', - 'window-addon.node', - )); + windowAddon = require( + path.join( + process.resourcesPath, + 'app.asar.unpacked', + 'node_modules', + 'window-addon', + 'window-addon.node', + ), + ); } export const tileWindows = async () => { (windowAddon as unknown as SafeAny)!.tileChromeWindows(); diff --git a/packages/main/tests/unit.spec.ts b/packages/main/tests/unit.spec.ts index 2c637dc..6f8a8b8 100644 --- a/packages/main/tests/unit.spec.ts +++ b/packages/main/tests/unit.spec.ts @@ -34,7 +34,7 @@ vi.mock('electron', () => { // 根据需要模拟其他 ipcMain 方法 }; - return { BrowserWindow: bw, app, ipcMain }; + return {BrowserWindow: bw, app, ipcMain}; }); beforeEach(() => { diff --git a/packages/preload/src/bridges/window.ts b/packages/preload/src/bridges/window.ts index 02e8805..bd351ba 100644 --- a/packages/preload/src/bridges/window.ts +++ b/packages/preload/src/bridges/window.ts @@ -1,5 +1,5 @@ import type {IpcRendererEvent} from 'electron'; -import { ipcRenderer} from 'electron'; +import {ipcRenderer} from 'electron'; import type {DB, SafeAny} from '../../../shared/types/db'; export const WindowBridge = { @@ -42,7 +42,7 @@ export const WindowBridge = { const result = await ipcRenderer.invoke('window-open', id); return result; }, - + async close(id: number) { const result = await ipcRenderer.invoke('window-close', id); return result; diff --git a/packages/renderer/src/constants/status.ts b/packages/renderer/src/constants/status.ts index abd8f0e..7ecc6b3 100644 --- a/packages/renderer/src/constants/status.ts +++ b/packages/renderer/src/constants/status.ts @@ -1,5 +1,5 @@ export const WINDOW_STATUS = { - DEPRECATED: 0, - NORMAL: 1, - RUNNING: 2, -}; \ No newline at end of file + DEPRECATED: 0, + NORMAL: 1, + RUNNING: 2, +}; diff --git a/packages/renderer/src/i18n.ts b/packages/renderer/src/i18n.ts index ed6e3dd..9e4dbf2 100644 --- a/packages/renderer/src/i18n.ts +++ b/packages/renderer/src/i18n.ts @@ -20,12 +20,13 @@ i18n sign_up: 'Sign up', sign_out: 'Sign out', forgot_password: 'Forgot password', - forgotten_password_desc: 'Enter your email and we will send you a link to reset your password.', + forgotten_password_desc: + 'Enter your email and we will send you a link to reset your password.', update_password: 'Update password', new_window: 'New window', edit_window: 'Edit window', - + window_open: 'Open', window_close: 'Close', window_edit: 'Edit', @@ -83,7 +84,6 @@ i18n proxy_import_column_remark: 'Remark', proxy_import_column_status: 'Status', - tile_windows: 'Tile window', settings_cache_path: 'Cache path', @@ -124,7 +124,7 @@ i18n forgot_password: '忘记密码', forgotten_password_desc: '输入您的电子邮件,我们将向您发送重置密码的链接。', update_password: '更新密码', - + new_window: '新建窗口', edit_window: '编辑窗口', @@ -139,7 +139,7 @@ i18n window_column_group: '分组', window_column_remark: '备注', window_column_name: '名称', - window_column_tags: '标签', + window_column_tags: '标签', window_column_last_open: '最后打开', window_column_created_at: '创建时间', window_column_action: '操作', @@ -192,7 +192,7 @@ i18n footer_ok: '确定', footer_cancel: '取消', - + new_proxy: '新建代理', menu_windows: '窗口管理', diff --git a/packages/renderer/src/store.ts b/packages/renderer/src/store.ts index 0ac332f..563cc27 100644 --- a/packages/renderer/src/store.ts +++ b/packages/renderer/src/store.ts @@ -2,7 +2,6 @@ import {configureStore} from '@reduxjs/toolkit'; import userReducer from './slices/user-slice'; - export const store = configureStore({ reducer: { user: userReducer, diff --git a/packages/renderer/tsconfig.json b/packages/renderer/tsconfig.json index cf5e1ca..9f85b55 100644 --- a/packages/renderer/tsconfig.json +++ b/packages/renderer/tsconfig.json @@ -9,7 +9,7 @@ "isolatedModules": true, "jsx": "react-jsx", "allowSyntheticDefaultImports": true, - "esModuleInterop":true, + "esModuleInterop": true, "types": ["node"], "baseUrl": ".", "paths": { @@ -23,7 +23,8 @@ "src/**/*.ts", "src/**/*.tsx", "types/**/*.d.ts", - "../../types/**/*.d.ts" -, "../shared/interfaces/supabaseClient.ts" ], + "../../types/**/*.d.ts", + "../shared/interfaces/supabaseClient.ts" + ], "exclude": ["**/*.spec.ts", "**/*.test.ts"] } diff --git a/packages/shared/types/db.d.ts b/packages/shared/types/db.d.ts index 11ee1e9..49551d8 100644 --- a/packages/shared/types/db.d.ts +++ b/packages/shared/types/db.d.ts @@ -17,7 +17,6 @@ export namespace DB { cookie?: string; status?: number; - ip?: string; port?: number; local_proxy_port?: number; diff --git a/packages/shared/types/ip.d.ts b/packages/shared/types/ip.d.ts index a5ef215..3f3755a 100644 --- a/packages/shared/types/ip.d.ts +++ b/packages/shared/types/ip.d.ts @@ -1,6 +1,6 @@ export interface IP { - ip: string; - country: string; - ll: number[]; - timeZone: string; -} \ No newline at end of file + ip: string; + country: string; + ll: number[]; + timeZone: string; +}