-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
register correctly custom styles and set xyz URL
- Loading branch information
Showing
6 changed files
with
178 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Ref, ref } from 'vue' | ||
import { acceptHMRUpdate, defineStore } from 'pinia' | ||
|
||
export const DEFAULT_LANG = 'fr' | ||
export const DEFAULT_LAYER_PANEL_OPENED = true | ||
export const DEFAULT_MY_LAYERS_TAB_OPENED = false | ||
export const DEFAULT_THEME_GRID_OPENED = false | ||
|
||
export const useAppStore = defineStore( | ||
'app', | ||
() => { | ||
const lang = ref(DEFAULT_LANG) | ||
const layersOpen = ref(DEFAULT_LAYER_PANEL_OPENED) | ||
<<<<<<< HEAD | ||
const myLayersTabOpen = ref(DEFAULT_MY_LAYERS_TAB_OPENED) | ||
const themeGridOpen = ref(DEFAULT_THEME_GRID_OPENED) | ||
======= | ||
>>>>>>> feat(state-persistor): add use case for default bg selection when mapId exists | ||
const mapId: Ref<string | undefined> = ref() | ||
const remoteLayersOpen = ref() | ||
const styleEditorOpen = ref(false) | ||
|
||
function setLang(language: string) { | ||
lang.value = language | ||
} | ||
|
||
function setLayersOpen(open: boolean) { | ||
layersOpen.value = open | ||
|
||
if (!open) { | ||
themeGridOpen.value = false | ||
myLayersTabOpen.value = false | ||
} | ||
} | ||
|
||
function setMyLayersTabOpen(open: boolean) { | ||
myLayersTabOpen.value = open | ||
|
||
if (open) { | ||
themeGridOpen.value = false | ||
} | ||
} | ||
|
||
function setThemeGridOpen(open: boolean) { | ||
themeGridOpen.value = open | ||
} | ||
|
||
function setRemoteLayersOpen(open: boolean) { | ||
remoteLayersOpen.value = open | ||
} | ||
|
||
function setMapId(id: string | undefined) { | ||
mapId.value = id | ||
} | ||
|
||
function openStyleEditorPanel() { | ||
styleEditorOpen.value = true | ||
} | ||
|
||
function closeStyleEditorPanel() { | ||
styleEditorOpen.value = false | ||
} | ||
|
||
return { | ||
lang, | ||
layersOpen, | ||
<<<<<<< HEAD | ||
myLayersTabOpen, | ||
themeGridOpen, | ||
======= | ||
>>>>>>> feat(state-persistor): add use case for default bg selection when mapId exists | ||
mapId, | ||
styleEditorOpen, | ||
remoteLayersOpen, | ||
setLang, | ||
setLayersOpen, | ||
setMyLayersTabOpen, | ||
setThemeGridOpen, | ||
setRemoteLayersOpen, | ||
setMapId, | ||
openStyleEditorPanel, | ||
closeStyleEditorPanel, | ||
} | ||
}, | ||
{} | ||
) | ||
|
||
if (import.meta.hot) { | ||
import.meta.hot.accept(acceptHMRUpdate(useAppStore, import.meta.hot)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters