diff --git a/extension/src/defaultOptions.ts b/extension/src/defaultOptions.ts index c8d0aad..5e09007 100644 --- a/extension/src/defaultOptions.ts +++ b/extension/src/defaultOptions.ts @@ -106,4 +106,4 @@ export default { siteWhitelistCustomUserAgent: "", showAdvancedOptions: false -} satisfies Options as Options; +} as Options; diff --git a/extension/src/ui/options/Bridge.svelte b/extension/src/ui/options/Bridge.svelte index 99871ae..f254ac9 100644 --- a/extension/src/ui/options/Bridge.svelte +++ b/extension/src/ui/options/Bridge.svelte @@ -13,6 +13,7 @@ import type { Options } from "../../lib/options"; import messaging from "../../messaging"; + import Option from "./Option.svelte"; const _ = browser.i18n.getMessage; @@ -294,16 +295,15 @@ {/if}
-
-
- -
- -
- {_("optionsBridgeBackupEnabledDescription")} -
-
+ + + {#if opts.showAdvancedOptions}
-
-
- -
- -
- {_("optionsBridgeBackupSecureDescription")} -
-
-
- -
- -
- {_("optionsBridgeBackupPasswordDescription")} -
-
-
+
{/if}
diff --git a/extension/src/ui/options/Option.svelte b/extension/src/ui/options/Option.svelte new file mode 100644 index 0000000..714dd5d --- /dev/null +++ b/extension/src/ui/options/Option.svelte @@ -0,0 +1,87 @@ + + +
+ + {#if inline} +
+ {#if $$restProps.type === "checkbox"} + + {:else} + + {/if} +
+ + {#if description} +
+ {description} + +
+ {/if} + {:else} + +
+ {#if $$restProps.type === "checkbox"} + + {:else} + + {/if} + {#if description} +
+ {description} + +
+ {/if} +
+ {/if} +
diff --git a/extension/src/ui/options/Options.svelte b/extension/src/ui/options/Options.svelte index 4ff70ee..4ef663d 100644 --- a/extension/src/ui/options/Options.svelte +++ b/extension/src/ui/options/Options.svelte @@ -11,6 +11,8 @@ import defaultOptions from "../../defaultOptions"; import { getChromeUserAgentString } from "../../lib/userAgents"; + import Option from "./Option.svelte"; + import OptionsCategory from "./OptionsCategory.svelte"; const _ = browser.i18n.getMessage; @@ -87,383 +89,230 @@ > -
- -

{_("optionsMediaCategoryName")}

-
-

- {_("optionsMediaCategoryDescription")} -

- -
-
- -
- -
+ +
+