@@ -5,6 +5,8 @@ import { computed, reactive, ref, toRaw } from 'vue';
5
5
6
6
import type { ListEntity } from '~/models/list.model' ;
7
7
8
+ import { NavbarPosition , type NavbarPositions } from '~/models/navbar-position.model' ;
9
+
8
10
import { PageSize } from '~/models/page-size.model' ;
9
11
import { ProgressType , type ProgressTypes } from '~/models/progress-type.model' ;
10
12
import { Route } from '~/models/router.model' ;
@@ -38,8 +40,6 @@ const DefaultRoutes: RouteDictionary = {
38
40
[ Route . Search ] : true ,
39
41
} ;
40
42
41
- type NavbarPosition = 'top' | 'bottom' | 'floating' | 'auto' ;
42
-
43
43
type ExtensionSettings = {
44
44
cacheRetention : CacheRetentionState ;
45
45
enabledRoutes : RouteDictionary ;
@@ -51,7 +51,7 @@ type ExtensionSettings = {
51
51
enableRatings : boolean ;
52
52
backgroundColor : string ;
53
53
loadingHysteresis : number ;
54
- navbarPosition : NavbarPosition ;
54
+ navbarPosition : NavbarPositions ;
55
55
} ;
56
56
57
57
const ExtensionSettingsConstants = {
@@ -72,7 +72,7 @@ export const useExtensionSettingsStore = defineStore(ExtensionSettingsConstants.
72
72
const enableRatings = ref ( false ) ;
73
73
const backgroundColor = ref ( 'transparent' ) ;
74
74
const loadingHysteresis = ref ( - 1 ) ;
75
- const navbarPosition = ref < NavbarPosition > ( 'auto' ) ;
75
+ const navbarPosition = ref < NavbarPositions > ( NavbarPosition . Auto ) ;
76
76
77
77
const clearState = ( ) => {
78
78
Object . assign ( cacheRetention , DefaultCacheRetention ) ;
@@ -250,7 +250,7 @@ export const useExtensionSettingsStore = defineStore(ExtensionSettingsConstants.
250
250
} ) ,
251
251
navbarPosition : computed ( {
252
252
get : ( ) => navbarPosition . value ,
253
- set : ( value : NavbarPosition ) => {
253
+ set : ( value : NavbarPositions ) => {
254
254
navbarPosition . value = value ;
255
255
saveState ( ) . catch ( err => Logger . error ( 'Failed to save navbar position extension settings' , { value, err } ) ) ;
256
256
} ,
0 commit comments