We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e461e4c commit 552240bCopy full SHA for 552240b
app/composables/useSettings.ts
@@ -115,11 +115,18 @@ export function useAccentColor() {
115
* Composable for managing the search provider setting.
116
*/
117
export function useSearchProvider() {
118
+ const cookie = useCookie('search-provider', {
119
+ secure: true,
120
+ sameSite: 'strict',
121
+ maxAge: 60 * 60 * 24 * 30,
122
+ path: '/',
123
+ })
124
const { settings } = useSettings()
125
126
const searchProvider = computed({
- get: () => settings.value.searchProvider,
127
+ get: () => (cookie.value === 'npm' ? 'npm' : settings.value.searchProvider),
128
set: (value: SearchProvider) => {
129
+ cookie.value = value
130
settings.value.searchProvider = value
131
},
132
})
0 commit comments