Files
AstralRinth/theseus_gui/src/pages/Library.vue
Adrian O.V bd697a02f5 UI/UX improvements (#146)
* Some initial changes

* New project cards

* Version

* Finalize improvements

* Fixed styling issues on versions page

* Removed light mode

* Run linter

* Added mixpanel stuff in context menus

* Fix styling issues

* Fix windows

* homepage fixes

* Finishing touches on mac styling

* Fixed windows related styling

* Update global.scss

---------

Co-authored-by: Jai A <jaiagr+gpg@pm.me>
2023-06-19 21:09:03 -07:00

35 lines
1002 B
Vue

<script setup>
import { onUnmounted, shallowRef } from 'vue'
import GridDisplay from '@/components/GridDisplay.vue'
import { list } from '@/helpers/profile.js'
import { useRoute } from 'vue-router'
import { useBreadcrumbs } from '@/store/breadcrumbs'
import { profile_listener } from '@/helpers/events.js'
import { handleError } from '@/store/notifications.js'
const route = useRoute()
const breadcrumbs = useBreadcrumbs()
breadcrumbs.setRootContext({ name: 'Library', link: route.path })
const profiles = await list(true).catch(handleError)
const instances = shallowRef(Object.values(profiles))
const unlisten = await profile_listener(async () => {
const profiles = await list(true).catch(handleError)
instances.value = Object.values(profiles)
})
onUnmounted(() => unlisten())
</script>
<template>
<GridDisplay label="Instances" :instances="instances" class="display" />
</template>
<style lang="scss" scoped>
.display {
background-color: rgb(30, 31, 34);
min-height: 100%;
}
</style>