diff --git a/src/components/TextData.vue b/src/components/TextData.vue index a20ffee..cb36e9b 100644 --- a/src/components/TextData.vue +++ b/src/components/TextData.vue @@ -3,18 +3,13 @@ import TerminalOutput from "./TerminalOutput.vue"; defineProps<{ text: string; - height?: number; }>(); - - - {{ text }} - - + + {{ text }} + diff --git a/src/library/AdminResourcesView.vue b/src/library/AdminResourcesView.vue index 08a4630..3acead5 100644 --- a/src/library/AdminResourcesView.vue +++ b/src/library/AdminResourcesView.vue @@ -1,20 +1,24 @@ {{ $t("resources") }} + + + {{ $t("admin.resources.help") }} + + - - + - - {{ resourceId }} - - + + + + {{ resourceId }} + + + + + {{ $t("load") }} + + + {{ $t("expand.close") }} + + + {{ $t("expand.open") }} + + + + + + {{ $t(resource.type) }} + + {{ $t("job.status.error") }} + + + + {{ $t("not_loaded") }} + + + + + + diff --git a/src/store/resource.store.ts b/src/store/resource.store.ts index 9f757b4..5b14b93 100644 --- a/src/store/resource.store.ts +++ b/src/store/resource.store.ts @@ -19,9 +19,9 @@ export type Resource = { export type Corpus = Resource & { type: "corpus"; sources: FileMeta[]; - config: ConfigOptions; + config?: ConfigOptions; status: CorpusStatus; - exports: FileMeta[]; + exports?: FileMeta[]; }; export type Metadata = Resource & { @@ -31,9 +31,9 @@ export type Metadata = Resource & { // User-defined type guards to help inform TypeScript // See https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards -const isCorpus = (resource: Partial): resource is Corpus => +export const isCorpus = (resource: Partial): resource is Corpus => resource.type == "corpus"; -const isMetadata = (resource: Partial): resource is Metadata => +export const isMetadata = (resource: Partial): resource is Metadata => resource.type == "metadata"; export const useResourceStore = defineStore("resource", () => { diff --git a/src/user/AdminModeBanner.vue b/src/user/AdminModeBanner.vue index c33132a..50882de 100644 --- a/src/user/AdminModeBanner.vue +++ b/src/user/AdminModeBanner.vue @@ -28,9 +28,15 @@ function disable() { {{ $t("disable") }} {{ $t("admin.goto") }}: - + {{ $t("resources") }} + +