diff options
author | Andrey Borysenko <andrey18106x@gmail.com> | 2024-10-11 17:12:49 +0300 |
---|---|---|
committer | Andrey Borysenko <andrey18106x@gmail.com> | 2024-10-29 20:54:07 +0200 |
commit | a5291c68a2fbc4ed2b95e94ed17fd3dd95460e5c (patch) | |
tree | 36c00b3cb8051c7e1270929d88865af34430ab75 /apps | |
parent | 7e31088f5be611d81eb25549a102d5041a9a9e18 (diff) | |
download | nextcloud-server-a5291c68a2fbc4ed2b95e94ed17fd3dd95460e5c.tar.gz nextcloud-server-a5291c68a2fbc4ed2b95e94ed17fd3dd95460e5c.zip |
WIP: add Daemon badge in app sidebar (2)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/src/components/AppList/AppDaemonBadge.vue | 37 | ||||
-rw-r--r-- | apps/settings/src/views/AppStoreSidebar.vue | 2 |
2 files changed, 39 insertions, 0 deletions
diff --git a/apps/settings/src/components/AppList/AppDaemonBadge.vue b/apps/settings/src/components/AppList/AppDaemonBadge.vue new file mode 100644 index 00000000000..1a46d3c7ebb --- /dev/null +++ b/apps/settings/src/components/AppList/AppDaemonBadge.vue @@ -0,0 +1,37 @@ +<!-- + - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> +<template> + <span v-if="daemon" + class="app-daemon-badge" + :title="daemon.name"> + <NcIconSvgWrapper :path="mdiFileChart" :size="20" inline /> + {{ daemon.display_name }} + </span> +</template> + +<script setup lang="ts"> +import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js' +import { mdiFileChart } from '@mdi/js' +import type { IDeployDaemon } from '../../app-types.ts' + +const props = defineProps<{ + daemon?: IDeployDaemon +}>() +</script> + +<style scoped lang="scss"> +.app-daemon-badge { + color: var(--color-text-maxcontrast); + background-color: transparent; + border: 1px solid var(--color-text-maxcontrast); + border-radius: var(--border-radius); + + display: flex; + flex-direction: row; + gap: 6px; + padding: 3px 6px; + width: fit-content; +} +</style> diff --git a/apps/settings/src/views/AppStoreSidebar.vue b/apps/settings/src/views/AppStoreSidebar.vue index 676458d7459..fc2b94d8ee0 100644 --- a/apps/settings/src/views/AppStoreSidebar.vue +++ b/apps/settings/src/views/AppStoreSidebar.vue @@ -26,6 +26,7 @@ <!-- Featured/Supported badges --> <div class="app-sidebar__badges"> <AppLevelBadge :level="app.level" /> + <AppDaemonBadge v-if="app?.app_api && app?.daemon" :daemon="app.daemon" /> <AppScore v-if="hasRating" :score="rating" /> </div> </template> @@ -52,6 +53,7 @@ import AppDetailsTab from '../components/AppStoreSidebar/AppDetailsTab.vue' import AppReleasesTab from '../components/AppStoreSidebar/AppReleasesTab.vue' import AppDeployDaemonTab from '../components/AppStoreSidebar/AppDeployDaemonTab.vue' import AppLevelBadge from '../components/AppList/AppLevelBadge.vue' +import AppDaemonBadge from '../components/AppList/AppDaemonBadge.vue' import { useAppIcon } from '../composables/useAppIcon.ts' import { useStore } from '../store' |