diff --git a/src/App.vue b/src/App.vue
index 1e20cd1..21348a2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -31,9 +31,12 @@
-
+
{{ payload.name }}
+
+ {{ $t("logout") }}
+
@@ -62,6 +65,7 @@
diff --git a/src/corpora/CreateCorpus.vue b/src/corpora/CreateCorpus.vue
index 7b9d61d..af2a70e 100644
--- a/src/corpora/CreateCorpus.vue
+++ b/src/corpora/CreateCorpus.vue
@@ -62,6 +62,7 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import PageTitle from "@/components/PageTitle.vue";
import Section from "@/components/Section.vue";
+import useSpin from "@/spin/spin.composable";
import PendingContent from "@/spin/PendingContent.vue";
import { FORMATS_EXT } from "@/api/corpusConfig";
import { useAuth } from "@/auth/auth.composable";
@@ -71,6 +72,7 @@ import HelpBox from "@/components/HelpBox.vue";
const { requireAuthentication } = useAuth();
const { createFromConfig } = useCorpora();
const { t } = useI18n();
+const { spin } = useSpin();
const formatOptions = computed(() =>
FORMATS_EXT.reduce(
@@ -85,11 +87,12 @@ const formatOptions = computed(() =>
requireAuthentication();
async function submit(fields) {
- await createFromConfig(
+ const createPromise = createFromConfig(
fields.name,
fields.description,
fields.format,
fields.textAnnotation
);
+ await spin(createPromise, null, "create");
}
diff --git a/src/corpora/Dashboard.vue b/src/corpora/Dashboard.vue
index 75714db..2cdfa78 100644
--- a/src/corpora/Dashboard.vue
+++ b/src/corpora/Dashboard.vue
@@ -1,5 +1,5 @@
-
+
{{
@@ -10,11 +10,7 @@
-
+
-
@@ -50,14 +48,16 @@ import SourceUpload from "@/corpus/sources/SourceUpload.vue";
import HelpBox from "@/components/HelpBox.vue";
import useCorpora from "@/corpora/corpora.composable";
import { useCorpusStore } from "@/store/corpus.store";
+import useSpin from "@/spin/spin.composable";
const corpusStore = useCorpusStore();
const { requireAuthentication, isAuthenticated } = useAuth();
const { loadCorpora, createFromUpload } = useCorpora();
+const { spin } = useSpin();
requireAuthentication(loadCorpora);
async function createCorpusFromFiles(files) {
- await createFromUpload(files);
+ await spin(createFromUpload(files), null, "create");
}
diff --git a/src/corpus/config/CorpusMetadata.vue b/src/corpus/config/CorpusMetadata.vue
index 1f894b7..c23b1f6 100644
--- a/src/corpus/config/CorpusMetadata.vue
+++ b/src/corpus/config/CorpusMetadata.vue
@@ -14,33 +14,35 @@
{{ $t("config.metadata.help") }}
-
-
-
+
-defineProps(["tag"]);
-
-
-
-
-
diff --git a/src/corpus/sources/SourceUpload.vue b/src/corpus/sources/SourceUpload.vue
index 7fb2178..ff92c73 100644
--- a/src/corpus/sources/SourceUpload.vue
+++ b/src/corpus/sources/SourceUpload.vue
@@ -35,6 +35,7 @@
type="file"
class="hidden"
multiple
+ :accept="extensionsAccept"
@change="handleFileInput"
/>
@@ -47,6 +48,7 @@