2023-03-30 18:37:45 -04:00
|
|
|
<script setup>
|
2023-04-08 18:54:38 -07:00
|
|
|
import { shallowRef } from 'vue'
|
2023-05-09 19:48:47 -04:00
|
|
|
import GridDisplay from '@/components/GridDisplay.vue'
|
|
|
|
|
import { list } from '@/helpers/profile.js'
|
2023-04-26 23:19:37 -04:00
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
import { useBreadcrumbs } from '@/store/breadcrumbs'
|
2023-05-11 18:11:15 -07:00
|
|
|
import { profile_listener } from '@/helpers/events.js'
|
2023-04-26 23:19:37 -04:00
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
const breadcrumbs = useBreadcrumbs()
|
2023-03-30 18:37:45 -04:00
|
|
|
|
2023-04-26 23:19:37 -04:00
|
|
|
breadcrumbs.setRootContext({ name: 'Library', link: route.path })
|
2023-05-09 19:48:47 -04:00
|
|
|
|
2023-05-11 18:11:15 -07:00
|
|
|
const profiles = await list(true)
|
2023-05-11 10:26:00 -07:00
|
|
|
const instances = shallowRef(Object.values(profiles))
|
2023-05-10 18:50:42 -04:00
|
|
|
|
2023-05-11 18:11:15 -07:00
|
|
|
profile_listener(async () => {
|
|
|
|
|
const profiles = await list(true)
|
|
|
|
|
instances.value = Object.values(profiles)
|
2023-05-10 18:50:42 -04:00
|
|
|
})
|
2023-03-30 18:37:45 -04:00
|
|
|
</script>
|
2023-03-17 15:46:55 -04:00
|
|
|
|
|
|
|
|
<template>
|
2023-05-11 10:26:00 -07:00
|
|
|
<GridDisplay
|
|
|
|
|
v-if="instances.length > 0"
|
|
|
|
|
label="Instances"
|
|
|
|
|
:instances="instances"
|
|
|
|
|
class="display"
|
|
|
|
|
/>
|
2023-03-17 15:46:55 -04:00
|
|
|
</template>
|
2023-05-09 19:48:47 -04:00
|
|
|
|
2023-05-11 10:26:00 -07:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.display {
|
|
|
|
|
background-color: rgb(30, 31, 34);
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|