mirror of
https://github.com/nextcloud/server.git
synced 2026-02-15 08:48:14 -05:00
WIP: add Daemon badge in app sidebar (2)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
This commit is contained in:
parent
475ce2ead8
commit
151a75812c
2 changed files with 39 additions and 0 deletions
37
apps/settings/src/components/AppList/AppDaemonBadge.vue
Normal file
37
apps/settings/src/components/AppList/AppDaemonBadge.vue
Normal file
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue