mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
feat(yomitan): add read-only external profile support for shared dictionaries (#18)
This commit is contained in:
10
src/main/runtime/character-dictionary-availability.ts
Normal file
10
src/main/runtime/character-dictionary-availability.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function isCharacterDictionaryRuntimeEnabled(externalProfilePath: string): boolean {
|
||||
return externalProfilePath.trim().length === 0;
|
||||
}
|
||||
|
||||
export function getCharacterDictionaryDisabledReason(externalProfilePath: string): string | null {
|
||||
if (isCharacterDictionaryRuntimeEnabled(externalProfilePath)) {
|
||||
return null;
|
||||
}
|
||||
return 'Character dictionary is disabled while yomitan.externalProfilePath is configured.';
|
||||
}
|
||||
Reference in New Issue
Block a user