mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-10 16:19:24 -07:00
Prepare Windows release and signing
# Conflicts: # package.json # Conflicts: # .github/workflows/release.yml # README.md # package.json # plugin/subminer/lifecycle.lua # scripts/build-yomitan.mjs # src/core/services/overlay-window.ts # src/main.ts # src/main/overlay-shortcuts-runtime.ts # src/main/runtime/overlay-shortcuts-runtime-main-deps.test.ts # src/main/runtime/overlay-shortcuts-runtime-main-deps.ts # src/window-trackers/base-tracker.ts
This commit is contained in:
15
src/main/runtime/yomitan-anki-server.ts
Normal file
15
src/main/runtime/yomitan-anki-server.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { AnkiConnectConfig } from '../../types';
|
||||
|
||||
export function getPreferredYomitanAnkiServerUrl(config: AnkiConnectConfig): string {
|
||||
if (config.enabled === true && config.proxy?.enabled === true) {
|
||||
const host = config.proxy.host || '127.0.0.1';
|
||||
const port = config.proxy.port || 8766;
|
||||
return `http://${host}:${port}`;
|
||||
}
|
||||
|
||||
return config.url || 'http://127.0.0.1:8765';
|
||||
}
|
||||
|
||||
export function shouldForceOverrideYomitanAnkiServer(config: AnkiConnectConfig): boolean {
|
||||
return config.enabled === true && config.proxy?.enabled === true;
|
||||
}
|
||||
Reference in New Issue
Block a user