Browse Source
WIP: add Daemon badge in app sidebar (2)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
pull/48665/head
Andrey Borysenko
1 year ago
No known key found for this signature in database
GPG Key ID: 934CB29F9F59B0D1
2 changed files with
39 additions and
0 deletions
-
apps/settings/src/components/AppList/AppDaemonBadge.vue
-
apps/settings/src/views/AppStoreSidebar.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> |
|
|
|
@ -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' |
|
|
|
|
|
|
|
|