Show article information.
This commit is contained in:
@@ -2,28 +2,45 @@ import {defineStore} from "pinia";
|
||||
import type {Article} from "~/types/article";
|
||||
import {NotificationMessage} from "~/types/notificationMessage";
|
||||
import type {RuntimeConfig} from "nuxt/schema";
|
||||
import {Origin} from "~/types/origin";
|
||||
|
||||
interface State {
|
||||
config: RuntimeConfig,
|
||||
|
||||
// UI
|
||||
descriptionMaxChars: number,
|
||||
ingredientsMaxChars: number,
|
||||
|
||||
// Notification
|
||||
notifications: NotificationMessage[],
|
||||
notificationQueue: NotificationMessage[],
|
||||
|
||||
// Article
|
||||
article: Article | null,
|
||||
|
||||
origins: Array<Origin>,
|
||||
}
|
||||
|
||||
export const useLabelEditorStore = defineStore('label_editor_store', {
|
||||
state: (): State => ({
|
||||
config: useRuntimeConfig(),
|
||||
|
||||
// UI
|
||||
descriptionMaxChars: 256,
|
||||
ingredientsMaxChars: 256,
|
||||
|
||||
// Notification
|
||||
notifications: [],
|
||||
notificationQueue: [],
|
||||
|
||||
// Article
|
||||
article: null,
|
||||
|
||||
origins: [
|
||||
Origin.EU,
|
||||
Origin.NonEU,
|
||||
Origin.EUnonEU
|
||||
]
|
||||
}),
|
||||
actions: {
|
||||
// Notification
|
||||
|
||||
Reference in New Issue
Block a user