mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-11-08 00:18:19 +00:00
Removing the properties suggestions feature
This feature is moved directly into Philomena. This implementation is now outdated and depends on the previous version of suggestions popup.
This commit is contained in:
1 parent
bb14492578
commit
2453bdf7b9
9 files changed
-569
No files matched your search
@@ -1,28 +0,0 @@
|
||||
import { type Writable, writable } from "svelte/store";
|
||||
import SearchSettings, { type SuggestionsPosition } from "$lib/extension/settings/SearchSettings";
|
||||
|
||||
export const searchPropertiesSuggestionsEnabled = writable(false);
|
||||
|
||||
export const searchPropertiesSuggestionsPosition: Writable<SuggestionsPosition> = writable('start');
|
||||
|
||||
const searchSettings = new SearchSettings();
|
||||
|
||||
Promise.allSettled([
|
||||
// First we wait for all properties to load and save
|
||||
searchSettings.resolvePropertiesSuggestionsEnabled().then(v => searchPropertiesSuggestionsEnabled.set(v)),
|
||||
searchSettings.resolvePropertiesSuggestionsPosition().then(v => searchPropertiesSuggestionsPosition.set(v))
|
||||
]).then(() => {
|
||||
// And then we can start reading value changes from the writable objects
|
||||
searchPropertiesSuggestionsEnabled.subscribe(value => {
|
||||
void searchSettings.setPropertiesSuggestions(value);
|
||||
});
|
||||
|
||||
searchPropertiesSuggestionsPosition.subscribe(value => {
|
||||
void searchSettings.setPropertiesSuggestionsPosition(value);
|
||||
});
|
||||
|
||||
searchSettings.subscribe(settings => {
|
||||
searchPropertiesSuggestionsEnabled.set(Boolean(settings.suggestProperties));
|
||||
searchPropertiesSuggestionsPosition.set(settings.suggestPropertiesPosition || 'start');
|
||||
});
|
||||
})
|
||||
Reference in new issue
Block a user