mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-22 02:56:24 -07:00
Harden Yomitan settings open flow for external profile mode
- Return status from `openYomitanSettings` and show user-facing warning when external read-only profile mode blocks settings - Thread `yomitanSession` through settings runtime/opener deps so settings window uses the active session - Expand tests for session forwarding and external profile path propagation - Move AniList setup/token/CLI docs into the AniList section in configuration docs
This commit is contained in:
@@ -23,13 +23,15 @@ test('yomitan opener warns when extension cannot be loaded', async () => {
|
||||
|
||||
test('yomitan opener opens settings window when extension is available', async () => {
|
||||
let opened = false;
|
||||
const yomitanSession = { id: 'session' };
|
||||
const openSettings = createOpenYomitanSettingsHandler({
|
||||
ensureYomitanExtensionLoaded: async () => ({ id: 'ext' }),
|
||||
openYomitanSettingsWindow: () => {
|
||||
opened = true;
|
||||
openYomitanSettingsWindow: ({ yomitanSession: forwardedSession }) => {
|
||||
opened = (forwardedSession as { id: string } | null)?.id === 'session';
|
||||
},
|
||||
getExistingWindow: () => null,
|
||||
setWindow: () => {},
|
||||
getYomitanSession: () => yomitanSession,
|
||||
logWarn: () => {},
|
||||
logError: () => {},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user