Show article information.

This commit is contained in:
2026-01-22 02:51:36 +01:00
parent 5e929dbb1e
commit a87500fb24
4 changed files with 80 additions and 37 deletions
+17
View File
@@ -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