Help
+This page is here to help you use IndieSearch.
+This page is here to help you use IndieSearch.
+Choose which sites are included in your IndieSearches.
+ +These are pagefind sites you've stumbled across since the last time you were here. They're included by default.
+ {#await sitesProm} +…
+ {:then sites} +You've marked these sites to be included in your IndieSearches.
+ {#await sitesProm} +…
+ {:then sites} +These sites will never feature in your IndieSearches.
+ {#await sitesProm} +…
+ {:then sites} +Here are a few sites you can add to get started:
+ + + +…
+{:then sites} + + + +{/await} + + diff --git a/Extension/src/search/search.ts b/Extension/src/search/search.ts new file mode 100644 index 0000000..9a03f7c --- /dev/null +++ b/Extension/src/search/search.ts @@ -0,0 +1,2 @@ +import App from './search.svelte'; +new App({ target: document.getElementById('root') as HTMLDivElement }); diff --git a/Extension/src/settings-connector.ts b/Extension/src/settings-connector.ts index c356524..46f8d07 100644 --- a/Extension/src/settings-connector.ts +++ b/Extension/src/settings-connector.ts @@ -1,32 +1,55 @@ import browser from 'webextension-polyfill'; -import { type AppSettings, DEFAULT_SETTINGS } from './models'; +import { type AppSettings, DEFAULT_SETTINGS, type SiteSpec, type SiteCategory } from './models'; class SettingsConnector { private static readonly settingsKey = 'settings'; + async getAppSettings() { let settings = ( await browser.storage.sync.get(SettingsConnector.settingsKey) )[SettingsConnector.settingsKey] as Partial