feat: complete i18n audit fix, toast system, UI improvements
i18n (all 3 languages - EN, ES, PT-BR): - ApiKeys page + CreateApiKeyDialog: 26 strings - billing/Processing page: 8 strings - onboarding/Step1 + Step2: 10 strings (new onboarding.php) - UserMenuContent: 7 strings (Account, Theme, Language, Log out) - PhotoUpload: 4 strings (Upload, Remove, hint) - TimezoneCombobox: 3 strings - DatePicker: 1 string - workspaces/Create + Index: full i18n (new workspaces.php) Toast system: - Unify Toast.vue with Sonner (copied from sendkit) - Flash messages + JS toasts use same system - Icon colors via CSS (success/error/warning/info) - Position bottom-right UI improvements: - Posts Edit: move trash/schedule/publish to header-right slot - Posts Edit: labels/hashtags/datepicker stay in top bar with platforms - Posts Edit: delete post requires typing DELETE to confirm - Posts Edit: Labels button with icon+text, always visible - DatePicker: w-full by default, w-auto via class override - Fix "Etiquetas" -> "Etiqueta" (remove plural) - Posts breadcrumbs: /posts shows "Posts > All Posts" - Calendar breadcrumbs: "Posts > Calendar" - Edit breadcrumbs: "Posts > Edit Post" - Remove unused AppHeader.vue and AppHeaderLayout.vue All 728 tests passing.
This commit is contained in:
parent
6d29bdf0e0
commit
c694d966d7
41 changed files with 751 additions and 503 deletions
|
|
@ -42,6 +42,17 @@
|
|||
'paid' => 'Paid',
|
||||
],
|
||||
|
||||
'processing' => [
|
||||
'page_title' => 'Processing...',
|
||||
'title' => 'Processing your subscription',
|
||||
'description' => 'Please wait while we set up your account. This will only take a moment.',
|
||||
'success_title' => 'You\'re all set!',
|
||||
'success_description' => 'Your subscription is active. Redirecting you to your workspaces...',
|
||||
'cancelled_title' => 'Checkout cancelled',
|
||||
'cancelled_description' => 'Your checkout was cancelled. No charges were made.',
|
||||
'retry' => 'Try again',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'active' => 'Active',
|
||||
'canceled' => 'Canceled',
|
||||
|
|
|
|||
|
|
@ -9,4 +9,21 @@
|
|||
'to_confirm' => 'to confirm.',
|
||||
'copy_to_clipboard' => 'Copy to clipboard',
|
||||
],
|
||||
|
||||
'photo_upload' => [
|
||||
'upload' => 'Upload',
|
||||
'uploading' => 'Uploading...',
|
||||
'remove' => 'Remove photo',
|
||||
'hint' => 'Recommended: square image, max 2 MB.',
|
||||
],
|
||||
|
||||
'timezone' => [
|
||||
'select' => 'Select timezone',
|
||||
'search' => 'Search timezone...',
|
||||
'empty' => 'No timezone found',
|
||||
],
|
||||
|
||||
'date_picker' => [
|
||||
'select' => 'Select date',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
21
lang/en/onboarding.php
Normal file
21
lang/en/onboarding.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'role' => [
|
||||
'page_title' => 'Welcome - Tell us about yourself',
|
||||
'title' => 'Tell us about yourself',
|
||||
'description' => 'Help us personalize your experience',
|
||||
'submit' => 'Continue',
|
||||
],
|
||||
|
||||
'connect' => [
|
||||
'page_title' => 'Connect your accounts',
|
||||
'title' => 'Connect your accounts',
|
||||
'description' => 'Connect at least one social network to get started',
|
||||
'submit' => 'Continue',
|
||||
'error' => 'Something went wrong. Please try again.',
|
||||
'go_back' => 'Go Back',
|
||||
],
|
||||
];
|
||||
|
|
@ -142,4 +142,50 @@
|
|||
'logo_updated' => 'Logo uploaded successfully!',
|
||||
'logo_deleted' => 'Logo removed successfully!',
|
||||
],
|
||||
|
||||
'api_keys' => [
|
||||
'title' => 'API Keys',
|
||||
'page_title' => 'API Keys',
|
||||
'heading' => 'API Keys',
|
||||
'description' => 'Manage API keys for programmatic access to your workspace.',
|
||||
'create' => 'Create API Key',
|
||||
'copy' => 'Copy',
|
||||
'new_token_message' => 'Your new API key has been created. Copy it now — you won\'t be able to see it again.',
|
||||
'table' => [
|
||||
'name' => 'Name',
|
||||
'key' => 'Key',
|
||||
'status' => 'Status',
|
||||
'expires' => 'Expires',
|
||||
'last_used' => 'Last Used',
|
||||
'never' => 'Never',
|
||||
],
|
||||
'actions' => [
|
||||
'copy_id' => 'Copy API Key ID',
|
||||
'copy_id_success' => 'API Key ID copied to clipboard',
|
||||
'delete' => 'Delete',
|
||||
],
|
||||
'empty' => [
|
||||
'title' => 'No API keys yet',
|
||||
'description' => 'Create an API key to access your workspace programmatically.',
|
||||
],
|
||||
'delete_modal' => [
|
||||
'title' => 'Delete API key',
|
||||
'description' => 'Are you sure you want to delete this API key? Any applications using this key will lose access immediately.',
|
||||
'action' => 'Delete API key',
|
||||
],
|
||||
'create_dialog' => [
|
||||
'title' => 'Create API Key',
|
||||
'description' => 'Create a new API key for programmatic access to your workspace.',
|
||||
'name' => 'Name',
|
||||
'name_placeholder' => 'e.g. Production API Key',
|
||||
'expires' => 'Expiration date (optional)',
|
||||
'expires_placeholder' => 'No expiration',
|
||||
'submit' => 'Create',
|
||||
'cancel' => 'Cancel',
|
||||
],
|
||||
'flash' => [
|
||||
'created' => 'API key created successfully!',
|
||||
'deleted' => 'API key deleted successfully!',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
'create_workspace' => 'Create workspace',
|
||||
'create_post' => 'Create post',
|
||||
'profile' => 'Profile',
|
||||
'account' => 'Account',
|
||||
'log_out' => 'Log out',
|
||||
|
||||
'workspace' => 'Workspace: :name',
|
||||
|
|
|
|||
20
lang/en/workspaces.php
Normal file
20
lang/en/workspaces.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'title' => 'Workspaces',
|
||||
'select_title' => 'Your workspaces',
|
||||
'select_description' => 'Select a workspace to continue',
|
||||
'current' => 'Current',
|
||||
'connections' => ':count connections',
|
||||
'posts' => ':count posts',
|
||||
|
||||
'create' => [
|
||||
'title' => 'Create a workspace',
|
||||
'description' => 'Give your workspace a name to get started',
|
||||
'name' => 'Workspace name',
|
||||
'name_placeholder' => 'My Workspace',
|
||||
'submit' => 'Create workspace',
|
||||
],
|
||||
];
|
||||
|
|
@ -42,6 +42,17 @@
|
|||
'paid' => 'Pagado',
|
||||
],
|
||||
|
||||
'processing' => [
|
||||
'page_title' => 'Procesando...',
|
||||
'title' => 'Procesando tu suscripción',
|
||||
'description' => 'Espera mientras configuramos tu cuenta. Solo tomará un momento.',
|
||||
'success_title' => '¡Todo listo!',
|
||||
'success_description' => 'Tu suscripción está activa. Redirigiendo a tus workspaces...',
|
||||
'cancelled_title' => 'Pago cancelado',
|
||||
'cancelled_description' => 'Tu pago fue cancelado. No se realizaron cargos.',
|
||||
'retry' => 'Intentar de nuevo',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'active' => 'Activa',
|
||||
'canceled' => 'Cancelada',
|
||||
|
|
|
|||
|
|
@ -9,4 +9,21 @@
|
|||
'to_confirm' => 'para confirmar.',
|
||||
'copy_to_clipboard' => 'Copiar al portapapeles',
|
||||
],
|
||||
|
||||
'photo_upload' => [
|
||||
'upload' => 'Subir',
|
||||
'uploading' => 'Subiendo...',
|
||||
'remove' => 'Eliminar foto',
|
||||
'hint' => 'Recomendado: imagen cuadrada, máximo 2 MB.',
|
||||
],
|
||||
|
||||
'timezone' => [
|
||||
'select' => 'Seleccionar zona horaria',
|
||||
'search' => 'Buscar zona horaria...',
|
||||
'empty' => 'No se encontró zona horaria',
|
||||
],
|
||||
|
||||
'date_picker' => [
|
||||
'select' => 'Seleccionar fecha',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
21
lang/es/onboarding.php
Normal file
21
lang/es/onboarding.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'role' => [
|
||||
'page_title' => 'Bienvenido - Cuéntanos sobre ti',
|
||||
'title' => 'Cuéntanos sobre ti',
|
||||
'description' => 'Ayúdanos a personalizar tu experiencia',
|
||||
'submit' => 'Continuar',
|
||||
],
|
||||
|
||||
'connect' => [
|
||||
'page_title' => 'Conecta tus cuentas',
|
||||
'title' => 'Conecta tus cuentas',
|
||||
'description' => 'Conecta al menos una red social para comenzar',
|
||||
'submit' => 'Continuar',
|
||||
'error' => 'Algo salió mal. Inténtalo de nuevo.',
|
||||
'go_back' => 'Volver',
|
||||
],
|
||||
];
|
||||
|
|
@ -142,4 +142,50 @@
|
|||
'logo_updated' => '¡Logo subido correctamente!',
|
||||
'logo_deleted' => '¡Logo eliminado correctamente!',
|
||||
],
|
||||
|
||||
'api_keys' => [
|
||||
'title' => 'Claves API',
|
||||
'page_title' => 'Claves API',
|
||||
'heading' => 'Claves API',
|
||||
'description' => 'Administra claves API para acceso programático a tu workspace.',
|
||||
'create' => 'Crear clave API',
|
||||
'copy' => 'Copiar',
|
||||
'new_token_message' => 'Tu nueva clave API ha sido creada. Cópiala ahora — no podrás verla de nuevo.',
|
||||
'table' => [
|
||||
'name' => 'Nombre',
|
||||
'key' => 'Clave',
|
||||
'status' => 'Estado',
|
||||
'expires' => 'Expira',
|
||||
'last_used' => 'Último uso',
|
||||
'never' => 'Nunca',
|
||||
],
|
||||
'actions' => [
|
||||
'copy_id' => 'Copiar ID de clave API',
|
||||
'copy_id_success' => 'ID de clave API copiado',
|
||||
'delete' => 'Eliminar',
|
||||
],
|
||||
'empty' => [
|
||||
'title' => 'No hay claves API',
|
||||
'description' => 'Crea una clave API para acceder a tu workspace programáticamente.',
|
||||
],
|
||||
'delete_modal' => [
|
||||
'title' => 'Eliminar clave API',
|
||||
'description' => '¿Estás seguro de que deseas eliminar esta clave API? Las aplicaciones que la usen perderán acceso inmediatamente.',
|
||||
'action' => 'Eliminar clave API',
|
||||
],
|
||||
'create_dialog' => [
|
||||
'title' => 'Crear clave API',
|
||||
'description' => 'Crea una nueva clave API para acceso programático a tu workspace.',
|
||||
'name' => 'Nombre',
|
||||
'name_placeholder' => 'ej. Clave API de Producción',
|
||||
'expires' => 'Fecha de expiración (opcional)',
|
||||
'expires_placeholder' => 'Sin expiración',
|
||||
'submit' => 'Crear',
|
||||
'cancel' => 'Cancelar',
|
||||
],
|
||||
'flash' => [
|
||||
'created' => '¡Clave API creada correctamente!',
|
||||
'deleted' => '¡Clave API eliminada correctamente!',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
'create_workspace' => 'Crear workspace',
|
||||
'create_post' => 'Crear post',
|
||||
'profile' => 'Perfil',
|
||||
'account' => 'Cuenta',
|
||||
'log_out' => 'Cerrar sesión',
|
||||
|
||||
'workspace' => 'Workspace: :name',
|
||||
|
|
|
|||
20
lang/es/workspaces.php
Normal file
20
lang/es/workspaces.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'title' => 'Workspaces',
|
||||
'select_title' => 'Tus workspaces',
|
||||
'select_description' => 'Selecciona un workspace para continuar',
|
||||
'current' => 'Actual',
|
||||
'connections' => ':count conexiones',
|
||||
'posts' => ':count posts',
|
||||
|
||||
'create' => [
|
||||
'title' => 'Crear un workspace',
|
||||
'description' => 'Dale un nombre a tu workspace para comenzar',
|
||||
'name' => 'Nombre del workspace',
|
||||
'name_placeholder' => 'Mi Workspace',
|
||||
'submit' => 'Crear workspace',
|
||||
],
|
||||
];
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -42,6 +42,17 @@
|
|||
'paid' => 'Pago',
|
||||
],
|
||||
|
||||
'processing' => [
|
||||
'page_title' => 'Processando...',
|
||||
'title' => 'Processando sua assinatura',
|
||||
'description' => 'Aguarde enquanto configuramos sua conta. Isso levará apenas um momento.',
|
||||
'success_title' => 'Tudo pronto!',
|
||||
'success_description' => 'Sua assinatura está ativa. Redirecionando para seus workspaces...',
|
||||
'cancelled_title' => 'Pagamento cancelado',
|
||||
'cancelled_description' => 'Seu pagamento foi cancelado. Nenhuma cobrança foi realizada.',
|
||||
'retry' => 'Tentar novamente',
|
||||
],
|
||||
|
||||
'status' => [
|
||||
'active' => 'Ativo',
|
||||
'canceled' => 'Cancelado',
|
||||
|
|
|
|||
|
|
@ -9,4 +9,21 @@
|
|||
'to_confirm' => 'para confirmar.',
|
||||
'copy_to_clipboard' => 'Copiar para a área de transferência',
|
||||
],
|
||||
|
||||
'photo_upload' => [
|
||||
'upload' => 'Enviar',
|
||||
'uploading' => 'Enviando...',
|
||||
'remove' => 'Remover foto',
|
||||
'hint' => 'Recomendado: imagem quadrada, máximo 2 MB.',
|
||||
],
|
||||
|
||||
'timezone' => [
|
||||
'select' => 'Selecionar fuso horário',
|
||||
'search' => 'Buscar fuso horário...',
|
||||
'empty' => 'Fuso horário não encontrado',
|
||||
],
|
||||
|
||||
'date_picker' => [
|
||||
'select' => 'Selecionar data',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
21
lang/pt-br/onboarding.php
Normal file
21
lang/pt-br/onboarding.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'role' => [
|
||||
'page_title' => 'Bem-vindo - Conte-nos sobre você',
|
||||
'title' => 'Conte-nos sobre você',
|
||||
'description' => 'Nos ajude a personalizar sua experiência',
|
||||
'submit' => 'Continuar',
|
||||
],
|
||||
|
||||
'connect' => [
|
||||
'page_title' => 'Conecte suas contas',
|
||||
'title' => 'Conecte suas contas',
|
||||
'description' => 'Conecte pelo menos uma rede social para começar',
|
||||
'submit' => 'Continuar',
|
||||
'error' => 'Algo deu errado. Tente novamente.',
|
||||
'go_back' => 'Voltar',
|
||||
],
|
||||
];
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
'view_title' => 'Visualizar Post',
|
||||
'manage_platforms' => 'Gerenciar plataformas',
|
||||
'sync' => 'Sincronizar',
|
||||
'labels' => 'Etiquetas',
|
||||
'labels' => 'Etiqueta',
|
||||
'hashtags' => 'Hashtags',
|
||||
'schedule' => 'Agendar',
|
||||
'publish' => 'Publicar',
|
||||
|
|
|
|||
|
|
@ -142,4 +142,50 @@
|
|||
'logo_updated' => 'Logo enviado com sucesso!',
|
||||
'logo_deleted' => 'Logo removido com sucesso!',
|
||||
],
|
||||
|
||||
'api_keys' => [
|
||||
'title' => 'Chaves API',
|
||||
'page_title' => 'Chaves API',
|
||||
'heading' => 'Chaves API',
|
||||
'description' => 'Gerencie chaves API para acesso programático ao seu workspace.',
|
||||
'create' => 'Criar chave API',
|
||||
'copy' => 'Copiar',
|
||||
'new_token_message' => 'Sua nova chave API foi criada. Copie agora — você não poderá vê-la novamente.',
|
||||
'table' => [
|
||||
'name' => 'Nome',
|
||||
'key' => 'Chave',
|
||||
'status' => 'Status',
|
||||
'expires' => 'Expira',
|
||||
'last_used' => 'Último uso',
|
||||
'never' => 'Nunca',
|
||||
],
|
||||
'actions' => [
|
||||
'copy_id' => 'Copiar ID da chave API',
|
||||
'copy_id_success' => 'ID da chave API copiado',
|
||||
'delete' => 'Excluir',
|
||||
],
|
||||
'empty' => [
|
||||
'title' => 'Nenhuma chave API',
|
||||
'description' => 'Crie uma chave API para acessar seu workspace programaticamente.',
|
||||
],
|
||||
'delete_modal' => [
|
||||
'title' => 'Excluir chave API',
|
||||
'description' => 'Tem certeza que deseja excluir esta chave API? Aplicações que a usam perderão acesso imediatamente.',
|
||||
'action' => 'Excluir chave API',
|
||||
],
|
||||
'create_dialog' => [
|
||||
'title' => 'Criar chave API',
|
||||
'description' => 'Crie uma nova chave API para acesso programático ao seu workspace.',
|
||||
'name' => 'Nome',
|
||||
'name_placeholder' => 'ex. Chave API de Produção',
|
||||
'expires' => 'Data de expiração (opcional)',
|
||||
'expires_placeholder' => 'Sem expiração',
|
||||
'submit' => 'Criar',
|
||||
'cancel' => 'Cancelar',
|
||||
],
|
||||
'flash' => [
|
||||
'created' => 'Chave de API criada com sucesso!',
|
||||
'deleted' => 'Chave de API excluída com sucesso!',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
'create_workspace' => 'Criar workspace',
|
||||
'create_post' => 'Novo post',
|
||||
'profile' => 'Perfil',
|
||||
'account' => 'Conta',
|
||||
'log_out' => 'Sair',
|
||||
|
||||
'workspace' => 'Workspace: :name',
|
||||
|
|
|
|||
20
lang/pt-br/workspaces.php
Normal file
20
lang/pt-br/workspaces.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
'title' => 'Workspaces',
|
||||
'select_title' => 'Seus workspaces',
|
||||
'select_description' => 'Selecione um workspace para continuar',
|
||||
'current' => 'Atual',
|
||||
'connections' => ':count conexões',
|
||||
'posts' => ':count posts',
|
||||
|
||||
'create' => [
|
||||
'title' => 'Criar um workspace',
|
||||
'description' => 'Dê um nome ao seu workspace para começar',
|
||||
'name' => 'Nome do workspace',
|
||||
'name_placeholder' => 'Meu Workspace',
|
||||
'submit' => 'Criar workspace',
|
||||
],
|
||||
];
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
@source '../../storage/framework/views/*.php';
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
|
||||
:root {
|
||||
--background: #fafafa;
|
||||
--foreground: #0a0a0a;
|
||||
|
|
@ -206,47 +207,181 @@ @layer base {
|
|||
}
|
||||
}
|
||||
|
||||
.workflow-dots {
|
||||
background-image: radial-gradient(circle,
|
||||
var(--border) 1px,
|
||||
transparent 1px);
|
||||
background-size: 20px 20px;
|
||||
cursor: grab;
|
||||
/* :root {
|
||||
--background: #f7f9f3;
|
||||
--foreground: #000000;
|
||||
--card: #ffffff;
|
||||
--card-foreground: #000000;
|
||||
--popover: #ffffff;
|
||||
--popover-foreground: #000000;
|
||||
--primary: #4f46e5;
|
||||
--primary-foreground: #ffffff;
|
||||
--secondary: #14b8a6;
|
||||
--secondary-foreground: #ffffff;
|
||||
--muted: #f0f0f0;
|
||||
--muted-foreground: #333333;
|
||||
--accent: #f59e0b;
|
||||
--accent-foreground: #000000;
|
||||
--destructive: #ef4444;
|
||||
--destructive-foreground: #ffffff;
|
||||
--border: #000000;
|
||||
--input: #737373;
|
||||
--ring: #a5b4fc;
|
||||
--chart-1: #4f46e5;
|
||||
--chart-2: #14b8a6;
|
||||
--chart-3: #f59e0b;
|
||||
--chart-4: #ec4899;
|
||||
--chart-5: #22c55e;
|
||||
--sidebar: #f7f9f3;
|
||||
--sidebar-foreground: #000000;
|
||||
--sidebar-primary: #4f46e5;
|
||||
--sidebar-primary-foreground: #ffffff;
|
||||
--sidebar-accent: #f59e0b;
|
||||
--sidebar-accent-foreground: #000000;
|
||||
--sidebar-border: #000000;
|
||||
--sidebar-ring: #a5b4fc;
|
||||
--font-sans: DM Sans, sans-serif;
|
||||
--font-serif: DM Sans, sans-serif;
|
||||
--font-mono: Space Mono, monospace;
|
||||
--radius: 1rem;
|
||||
--shadow-x: 0px;
|
||||
--shadow-y: 0px;
|
||||
--shadow-blur: 0px;
|
||||
--shadow-spread: 0px;
|
||||
--shadow-opacity: 0.05;
|
||||
--shadow-color: #1a1a1a;
|
||||
--shadow-2xs: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.03);
|
||||
--shadow-xs: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.03);
|
||||
--shadow-sm: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 1px 2px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 1px 2px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-md: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 2px 4px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-lg: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 4px 6px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-xl: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 8px 10px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-2xl: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.13);
|
||||
--tracking-normal: normal;
|
||||
--spacing: 0.25rem;
|
||||
}
|
||||
|
||||
.workflow-dots:active {
|
||||
cursor: grabbing;
|
||||
.dark {
|
||||
--background: #000000;
|
||||
--foreground: #ffffff;
|
||||
--card: #1a212b;
|
||||
--card-foreground: #ffffff;
|
||||
--popover: #1a212b;
|
||||
--popover-foreground: #ffffff;
|
||||
--primary: #818cf8;
|
||||
--primary-foreground: #000000;
|
||||
--secondary: #2dd4bf;
|
||||
--secondary-foreground: #000000;
|
||||
--muted: #333333;
|
||||
--muted-foreground: #cccccc;
|
||||
--accent: #fcd34d;
|
||||
--accent-foreground: #000000;
|
||||
--destructive: #f87171;
|
||||
--destructive-foreground: #000000;
|
||||
--border: #545454;
|
||||
--input: #ffffff;
|
||||
--ring: #818cf8;
|
||||
--chart-1: #818cf8;
|
||||
--chart-2: #2dd4bf;
|
||||
--chart-3: #fcd34d;
|
||||
--chart-4: #f472b6;
|
||||
--chart-5: #4ade80;
|
||||
--sidebar: #000000;
|
||||
--sidebar-foreground: #ffffff;
|
||||
--sidebar-primary: #818cf8;
|
||||
--sidebar-primary-foreground: #000000;
|
||||
--sidebar-accent: #fcd34d;
|
||||
--sidebar-accent-foreground: #000000;
|
||||
--sidebar-border: #ffffff;
|
||||
--sidebar-ring: #818cf8;
|
||||
--font-sans: DM Sans, sans-serif;
|
||||
--font-serif: DM Sans, sans-serif;
|
||||
--font-mono: Space Mono, monospace;
|
||||
--radius: 1rem;
|
||||
--shadow-x: 0px;
|
||||
--shadow-y: 0px;
|
||||
--shadow-blur: 0px;
|
||||
--shadow-spread: 0px;
|
||||
--shadow-opacity: 0.05;
|
||||
--shadow-color: #1a1a1a;
|
||||
--shadow-2xs: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.03);
|
||||
--shadow-xs: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.03);
|
||||
--shadow-sm: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 1px 2px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 1px 2px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-md: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 2px 4px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-lg: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 4px 6px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-xl: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.05), 0px 8px 10px -1px hsl(0 0% 10.1961% / 0.05);
|
||||
--shadow-2xl: 0px 0px 0px 0px hsl(0 0% 10.1961% / 0.13);
|
||||
}
|
||||
|
||||
/* Animated dashed connector lines */
|
||||
.workflow-line-v {
|
||||
width: 2px;
|
||||
background: repeating-linear-gradient(to bottom,
|
||||
var(--border) 0,
|
||||
var(--border) 4px,
|
||||
transparent 4px,
|
||||
transparent 8px);
|
||||
animation: march-v 0.5s linear infinite;
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-destructive-foreground: var(--destructive-foreground);
|
||||
--color-border: var(--border);
|
||||
--color-input: var(--input);
|
||||
--color-ring: var(--ring);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
|
||||
--font-sans: var(--font-sans);
|
||||
--font-mono: var(--font-mono);
|
||||
--font-serif: var(--font-serif);
|
||||
|
||||
--radius-sm: calc(var(--radius) - 4px);
|
||||
--radius-md: calc(var(--radius) - 2px);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) + 4px);
|
||||
|
||||
--shadow-2xs: var(--shadow-2xs);
|
||||
--shadow-xs: var(--shadow-xs);
|
||||
--shadow-sm: var(--shadow-sm);
|
||||
--shadow: var(--shadow);
|
||||
--shadow-md: var(--shadow-md);
|
||||
--shadow-lg: var(--shadow-lg);
|
||||
--shadow-xl: var(--shadow-xl);
|
||||
--shadow-2xl: var(--shadow-2xl);
|
||||
|
||||
--tracking-tighter: calc(var(--tracking-normal) - 0.05em);
|
||||
--tracking-tight: calc(var(--tracking-normal) - 0.025em);
|
||||
--tracking-normal: var(--tracking-normal);
|
||||
--tracking-wide: calc(var(--tracking-normal) + 0.025em);
|
||||
--tracking-wider: calc(var(--tracking-normal) + 0.05em);
|
||||
--tracking-widest: calc(var(--tracking-normal) + 0.1em);
|
||||
}
|
||||
|
||||
.workflow-line-h {
|
||||
height: 2px;
|
||||
background: repeating-linear-gradient(to right,
|
||||
var(--border) 0,
|
||||
var(--border) 4px,
|
||||
transparent 4px,
|
||||
transparent 8px);
|
||||
animation: march-h 0.5s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes march-v {
|
||||
to {
|
||||
background-position-y: 8px;
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes march-h {
|
||||
to {
|
||||
background-position-x: 8px;
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
letter-spacing: var(--tracking-normal);
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import type { InertiaLinkProps } from '@inertiajs/vue3';
|
||||
import { Link, usePage } from '@inertiajs/vue3';
|
||||
import { IconCalendar, IconMenu2, IconSettings, IconShare, IconUsers } from '@tabler/icons-vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import Breadcrumbs from '@/components/Breadcrumbs.vue';
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/components/ui/dropdown-menu';
|
||||
import {
|
||||
NavigationMenu,
|
||||
NavigationMenuItem,
|
||||
NavigationMenuList,
|
||||
navigationMenuTriggerStyle,
|
||||
} from '@/components/ui/navigation-menu';
|
||||
import {
|
||||
Sheet,
|
||||
SheetContent,
|
||||
SheetHeader,
|
||||
SheetTitle,
|
||||
SheetTrigger,
|
||||
} from '@/components/ui/sheet';
|
||||
import UserMenuContent from '@/components/UserMenuContent.vue';
|
||||
import WorkspaceSwitcher from '@/components/WorkspaceSwitcher.vue';
|
||||
import { useActiveUrl } from '@/composables/useActiveUrl';
|
||||
import { calendar } from '@/routes/app';
|
||||
import type { BreadcrumbItem, NavItem } from '@/types';
|
||||
|
||||
interface Props {
|
||||
breadcrumbs?: BreadcrumbItem[];
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
breadcrumbs: () => [],
|
||||
});
|
||||
|
||||
const page = usePage();
|
||||
const auth = computed(() => page.props.auth);
|
||||
const currentWorkspace = computed(() => page.props.auth.currentWorkspace);
|
||||
const { urlIsActive } = useActiveUrl();
|
||||
|
||||
function activeItemStyles(url: NonNullable<InertiaLinkProps['href']>) {
|
||||
return urlIsActive(url)
|
||||
? 'text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100'
|
||||
: '';
|
||||
}
|
||||
|
||||
const mainNavItems: NavItem[] = [
|
||||
{
|
||||
title: 'Calendar',
|
||||
href: '/calendar',
|
||||
icon: IconCalendar,
|
||||
},
|
||||
{
|
||||
title: 'Accounts',
|
||||
href: '/accounts',
|
||||
icon: IconShare,
|
||||
},
|
||||
{
|
||||
title: 'Members',
|
||||
href: '/members',
|
||||
icon: IconUsers,
|
||||
},
|
||||
{
|
||||
title: 'Settings',
|
||||
href: '/settings',
|
||||
icon: IconSettings,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="border-b border-border">
|
||||
<div class="mx-auto flex h-16 items-center px-4 md:max-w-7xl">
|
||||
<!-- Mobile Menu -->
|
||||
<div v-if="currentWorkspace" class="lg:hidden">
|
||||
<Sheet>
|
||||
<SheetTrigger :as-child="true">
|
||||
<Button variant="ghost" size="icon" class="mr-2 h-9 w-9">
|
||||
<IconMenu2 class="h-5 w-5" />
|
||||
</Button>
|
||||
</SheetTrigger>
|
||||
<SheetContent side="left" class="w-[300px] p-6">
|
||||
<SheetTitle class="sr-only">Navigation Menu</SheetTitle>
|
||||
<SheetHeader class="flex justify-start text-left">
|
||||
<img src="/images/trypost/logo-light.png" alt="TryPost"
|
||||
class="dark:hidden h-8 w-auto" />
|
||||
<img src="/images/trypost/logo-dark.png" alt="TryPost"
|
||||
class="hidden dark:block h-8 w-auto" />
|
||||
</SheetHeader>
|
||||
<div class="flex h-full flex-1 flex-col justify-between space-y-4 py-6">
|
||||
<div class="space-y-4">
|
||||
<WorkspaceSwitcher />
|
||||
<nav class="-mx-3 space-y-1">
|
||||
<Link v-for="item in mainNavItems" :key="item.title" :href="item.href"
|
||||
class="flex items-center gap-x-3 rounded-lg px-3 py-2 text-sm font-medium hover:bg-accent"
|
||||
:class="activeItemStyles(item.href)">
|
||||
<component v-if="item.icon" :is="item.icon" class="h-5 w-5" />
|
||||
{{ item.title }}
|
||||
</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</SheetContent>
|
||||
</Sheet>
|
||||
</div>
|
||||
|
||||
<Link :href="calendar.url()" class="flex items-center gap-x-2">
|
||||
<img src="/images/trypost/logo-light.png" alt="TryPost" class="dark:hidden h-8 w-auto" />
|
||||
<img src="/images/trypost/logo-dark.png" alt="TryPost" class="hidden dark:block h-8 w-auto" />
|
||||
</Link>
|
||||
|
||||
<!-- Workspace Switcher - Desktop -->
|
||||
<div v-if="currentWorkspace" class="ml-6 hidden lg:block">
|
||||
<WorkspaceSwitcher />
|
||||
</div>
|
||||
|
||||
<!-- Desktop Menu -->
|
||||
<div v-if="currentWorkspace" class="hidden h-full lg:flex lg:flex-1">
|
||||
<NavigationMenu class="ml-6 flex h-full items-stretch">
|
||||
<NavigationMenuList class="flex h-full items-stretch space-x-2">
|
||||
<NavigationMenuItem v-for="(item, index) in mainNavItems" :key="index"
|
||||
class="relative flex h-full items-center">
|
||||
<Link :class="[
|
||||
navigationMenuTriggerStyle(),
|
||||
activeItemStyles(item.href),
|
||||
'h-9 cursor-pointer px-3',
|
||||
]" :href="item.href">
|
||||
<component v-if="item.icon" :is="item.icon" class="mr-2 h-4 w-4" />
|
||||
{{ item.title }}
|
||||
</Link>
|
||||
<div v-if="urlIsActive(item.href)"
|
||||
class="absolute bottom-0 left-0 h-0.5 w-full translate-y-px bg-black dark:bg-white">
|
||||
</div>
|
||||
</NavigationMenuItem>
|
||||
</NavigationMenuList>
|
||||
</NavigationMenu>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto flex items-center space-x-2">
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger :as-child="true">
|
||||
<Button variant="ghost" size="icon"
|
||||
class="relative size-10 w-auto rounded-full p-1 focus-within:ring-2 focus-within:ring-primary">
|
||||
<Avatar
|
||||
:src="auth.user.photo_url"
|
||||
:name="auth.user.name"
|
||||
class="size-8 overflow-hidden rounded-full"
|
||||
fallback-class="bg-neutral-200 font-semibold text-black dark:bg-neutral-700 dark:text-white"
|
||||
/>
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end" class="w-56">
|
||||
<UserMenuContent :user="auth.user" />
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="props.breadcrumbs.length > 1" class="flex w-full border-b border-border">
|
||||
<div class="mx-auto flex h-12 w-full items-center justify-start px-4 text-neutral-500 md:max-w-7xl">
|
||||
<Breadcrumbs :breadcrumbs="breadcrumbs" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -43,7 +43,7 @@ const props = defineProps({
|
|||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: 'Select date',
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -175,9 +175,9 @@ const displayText = computed(() => {
|
|||
<Popover v-model:open="popoverOpen">
|
||||
<PopoverTrigger as-child :disabled="disabled">
|
||||
<Button :id="name" type="button" variant="outline" class="w-full justify-between text-left font-normal"
|
||||
:class="{ 'text-muted-foreground': !displayText }" :disabled="disabled">
|
||||
<span>{{ displayText || placeholder }}</span>
|
||||
<IconCalendar class="h-4 w-4" />
|
||||
:class="[{ 'text-muted-foreground': !displayText }, $attrs.class]" :disabled="disabled">
|
||||
<span>{{ displayText || placeholder || $t('common.date_picker.select') }}</span>
|
||||
<IconCalendar class="h-4 w-4 shrink-0" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-auto p-0" :align="align">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { router } from '@inertiajs/vue3';
|
||||
import { IconTrash } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
|
|
@ -116,7 +117,7 @@ const handleDelete = () => {
|
|||
:disabled="uploading"
|
||||
@click="triggerFileInput"
|
||||
>
|
||||
{{ uploading ? 'Uploading...' : 'Upload' }}
|
||||
{{ uploading ? trans('common.photo_upload.uploading') : trans('common.photo_upload.upload') }}
|
||||
</Button>
|
||||
<TooltipProvider v-if="hasPhoto && deleteUrl">
|
||||
<Tooltip>
|
||||
|
|
@ -131,12 +132,12 @@ const handleDelete = () => {
|
|||
<IconTrash class="size-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>Remove photo</TooltipContent>
|
||||
<TooltipContent>{{ $t('common.photo_upload.remove') }}</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
Recommended: square image, max 2 MB.
|
||||
{{ $t('common.photo_upload.hint') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { IconCheck, IconChevronDown, IconSearch } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { FocusScope } from 'reka-ui';
|
||||
import { ref, watchEffect } from 'vue';
|
||||
|
||||
|
|
@ -92,7 +93,7 @@ watchEffect(() => {
|
|||
{{
|
||||
selectedTimezone
|
||||
? selectedTimezone.label
|
||||
: 'Select timezone'
|
||||
: trans('common.timezone.select')
|
||||
}}
|
||||
<IconChevronDown
|
||||
class="ml-2 h-4 w-4 shrink-0 opacity-50"
|
||||
|
|
@ -102,14 +103,14 @@ watchEffect(() => {
|
|||
</ComboboxAnchor>
|
||||
<ComboboxList class="w-full">
|
||||
<div class="relative">
|
||||
<ComboboxInput placeholder="Search timezone..." />
|
||||
<ComboboxInput :placeholder="trans('common.timezone.search')" />
|
||||
<span
|
||||
class="absolute inset-y-0 start-0 flex items-center justify-center px-3"
|
||||
>
|
||||
<IconSearch class="size-4 text-muted-foreground" />
|
||||
</span>
|
||||
</div>
|
||||
<ComboboxEmpty>No timezone found</ComboboxEmpty>
|
||||
<ComboboxEmpty>{{ $t('common.timezone.empty') }}</ComboboxEmpty>
|
||||
<ComboboxGroup>
|
||||
<ComboboxItem
|
||||
v-for="tz in timezones"
|
||||
|
|
|
|||
|
|
@ -1,77 +1,48 @@
|
|||
<script setup lang="ts">
|
||||
import { usePage } from '@inertiajs/vue3';
|
||||
import {
|
||||
IconAlertTriangle,
|
||||
IconCircleCheck,
|
||||
IconCircleX,
|
||||
IconInfoCircle,
|
||||
IconX,
|
||||
} from '@tabler/icons-vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { computed, onMounted, watch } from 'vue';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
|
||||
const show = ref(false);
|
||||
const style = computed(() => usePage().props.flash?.bannerStyle || 'success');
|
||||
const message = computed(() => usePage().props.flash?.banner || '');
|
||||
|
||||
let timeoutId: ReturnType<typeof setTimeout> | null = null;
|
||||
const showToast = (msg: string) => {
|
||||
switch (style.value) {
|
||||
case 'success':
|
||||
toast.success(msg);
|
||||
break;
|
||||
case 'danger':
|
||||
toast.error(msg);
|
||||
break;
|
||||
case 'warning':
|
||||
toast.warning(msg);
|
||||
break;
|
||||
case 'info':
|
||||
toast.info(msg);
|
||||
break;
|
||||
default:
|
||||
toast(msg);
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
message,
|
||||
(newMessage) => {
|
||||
if (newMessage) {
|
||||
show.value = true;
|
||||
// Show flash on initial page load (after Toaster is mounted)
|
||||
onMounted(() => {
|
||||
if (message.value) {
|
||||
showToast(message.value);
|
||||
}
|
||||
});
|
||||
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
// Show flash on SPA navigation (Inertia visits)
|
||||
watch(message, (newMessage) => {
|
||||
if (!newMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
timeoutId = setTimeout(() => {
|
||||
show.value = false;
|
||||
timeoutId = null;
|
||||
}, 3000);
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
showToast(newMessage);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="show && message"
|
||||
class="pointer-events-none fixed inset-0 z-50 flex items-end justify-end p-6"
|
||||
>
|
||||
<div
|
||||
class="pointer-events-auto w-full max-w-sm rounded-lg border bg-background p-4 shadow-lg"
|
||||
>
|
||||
<div class="flex items-start gap-3">
|
||||
<IconCircleCheck
|
||||
v-if="style === 'success'"
|
||||
class="size-5 shrink-0 text-green-500"
|
||||
/>
|
||||
<IconCircleX
|
||||
v-if="style === 'danger'"
|
||||
class="size-5 shrink-0 text-destructive"
|
||||
/>
|
||||
<IconInfoCircle
|
||||
v-if="style === 'info'"
|
||||
class="size-5 shrink-0 text-blue-500"
|
||||
/>
|
||||
<IconAlertTriangle
|
||||
v-if="style === 'warning'"
|
||||
class="size-5 shrink-0 text-yellow-500"
|
||||
/>
|
||||
<p class="flex-1 text-sm font-medium text-foreground">
|
||||
{{ message }}
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
@click="show = false"
|
||||
class="shrink-0 rounded-md text-muted-foreground hover:text-foreground focus:outline-none"
|
||||
>
|
||||
<span class="sr-only">Close</span>
|
||||
<IconX class="size-4" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Toaster />
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ const handleLogout = () => {
|
|||
<DropdownMenuItem :as-child="true">
|
||||
<Link class="block w-full cursor-pointer" :href="edit()" prefetch>
|
||||
<IconUser class="size-4" />
|
||||
Account
|
||||
{{ $t('sidebar.account') }}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
|
|
@ -102,21 +102,21 @@ const handleLogout = () => {
|
|||
v-else
|
||||
class="size-4 text-muted-foreground"
|
||||
/>
|
||||
Theme: <span class="capitalize">{{ appearance }}</span>
|
||||
{{ $t('sidebar.theme', { name: appearance === 'light' ? $t('sidebar.theme_light') : appearance === 'dark' ? $t('sidebar.theme_dark') : $t('sidebar.theme_system') }) }}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuPortal>
|
||||
<DropdownMenuSubContent>
|
||||
<DropdownMenuItem @click="updateAppearance('light')">
|
||||
<IconBrightnessUp class="size-4" />
|
||||
Light
|
||||
{{ $t('sidebar.theme_light') }}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem @click="updateAppearance('dark')">
|
||||
<IconMoon class="size-4" />
|
||||
Dark
|
||||
{{ $t('sidebar.theme_dark') }}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem @click="updateAppearance('system')">
|
||||
<IconDeviceDesktop class="size-4" />
|
||||
System
|
||||
{{ $t('sidebar.theme_system') }}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuPortal>
|
||||
|
|
@ -127,7 +127,7 @@ const handleLogout = () => {
|
|||
<DropdownMenuSub v-if="languages && languages.length > 1">
|
||||
<DropdownMenuSubTrigger class="gap-2">
|
||||
<IconLanguage class="size-4 text-muted-foreground" />
|
||||
Language: <span>{{ currentLanguage?.name ?? 'English' }}</span>
|
||||
{{ $t('sidebar.language', { name: currentLanguage?.name ?? 'English' }) }}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuPortal>
|
||||
<DropdownMenuSubContent>
|
||||
|
|
@ -153,7 +153,7 @@ const handleLogout = () => {
|
|||
data-test="logout-button"
|
||||
>
|
||||
<IconLogout class="size-4" />
|
||||
Log out
|
||||
{{ $t('sidebar.log_out') }}
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { Form } from '@inertiajs/vue3';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import ApiKeyController from '@/actions/App/Http/Controllers/App/ApiKeyController';
|
||||
|
|
@ -31,9 +32,9 @@ const onSuccess = () => {
|
|||
<Dialog v-model:open="open">
|
||||
<DialogContent class="sm:max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Create API Key</DialogTitle>
|
||||
<DialogTitle>{{ $t('settings.api_keys.create_dialog.title') }}</DialogTitle>
|
||||
<DialogDescription>
|
||||
Create a new API key for programmatic access to your workspace.
|
||||
{{ $t('settings.api_keys.create_dialog.description') }}
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
<Form
|
||||
|
|
@ -43,31 +44,31 @@ const onSuccess = () => {
|
|||
@success="onSuccess"
|
||||
>
|
||||
<div class="grid gap-2">
|
||||
<Label for="token-name">Name</Label>
|
||||
<Label for="token-name">{{ $t('settings.api_keys.create_dialog.name') }}</Label>
|
||||
<Input
|
||||
id="token-name"
|
||||
name="name"
|
||||
placeholder="e.g. Production API Key"
|
||||
:placeholder="trans('settings.api_keys.create_dialog.name_placeholder')"
|
||||
/>
|
||||
<InputError :message="errors.name" />
|
||||
</div>
|
||||
<div class="grid gap-2">
|
||||
<Label>Expiration date (optional)</Label>
|
||||
<Label>{{ $t('settings.api_keys.create_dialog.expires') }}</Label>
|
||||
<DatePicker
|
||||
name="token-expires"
|
||||
v-model="expiresAt"
|
||||
:show-time="false"
|
||||
placeholder="No expiration"
|
||||
:placeholder="trans('settings.api_keys.create_dialog.expires_placeholder')"
|
||||
/>
|
||||
<input type="hidden" name="expires_at" :value="expiresAt" />
|
||||
<InputError :message="errors.expires_at" />
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button type="submit" :disabled="processing">
|
||||
Create
|
||||
{{ $t('settings.api_keys.create_dialog.submit') }}
|
||||
</Button>
|
||||
<Button type="button" variant="secondary" @click="open = false">
|
||||
Cancel
|
||||
{{ $t('settings.api_keys.create_dialog.cancel') }}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,44 @@
|
|||
<script lang="ts" setup>
|
||||
import type { ToasterProps } from "vue-sonner"
|
||||
import { IconCircleCheck, IconInfoCircle, IconLoader2, IconAlertOctagon, IconAlertTriangle, IconX } from "@tabler/icons-vue"
|
||||
import { Toaster as Sonner } from "vue-sonner"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const props = defineProps<ToasterProps>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Sonner
|
||||
:class="cn('toaster group', props.class)"
|
||||
:style="{
|
||||
'--normal-bg': 'var(--popover)',
|
||||
'--normal-text': 'var(--popover-foreground)',
|
||||
'--normal-border': 'var(--border)',
|
||||
'--border-radius': 'var(--radius)',
|
||||
}"
|
||||
v-bind="props"
|
||||
>
|
||||
<template #success-icon>
|
||||
<IconCircleCheck class="size-4" />
|
||||
</template>
|
||||
<template #info-icon>
|
||||
<IconInfoCircle class="size-4" />
|
||||
</template>
|
||||
<template #warning-icon>
|
||||
<IconAlertTriangle class="size-4" />
|
||||
</template>
|
||||
<template #error-icon>
|
||||
<IconAlertOctagon class="size-4" />
|
||||
</template>
|
||||
<template #loading-icon>
|
||||
<div>
|
||||
<IconLoader2 class="size-4 animate-spin" />
|
||||
</div>
|
||||
</template>
|
||||
<template #close-icon>
|
||||
<IconX class="size-4" />
|
||||
</template>
|
||||
</Sonner>
|
||||
<Sonner v-bind="props" position="bottom-right" :style="{
|
||||
'--normal-bg': 'var(--popover)',
|
||||
'--normal-text': 'var(--popover-foreground)',
|
||||
'--normal-border': 'var(--border)',
|
||||
'--success-bg': 'var(--popover)',
|
||||
'--success-text': 'var(--popover-foreground)',
|
||||
'--success-border': 'var(--border)',
|
||||
'--error-bg': 'var(--popover)',
|
||||
'--error-text': 'var(--popover-foreground)',
|
||||
'--error-border': 'var(--border)',
|
||||
'--warning-bg': 'var(--popover)',
|
||||
'--warning-text': 'var(--popover-foreground)',
|
||||
'--warning-border': 'var(--border)',
|
||||
'--info-bg': 'var(--popover)',
|
||||
'--info-text': 'var(--popover-foreground)',
|
||||
'--info-border': 'var(--border)',
|
||||
}" />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
[data-sonner-toast][data-type="success"] [data-icon] {
|
||||
color: var(--success) !important;
|
||||
}
|
||||
|
||||
[data-sonner-toast][data-type="error"] [data-icon] {
|
||||
color: var(--error) !important;
|
||||
}
|
||||
|
||||
[data-sonner-toast][data-type="warning"] [data-icon] {
|
||||
color: var(--warning) !important;
|
||||
}
|
||||
|
||||
[data-sonner-toast][data-type="info"] [data-icon] {
|
||||
color: var(--info) !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
<script setup lang="ts">
|
||||
import AppContent from '@/components/AppContent.vue';
|
||||
import AppHeader from '@/components/AppHeader.vue';
|
||||
import AppShell from '@/components/AppShell.vue';
|
||||
import type { BreadcrumbItemType } from '@/types';
|
||||
|
||||
interface Props {
|
||||
breadcrumbs?: BreadcrumbItemType[];
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
breadcrumbs: () => [],
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppShell class="flex-col">
|
||||
<AppHeader :breadcrumbs="breadcrumbs" />
|
||||
<AppContent>
|
||||
<slot />
|
||||
</AppContent>
|
||||
</AppShell>
|
||||
</template>
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
import { Head, router } from '@inertiajs/vue3';
|
||||
import { useEcho } from '@laravel/echo-vue';
|
||||
import { IconLoader2, IconCircleCheck, IconCircleX } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
|
@ -49,13 +50,13 @@ if (props.status === 'success') {
|
|||
});
|
||||
}
|
||||
|
||||
function retry() {
|
||||
const retry = () => {
|
||||
router.visit(subscribe.url());
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Processing..." />
|
||||
<Head :title="$t('billing.processing.page_title')" />
|
||||
|
||||
<div class="min-h-screen bg-gradient-to-b from-background via-background to-muted/30 flex items-center justify-center">
|
||||
<div class="text-center max-w-md px-4">
|
||||
|
|
@ -64,9 +65,9 @@ function retry() {
|
|||
<div class="inline-flex items-center justify-center w-20 h-20 rounded-full bg-primary/10 mb-6">
|
||||
<IconLoader2 class="w-10 h-10 text-primary animate-spin" />
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">Processing your subscription</h1>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">{{ $t('billing.processing.title') }}</h1>
|
||||
<p class="text-muted-foreground">
|
||||
Please wait while we set up your account. This will only take a moment.
|
||||
{{ $t('billing.processing.description') }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
|
|
@ -75,9 +76,9 @@ function retry() {
|
|||
<div class="inline-flex items-center justify-center w-20 h-20 rounded-full bg-green-100 mb-6">
|
||||
<IconCircleCheck class="w-10 h-10 text-green-600" />
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">You're all set!</h1>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">{{ $t('billing.processing.success_title') }}</h1>
|
||||
<p class="text-muted-foreground">
|
||||
Your subscription is active. Redirecting you to your workspaces...
|
||||
{{ $t('billing.processing.success_description') }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
|
|
@ -86,12 +87,12 @@ function retry() {
|
|||
<div class="inline-flex items-center justify-center w-20 h-20 rounded-full bg-red-100 mb-6">
|
||||
<IconCircleX class="w-10 h-10 text-red-600" />
|
||||
</div>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">Checkout cancelled</h1>
|
||||
<h1 class="text-2xl font-bold tracking-tight mb-3">{{ $t('billing.processing.cancelled_title') }}</h1>
|
||||
<p class="text-muted-foreground mb-6">
|
||||
Your checkout was cancelled. No charges were made.
|
||||
{{ $t('billing.processing.cancelled_description') }}
|
||||
</p>
|
||||
<Button @click="retry">
|
||||
Try again
|
||||
{{ $t('billing.processing.retry') }}
|
||||
</Button>
|
||||
</template>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { IconBuilding, IconRocket, IconSparkles, IconBuildingStore, IconUser } from '@tabler/icons-vue';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
|
||||
import { storeStep1 } from '@/actions/App/Http/Controllers/App/OnboardingController';
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
|
@ -40,11 +41,11 @@ const isSelected = (value: string) => form.persona === value;
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Welcome - Tell us about yourself" />
|
||||
<Head :title="$t('onboarding.role.page_title')" />
|
||||
|
||||
<OnboardingLayout
|
||||
title="Tell us about yourself"
|
||||
description="Help us personalize your experience"
|
||||
:title="$t('onboarding.role.title')"
|
||||
:description="$t('onboarding.role.description')"
|
||||
:step="1"
|
||||
>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
|
|
@ -81,7 +82,7 @@ const isSelected = (value: string) => form.persona === value;
|
|||
:disabled="!form.persona || form.processing"
|
||||
@click="submit"
|
||||
>
|
||||
Continue
|
||||
{{ $t('onboarding.role.submit') }}
|
||||
</Button>
|
||||
</OnboardingLayout>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@ const submit = () => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Connect your accounts" />
|
||||
<Head :title="$t('onboarding.connect.page_title')" />
|
||||
|
||||
<AuthLayout
|
||||
title="Connect your accounts"
|
||||
description="Connect at least one social network to get started"
|
||||
:title="$t('onboarding.connect.title')"
|
||||
:description="$t('onboarding.connect.description')"
|
||||
>
|
||||
<div v-if="hasWorkspace" class="space-y-4">
|
||||
<div class="space-y-1.5">
|
||||
|
|
@ -129,16 +129,16 @@ const submit = () => {
|
|||
:disabled="isSubmitting"
|
||||
@click="submit"
|
||||
>
|
||||
Continue
|
||||
{{ $t('onboarding.connect.submit') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div v-else class="flex flex-col items-center gap-4 py-8">
|
||||
<p class="text-muted-foreground">
|
||||
Something went wrong. Please try again.
|
||||
{{ $t('onboarding.connect.error') }}
|
||||
</p>
|
||||
<Button variant="outline" @click="router.visit('/onboarding/role')">
|
||||
Go Back
|
||||
{{ $t('onboarding.connect.go_back') }}
|
||||
</Button>
|
||||
</div>
|
||||
</AuthLayout>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
|||
import date from '@/date';
|
||||
import dayjs from '@/dayjs';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { index as postsIndex } from '@/actions/App/Http/Controllers/App/PostController';
|
||||
import { calendar } from '@/routes/app';
|
||||
import { store as storePost, edit as editPost } from '@/routes/app/posts';
|
||||
import { type BreadcrumbItemType } from '@/types';
|
||||
|
|
@ -71,6 +72,7 @@ const effectiveView = computed(() => {
|
|||
});
|
||||
|
||||
const breadcrumbs = computed<BreadcrumbItemType[]>(() => [
|
||||
{ title: trans('posts.title'), href: postsIndex.url() },
|
||||
{ title: trans('calendar.title'), href: calendar.url() },
|
||||
]);
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ import { useMediaManager, type MediaItem } from '@/composables/useMediaManager';
|
|||
import dayjs from '@/dayjs';
|
||||
import debounce from '@/debounce';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { destroy as destroyPost, index as postsIndex, update as updatePost } from '@/routes/app/posts';
|
||||
import { destroy as destroyPost, edit as editPost, index as postsIndex, update as updatePost } from '@/routes/app/posts';
|
||||
import { type BreadcrumbItemType } from '@/types';
|
||||
|
||||
interface SocialAccount {
|
||||
|
|
@ -155,6 +155,7 @@ const props = defineProps<Props>();
|
|||
|
||||
const breadcrumbs = computed<BreadcrumbItemType[]>(() => [
|
||||
{ title: trans('posts.title'), href: postsIndex.url() },
|
||||
{ title: isReadOnly.value ? trans('posts.edit.view_title') : trans('posts.edit.title'), href: editPost.url(post.value.id) },
|
||||
]);
|
||||
|
||||
// Reactive state for real-time updates
|
||||
|
|
@ -653,7 +654,7 @@ const deletePost = () => {
|
|||
if (isReadOnly.value) return;
|
||||
deleteModal.value?.open({
|
||||
url: destroyPost.url(post.value.id),
|
||||
redirect: 'posts.index',
|
||||
confirmText: 'DELETE',
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -686,12 +687,33 @@ const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
|||
<Head :title="isReadOnly ? $t('posts.edit.view_title') : $t('posts.edit.title')" />
|
||||
|
||||
<AppLayout :breadcrumbs="breadcrumbs" :fullWidth="true">
|
||||
<template v-if="!isReadOnly" #header-right>
|
||||
<div class="flex items-center gap-3">
|
||||
<Button type="button" variant="ghost" size="icon" @click="deletePost"
|
||||
:disabled="isSaving || isSubmitting" class="text-muted-foreground hover:text-destructive">
|
||||
<IconTrash class="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
<span class="h-4 w-px bg-border" />
|
||||
|
||||
<Button type="button" variant="secondary" size="sm" class="shrink-0"
|
||||
:disabled="!canSubmit || isSubmitting || isSaving" @click="submit('scheduled')">
|
||||
{{ $t('posts.edit.schedule') }}
|
||||
</Button>
|
||||
|
||||
<Button type="button" size="sm" class="shrink-0" :disabled="!canSubmit || isSubmitting || isSaving"
|
||||
@click="submit('publishing')">
|
||||
{{ $t('posts.edit.publish') }}
|
||||
</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="flex flex-col h-screen">
|
||||
<!-- Top Bar with Tabs and Actions -->
|
||||
<div class="relative flex items-center justify-between border-b px-4 py-2 bg-background">
|
||||
<div class="relative flex items-center justify-between gap-4 border-b px-4 py-2 bg-background">
|
||||
|
||||
<!-- Platform Tabs -->
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex min-w-0 items-center gap-2">
|
||||
<!-- Status Badge (when read-only) -->
|
||||
<Badge v-if="isReadOnly" :class="getStatusConfig(post.status).color" class="mr-2">
|
||||
<component :is="getStatusConfig(post.status).icon" class="mr-1 h-3 w-3"
|
||||
|
|
@ -765,20 +787,19 @@ const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
|||
@click="submit('publishing')">
|
||||
{{ $t('posts.edit.publish') }}
|
||||
</Button>
|
||||
<Button type="button" variant="outline" size="icon-sm" @click="showMobileActionsSheet = true">
|
||||
<Button type="button" variant="outline" size="icon" @click="showMobileActionsSheet = true">
|
||||
<IconSettings class="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Schedule & Actions (only in edit mode) -->
|
||||
<div v-if="!isReadOnly" class="hidden lg:flex items-center gap-3">
|
||||
<!-- Desktop: Labels, Hashtags, DatePicker (only in edit mode) -->
|
||||
<div v-if="!isReadOnly" class="hidden lg:flex shrink-0 items-center gap-2">
|
||||
<!-- Labels Selector -->
|
||||
<Popover v-if="labels.length > 0">
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button type="button" variant="outline" size="sm" class="gap-2">
|
||||
<Button type="button" variant="outline">
|
||||
<IconTag class="h-4 w-4" />
|
||||
<span v-if="selectedLabels.length === 0">{{ $t('posts.edit.labels') }}</span>
|
||||
<span v-else>{{ selectedLabels.length }}</span>
|
||||
{{ $t('posts.edit.labels') }}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-56 p-2" align="end">
|
||||
|
|
@ -796,35 +817,16 @@ const appendHashtags = (hashtag: WorkspaceHashtag) => {
|
|||
</Popover>
|
||||
|
||||
<!-- Hashtags Selector -->
|
||||
<Button v-if="hashtags.length > 0" type="button" variant="outline" size="icon-sm"
|
||||
<Button type="button" variant="outline" size="icon"
|
||||
@click="hashtagsModal?.open()">
|
||||
<IconHash class="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
<!-- DateTime Picker -->
|
||||
<div class="flex items-center gap-2">
|
||||
<DatePicker name="scheduled_datetime" v-model="scheduledDateTime" :show-time="true" />
|
||||
<span class="text-xs text-muted-foreground">
|
||||
{{ timezoneAbbr }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="text-muted-foreground">|</span>
|
||||
|
||||
<Button type="button" variant="outline" size="icon-sm" @click="deletePost"
|
||||
:disabled="isSaving || isSubmitting" class="text-muted-foreground hover:text-destructive">
|
||||
<IconTrash class="h-4 w-4" />
|
||||
</Button>
|
||||
|
||||
<Button type="button" variant="secondary" size="sm"
|
||||
:disabled="!canSubmit || isSubmitting || isSaving" @click="submit('scheduled')">
|
||||
{{ $t('posts.edit.schedule') }}
|
||||
</Button>
|
||||
|
||||
<Button type="button" size="sm" :disabled="!canSubmit || isSubmitting || isSaving"
|
||||
@click="submit('publishing')">
|
||||
{{ $t('posts.edit.publish') }}
|
||||
</Button>
|
||||
<DatePicker name="scheduled_datetime" v-model="scheduledDateTime" :show-time="true" class="w-auto" />
|
||||
<span class="whitespace-nowrap text-xs text-muted-foreground">
|
||||
{{ timezoneAbbr }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Read-only info (responsive) -->
|
||||
|
|
|
|||
|
|
@ -96,12 +96,14 @@ const breadcrumbs = computed<BreadcrumbItemType[]>(() => {
|
|||
{ title: trans('posts.title'), href: postsIndex.url() },
|
||||
];
|
||||
|
||||
if (props.currentStatus) {
|
||||
items.push({
|
||||
title: trans(`posts.status.${props.currentStatus}`),
|
||||
href: postsIndex.url(props.currentStatus),
|
||||
});
|
||||
}
|
||||
items.push({
|
||||
title: props.currentStatus
|
||||
? trans(`posts.status.${props.currentStatus}`)
|
||||
: trans('posts.all_posts'),
|
||||
href: props.currentStatus
|
||||
? postsIndex.url(props.currentStatus)
|
||||
: postsIndex.url(),
|
||||
});
|
||||
|
||||
return items;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ const page = usePage();
|
|||
const newToken = computed(() => (page.props.flash as Record<string, unknown>)?.plainToken as string | undefined);
|
||||
|
||||
const breadcrumbItems = computed<BreadcrumbItem[]>(() => [
|
||||
{ title: 'API Keys', href: apiKeysIndex.url() },
|
||||
{ title: trans('settings.api_keys.title'), href: apiKeysIndex.url() },
|
||||
]);
|
||||
|
||||
const createDialogOpen = ref(false);
|
||||
|
|
@ -62,19 +62,19 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
|
||||
<template>
|
||||
<AppLayout :breadcrumbs="breadcrumbItems">
|
||||
<Head title="API Keys" />
|
||||
<Head :title="$t('settings.api_keys.page_title')" />
|
||||
|
||||
<h1 class="sr-only">API Keys</h1>
|
||||
<h1 class="sr-only">{{ $t('settings.api_keys.heading') }}</h1>
|
||||
|
||||
<SettingsLayout>
|
||||
<div class="flex flex-col space-y-6">
|
||||
<div class="flex items-center justify-between">
|
||||
<HeadingSmall
|
||||
title="API Keys"
|
||||
description="Manage API keys for programmatic access to your workspace."
|
||||
:title="$t('settings.api_keys.heading')"
|
||||
:description="$t('settings.api_keys.description')"
|
||||
/>
|
||||
<Button @click="createDialogOpen = true">
|
||||
Create API Key
|
||||
{{ $t('settings.api_keys.create') }}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
|
@ -84,14 +84,14 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
class="rounded-lg border border-green-200 bg-green-50 p-4 dark:border-green-900 dark:bg-green-950"
|
||||
>
|
||||
<p class="mb-2 text-sm font-medium text-green-800 dark:text-green-200">
|
||||
Your new API key has been created. Copy it now — you won't be able to see it again.
|
||||
{{ $t('settings.api_keys.new_token_message') }}
|
||||
</p>
|
||||
<div class="flex items-center gap-2">
|
||||
<code class="flex-1 rounded bg-white px-3 py-2 font-mono text-sm dark:bg-black">
|
||||
{{ newToken }}
|
||||
</code>
|
||||
<Button variant="outline" size="sm" @click="copyToClipboard(newToken!, 'API key copied to clipboard')">
|
||||
Copy
|
||||
<Button variant="outline" size="sm" @click="copyToClipboard(newToken!, trans('settings.api_keys.new_token_message'))">
|
||||
{{ $t('settings.api_keys.copy') }}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,11 +100,11 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>Name</TableHead>
|
||||
<TableHead>Key</TableHead>
|
||||
<TableHead>Status</TableHead>
|
||||
<TableHead>Expires</TableHead>
|
||||
<TableHead>Last Used</TableHead>
|
||||
<TableHead>{{ $t('settings.api_keys.table.name') }}</TableHead>
|
||||
<TableHead>{{ $t('settings.api_keys.table.key') }}</TableHead>
|
||||
<TableHead>{{ $t('settings.api_keys.table.status') }}</TableHead>
|
||||
<TableHead>{{ $t('settings.api_keys.table.expires') }}</TableHead>
|
||||
<TableHead>{{ $t('settings.api_keys.table.last_used') }}</TableHead>
|
||||
<TableHead class="w-10" />
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
|
|
@ -124,10 +124,10 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
</Badge>
|
||||
</TableCell>
|
||||
<TableCell class="text-muted-foreground">
|
||||
{{ token.expires_at ? date.formatDate(token.expires_at) : 'Never' }}
|
||||
{{ token.expires_at ? date.formatDate(token.expires_at) : $t('settings.api_keys.table.never') }}
|
||||
</TableCell>
|
||||
<TableCell class="text-muted-foreground">
|
||||
{{ token.last_used_at ? date.diffForHumans(token.last_used_at) : 'Never' }}
|
||||
{{ token.last_used_at ? date.diffForHumans(token.last_used_at) : $t('settings.api_keys.table.never') }}
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
<DropdownMenu>
|
||||
|
|
@ -138,10 +138,10 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem
|
||||
@click="copyToClipboard(token.id, 'API Key ID copied to clipboard')"
|
||||
@click="copyToClipboard(token.id, trans('settings.api_keys.actions.copy_id_success'))"
|
||||
>
|
||||
<IconCopy class="size-4" />
|
||||
Copy API Key ID
|
||||
{{ $t('settings.api_keys.actions.copy_id') }}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem
|
||||
|
|
@ -149,7 +149,7 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
@click="confirmDeleteModal?.open({ url: ApiKeyController.destroy.url(token), confirmText: token.name })"
|
||||
>
|
||||
<IconTrash class="size-4" />
|
||||
Delete
|
||||
{{ $t('settings.api_keys.actions.delete') }}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
|
@ -162,8 +162,8 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
<EmptyState
|
||||
v-else-if="!newToken"
|
||||
:icon="IconKey"
|
||||
title="No API keys yet"
|
||||
description="Create an API key to access your workspace programmatically."
|
||||
:title="$t('settings.api_keys.empty.title')"
|
||||
:description="$t('settings.api_keys.empty.description')"
|
||||
/>
|
||||
</div>
|
||||
</SettingsLayout>
|
||||
|
|
@ -173,8 +173,8 @@ const confirmDeleteModal = ref<InstanceType<typeof ConfirmDeleteModal> | null>(n
|
|||
|
||||
<ConfirmDeleteModal
|
||||
ref="confirmDeleteModal"
|
||||
title="Delete API key"
|
||||
description="Are you sure you want to delete this API key? Any applications using this key will lose access immediately."
|
||||
action="Delete API key"
|
||||
:title="$t('settings.api_keys.delete_modal.title')"
|
||||
:description="$t('settings.api_keys.delete_modal.description')"
|
||||
:action="$t('settings.api_keys.delete_modal.action')"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,68 +1,41 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, useForm } from '@inertiajs/vue3';
|
||||
import { Form, Head } from '@inertiajs/vue3';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
|
||||
import WorkspaceController from '@/actions/App/Http/Controllers/App/WorkspaceController';
|
||||
import InputError from '@/components/InputError.vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { type BreadcrumbItemType } from '@/types';
|
||||
|
||||
const breadcrumbs: BreadcrumbItemType[] = [
|
||||
{ title: 'Create Workspace', href: '/workspaces/create' },
|
||||
];
|
||||
|
||||
const form = useForm({
|
||||
name: '',
|
||||
});
|
||||
|
||||
const submit = () => {
|
||||
form.post('/workspaces');
|
||||
};
|
||||
import AuthLayout from '@/layouts/AuthLayout.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Criar Workspace" />
|
||||
<Head :title="$t('workspaces.create.title')" />
|
||||
|
||||
<AppLayout :breadcrumbs="breadcrumbs">
|
||||
<div class="flex flex-col gap-6 p-6">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold tracking-tight">Criar Workspace</h1>
|
||||
<p class="text-muted-foreground">
|
||||
Crie um novo workspace para organizar suas redes sociais
|
||||
</p>
|
||||
<AuthLayout
|
||||
:title="$t('workspaces.create.title')"
|
||||
:description="$t('workspaces.create.description')"
|
||||
>
|
||||
<Form
|
||||
v-bind="WorkspaceController.store.form()"
|
||||
class="flex flex-col gap-6"
|
||||
v-slot="{ errors, processing }"
|
||||
>
|
||||
<div class="grid gap-2">
|
||||
<Label for="name">{{ $t('workspaces.create.name') }}</Label>
|
||||
<Input
|
||||
id="name"
|
||||
name="name"
|
||||
autofocus
|
||||
:placeholder="trans('workspaces.create.name_placeholder')"
|
||||
/>
|
||||
<InputError :message="errors.name" />
|
||||
</div>
|
||||
|
||||
<Card class="max-w-lg">
|
||||
<CardHeader>
|
||||
<CardTitle>Informações do Workspace</CardTitle>
|
||||
<CardDescription>
|
||||
Dê um nome para identificar seu workspace
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<form @submit.prevent="submit" class="space-y-4">
|
||||
<div class="space-y-2">
|
||||
<Label for="name">Nome</Label>
|
||||
<Input
|
||||
id="name"
|
||||
v-model="form.name"
|
||||
placeholder="Meu Workspace"
|
||||
:class="{ 'border-destructive': form.errors.name }"
|
||||
/>
|
||||
<p v-if="form.errors.name" class="text-sm text-destructive">
|
||||
{{ form.errors.name }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<Button type="submit" :disabled="form.processing">
|
||||
{{ form.processing ? 'Criando...' : 'Criar Workspace' }}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</AppLayout>
|
||||
<Button type="submit" class="w-full" :disabled="processing">
|
||||
{{ $t('workspaces.create.submit') }}
|
||||
</Button>
|
||||
</Form>
|
||||
</AuthLayout>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { Head, Link, router } from '@inertiajs/vue3';
|
||||
import { trans } from 'laravel-vue-i18n';
|
||||
|
||||
import { Avatar } from '@/components/ui/avatar';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
|
|
@ -30,9 +31,12 @@ const switchToWorkspace = (workspace: Workspace) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<Head title="Workspaces" />
|
||||
<Head :title="$t('workspaces.title')" />
|
||||
|
||||
<AuthLayout title="Your workspaces" description="Select a workspace to continue">
|
||||
<AuthLayout
|
||||
:title="$t('workspaces.select_title')"
|
||||
:description="$t('workspaces.select_description')"
|
||||
>
|
||||
<div class="space-y-3">
|
||||
<div
|
||||
v-for="workspace in workspaces"
|
||||
|
|
@ -50,18 +54,18 @@ const switchToWorkspace = (workspace: Workspace) => {
|
|||
<div class="min-w-0 flex-1">
|
||||
<p class="truncate font-medium">{{ workspace.name }}</p>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
{{ workspace.social_accounts_count }} connections · {{ workspace.posts_count }} posts
|
||||
{{ trans('workspaces.connections', { count: workspace.social_accounts_count }) }} · {{ trans('workspaces.posts', { count: workspace.posts_count }) }}
|
||||
</p>
|
||||
</div>
|
||||
<Badge v-if="workspace.id === currentWorkspaceId" variant="secondary" class="shrink-0">
|
||||
Current
|
||||
{{ $t('workspaces.current') }}
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Link :href="createWorkspace.url()">
|
||||
<Button variant="outline" class="w-full">
|
||||
Create workspace
|
||||
{{ $t('workspaces.create.submit') }}
|
||||
</Button>
|
||||
</Link>
|
||||
</AuthLayout>
|
||||
|
|
|
|||
Loading…
Reference in a new issue