Skip to content

Commit 0c94e66

Browse files
committed
wip: design-draft
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
1 parent a24c10d commit 0c94e66

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

src/talk/renderer/TitleBar/TitleBar.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
-->
55

66
<script setup lang="ts">
7+
import AppsMenu from './components/AppsMenu.vue'
78
import DevMenu from './components/DevMenu.vue'
89
import MainMenu from './components/MainMenu.vue'
910
import UserMenu from './components/UserMenu.vue'
@@ -45,6 +46,10 @@ const { isDevMode } = useDevMode()
4546
<DevMenu />
4647
</div>
4748

49+
<div class="title-bar__item" data-theme-dark>
50+
<AppsMenu />
51+
</div>
52+
4853
<div class="title-bar__item" data-theme-dark>
4954
<MainMenu />
5055
</div>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!--
2+
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
3+
- SPDX-License-Identifier: AGPL-3.0-or-later
4+
-->
5+
6+
<script setup lang="ts">
7+
import axios from '@nextcloud/axios'
8+
import { t } from '@nextcloud/l10n'
9+
import { generateOcsUrl } from '@nextcloud/router'
10+
import { onBeforeMount, ref } from 'vue'
11+
import NcActionLink from '@nextcloud/vue/components/NcActionLink'
12+
import NcActions from '@nextcloud/vue/components/NcActions'
13+
import IconDotsGrid from 'vue-material-design-icons/DotsGrid.vue'
14+
import ThemeLogo from './ThemeLogo.vue'
15+
import { appData } from '../../../../app/AppData.js'
16+
17+
const apps = ref([])
18+
const serverUrl = appData.serverUrl! as string
19+
const theming = appData.capabilities.theming
20+
21+
// TODO: add it to the Application Data
22+
// TODO: add types
23+
onBeforeMount(async () => {
24+
const response = await axios.get(generateOcsUrl('core/navigation/apps'))
25+
apps.value = response.data.ocs.data.filter(({ id }) => id !== 'spreed')
26+
})
27+
</script>
28+
29+
<template>
30+
<NcActions :aria-label="t('talk_desktop', 'Menu')" variant="tertiary-no-background" force-menu>
31+
<template #icon>
32+
<IconDotsGrid :size="20" />
33+
</template>
34+
35+
<NcActionLink :href="serverUrl">
36+
<template #icon>
37+
<span class="action-icon-wrapper">
38+
<ThemeLogo :size="20" />
39+
</span>
40+
</template>
41+
{{ theming.name }}
42+
</NcActionLink>
43+
<NcActionLink v-for="app in apps" :key="app.id" :href="app.href">
44+
<template #icon>
45+
<span class="action-icon-wrapper">
46+
<img class="app-icon" :src="app.icon" alt="">
47+
</span>
48+
</template>
49+
{{ app.name }}
50+
</NcActionLink>
51+
</NcActions>
52+
</template>
53+
54+
<style scoped>
55+
.action-icon-wrapper {
56+
width: var(--default-clickable-area);
57+
height: var(--default-clickable-area);
58+
display: flex;
59+
align-items: center;
60+
justify-content: center;
61+
}
62+
63+
.app-icon {
64+
max-width: 20px;
65+
max-height: 20px;
66+
filter: var(--background-invert-if-bright);
67+
}
68+
</style>

0 commit comments

Comments
 (0)