mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
refactor
This commit is contained in:
parent
409cd4fbd3
commit
2dc2d2e4fe
3 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@ type PizzaxChannelMessage<T extends StateDef> = {
|
||||||
userId?: string;
|
userId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export class Storage<T extends StateDef> {
|
export class Pizzax<T extends StateDef> {
|
||||||
public readonly ready: Promise<void>;
|
public readonly ready: Promise<void>;
|
||||||
public readonly loaded: Promise<void>;
|
public readonly loaded: Promise<void>;
|
||||||
|
|
|
@ -11,13 +11,13 @@ import { hemisphere } from '@@/js/intl-const.js';
|
||||||
import type { DeviceKind } from '@/utility/device-kind.js';
|
import type { DeviceKind } from '@/utility/device-kind.js';
|
||||||
import type { Plugin } from '@/plugin.js';
|
import type { Plugin } from '@/plugin.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { Storage } from '@/pizzax.js';
|
import { Pizzax } from '@/lib/pizzax.js';
|
||||||
import { DEFAULT_DEVICE_KIND } from '@/utility/device-kind.js';
|
import { DEFAULT_DEVICE_KIND } from '@/utility/device-kind.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 「状態」を管理するストア(not「設定」)
|
* 「状態」を管理するストア(not「設定」)
|
||||||
*/
|
*/
|
||||||
export const store = markRaw(new Storage('base', {
|
export const store = markRaw(new Pizzax('base', {
|
||||||
accountSetupWizard: {
|
accountSetupWizard: {
|
||||||
where: 'account',
|
where: 'account',
|
||||||
default: 0,
|
default: 0,
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
import { markRaw } from 'vue';
|
import { markRaw } from 'vue';
|
||||||
import type { Column } from '@/deck.js';
|
import type { Column } from '@/deck.js';
|
||||||
import { Storage } from '@/pizzax.js';
|
import { Pizzax } from '@/lib/pizzax.js';
|
||||||
|
|
||||||
// TODO: 消す(移行済みのため)
|
// TODO: 消す(移行済みのため)
|
||||||
export const deckStore = markRaw(new Storage('deck', {
|
export const deckStore = markRaw(new Pizzax('deck', {
|
||||||
profile: {
|
profile: {
|
||||||
where: 'deviceAccount',
|
where: 'deviceAccount',
|
||||||
default: 'default',
|
default: 'default',
|
||||||
|
|
Loading…
Add table
Reference in a new issue