diff --git a/materialious/electron/src/setup.ts b/materialious/electron/src/setup.ts index f2a4171a..dbfe60b2 100644 --- a/materialious/electron/src/setup.ts +++ b/materialious/electron/src/setup.ts @@ -106,7 +106,7 @@ export class ElectronCapacitorApp { defaultHeight: 800, }); // Setup preload script path and construct our main window. - const preloadPath = join(app.getAppPath(), 'build', 'src', 'preload); + const preloadPath = join(app.getAppPath(), 'build', 'src', 'preload.js'); this.MainWindow = new BrowserWindow({ icon, show: false, diff --git a/materialious/src/lib/components/Search.svelte b/materialious/src/lib/components/Search.svelte index aaf98ffe..b4c5a110 100644 --- a/materialious/src/lib/components/Search.svelte +++ b/materialious/src/lib/components/Search.svelte @@ -46,7 +46,11 @@ showSearchBox = false; if ($interfaceSearchHistoryEnabled && !$searchHistoryStore.includes(search)) { - searchHistoryStore.set([search, ...$searchHistoryStore]); + let pastHistory = $searchHistoryStore; + if (pastHistory.length > 15) { + pastHistory.pop(); + } + searchHistoryStore.set([search, ...pastHistory]); } } diff --git a/materialious/src/lib/components/Settings/Interface.svelte b/materialious/src/lib/components/Settings/Interface.svelte index 7e6facbc..93b22c3a 100644 --- a/materialious/src/lib/components/Settings/Interface.svelte +++ b/materialious/src/lib/components/Settings/Interface.svelte @@ -24,7 +24,9 @@ interfaceLowBandwidthMode, interfacePreviewVideoOnHoverStore, interfaceRegionStore, + interfaceSearchHistoryEnabled, interfaceSearchSuggestionsStore, + searchHistoryStore, themeColorStore } from '../../store'; @@ -128,6 +130,25 @@ +
+ +
+