diff options
author | Andrey Borysenko <andrey18106x@gmail.com> | 2024-10-11 17:12:49 +0300 |
---|---|---|
committer | Andrey Borysenko <andrey18106x@gmail.com> | 2024-10-30 20:36:54 +0200 |
commit | 151a75812cfe1ee84c19aeeef700f9c75909b940 (patch) | |
tree | 48b1ee217b0bfafc6e3f0b44af5a58685ca139c3 | |
parent | 475ce2ead8e7e634b50a257147ff66d82b395e67 (diff) | |
download | nextcloud-server-151a75812cfe1ee84c19aeeef700f9c75909b940.tar.gz nextcloud-server-151a75812cfe1ee84c19aeeef700f9c75909b940.zip |
WIP: add Daemon badge in app sidebar (2)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
-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' |