Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

feat: create the team pannel in settings for quick access

Smaug673964df59897cff
diff --git a/frontend/app/components/Node/Card/Team.vue b/frontend/app/components/Node/Card/Team.vue
new file mode 100644
index 00000000..c8b904ad
--- /dev/null
+++ b/frontend/app/components/Node/Card/Team.vue
@@ -0,0 +1,113 @@
+<template>
+ <NuxtLink :to="resolveNodeLink(team)" @click="emit('click')">
+ <div class="top">
+ <div class="avatar" :class="getAppAccent(team.color as number, true)">
+ <img v-if="team.thumbnail" :src="team.thumbnail" :alt="team.name" class="thumbnail" />
+ <Icon v-else :name="resolveIcon(team)" display="xl" />
+ </div>
+ <div class="title">
+ <h2>{{ team.name }}</h2>
+ <p>{{ team.description || t('teams.noDescription') }}</p>
+ </div>
+ </div>
+
+ <NodeStats :parent-id="team.id" />
+
+ <div class="team-footer">
+ <span class="team-meta">Updated {{ shortDate(team.updated_timestamp) }}</span>
+ <span class="team-open">Open team</span>
+ </div>
+ </NuxtLink>
+</template>
+
+<script setup lang="ts">
+import { resolveIcon, resolveNodeLink } from '~/helpers/node';
+import type { Node } from '~/stores';
+
+defineProps<{ team: Node }>();
+const emit = defineEmits<{ (e: 'click'): void }>();
+
+const { shortDate } = useDateFormatters();
+const { getAppAccent } = useAppColors();
+const { t } = useI18nT();
+</script>
+<style scoped lang="scss">
+a {
+ display: flex;
+ min-height: 220px;
+ padding: 1.1rem;
+ border: 1px solid var(--border);
+ border-radius: var(--radius-xl);
+ color: var(--text-body);
+ background: linear-gradient(180deg, var(--surface-base), var(--surface-raised));
+ box-shadow: var(--shadow-sm);
+ transition:
+ transform 0.18s ease,
+ box-shadow 0.18s ease,
+ border-color 0.18s ease;
+ flex-direction: column;
+ gap: 1rem;
+ text-decoration: none;
+
+ &:hover {
+ border-color: var(--border-strong);
+ box-shadow: var(--shadow-lg);
+ transform: translateY(-2px);
+ }
+}
+
+.top {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+}
+
+.avatar {
+ display: grid;
+ width: 72px;
+ height: 72px;
+ border-radius: 22px;
+ background: var(--surface-overlay);
+ flex: none;
+ overflow: hidden;
+ place-items: center;
+}
+
+.thumbnail {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.title {
+ min-width: 0;
+
+ h2 {
+ margin: 0;
+ font-size: 1.1rem;
+ }
+
+ p {
+ margin: 0.3rem 0 0;
+ color: var(--text-secondary);
+ }
+}
+
+.team-footer {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ justify-content: space-between;
+ margin-top: auto;
+}
+
+.team-meta {
+ font-size: 0.86rem;
+ color: var(--text-secondary);
+}
+
+.team-open {
+ font-weight: 700;
+ color: var(--primary);
+}
+</style>
diff --git a/frontend/app/pages/dashboard/settings/_views/teams.vue b/frontend/app/pages/dashboard/settings/_views/teams.vue
index f908c7d4..6808f6aa 100644
--- a/frontend/app/pages/dashboard/settings/_views/teams.vue
+++ b/frontend/app/pages/dashboard/settings/_views/teams.vue
@@ -1,61 +1,20 @@
<template>
<section>
- <div>
- <h2>Create Team</h2>
- <label for="name">{{ t('common.labels.name') }}</label>
- <input id="name" v-model="category.name" class="entry" type="text" required :placeholder="t('common.labels.name')" />
- <div style="min-width: 200px; flex: 1; margin-left: 10px">
- <label for="color">{{ t('common.labels.color') }}</label>
- <AppColorPicker id="color" v-model="category.color" class="entry" nullable />
- </div>
- <div class="footer">
- <AppButton type="secondary" @click="emit('close')">{{ t('common.actions.cancel') }}</AppButton>
- <AppButton type="primary" @click="createTeam">{{ t('common.actions.create') }}</AppButton>
- </div>
- </div>
- <div class="teams-list">
- <h2>Teams</h2>
- <ul>
- <li v-for="team in store.teams" :key="team.id">
- <span>{{ team.name }}</span>
- </li>
- </ul>
- </div>
+ <h2>Teams</h2>
+ <NodeCardTeam v-for="team in store.teams" :key="team.id" :team="team" @click="emit('close')" />
</section>
</template>
<script setup lang="ts">
-import type { Node } from '~/stores';
-
-const emit = defineEmits(['close']);
+const emit = defineEmits<{ (e: 'close'): void }>();
const store = useNodesStore();
-
-const { t } = useI18nT();
-
-const category = ref<Partial<Node>>({
- accessibility: 1,
- name: '',
- role: 0,
-});
-
-const createTeam = () => {
- store
- .post(category.value)
- .then(() => {
- useNotifications().add({ title: t('nodes.category.notifications.created'), type: 'success' });
- emit('close');
- })
- .catch(e => useNotifications().add({ message: e, title: t('nodes.category.notifications.creationError'), type: 'error' }));
-};
</script>
<style scoped lang="scss">
-label {
- margin: 5px 0;
-}
-
-.entry {
- background: var(--surface-base);
+section {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
}
</style>
diff --git a/frontend/app/pages/dashboard/teams/index.vue b/frontend/app/pages/dashboard/teams/index.vue
index 0fdde735..b1ef6aa0 100644
--- a/frontend/app/pages/dashboard/teams/index.vue
+++ b/frontend/app/pages/dashboard/teams/index.vue
@@ -24,25 +24,7 @@
</section>
<section v-if="filteredTeams.length" class="team-grid">
- <NuxtLink v-for="team in filteredTeams" :key="team.id" :to="resolveNodeLink(team)" class="team-card">
- <div class="team-card-top">
- <div class="team-avatar" :class="getAppAccent(team.color as number, true)">
- <img v-if="team.thumbnail" :src="team.thumbnail" :alt="team.name" class="team-thumbnail" />
- <Icon v-else :name="resolveIcon(team)" display="xl" />
- </div>
- <div class="team-title">
- <h2>{{ team.name }}</h2>
- <p>{{ team.description || t('teams.noDescription') }}</p>
- </div>
- </div>
-
- <NodeStats :parent-id="team.id" />
-
- <div class="team-footer">
- <span class="team-meta">Updated {{ shortDate(team.updated_timestamp) }}</span>
- <span class="team-open">Open team</span>
- </div>
- </NuxtLink>
+ <NodeCardTeam v-for="team in filteredTeams" :key="team.id" :team="team" />
</section>
<NoContent v-else title="No teams yet" :description="t('teams.actions.createDescription')">
@@ -53,12 +35,9 @@
<script setup lang="ts">
import CreateCategoryModal from '~/components/Node/Modals/CreateCategory.vue';
-import { resolveIcon, resolveNodeLink } from '~/helpers/node';
const nodesStore = useNodesStore();
const modals = useModal();
-const { shortDate } = useDateFormatters();
-const { getAppAccent } = useAppColors();
const { t } = useI18nT();
const query = ref('');
@@ -158,83 +137,4 @@ h1 {
grid-column: 1 / -1;
}
}
-
-.team-card {
- display: flex;
- min-height: 220px;
- padding: 1.1rem;
- border: 1px solid var(--border);
- border-radius: var(--radius-xl);
- color: var(--text-body);
- background: linear-gradient(180deg, var(--surface-base), var(--surface-raised));
- box-shadow: var(--shadow-sm);
- transition:
- transform 0.18s ease,
- box-shadow 0.18s ease,
- border-color 0.18s ease;
- flex-direction: column;
- gap: 1rem;
- text-decoration: none;
-
- &:hover {
- border-color: var(--border-strong);
- box-shadow: var(--shadow-lg);
- transform: translateY(-2px);
- }
-}
-
-.team-card-top {
- display: flex;
- align-items: center;
- gap: 1rem;
-}
-
-.team-avatar {
- display: grid;
- width: 72px;
- height: 72px;
- border-radius: 22px;
- background: var(--surface-overlay);
- flex: none;
- overflow: hidden;
- place-items: center;
-}
-
-.team-thumbnail {
- width: 100%;
- height: 100%;
- object-fit: cover;
-}
-
-.team-title {
- min-width: 0;
-
- h2 {
- margin: 0;
- font-size: 1.1rem;
- }
-
- p {
- margin: 0.3rem 0 0;
- color: var(--text-secondary);
- }
-}
-
-.team-footer {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- justify-content: space-between;
- margin-top: auto;
-}
-
-.team-meta {
- font-size: 0.86rem;
- color: var(--text-secondary);
-}
-
-.team-open {
- font-weight: 700;
- color: var(--primary);
-}
</style>