mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
chore(types): font families
This commit is contained in:
parent
8a494b220b
commit
80af0899b8
@ -1,9 +1,19 @@
|
||||
import OptionsWidget from "../options_widget.js";
|
||||
import utils from "../../../../services/utils.js";
|
||||
import { t } from "../../../../services/i18n.js";
|
||||
import { OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
||||
import { FontFamily, OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
||||
|
||||
const FONT_FAMILIES = [
|
||||
interface FontFamilyEntry {
|
||||
value: FontFamily;
|
||||
label: string;
|
||||
}
|
||||
|
||||
interface FontGroup {
|
||||
title: string;
|
||||
items: FontFamilyEntry[];
|
||||
}
|
||||
|
||||
const FONT_FAMILIES: FontGroup[] = [
|
||||
{
|
||||
title: t("fonts.generic-fonts"),
|
||||
items: [
|
||||
|
@ -12,6 +12,8 @@ type KeyboardShortcutsOptions<T extends KeyboardActionNames> = {
|
||||
[key in T as `keyboardShortcuts${Capitalize<key>}`]: string
|
||||
};
|
||||
|
||||
export type FontFamily = "theme" | "serif" | "sans-serif" | "monospace" | string;
|
||||
|
||||
export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActionNames> {
|
||||
"openNoteContexts": string;
|
||||
"lastDailyBackupDate": string;
|
||||
@ -22,10 +24,10 @@ export interface OptionDefinitions extends KeyboardShortcutsOptions<KeyboardActi
|
||||
"syncServerHost": string;
|
||||
"syncServerTimeout": string;
|
||||
"syncProxy": string;
|
||||
"mainFontFamily": string;
|
||||
"treeFontFamily": string;
|
||||
"detailFontFamily": string;
|
||||
"monospaceFontFamily": string;
|
||||
"mainFontFamily": FontFamily;
|
||||
"treeFontFamily": FontFamily;
|
||||
"detailFontFamily": FontFamily;
|
||||
"monospaceFontFamily": FontFamily;
|
||||
"spellCheckLanguageCode": string;
|
||||
"codeNotesMimeTypes": string;
|
||||
"headingStyle": string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user