fix: align button icons and polish vendor sidebar
Fix vertical alignment of Lucide icons inside Button children across all pages by adding verticalAlign offsets (-3px for 16px icons, -2px for 14px icons). The design system Button wraps children in an inline span, so SVG icons defaulted to baseline alignment. Hide the redundant top-right "Create Tenant" button on VendorTenantsPage when no tenants exist — the EmptyState already provides that action. Add icons to all vendor sidebar sub-items for consistency (previously only Email Connector had one). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -185,7 +185,7 @@ export function SsoPage() {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<h1 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 600 }}>Enterprise SSO</h1>
|
||||
<Button variant="primary" onClick={() => setShowCreate((v) => !v)}>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Add SSO Connection
|
||||
</Button>
|
||||
</div>
|
||||
@@ -284,7 +284,7 @@ export function SsoPage() {
|
||||
description="Add an enterprise SSO connection to let your team sign in with their corporate identity provider."
|
||||
action={
|
||||
<Button variant="primary" onClick={() => setShowCreate(true)}>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Add SSO Connection
|
||||
</Button>
|
||||
}
|
||||
@@ -413,7 +413,7 @@ function CaCertificatesSection() {
|
||||
<FileInput ref={certRef} accept=".pem,.crt,.cer" icon={<ShieldCheck size={16} />} />
|
||||
</FormField>
|
||||
<Button variant="primary" onClick={handleUpload} loading={stageMutation.isPending}>
|
||||
<Upload size={14} style={{ marginRight: 6 }} />
|
||||
<Upload size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Stage Certificate
|
||||
</Button>
|
||||
</div>
|
||||
@@ -447,7 +447,7 @@ function CaCertificatesSection() {
|
||||
</div>
|
||||
<div style={{ paddingTop: 8, display: 'flex', gap: 8 }}>
|
||||
<Button variant="primary" onClick={() => handleActivate(cert.id)} loading={activateMutation.isPending}>
|
||||
<ShieldCheck size={14} style={{ marginRight: 6 }} />
|
||||
<ShieldCheck size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Activate
|
||||
</Button>
|
||||
<Button variant="danger" onClick={() => setDeleteTarget(cert)}>
|
||||
@@ -486,7 +486,7 @@ function CaCertificatesSection() {
|
||||
</div>
|
||||
<div style={{ paddingTop: 8 }}>
|
||||
<Button variant="danger" onClick={() => setDeleteTarget(cert)}>
|
||||
<Trash2 size={14} style={{ marginRight: 6 }} />
|
||||
<Trash2 size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Remove
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -161,7 +161,7 @@ export function TeamPage() {
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<h1 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 600 }}>Team</h1>
|
||||
<Button variant="primary" onClick={() => setShowInvite((v) => !v)}>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Invite Member
|
||||
</Button>
|
||||
</div>
|
||||
@@ -222,7 +222,7 @@ export function TeamPage() {
|
||||
description="Invite colleagues to collaborate on this tenant."
|
||||
action={
|
||||
<Button variant="primary" onClick={() => setShowInvite(true)}>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Invite Member
|
||||
</Button>
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ export function TenantDashboardPage() {
|
||||
}}
|
||||
loading={restartServer.isPending}
|
||||
>
|
||||
<RefreshCw size={14} style={{ marginRight: 6 }} />
|
||||
<RefreshCw size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Restart
|
||||
</Button>
|
||||
<Button
|
||||
@@ -127,7 +127,7 @@ export function TenantDashboardPage() {
|
||||
}}
|
||||
loading={upgradeServer.isPending}
|
||||
>
|
||||
<ArrowUpCircle size={14} style={{ marginRight: 6 }} />
|
||||
<ArrowUpCircle size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Upgrade
|
||||
</Button>
|
||||
</div>
|
||||
@@ -150,16 +150,16 @@ export function TenantDashboardPage() {
|
||||
variant="secondary"
|
||||
onClick={() => window.open(`/t/${data.slug}/`, '_blank')}
|
||||
>
|
||||
<ExternalLink size={14} style={{ marginRight: 6 }} />
|
||||
<ExternalLink size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Open Server Dashboard
|
||||
</Button>
|
||||
)}
|
||||
<Button variant="secondary" onClick={() => navigate('../license')}>
|
||||
<Key size={14} style={{ marginRight: 6 }} />
|
||||
<Key size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
View License
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={() => navigate('../oidc')}>
|
||||
<Settings size={14} style={{ marginRight: 6 }} />
|
||||
<Settings size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Configure OIDC
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -132,12 +132,12 @@ export function TenantLicensePage() {
|
||||
<div style={{ display: 'flex', gap: 8 }}>
|
||||
<Button variant="secondary" onClick={() => setShowToken((v) => !v)}>
|
||||
{showToken
|
||||
? <><EyeOff size={14} style={{ marginRight: 6 }} />Hide</>
|
||||
: <><Eye size={14} style={{ marginRight: 6 }} />Show</>
|
||||
? <><EyeOff size={14} style={{ marginRight: 6, verticalAlign: -2 }} />Hide</>
|
||||
: <><Eye size={14} style={{ marginRight: 6, verticalAlign: -2 }} />Show</>
|
||||
}
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={handleCopy}>
|
||||
<Copy size={14} style={{ marginRight: 6 }} />
|
||||
<Copy size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Copy
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
8
ui/src/pages/vendor/CertificatesPage.tsx
vendored
8
ui/src/pages/vendor/CertificatesPage.tsx
vendored
@@ -225,7 +225,7 @@ export function CertificatesPage() {
|
||||
onClick={handleActivate}
|
||||
loading={activateMutation.isPending}
|
||||
>
|
||||
<ShieldCheck size={14} style={{ marginRight: 6 }} />
|
||||
<ShieldCheck size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Activate
|
||||
</Button>
|
||||
<Button
|
||||
@@ -233,7 +233,7 @@ export function CertificatesPage() {
|
||||
onClick={handleDiscard}
|
||||
loading={discardMutation.isPending}
|
||||
>
|
||||
<Trash2 size={14} style={{ marginRight: 6 }} />
|
||||
<Trash2 size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Discard
|
||||
</Button>
|
||||
</>
|
||||
@@ -252,7 +252,7 @@ export function CertificatesPage() {
|
||||
loading={restoreMutation.isPending}
|
||||
disabled={expired}
|
||||
>
|
||||
<RotateCcw size={14} style={{ marginRight: 6 }} />
|
||||
<RotateCcw size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
{expired ? 'Expired' : 'Restore'}
|
||||
</Button>
|
||||
}
|
||||
@@ -284,7 +284,7 @@ export function CertificatesPage() {
|
||||
onClick={handleUpload}
|
||||
loading={stageMutation.isPending}
|
||||
>
|
||||
<Upload size={14} style={{ marginRight: 6 }} />
|
||||
<Upload size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Stage Certificate
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
8
ui/src/pages/vendor/EmailConfigPage.tsx
vendored
8
ui/src/pages/vendor/EmailConfigPage.tsx
vendored
@@ -172,7 +172,7 @@ export function EmailConfigPage() {
|
||||
</Button>
|
||||
{!confirmDelete ? (
|
||||
<Button variant="secondary" onClick={() => setConfirmDelete(true)}>
|
||||
<Trash2 size={14} style={{ marginRight: 6 }} />
|
||||
<Trash2 size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Remove
|
||||
</Button>
|
||||
) : (
|
||||
@@ -235,7 +235,7 @@ export function EmailConfigPage() {
|
||||
</FormField>
|
||||
<div style={{ display: 'flex', gap: 8 }}>
|
||||
<Button variant="primary" onClick={handleSave} loading={saveMutation.isPending}>
|
||||
<Save size={14} style={{ marginRight: 6 }} />
|
||||
<Save size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
{isConfigured ? 'Update' : 'Save'}
|
||||
</Button>
|
||||
{editing && (
|
||||
@@ -263,7 +263,7 @@ export function EmailConfigPage() {
|
||||
onClick={handleToggleRegistration}
|
||||
loading={toggleMutation.isPending}
|
||||
>
|
||||
<Power size={14} style={{ marginRight: 6 }} />
|
||||
<Power size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
{connector.registrationEnabled ? 'Disable Registration' : 'Enable Registration'}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -284,7 +284,7 @@ export function EmailConfigPage() {
|
||||
/>
|
||||
</FormField>
|
||||
<Button variant="primary" onClick={handleTest} loading={testMutation.isPending}>
|
||||
<Send size={14} style={{ marginRight: 6 }} />
|
||||
<Send size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Send Test Email
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
8
ui/src/pages/vendor/TenantDetailPage.tsx
vendored
8
ui/src/pages/vendor/TenantDetailPage.tsx
vendored
@@ -227,7 +227,7 @@ export function TenantDetailPage() {
|
||||
onClick={handleRenewLicense}
|
||||
loading={renewLicense.isPending}
|
||||
>
|
||||
<RefreshCw size={14} style={{ marginRight: 6 }} />
|
||||
<RefreshCw size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Renew License
|
||||
</Button>
|
||||
</div>
|
||||
@@ -276,7 +276,7 @@ export function TenantDetailPage() {
|
||||
onClick={handleRestart}
|
||||
loading={restartServer.isPending}
|
||||
>
|
||||
<RefreshCw size={14} style={{ marginRight: 6 }} />
|
||||
<RefreshCw size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Restart Server
|
||||
</Button>
|
||||
<Button
|
||||
@@ -284,7 +284,7 @@ export function TenantDetailPage() {
|
||||
onClick={handleUpgrade}
|
||||
loading={upgradeServer.isPending}
|
||||
>
|
||||
<ArrowUpCircle size={14} style={{ marginRight: 6 }} />
|
||||
<ArrowUpCircle size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Upgrade Server
|
||||
</Button>
|
||||
<Button
|
||||
@@ -298,7 +298,7 @@ export function TenantDetailPage() {
|
||||
variant="danger"
|
||||
onClick={() => setDeleteOpen(true)}
|
||||
>
|
||||
<Trash2 size={14} style={{ marginRight: 6 }} />
|
||||
<Trash2 size={14} style={{ marginRight: 6, verticalAlign: -2 }} />
|
||||
Delete Tenant
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
18
ui/src/pages/vendor/VendorTenantsPage.tsx
vendored
18
ui/src/pages/vendor/VendorTenantsPage.tsx
vendored
@@ -93,13 +93,15 @@ export function VendorTenantsPage() {
|
||||
<div style={{ padding: '24px', display: 'flex', flexDirection: 'column', gap: 20 }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<h1 style={{ margin: 0, fontSize: '1.25rem', fontWeight: 600 }}>Tenants</h1>
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => navigate('/vendor/tenants/new')}
|
||||
>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
Create Tenant
|
||||
</Button>
|
||||
{!isLoading && tenants && tenants.length > 0 && (
|
||||
<Button
|
||||
variant="primary"
|
||||
onClick={() => navigate('/vendor/tenants/new')}
|
||||
>
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Create Tenant
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{isLoading && (
|
||||
@@ -115,7 +117,7 @@ export function VendorTenantsPage() {
|
||||
description="Create your first tenant to get started."
|
||||
action={
|
||||
<Button variant="primary" onClick={() => navigate('/vendor/tenants/new')}>
|
||||
<Plus size={16} style={{ marginRight: 6 }} />
|
||||
<Plus size={16} style={{ marginRight: 6, verticalAlign: -3 }} />
|
||||
Create Tenant
|
||||
</Button>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user