Skip to content

armgit / posta

Public Imported from GitHub
0

Self-hosted email delivery platform that enables applications to send emails via HTTP APIs while handling SMTP delivery, templates, storage, security, and analytics. Fully self-hostable alternative to services like SendGrid or Mailgun.

feat(web): redesign sidebar information architecture (#103)

Jonas Kaninda3d09ce7d07d3
diff --git a/web/src/components/SectionHeader.vue b/web/src/components/SectionHeader.vue
deleted file mode 100644
index f789806..0000000
--- a/web/src/components/SectionHeader.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-<script setup lang="ts">
-import { useRoute } from 'vue-router'
-
-defineProps<{
- title: string
- tabs: { label: string; to: string }[]
-}>()
-
-const route = useRoute()
-
-function isActive(to: string): boolean {
- return route.path === to || route.path.startsWith(to + '/')
-}
-</script>
-
-<template>
- <div>
- <div class="page-header">
- <h1>{{ title }}</h1>
- </div>
- <div class="tabs">
- <router-link v-for="t in tabs" :key="t.to" :to="t.to" class="tab" :class="{ active: isActive(t.to) }">
- {{ t.label }}
- </router-link>
- </div>
- </div>
-</template>
-
-<style scoped>
-.tab {
- text-decoration: none;
-}
-</style>
diff --git a/web/src/layouts/DashboardLayout.vue b/web/src/layouts/DashboardLayout.vue
index 874948a..c15acd1 100644
--- a/web/src/layouts/DashboardLayout.vue
+++ b/web/src/layouts/DashboardLayout.vue
@@ -60,10 +60,12 @@ interface NavItem {
external?: boolean
/** Only show when a real workspace (not Personal) is selected. */
requiresWorkspace?: boolean
+ /** Only show when the user is an owner or admin of the current workspace. */
+ requiresWorkspaceAdmin?: boolean
/** Only show when the backend exposes the OpenAPI docs. */
requiresOpenapiDocs?: boolean
/** Deep-link into a WorkspaceSettings tab of the current workspace. */
- workspaceTab?: 'members' | 'plan'
+ workspaceTab?: 'members' | 'plan' | 'settings'
/** Additional route path prefixes that should keep this item highlighted (grouped tab pages). */
matchPaths?: string[]
/** Nested items shown indented under this entry. */
@@ -76,6 +78,8 @@ interface NavSection {
items: NavItem[]
/** Only rendered for platform admins. */
admin?: boolean
+ /** Hidden in Personal mode; only shown when a real workspace is selected. */
+ requiresWorkspace?: boolean
/** Whether the section starts expanded. Defaults to true. */
defaultOpen?: boolean
}
@@ -95,7 +99,15 @@ const navSections: NavSection[] = [
items: [
{ name: 'Emails', path: '/emails', icon: 'mail' },
{ name: 'Campaigns', path: '/campaigns', icon: 'send' },
- { name: 'Templates', path: '/templates', icon: 'file-text', matchPaths: ['/stylesheets', '/languages'] },
+ {
+ name: 'Templates',
+ path: '/templates',
+ icon: 'file-text',
+ children: [
+ { name: 'Stylesheets', path: '/stylesheets', icon: 'type' },
+ { name: 'Languages', path: '/languages', icon: 'globe' },
+ ],
+ },
],
},
{
@@ -110,7 +122,9 @@ const navSections: NavSection[] = [
title: 'Audience',
items: [
{ name: 'Contacts', path: '/contacts', icon: 'users' },
- { name: 'Subscribers', path: '/subscribers', icon: 'user-check', matchPaths: ['/subscriber-lists', '/unsubscribe-lists'] },
+ { name: 'Subscribers', path: '/subscribers', icon: 'user-check' },
+ { name: 'Subscriber Lists', path: '/subscriber-lists', icon: 'list' },
+ { name: 'Unsubscribe Lists', path: '/unsubscribe-lists', icon: 'mail-x' },
],
},
{
@@ -125,8 +139,11 @@ const navSections: NavSection[] = [
title: 'Developers',
defaultOpen: false,
items: [
- { name: 'API Keys & Docs', path: '/api-keys', icon: 'key' },
- { name: 'Webhooks', path: '/webhooks', icon: 'link', matchPaths: ['/webhook-deliveries'] },
+ { name: 'API Keys', path: '/api-keys', icon: 'key' },
+ { name: 'Webhooks', path: '/webhooks', icon: 'link' },
+ { name: 'Webhook Deliveries', path: '/webhook-deliveries', icon: 'activity' },
+ { name: 'API Reference', path: '/docs', icon: 'book-open', external: true, requiresOpenapiDocs: true },
+ { name: 'OpenAPI (Swagger)', path: '/swagger', icon: 'code', external: true, requiresOpenapiDocs: true },
],
},
{
@@ -141,10 +158,12 @@ const navSections: NavSection[] = [
{
id: 'workspace',
title: 'Workspace',
+ requiresWorkspace: true,
defaultOpen: false,
items: [
- { name: 'Settings', path: '/settings', icon: 'settings' },
- { name: 'Audit Log', path: '/audit-log', icon: 'history' },
+ { name: 'Members', path: '', icon: 'users', workspaceTab: 'members' },
+ { name: 'Plan & Billing', path: '', icon: 'credit-card', workspaceTab: 'plan' },
+ { name: 'Settings', path: '', icon: 'settings', workspaceTab: 'settings', requiresWorkspaceAdmin: true },
],
},
{
@@ -189,12 +208,17 @@ function toggleSection(id: string) {
}
const visibleSections = computed(() =>
- navSections.filter((s) => !s.admin || auth.isAdmin)
+ navSections.filter((s) => {
+ if (s.admin && !auth.isAdmin) return false
+ if (s.requiresWorkspace && !wsStore.isWorkspaceContext) return false
+ return true
+ })
)
function sectionItems(section: NavSection): NavItem[] {
return section.items.filter((item) => {
if (item.requiresWorkspace && !wsStore.isWorkspaceContext) return false
+ if (item.requiresWorkspaceAdmin && !wsStore.isWorkspaceAdmin) return false
if (item.requiresOpenapiDocs && !appInfo.value?.openapi_docs) return false
return true
})
@@ -419,6 +443,25 @@ function getIcon(name: string): string {
</svg>
My Profile
</a>
+ <a class="user-dropdown-item" @click.stop="navigate('/settings'); userMenuOpen = false">
+ <svg width="15" height="15" viewBox="0 0 16 16" fill="none">
+ <circle cx="8" cy="8" r="2" stroke="currentColor" stroke-width="1.5" />
+ <path d="M13 9.6a1.1 1.1 0 00.22 1.18l.04.04a1.3 1.3 0 11-1.84 1.84l-.04-.04a1.1 1.1 0 00-1.18-.22 1.1 1.1 0 00-.66.98v.12a1.3 1.3 0 11-2.6 0v-.06a1.1 1.1 0 00-.7-.98 1.1 1.1 0 00-1.18.22l-.04.04a1.3 1.3 0 11-1.84-1.84l.04-.04a1.1 1.1 0 00.22-1.18A1.1 1.1 0 002.28 9H2.2a1.3 1.3 0 110-2.6h.06a1.1 1.1 0 00.98-.7 1.1 1.1 0 00-.22-1.18l-.04-.04a1.3 1.3 0 111.84-1.84l.04.04a1.1 1.1 0 001.18.22h.06a1.1 1.1 0 00.66-.98V1.8a1.3 1.3 0 112.6 0v.06a1.1 1.1 0 00.66.98 1.1 1.1 0 001.18-.22l.04-.04a1.3 1.3 0 111.84 1.84l-.04.04a1.1 1.1 0 00-.22 1.18v.06a1.1 1.1 0 00.98.66h.12a1.3 1.3 0 110 2.6h-.06a1.1 1.1 0 00-.98.66z"
+ stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
+ </svg>
+ Settings
+ </a>
+ <a class="user-dropdown-item" @click.stop="navigate('/audit-log'); userMenuOpen = false">
+ <svg width="15" height="15" viewBox="0 0 16 16" fill="none">
+ <path d="M2 8a6 6 0 102.7-5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
+ stroke-linejoin="round" />
+ <path d="M2 12V8.7h3.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
+ stroke-linejoin="round" />
+ <path d="M8 4.7V8l2 1.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
+ stroke-linejoin="round" />
+ </svg>
+ Audit Log
+ </a>
<div class="user-dropdown-divider"></div>
<div class="user-dropdown-theme">
<div class="user-dropdown-theme-label">
diff --git a/web/src/views/languages/Languages.vue b/web/src/views/languages/Languages.vue
index ba8e25a..5f068dc 100644
--- a/web/src/views/languages/Languages.vue
+++ b/web/src/views/languages/Languages.vue
@@ -6,7 +6,6 @@ import { useNotificationStore } from '../../stores/notification'
import { useConfirm } from '../../composables/useConfirm'
import { useModalSafeClose } from '../../composables/useModalSafeClose';
import { useWorkspaceStore } from '../../stores/workspace'
-import SectionHeader from '@/components/SectionHeader.vue'
import { usePagination } from '@/composables/usePagination'
import Pagination from '@/components/Pagination.vue'
@@ -134,14 +133,9 @@ const { watchClickStart, confirmClickEnd } = useModalSafeClose(() => {
<template>
<div>
- <SectionHeader
- title="Templates"
- :tabs="[
- { label: 'Templates', to: '/templates' },
- { label: 'Stylesheets', to: '/stylesheets' },
- { label: 'Languages', to: '/languages' },
- ]"
- />
+ <div class="page-header">
+ <h1>Languages</h1>
+ </div>
<div v-if="loading" class="loading-page">
<div class="spinner"></div>
diff --git a/web/src/views/stylesheets/Stylesheets.vue b/web/src/views/stylesheets/Stylesheets.vue
index ada036f..1222434 100644
--- a/web/src/views/stylesheets/Stylesheets.vue
+++ b/web/src/views/stylesheets/Stylesheets.vue
@@ -6,7 +6,6 @@ import { useNotificationStore } from '../../stores/notification'
import { useConfirm } from '../../composables/useConfirm'
import { useModalSafeClose } from '../../composables/useModalSafeClose';
import { useWorkspaceStore } from '../../stores/workspace'
-import SectionHeader from '@/components/SectionHeader.vue'
import { usePagination } from '@/composables/usePagination'
import Pagination from '@/components/Pagination.vue'
@@ -111,14 +110,9 @@ const { watchClickStart, confirmClickEnd } = useModalSafeClose(() => {
<template>
<div>
- <SectionHeader
- title="Templates"
- :tabs="[
- { label: 'Templates', to: '/templates' },
- { label: 'Stylesheets', to: '/stylesheets' },
- { label: 'Languages', to: '/languages' },
- ]"
- />
+ <div class="page-header">
+ <h1>Stylesheets</h1>
+ </div>
<div v-if="loading" class="loading-page">
<div class="spinner"></div>
diff --git a/web/src/views/subscriber-lists/SubscriberLists.vue b/web/src/views/subscriber-lists/SubscriberLists.vue
index 216c4f2..41e8203 100644
--- a/web/src/views/subscriber-lists/SubscriberLists.vue
+++ b/web/src/views/subscriber-lists/SubscriberLists.vue
@@ -7,7 +7,6 @@ import { useNotificationStore } from '../../stores/notification'
import { useConfirm } from '../../composables/useConfirm'
import { useModalSafeClose } from '../../composables/useModalSafeClose'
import { useWorkspaceStore } from '../../stores/workspace'
-import SectionHeader from '@/components/SectionHeader.vue'
import { usePagination } from '@/composables/usePagination'
import Pagination from '@/components/Pagination.vue'
@@ -120,14 +119,9 @@ const { watchClickStart, confirmClickEnd } = useModalSafeClose(() => {
<template>
<div>
- <SectionHeader
- title="Subscribers"
- :tabs="[
- { label: 'Subscribers', to: '/subscribers' },
- { label: 'Lists', to: '/subscriber-lists' },
- { label: 'Unsubscribe', to: '/unsubscribe-lists' },
- ]"
- />
+ <div class="page-header">
+ <h1>Subscriber Lists</h1>
+ </div>
<div v-if="loading" class="loading-page">
<div class="spinner"></div>
diff --git a/web/src/views/subscribers/Subscribers.vue b/web/src/views/subscribers/Subscribers.vue
index 6f41d99..e0e07e9 100644
--- a/web/src/views/subscribers/Subscribers.vue
+++ b/web/src/views/subscribers/Subscribers.vue
@@ -8,7 +8,6 @@ import { usePagination } from '../../composables/usePagination'
import { useNotificationStore } from '../../stores/notification'
import { useModalSafeClose } from '../../composables/useModalSafeClose'
import { useWorkspaceStore } from '../../stores/workspace'
-import SectionHeader from '../../components/SectionHeader.vue'
const router = useRouter()
const notify = useNotificationStore()
@@ -170,14 +169,9 @@ const { watchClickStart: watchImportStart, confirmClickEnd: confirmImportEnd } =
<template>
<div>
- <SectionHeader
- title="Subscribers"
- :tabs="[
- { label: 'Subscribers', to: '/subscribers' },
- { label: 'Lists', to: '/subscriber-lists' },
- { label: 'Unsubscribe', to: '/unsubscribe-lists' },
- ]"
- />
+ <div class="page-header">
+ <h1>Subscribers</h1>
+ </div>
<div class="card">
<div class="card-header" style="display: flex; gap: 12px; align-items: center">
diff --git a/web/src/views/templates/Templates.vue b/web/src/views/templates/Templates.vue
index 77ec311..36dab51 100644
--- a/web/src/views/templates/Templates.vue
+++ b/web/src/views/templates/Templates.vue
@@ -16,7 +16,6 @@ import { useModalSafeClose } from "../../composables/useModalSafeClose";
import { useWorkspaceStore } from "../../stores/workspace";
import { usePagination } from '@/composables/usePagination'
import Pagination from '@/components/Pagination.vue'
-import SectionHeader from '@/components/SectionHeader.vue'
@@ -205,14 +204,9 @@ onMounted(() => {
<template>
<div>
- <SectionHeader
- title="Templates"
- :tabs="[
- { label: 'Templates', to: '/templates' },
- { label: 'Stylesheets', to: '/stylesheets' },
- { label: 'Languages', to: '/languages' },
- ]"
- />
+ <div class="page-header">
+ <h1>Templates</h1>
+ </div>
<div class="card">
<div class="card-header">
diff --git a/web/src/views/unsubscribe-lists/UnsubscribeLists.vue b/web/src/views/unsubscribe-lists/UnsubscribeLists.vue
index 8520d1f..c1ce916 100644
--- a/web/src/views/unsubscribe-lists/UnsubscribeLists.vue
+++ b/web/src/views/unsubscribe-lists/UnsubscribeLists.vue
@@ -7,7 +7,6 @@ import { useNotificationStore } from '../../stores/notification'
import { useConfirm } from '../../composables/useConfirm'
import { useModalSafeClose } from '../../composables/useModalSafeClose'
import { useWorkspaceStore } from '../../stores/workspace'
-import SectionHeader from '@/components/SectionHeader.vue'
import { usePagination } from '@/composables/usePagination'
import Pagination from '@/components/Pagination.vue'
@@ -127,14 +126,9 @@ const { watchClickStart, confirmClickEnd } = useModalSafeClose(() => {
<template>
<div>
- <SectionHeader
- title="Subscribers"
- :tabs="[
- { label: 'Subscribers', to: '/subscribers' },
- { label: 'Lists', to: '/subscriber-lists' },
- { label: 'Unsubscribe', to: '/unsubscribe-lists' },
- ]"
- />
+ <div class="page-header">
+ <h1>Unsubscribe Lists</h1>
+ </div>
<div v-if="showInfo" class="card help-card">
<div class="card-body">
diff --git a/web/src/views/webhooks/WebhookDeliveries.vue b/web/src/views/webhooks/WebhookDeliveries.vue
index a9ac074..6318be2 100644
--- a/web/src/views/webhooks/WebhookDeliveries.vue
+++ b/web/src/views/webhooks/WebhookDeliveries.vue
@@ -3,7 +3,6 @@ import { ref } from 'vue'
import { webhookDeliveriesApi } from '../../api/webhooks'
import type { WebhookDelivery } from '../../api/types'
import Pagination from '../../components/Pagination.vue'
-import SectionHeader from '../../components/SectionHeader.vue'
import { usePagination } from '../../composables/usePagination'
const loading = ref(true)
@@ -33,13 +32,9 @@ function formatDate(date: string) {
<template>
<div>
- <SectionHeader
- title="Webhooks"
- :tabs="[
- { label: 'Webhooks', to: '/webhooks' },
- { label: 'Deliveries', to: '/webhook-deliveries' },
- ]"
- />
+ <div class="page-header">
+ <h1>Webhook Deliveries</h1>
+ </div>
<div v-if="loading" class="loading-page">
<div class="spinner"></div>
diff --git a/web/src/views/webhooks/Webhooks.vue b/web/src/views/webhooks/Webhooks.vue
index 1ebb299..bf43e96 100644
--- a/web/src/views/webhooks/Webhooks.vue
+++ b/web/src/views/webhooks/Webhooks.vue
@@ -3,7 +3,6 @@ import { ref } from 'vue'
import { webhooksApi } from '../../api/webhooks'
import type { Webhook, WebhookInput } from '../../api/types'
import Pagination from '../../components/Pagination.vue'
-import SectionHeader from '../../components/SectionHeader.vue'
import { usePagination } from '../../composables/usePagination'
import { useNotificationStore } from '../../stores/notification'
import { useConfirm } from '../../composables/useConfirm'
@@ -133,13 +132,9 @@ const { watchClickStart, confirmClickEnd } = useModalSafeClose(() => {
<template>
<div>
- <SectionHeader
- title="Webhooks"
- :tabs="[
- { label: 'Webhooks', to: '/webhooks' },
- { label: 'Deliveries', to: '/webhook-deliveries' },
- ]"
- />
+ <div class="page-header">
+ <h1>Webhooks</h1>
+ </div>
<div v-if="loading" class="loading-page">
<div class="spinner"></div>
diff --git a/web/src/views/workspaces/WorkspaceSettings.vue b/web/src/views/workspaces/WorkspaceSettings.vue
index 901afa9..2c0d9e9 100644
--- a/web/src/views/workspaces/WorkspaceSettings.vue
+++ b/web/src/views/workspaces/WorkspaceSettings.vue
@@ -19,9 +19,11 @@ const ws = ref<Workspace | null>(null)
const loading = ref(true)
// Tabs
-type WorkspaceTab = 'members' | 'invitations' | 'plan' | 'sso' | 'transfer' | 'settings'
-const validTabs: WorkspaceTab[] = ['members', 'invitations', 'plan', 'sso', 'transfer', 'settings']
+type WorkspaceTab = 'members' | 'invitations' | 'plan' | 'settings'
+const validTabs: WorkspaceTab[] = ['members', 'invitations', 'plan', 'settings']
function tabFromQuery(value: unknown): WorkspaceTab {
+ // Legacy tabs that were folded into Settings.
+ if (value === 'sso' || value === 'transfer') return 'settings'
return validTabs.includes(value as WorkspaceTab) ? (value as WorkspaceTab) : 'members'
}
const activeTab = ref<WorkspaceTab>(tabFromQuery(route.query.tab))
@@ -454,6 +456,10 @@ onMounted(async () => {
await fetchWorkspace()
await Promise.all([fetchMembers(), fetchInvitations(), fetchPlan()])
})
+
+watch(activeTab, (value) => {
+ if (value === 'settings' && isOwner.value) fetchSSO()
+}, { immediate: true })
</script>
<template>
@@ -484,12 +490,6 @@ onMounted(async () => {
<button :class="['tab', { active: activeTab === 'plan' }]" @click="activeTab = 'plan'">
Plan
</button>
- <button v-if="isOwner" :class="['tab', { active: activeTab === 'sso' }]" @click="activeTab = 'sso'; fetchSSO()">
- SSO
- </button>
- <button v-if="isAdminOrOwner" :class="['tab', { active: activeTab === 'transfer' }]" @click="activeTab = 'transfer'">
- Data Transfer
- </button>
<button v-if="isAdminOrOwner" :class="['tab', { active: activeTab === 'settings' }]" @click="activeTab = 'settings'">
Settings
</button>
@@ -681,69 +681,86 @@ onMounted(async () => {
</div>
</div>
- <!-- SSO Tab -->
- <div v-if="activeTab === 'sso' && isOwner">
- <div v-if="ssoLoading" class="loading-page"><div class="spinner"></div></div>
- <template v-else>
- <div class="card">
- <div class="card-header">
- <h3 style="margin: 0">Single Sign-On (SSO)</h3>
- <button v-if="ssoConfig" class="btn btn-danger btn-sm" @click="removeSSO">Remove SSO</button>
+ <!-- Settings Tab -->
+ <div v-if="activeTab === 'settings' && isAdminOrOwner" class="card">
+ <div class="card-header"><span>Workspace Settings</span></div>
+ <div class="card-body">
+ <div class="form-group">
+ <label class="form-label">Name</label>
+ <input v-model="editName" class="form-input" />
+ </div>
+ <div class="form-group">
+ <label class="form-label">Description</label>
+ <input v-model="editDescription" class="form-input" placeholder="Optional description" />
+ </div>
+ <div class="form-group">
+ <label class="form-label">Slug</label>
+ <input :value="ws?.slug" class="form-input" disabled />
+ <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Slug cannot be changed after creation.</small>
+ </div>
+ <button class="btn btn-primary" :disabled="saving" @click="saveSettings">
+ {{ saving ? 'Saving...' : 'Save Changes' }}
+ </button>
+ </div>
+
+ <!-- Single Sign-On (SSO) — owners only -->
+ <div v-if="isOwner" class="card-body" style="border-top: 1px solid var(--border-primary);">
+ <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;">
+ <h4 style="font-size: 14px; font-weight: 600; margin: 0;">Single Sign-On (SSO)</h4>
+ <button v-if="ssoConfig" class="btn btn-danger btn-sm" @click="removeSSO">Remove SSO</button>
+ </div>
+ <p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;">
+ Configure SSO to allow workspace members to authenticate using an OAuth provider.
+ </p>
+
+ <div v-if="ssoLoading" class="loading-page" style="padding: 24px 0;"><div class="spinner"></div></div>
+ <template v-else>
+ <div v-if="ssoProviders.length === 0" class="empty-state" style="padding: 24px 0">
+ <h3>No OAuth providers available</h3>
+ <p>An administrator must configure OAuth providers before SSO can be enabled.</p>
</div>
- <div class="card-body">
- <p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;">
- Configure SSO to allow workspace members to authenticate using an OAuth provider.
- </p>
-
- <div v-if="ssoProviders.length === 0" class="empty-state" style="padding: 24px 0">
- <h3>No OAuth providers available</h3>
- <p>An administrator must configure OAuth providers before SSO can be enabled.</p>
+
+ <form v-else @submit.prevent="saveSSO" style="display: grid; gap: 16px; max-width: 480px;">
+ <div class="form-group">
+ <label class="form-label">OAuth Provider</label>
+ <select v-model.number="ssoForm.provider_id" class="form-select" required>
+ <option :value="0" disabled>Select a provider</option>
+ <option v-for="p in ssoProviders" :key="p.slug" :value="p.id">{{ p.name }} ({{ p.type }})</option>
+ </select>
</div>
- <form v-else @submit.prevent="saveSSO" style="display: grid; gap: 16px; max-width: 480px;">
- <div class="form-group">
- <label class="form-label">OAuth Provider</label>
- <select v-model.number="ssoForm.provider_id" class="form-select" required>
- <option :value="0" disabled>Select a provider</option>
- <option v-for="p in ssoProviders" :key="p.slug" :value="p.id">{{ p.name }} ({{ p.type }})</option>
- </select>
- </div>
-
- <div class="form-group">
- <label class="form-label">Allowed Domains</label>
- <input v-model="ssoForm.allowed_domains" type="text" class="form-input" placeholder="example.com, company.org" />
- <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Comma-separated email domains. Leave empty to allow all domains.</small>
- </div>
-
- <div class="form-group">
- <label style="display: flex; align-items: center; gap: 8px; cursor: pointer;">
- <input type="checkbox" v-model="ssoForm.enforce_sso" />
- <span>Enforce SSO</span>
- </label>
- <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Require all workspace members to authenticate via SSO.</small>
- </div>
-
- <div class="form-group">
- <label style="display: flex; align-items: center; gap: 8px; cursor: pointer;">
- <input type="checkbox" v-model="ssoForm.auto_provision" />
- <span>Auto-provision users</span>
- </label>
- <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Automatically create accounts for new users who authenticate via SSO.</small>
- </div>
-
- <button type="submit" class="btn btn-primary" :disabled="ssoSaving" style="justify-self: start;">
- {{ ssoSaving ? 'Saving...' : (ssoConfig ? 'Update SSO' : 'Enable SSO') }}
- </button>
- </form>
- </div>
- </div>
- </template>
- </div>
+ <div class="form-group">
+ <label class="form-label">Allowed Domains</label>
+ <input v-model="ssoForm.allowed_domains" type="text" class="form-input" placeholder="example.com, company.org" />
+ <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Comma-separated email domains. Leave empty to allow all domains.</small>
+ </div>
- <!-- Data Transfer Tab -->
- <div v-if="activeTab === 'transfer' && isAdminOrOwner" class="card">
- <div class="card-header"><span>Transfer Personal Data to Workspace</span></div>
- <div class="card-body">
+ <div class="form-group">
+ <label style="display: flex; align-items: center; gap: 8px; cursor: pointer;">
+ <input type="checkbox" v-model="ssoForm.enforce_sso" />
+ <span>Enforce SSO</span>
+ </label>
+ <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Require all workspace members to authenticate via SSO.</small>
+ </div>
+
+ <div class="form-group">
+ <label style="display: flex; align-items: center; gap: 8px; cursor: pointer;">
+ <input type="checkbox" v-model="ssoForm.auto_provision" />
+ <span>Auto-provision users</span>
+ </label>
+ <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Automatically create accounts for new users who authenticate via SSO.</small>
+ </div>
+
+ <button type="submit" class="btn btn-primary" :disabled="ssoSaving" style="justify-self: start;">
+ {{ ssoSaving ? 'Saving...' : (ssoConfig ? 'Update SSO' : 'Enable SSO') }}
+ </button>
+ </form>
+ </template>
+ </div>
+
+ <!-- Transfer Personal Data to Workspace -->
+ <div class="card-body" style="border-top: 1px solid var(--border-primary);">
+ <h4 style="font-size: 14px; font-weight: 600; margin-bottom: 8px;">Transfer Personal Data to Workspace</h4>
<p style="font-size: 13px; color: var(--text-secondary); margin-bottom: 16px;">
Move your personal resources into this workspace. Transferred data will no longer appear in your personal account.
</p>
@@ -811,29 +828,6 @@ onMounted(async () => {
</div>
</div>
</div>
- </div>
-
- <!-- Settings Tab -->
- <div v-if="activeTab === 'settings' && isAdminOrOwner" class="card">
- <div class="card-header"><span>Workspace Settings</span></div>
- <div class="card-body">
- <div class="form-group">
- <label class="form-label">Name</label>
- <input v-model="editName" class="form-input" />
- </div>
- <div class="form-group">
- <label class="form-label">Description</label>
- <input v-model="editDescription" class="form-input" placeholder="Optional description" />
- </div>
- <div class="form-group">
- <label class="form-label">Slug</label>
- <input :value="ws?.slug" class="form-input" disabled />
- <small style="font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block;">Slug cannot be changed after creation.</small>
- </div>
- <button class="btn btn-primary" :disabled="saving" @click="saveSettings">
- {{ saving ? 'Saving...' : 'Save Changes' }}
- </button>
- </div>
<div class="card-body" style="border-top: 1px solid var(--border-primary);">
<h4 style="font-size: 14px; font-weight: 600; margin-bottom: 8px;">Data Export / Import</h4>