-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates with components for individual sections
- Loading branch information
1 parent
20af8e9
commit 2a278d9
Showing
10 changed files
with
117 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
arches_lingo/src/arches_lingo/components/detail/SchemeSection.vue
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
arches_lingo/src/arches_lingo/components/scheme/report/SchemeAuthority.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue"; | ||
const { $gettext } = useGettext(); | ||
</script> | ||
|
||
<template> | ||
<SchemeReportSection :title-text="$gettext('Trusted Authorities')"> | ||
abc | ||
</SchemeReportSection> | ||
</template> |
11 changes: 11 additions & 0 deletions
11
arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue"; | ||
const { $gettext } = useGettext(); | ||
</script> | ||
|
||
<template> | ||
<SchemeReportSection :title-text="$gettext('License')"> | ||
abc | ||
</SchemeReportSection> | ||
</template> |
11 changes: 11 additions & 0 deletions
11
arches_lingo/src/arches_lingo/components/scheme/report/SchemeNote.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue"; | ||
const { $gettext } = useGettext(); | ||
</script> | ||
|
||
<template> | ||
<SchemeReportSection :title-text="$gettext('Scheme Notes')"> | ||
abc | ||
</SchemeReportSection> | ||
</template> |
45 changes: 45 additions & 0 deletions
45
arches_lingo/src/arches_lingo/components/scheme/report/SchemeSection.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import Button from "primevue/button"; | ||
const { $gettext } = useGettext(); | ||
const props = defineProps<{ | ||
titleText: string; | ||
}>(); | ||
const buttonText = $gettext(`Add ${props.titleText}`); | ||
</script> | ||
|
||
<template> | ||
<div class="section"> | ||
<div class="header"> | ||
<h2>{{ props.titleText }}</h2> | ||
<div> | ||
<Button | ||
:label="buttonText" | ||
@click="$emit('openEditor')" | ||
></Button> | ||
</div> | ||
</div> | ||
<div class="content"> | ||
<slot></slot> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.section { | ||
margin: 0 1rem; | ||
} | ||
.section .header { | ||
display: flex; | ||
align-items: center; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
.section .header h2 { | ||
flex: 1; | ||
} | ||
.content { | ||
margin: 1rem 0; | ||
} | ||
</style> |
11 changes: 11 additions & 0 deletions
11
arches_lingo/src/arches_lingo/components/scheme/report/SchemeStandard.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue"; | ||
const { $gettext } = useGettext(); | ||
</script> | ||
|
||
<template> | ||
<SchemeReportSection :title-text="$gettext('Scheme Standards Followed')"> | ||
abc | ||
</SchemeReportSection> | ||
</template> |
11 changes: 11 additions & 0 deletions
11
arches_lingo/src/arches_lingo/components/scheme/report/SchemeUri.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup lang="ts"> | ||
import { useGettext } from "vue3-gettext"; | ||
import SchemeReportSection from "@/arches_lingo/components/scheme/report/SchemeSection.vue"; | ||
const { $gettext } = useGettext(); | ||
</script> | ||
|
||
<template> | ||
<SchemeReportSection :title-text="$gettext('Scheme URI')"> | ||
abc | ||
</SchemeReportSection> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
<script setup lang="ts"> | ||
import { onMounted, ref } from "vue"; | ||
import { useRoute } from "vue-router"; | ||
import { fetchSchemeResource } from "@/arches_lingo/api.ts"; | ||
import type { SchemeResource } from "@/arches_lingo/types.ts"; | ||
import SchemeSection from "@/arches_lingo/components/detail/SchemeSection.vue"; | ||
const route = useRoute(); | ||
const schemeResource = ref<SchemeResource | null>(null); | ||
onMounted(async () => { | ||
const resource = (await fetchSchemeResource( | ||
route.params.id, | ||
)) as SchemeResource; | ||
schemeResource.value = resource; | ||
}); | ||
import Splitter from "primevue/splitter"; | ||
import SplitterPanel from "primevue/splitterpanel"; | ||
import SchemeLicense from "@/arches_lingo/components/scheme/report/SchemeLicense.vue"; | ||
import SchemeNote from "@/arches_lingo/components/scheme/report/SchemeNote.vue"; | ||
import SchemeUri from "@/arches_lingo/components/scheme/report/SchemeUri.vue"; | ||
import SchemeStandard from "@/arches_lingo/components/scheme/report/SchemeStandard.vue"; | ||
import SchemeAuthority from "@/arches_lingo/components/scheme/report/SchemeAuthority.vue"; | ||
</script> | ||
|
||
<template> | ||
<div v-if="schemeResource"> | ||
<div | ||
v-for="(section, resourceKey) in schemeResource.resource" | ||
:key="resourceKey" | ||
> | ||
<SchemeSection | ||
:section="section" | ||
:resource-key="resourceKey" | ||
/> | ||
</div> | ||
<div> | ||
<Splitter> | ||
<SplitterPanel> | ||
<SchemeNote /> | ||
<SchemeAuthority /> | ||
<SchemeStandard /> | ||
<SchemeLicense /> | ||
<SchemeUri /> | ||
</SplitterPanel> | ||
</Splitter> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters