Skip to content

Commit

Permalink
Add PendingContent to config/metadata forms
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Feb 20, 2024
1 parent 0e2863f commit 08fb2b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
20 changes: 9 additions & 11 deletions src/corpus/config/CorpusConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async function submit(fields: Form) {
</script>

<template>
<div v-if="config">
<PendingContent v-if="config" :on="`corpus/${corpusId}/config`">
<FormKit
id="corpus-config"
v-slot="{ value }"
Expand Down Expand Up @@ -175,17 +175,15 @@ async function submit(fields: Form) {
</LayoutSection>
</FormKit>
<div class="flex justify-center">
<PendingContent :on="`corpus/${corpusId}`">
<RouteButton
:to="`/library/corpus/${corpusId}/delete`"
class="button-danger"
>
<icon :icon="['far', 'trash-can']" class="mr-1" />
{{ $t("corpus.delete") }}
</RouteButton>
</PendingContent>
<RouteButton
:to="`/library/corpus/${corpusId}/delete`"
class="button-danger"
>
<icon :icon="['far', 'trash-can']" class="mr-1" />
{{ $t("corpus.delete") }}
</RouteButton>
</div>
</div>
</PendingContent>
</template>

<style scoped>
Expand Down
5 changes: 3 additions & 2 deletions src/corpus/config/CorpusMetadata.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useRouter } from "vue-router";
import PendingContent from "@/spin/PendingContent.vue";
import useCorpusIdParam from "@/corpus/corpusIdParam.composable";
import LayoutSection from "@/components/LayoutSection.vue";
import useConfig from "./config.composable";
Expand Down Expand Up @@ -31,7 +32,7 @@ async function submit(fields: Form) {
</script>

<template>
<div v-if="config">
<PendingContent v-if="config" :on="`corpus/${corpusId}/config`">
<FormKit
id="corpus-config"
type="form"
Expand Down Expand Up @@ -88,5 +89,5 @@ async function submit(fields: Form) {
/>
</LayoutSection>
</FormKit>
</div>
</PendingContent>
</template>

0 comments on commit 08fb2b4

Please sign in to comment.