-
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.
- Loading branch information
1 parent
9b61c52
commit 25678a1
Showing
5 changed files
with
87 additions
and
51 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
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
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
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,29 +1,41 @@ | ||
<script setup lang="ts"> | ||
import { useKeyCollectionsStore } from "../../store/key-collections-store"; | ||
import KeyList from "../../component/KeyList.vue"; | ||
import { storeToRefs } from "pinia"; | ||
import LoadingSpinner from "../../component/LoadingSpinner.vue"; | ||
const keyCollectionsStore = useKeyCollectionsStore(); | ||
const { loading, keyCollections } = storeToRefs(useKeyCollectionsStore()); | ||
</script> | ||
|
||
<template> | ||
<p class="text-lg">My Key Collections</p> | ||
|
||
<div | ||
v-if="keyCollectionsStore.keyCollections.length === 0" | ||
class="ms-5 italic" | ||
> | ||
<p>You don't have any key collections yet.</p> | ||
<!-- TODO I want to link to the search screen here but I need the router for that --> | ||
<p>When you add a key you will be able to create a collection for it!</p> | ||
</div> | ||
<template v-else> | ||
<div | ||
v-for="c in keyCollectionsStore.keyCollections" | ||
v-bind:key="c.name" | ||
class="mt-3" | ||
> | ||
<p class="font-bold">{{ c.name }}</p> | ||
<KeyList :keys-with-meta="c.gpg_keys" :readonly="true"></KeyList> | ||
</div> | ||
</template> | ||
<LoadingSpinner :loading="loading"> | ||
<template #loading> | ||
<p class="text-lg p-2">Loading key collections</p> | ||
</template> | ||
<template #content> | ||
<div> <!-- Single root for loading transition --> | ||
<div | ||
v-if="keyCollections.length === 0" | ||
class="ms-5 italic" | ||
> | ||
<p>You don't have any key collections yet.</p> | ||
<!-- TODO I want to link to the search screen here but I need the router for that --> | ||
<p>When you add a key you will be able to create a collection for it!</p> | ||
</div> | ||
<template v-else> | ||
<div | ||
v-for="c in keyCollections" | ||
v-bind:key="c.name" | ||
class="mt-3" | ||
> | ||
<p class="font-bold">{{ c.name }}</p> | ||
<KeyList :keys-with-meta="c.gpg_keys" :readonly="true"></KeyList> | ||
</div> | ||
</template> | ||
</div> | ||
</template> | ||
</LoadingSpinner> | ||
|
||
</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