mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 10:03:08 +02:00
✌️
This commit is contained in:
parent
019529d76c
commit
9e6d13ce46
4 changed files with 7 additions and 5 deletions
|
@ -55,7 +55,7 @@ export class Storage<T extends StateDef> {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
await this.migrate();
|
await this.migrate();
|
||||||
|
|
||||||
const deviceState: State<T> = await get(this.deviceStateKeyName);
|
const deviceState: State<T> = await get(this.deviceStateKeyName) || {};
|
||||||
const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) || {} : {};
|
const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) || {} : {};
|
||||||
const registryCache = $i ? await get(this.registryCacheKeyName) || {} : {};
|
const registryCache = $i ? await get(this.registryCacheKeyName) || {} : {};
|
||||||
|
|
||||||
|
|
|
@ -160,12 +160,14 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
async created() {
|
||||||
if (window.innerWidth < 1024) {
|
if (window.innerWidth < 1024) {
|
||||||
localStorage.setItem('ui', 'default');
|
localStorage.setItem('ui', 'default');
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await store.ready;
|
||||||
|
|
||||||
os.api('users/lists/list').then(lists => {
|
os.api('users/lists/list').then(lists => {
|
||||||
this.lists = lists;
|
this.lists = lists;
|
||||||
});
|
});
|
||||||
|
|
|
@ -68,7 +68,7 @@ export default defineComponent({
|
||||||
DeckColumnCore,
|
DeckColumnCore,
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
async setup() {
|
||||||
const isMobile = ref(window.innerWidth <= 500);
|
const isMobile = ref(window.innerWidth <= 500);
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
isMobile.value = window.innerWidth <= 500;
|
isMobile.value = window.innerWidth <= 500;
|
||||||
|
@ -81,6 +81,8 @@ export default defineComponent({
|
||||||
drawerMenuShowing.value = false;
|
drawerMenuShowing.value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await deckStore.ready;
|
||||||
|
|
||||||
const columns = deckStore.reactiveState.columns;
|
const columns = deckStore.reactiveState.columns;
|
||||||
const layout = deckStore.reactiveState.layout;
|
const layout = deckStore.reactiveState.layout;
|
||||||
const menuIndicated = computed(() => {
|
const menuIndicated = computed(() => {
|
||||||
|
|
|
@ -61,8 +61,6 @@ export const deckStore = markRaw(new Storage('deck', {
|
||||||
export const loadDeck = async () => {
|
export const loadDeck = async () => {
|
||||||
let deck;
|
let deck;
|
||||||
|
|
||||||
await deckStore.ready;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
deck = await api('i/registry/get', {
|
deck = await api('i/registry/get', {
|
||||||
scope: ['client', 'deck', 'profiles'],
|
scope: ['client', 'deck', 'profiles'],
|
||||||
|
|
Loading…
Reference in a new issue