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.

fix: teams translations & missing page

Smaug67398b01dfb0f0ed
diff --git a/frontend/app/pages/dashboard/settings/_views/teams.vue b/frontend/app/pages/dashboard/settings/_views/teams.vue
index 6808f6aa..03e23b97 100644
--- a/frontend/app/pages/dashboard/settings/_views/teams.vue
+++ b/frontend/app/pages/dashboard/settings/_views/teams.vue
@@ -2,13 +2,24 @@
<section>
<h2>Teams</h2>
<NodeCardTeam v-for="team in store.teams" :key="team.id" :team="team" @click="emit('close')" />
+
+ <NoContent v-if="!store.teams.length" :title="t('teams.actions.noTeams')" :description="t('teams.actions.createDescription')">
+ <AppButton type="primary" @click="openCreateTeam">{{ t('teams.actions.create') }}</AppButton>
+ </NoContent>
</section>
</template>
<script setup lang="ts">
+import CreateCategoryModal from '~/components/Node/Modals/CreateCategory.vue';
+
const emit = defineEmits<{ (e: 'close'): void }>();
const store = useNodesStore();
+
+const { t } = useI18nT();
+const modals = useModal();
+
+const openCreateTeam = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 0, parentId: undefined }, size: 'small' }));
</script>
<style scoped lang="scss">
diff --git a/frontend/app/pages/dashboard/teams/[id]/index.vue b/frontend/app/pages/dashboard/teams/[id]/index.vue
index 63eb09d5..c58941ee 100644
--- a/frontend/app/pages/dashboard/teams/[id]/index.vue
+++ b/frontend/app/pages/dashboard/teams/[id]/index.vue
@@ -26,7 +26,8 @@
<NuxtLink :to="`/dashboard/docs/new?parent_id=${team.id}`">
<AppButton type="secondary">{{ t('dashboard.actions.newDocument') }}</AppButton>
</NuxtLink>
- <AppButton type="danger" @click="openDelete">{{ t('teams.actions.delete') }}</AppButton>
+ <AppButton v-if="userStore.user?.id === team.user_id" type="danger" @click="openDelete">{{ t('teams.actions.delete') }}</AppButton>
+ <AppButton v-else type="danger" @click="openRemoveShareModal">{{ t('teams.actions.leave') }}</AppButton>
</div>
</section>
@@ -45,12 +46,14 @@
<script setup lang="ts">
import NodeDeleteModal from '~/components/Node/Modals/Delete.vue';
import CreateCategoryModal from '~/components/Node/Modals/CreateCategory.vue';
+import RemoveSharedNode from '~/components/Node/Modals/RemoveShared.vue';
import { resolveIcon } from '~/helpers/node';
import type { Node } from '~/stores';
definePageMeta({ breadcrumb: { i18n: 'teams.overview.title' } });
const nodesStore = useNodesStore();
+const userStore = useUserStore();
const route = useRoute();
const modals = useModal();
@@ -86,6 +89,7 @@ const directChildren = computed(() => (team.value ? nodesStore.nodes.getChildren
const openCreateWorkspace = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 1, parentId: teamId } }));
const openCreateCategory = () => modals.add(new Modal(shallowRef(CreateCategoryModal), { props: { role: 2, parentId: teamId } }));
const openDelete = () => team.value && modals.add(new Modal(shallowRef(NodeDeleteModal), { props: { node: team.value, redirectTo: '/dashboard/teams' } }));
+const openRemoveShareModal = () => modals.add(new Modal(shallowRef(RemoveSharedNode), { props: { nodeId: team.value?.id }, size: 'small' }));
</script>
<style scoped lang="scss">
diff --git a/frontend/app/pages/dashboard/teams/index.vue b/frontend/app/pages/dashboard/teams/index.vue
index c51d3b3c..4322dc6f 100644
--- a/frontend/app/pages/dashboard/teams/index.vue
+++ b/frontend/app/pages/dashboard/teams/index.vue
@@ -26,7 +26,7 @@
<NodeCardTeam v-for="team in filteredTeams" :key="team.id" :team="team" />
</section>
- <NoContent v-else title="No teams yet" :description="t('teams.actions.createDescription')">
+ <NoContent v-else :title="t('teams.actions.noTeams')" :description="t('teams.actions.createDescription')">
<AppButton type="primary" @click="openCreateTeam">{{ t('teams.actions.create') }}</AppButton>
</NoContent>
</div>
diff --git a/frontend/i18n/locales/de/teams.ts b/frontend/i18n/locales/de/teams.ts
index 4684f541..81268de6 100644
--- a/frontend/i18n/locales/de/teams.ts
+++ b/frontend/i18n/locales/de/teams.ts
@@ -8,6 +8,8 @@ export default {
createDescription: 'Erstellen Sie das erste Team, um Arbeitsbereiche und Dokumente zu gruppieren',
delete: 'Team löschen',
addContent: 'Inhalte hinzufügen',
+ leave: 'Team verlassen',
+ noTeams: 'Noch keine Teams',
},
teamsCount: 'Teams',
noDescription: 'Noch keine Beschreibung',
diff --git a/frontend/i18n/locales/en/teams.ts b/frontend/i18n/locales/en/teams.ts
index 01839bfb..7f58f351 100644
--- a/frontend/i18n/locales/en/teams.ts
+++ b/frontend/i18n/locales/en/teams.ts
@@ -8,6 +8,8 @@ export default {
createDescription: 'Create the first team to start grouping workspaces and documents',
delete: 'Delete team',
addContent: 'Add content',
+ leave: 'Leave team',
+ noTeams: 'No teams yet',
},
teamsCount: 'teams',
noDescription: 'No description yet',
diff --git a/frontend/i18n/locales/fr/teams.ts b/frontend/i18n/locales/fr/teams.ts
index d82a5612..620674b5 100644
--- a/frontend/i18n/locales/fr/teams.ts
+++ b/frontend/i18n/locales/fr/teams.ts
@@ -8,6 +8,8 @@ export default {
createDescription: 'Créez la première équipe pour commencer à regrouper les espaces de travail et les documents',
delete: "Supprimer l'équipe",
addContent: 'Ajouter du contenu',
+ leave: "Quitter l'équipe",
+ noTeams: "Pas encore d'équipes",
},
teamsCount: 'équipes',
noDescription: 'Aucune description pour le moment',
diff --git a/frontend/i18n/locales/uk/teams.ts b/frontend/i18n/locales/uk/teams.ts
index 71d8ef85..d5fa25bc 100644
--- a/frontend/i18n/locales/uk/teams.ts
+++ b/frontend/i18n/locales/uk/teams.ts
@@ -8,6 +8,8 @@ export default {
createDescription: 'Створіть першу команду, щоб почати групувати робочі простори та документи',
delete: 'Видалити команду',
addContent: 'Додати вміст',
+ leave: 'Покинути команду',
+ noTeams: 'Команд ще немає',
},
teamsCount: 'команди',
noDescription: 'Опис ще не додано',