Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions packages/admin-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Changelog from "./pages/Changelog";
import ClientEdit from "./pages/ClientEdit";
import Clients from "./pages/Clients";
import Dashboard from "./pages/Dashboard";
import EmailTemplates from "./pages/EmailTemplates";
import ErrorPage from "./pages/Error";
import Install from "./pages/Install";
import Keys from "./pages/Keys";
Expand Down Expand Up @@ -445,6 +446,14 @@ const App = () => {
</DashboardLayout>
}
/>
<Route
path="/settings/email-templates"
element={
<DashboardLayout adminSession={adminSession} onLogout={handleLogout}>
<EmailTemplates />
</DashboardLayout>
}
/>
<Route
path="/settings/admin-users/new"
element={
Expand Down
1 change: 1 addition & 0 deletions packages/admin-ui/src/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const securityItems: SidebarNavItem[] = [
const systemItems: SidebarNavItem[] = [
{ title: "Changelog", url: "/changelog", icon: FileText },
{ title: "Settings", url: "/settings", icon: Settings },
{ title: "Email", url: "/settings/email-templates", icon: FileText },
{ title: "Admin Users", url: "/settings/admin-users", icon: Users },
];

Expand Down
55 changes: 43 additions & 12 deletions packages/admin-ui/src/components/ui/tabs.module.css
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
.tabsList {
display: inline-flex;
height: 40px;
display: flex;
width: 100%;
height: auto;
justify-content: flex-start;
align-items: center;
justify-content: center;
border-radius: 6px;
background-color: hsl(var(--muted));
padding: 4px;
color: hsl(var(--muted-foreground));
gap: 4px;
padding: 0;
background-color: transparent;
border-bottom: 1px solid hsl(var(--border));
border-radius: 0;
z-index: 1;
}

.tabsTrigger {
display: inline-flex;
align-items: center;
justify-content: center;
height: 40px;
padding: 0 1.25rem;
white-space: nowrap;
border-radius: 4px;
padding: 6px 12px;
font-size: 14px;
font-weight: 500;
transition: all 0.2s;
background: transparent;
border: none;
border: 1px solid transparent;
border-bottom: none;
border-radius: 8px 8px 0 0;
cursor: pointer;
color: hsl(var(--muted-foreground));
margin-bottom: -1px;
}

.tabsTrigger:focus-visible {
Expand All @@ -36,15 +42,40 @@
}

.tabsTrigger[data-state="active"] {
background-color: hsl(var(--background));
background-color: hsl(var(--card));
color: hsl(var(--foreground));
border-color: hsl(var(--border));
}

.tabsTrigger:hover:not([data-state="active"]) {
color: hsl(var(--foreground));
background: hsl(var(--muted) / 0.5);
}

.tabsContent {
margin-top: 8px;
margin-top: 0;
}

.tabsContent:focus-visible {
outline: 2px solid hsl(var(--ring));
outline-offset: 2px;
}

@media (max-width: 768px) {
.tabsList {
flex-direction: column;
align-items: stretch;
height: auto;
border-bottom: none;
gap: 8px;
margin-bottom: 8px;
}

.tabsTrigger {
width: 100%;
justify-content: flex-start;
border: 1px solid hsl(var(--border));
border-radius: 8px;
margin-bottom: 0;
}
}
63 changes: 4 additions & 59 deletions packages/admin-ui/src/pages/ClientEdit.module.css
Original file line number Diff line number Diff line change
@@ -1,73 +1,18 @@
.tabsRoot {
display: flex;
flex-direction: column;
gap: 0;
}

.tabsList {
display: flex;
width: 100%;
height: auto;
justify-content: flex-start;
gap: 6px;
padding: 0 0 0 0;
overflow-x: auto;
background: transparent;
border-bottom: 1px solid hsl(var(--border));
border-radius: 0;
margin-bottom: -1px;
}

.tabsTrigger {
min-width: 110px;
border: 1px solid transparent;
border-bottom: none;
border-radius: 10px 10px 0 0;
color: hsl(var(--muted-foreground));
background: transparent;
margin-bottom: -1px;
}

.tabsTrigger[data-state="active"] {
background: hsl(var(--card));
color: hsl(var(--foreground));
border-color: hsl(var(--border));
}

.tabsContent {
margin-top: 0;
padding-top: 0;
}

.tabCard {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: none;
}

@media (max-width: 768px) {
.tabsList {
flex-direction: column;
align-items: stretch;
overflow-x: visible;
border-bottom: none;
margin-bottom: 8px;
}

.tabsTrigger {
width: 100%;
justify-content: flex-start;
border-radius: 8px;
border: 1px solid hsl(var(--border));
margin-bottom: 0;
}

.tabsTrigger[data-state="active"] {
border-color: hsl(var(--primary));
background: hsl(var(--primary) / 0.1);
}

.tabCard {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border-top-left-radius: 0.75rem;
border-top-right-radius: 0.75rem;
border-top: 1px solid hsl(var(--border));
}
}
102 changes: 102 additions & 0 deletions packages/admin-ui/src/pages/EmailTemplates.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.page {
display: flex;
flex-direction: column;
gap: 1.5rem;
}

.headerActions {
display: flex;
gap: 0.5rem;
}

.container {
max-width: 1200px;
}

.loadingState {
color: hsl(var(--muted-foreground));
padding: 2rem;
text-align: center;
}

.tabsRoot {
display: flex;
flex-direction: column;
}

.tabCard {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: none;
}

.formContent {
display: grid;
gap: 1.5rem;
}

.gridFields {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1.5rem;
}

.field {
display: grid;
gap: 0.5rem;
}

.textarea {
font-family:
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
font-size: 0.875rem;
line-height: 1.5;
resize: vertical;
}

.variablesBlock {
border: 1px solid hsl(var(--border));
background: hsl(var(--muted) / 0.3);
border-radius: 0.75rem;
padding: 1rem;
}

.variablesTitle {
margin: 0 0 0.75rem;
font-size: 0.75rem;
font-weight: 600;
color: hsl(var(--muted-foreground));
text-transform: uppercase;
letter-spacing: 0.05em;
}

.variablesList {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}

.variableBadge {
background: hsl(var(--background));
border: 1px solid hsl(var(--border));
color: hsl(var(--foreground));
padding: 0.125rem 0.5rem;
border-radius: 0.375rem;
font-size: 0.8125rem;
font-weight: 500;
}

@media (max-width: 1024px) {
.gridFields {
grid-template-columns: 1fr;
}
}

@media (max-width: 640px) {
.tabCard {
border-top-left-radius: 0.75rem;
border-top-right-radius: 0.75rem;
border-top: 1px solid hsl(var(--border));
}
}
Loading
Loading