Fix lint issues

This commit is contained in:
Akis Kesoglou 2023-07-06 21:50:29 +03:00
parent 497bb0e2cb
commit 9410669294
2 changed files with 7 additions and 7 deletions

View File

@ -46,7 +46,8 @@ const translation = {
drive: '磁碟', drive: '磁碟',
missingPartitionTable: missingPartitionTable:
'看起來這不是一個可啟動的{{type}}。\n\n這個{{type}}似乎不包含分割表,因此您的設備可能無法識別或無法正確啟動。', '看起來這不是一個可啟動的{{type}}。\n\n這個{{type}}似乎不包含分割表,因此您的設備可能無法識別或無法正確啟動。',
largeDriveSize: '這是個很大容量的磁碟!請檢查並確認它不包含對您來說存放很重要的資料', largeDriveSize:
'這是個很大容量的磁碟!請檢查並確認它不包含對您來說存放很重要的資料',
systemDrive: '選擇系統分割區很危險,因為這將會刪除你的系統', systemDrive: '選擇系統分割區很危險,因為這將會刪除你的系統',
sourceDrive: '來源映像檔位於這個分割區中', sourceDrive: '來源映像檔位於這個分割區中',
noSpace: '磁碟空間不足。請插入另一個較大的磁碟並重試。', noSpace: '磁碟空間不足。請插入另一個較大的磁碟並重試。',
@ -130,8 +131,7 @@ const translation = {
autoUpdate: '自動更新', autoUpdate: '自動更新',
settings: '軟體設定', settings: '軟體設定',
systemInformation: '系統資訊', systemInformation: '系統資訊',
trimExtPartitions: trimExtPartitions: '修改原始映像檔上未分配的空間(在 ext 類型分割區中)',
'修改原始映像檔上未分配的空間(在 ext 類型分割區中)',
}, },
menu: { menu: {
edit: '編輯', edit: '編輯',

View File

@ -21,7 +21,7 @@ import { promises as fs } from 'fs';
import { platform } from 'os'; import { platform } from 'os';
import * as path from 'path'; import * as path from 'path';
import * as semver from 'semver'; import * as semver from 'semver';
import * as _ from 'lodash'; import * as lodash from 'lodash';
import './app/i18n'; import './app/i18n';
@ -107,10 +107,10 @@ async function getCommandLineURL(argv: string[]): Promise<string | undefined> {
} }
} }
const initSentryMain = _.once(() => { const initSentryMain = lodash.once(() => {
const dsn = const dsn =
settings.getSync('analyticsSentryToken') || settings.getSync('analyticsSentryToken') ||
_.get(packageJSON, ['analytics', 'sentry', 'token']); lodash.get(packageJSON, ['analytics', 'sentry', 'token']);
SentryMain.init({ dsn, beforeSend: anonymizeSentryData }); SentryMain.init({ dsn, beforeSend: anonymizeSentryData });
}); });
@ -278,7 +278,7 @@ async function main(): Promise<void> {
(url.protocol === 'http:' || url.protocol === 'https:') && (url.protocol === 'http:' || url.protocol === 'https:') &&
event.disposition === 'foreground-tab' && event.disposition === 'foreground-tab' &&
// Don't open links if they're disabled by the env var // Don't open links if they're disabled by the env var
!(settings.getSync('disableExternalLinks')) !settings.getSync('disableExternalLinks')
) { ) {
electron.shell.openExternal(url.href); electron.shell.openExternal(url.href);
} }