ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
refactor(servers): replace static inline styles with SCSS classes
Juan Denisab7505c93455
diff --git a/frontend/src/components/serverdetail/ServerSettingsTab.jsx b/frontend/src/components/serverdetail/ServerSettingsTab.jsxindex 75975c70..87b612de 100644--- a/frontend/src/components/serverdetail/ServerSettingsTab.jsx+++ b/frontend/src/components/serverdetail/ServerSettingsTab.jsx@@ -475,7 +475,7 @@ Install-ServerKitAgent -Server "${window.location.origin}" -Token "${result.regi<details className="install-fallback"><summary>{t('app.serverSettingsTab.needToInstallTheAgentFirst', 'Need to install the agent first? Use the one-liner installer.')}</summary>- <div className="install-tabs" style={{ marginTop: '0.75rem' }}>+ <div className="install-tabs install-tabs--after-summary"><div className="install-tab"><div className="install-tab-header"><TerminalIcon />diff --git a/frontend/src/pages/Git.jsx b/frontend/src/pages/Git.jsxindex f20d53cb..fcca1e0d 100644--- a/frontend/src/pages/Git.jsx+++ b/frontend/src/pages/Git.jsx@@ -1052,17 +1052,17 @@ function Git({ basePath = '/git' }) {<div className="dom-specs"><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.httpUrl', 'HTTP URL')}</div>- <div className="sk-spec-card__value" style={{ fontSize: 13 }}>{status?.running ? getGiteaUrl() : 'Server not running'}</div>+ <div className="sk-spec-card__value git-url-value">{status?.running ? getGiteaUrl() : 'Server not running'}</div><div className="sk-spec-card__sub">{t('app.git.webInterface', 'Web interface')}</div></div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.sshCloneUrl', 'SSH Clone URL')}</div>- <div className="sk-spec-card__value" style={{ fontSize: 13 }}>ssh://git@{window.location.hostname}:{status?.ssh_port}/user/repo.git</div>+ <div className="sk-spec-card__value git-url-value">ssh://git@{window.location.hostname}:{status?.ssh_port}/user/repo.git</div><div className="sk-spec-card__sub">{t('app.git.useYourSshKey', 'Use your SSH key')}</div></div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.quickActions', 'Quick actions')}</div>- <div className="git-quick-actions" style={{ marginTop: 8 }}>+ <div className="git-quick-actions"><Button variant="outline" size="sm" onClick={openGitea} disabled={!status?.running}>{t('app.git.openGitea', 'Open Gitea')}</Button><Button variant="outline" size="sm" onClick={() => { copyToClipboard(`git clone ssh://git@${window.location.hostname}:${status?.ssh_port}/user/repo.git`); toast.success(t('app.git.sshUrlCopied', 'SSH URL copied')); }}>{t('app.git.copySshUrl', 'Copy SSH URL')}@@ -1156,24 +1156,24 @@ function Git({ basePath = '/git' }) {<div className="dom-specs"><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.httpAccess', 'HTTP Access')}</div>- <div className="sk-spec-card__value" style={{ fontSize: 13 }}>{getGiteaUrl()}</div>+ <div className="sk-spec-card__value git-url-value">{getGiteaUrl()}</div><div className="sk-spec-card__sub">{t('app.git.webBrowserAccess', 'Web browser access')}</div>- <div className="git-quick-actions" style={{ marginTop: 12 }}>+ <div className="git-quick-actions"><Button variant="outline" size="sm" onClick={() => { copyToClipboard(getGiteaUrl()); toast.success(t('app.git.urlCopied', 'URL copied')); }}>{t('app.git.copyUrl', 'Copy URL')}</Button><Button variant="outline" size="sm" onClick={openGitea} disabled={!status?.running}>{t('app.git.openGitea3', 'Open Gitea')}</Button></div></div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.sshAccess', 'SSH Access')}</div>- <div className="sk-spec-card__value" style={{ fontSize: 13 }}>ssh://git@{window.location.hostname}:{status?.ssh_port}/username/repo.git</div>+ <div className="sk-spec-card__value git-url-value">ssh://git@{window.location.hostname}:{status?.ssh_port}/username/repo.git</div><div className="sk-spec-card__sub">{t('app.git.cloneRepositoriesViaSsh', 'Clone repositories via SSH')}</div>- <div className="git-quick-actions" style={{ marginTop: 12 }}>+ <div className="git-quick-actions"><Button variant="outline" size="sm" onClick={() => { copyToClipboard(`ssh://git@${window.location.hostname}:${status?.ssh_port}/username/repo.git`); toast.success(t('app.git.sshUrlCopied2', 'SSH URL copied')); }}>{t('app.git.copySshUrl2', 'Copy SSH URL')}</Button></div></div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.sshKeyRequirement', 'SSH key requirement')}</div>- <div className="sk-spec-card__value" style={{ fontSize: 13 }}>{t('app.git.addYourPublicKeyInGitea', 'Add your public key in Gitea')}</div>+ <div className="sk-spec-card__value git-url-value">{t('app.git.addYourPublicKeyInGitea', 'Add your public key in Gitea')}</div><div className="sk-spec-card__sub">{t('app.git.requiredForSshClonePush', 'Required for SSH clone/push')}</div></div></div>@@ -1309,7 +1309,7 @@ function Git({ basePath = '/git' }) {<div className="dom-specs"><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.serverPower', 'Server power')}</div>- <div className="git-quick-actions" style={{ marginTop: 8 }}>+ <div className="git-quick-actions">{status?.running ? (<Button variant="secondary" onClick={handleStop} disabled={actionLoading}>{t('app.git.stopServer', 'Stop Server')}</Button>) : (@@ -1320,13 +1320,13 @@ function Git({ basePath = '/git' }) {</div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.uninstall2', 'Uninstall')}</div>- <div className="git-quick-actions" style={{ marginTop: 8 }}>+ <div className="git-quick-actions"><Button variant="destructive" onClick={handleUninstall} disabled={actionLoading}>{t('app.git.uninstallGitServer2', 'Uninstall Git Server')}</Button></div><div className="sk-spec-card__sub">{t('app.git.stopsGiteaDataIsPreservedUnless', 'Stops Gitea; data is preserved unless removed manually')}</div></div></div>- <div style={{ marginTop: 24 }}>+ <div className="git-danger-zone-wrap"><DangerZonetitle={t('app.git.dangerZone', 'Danger Zone')}description={t('app.git.uninstallingWillStopTheGiteaContainer', 'Uninstalling will stop the Gitea container. Your data will be preserved unless you choose to remove it.')}@@ -1427,7 +1427,7 @@ function Git({ basePath = '/git' }) {{pageError && (<div className="error-banner">{pageError}- <button type="button" onClick={() => setPageError('')} style={{ float: 'right', background: 'none', border: 'none', cursor: 'pointer' }}>×</button>+ <button type="button" className="git-error-dismiss" onClick={() => setPageError('')}>×</button></div>)}@@ -1637,7 +1637,7 @@ function Git({ basePath = '/git' }) {</div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.status3', 'Status')}</div>- <div style={{ marginTop: 8 }}><Pill kind={drawerWebhook.is_active ? 'green' : 'gray'}>{drawerWebhook.is_active ? 'Active' : 'Inactive'}</Pill></div>+ <div className="git-pill-row"><Pill kind={drawerWebhook.is_active ? 'green' : 'gray'}>{drawerWebhook.is_active ? 'Active' : 'Inactive'}</Pill></div><div className="sk-spec-card__sub">{drawerWebhook.sync_count} syncs</div></div></div>@@ -1651,11 +1651,11 @@ function Git({ basePath = '/git' }) {</div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.deployOnPush2', 'Deploy on push')}</div>- <div style={{ marginTop: 8 }}><Pill kind={drawerWebhook.deploy_on_push ? 'green' : 'gray'}>{drawerWebhook.deploy_on_push ? 'Enabled' : 'Disabled'}</Pill></div>+ <div className="git-pill-row"><Pill kind={drawerWebhook.deploy_on_push ? 'green' : 'gray'}>{drawerWebhook.deploy_on_push ? 'Enabled' : 'Disabled'}</Pill></div></div><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.zeroDowntime', 'Zero downtime')}</div>- <div style={{ marginTop: 8 }}><Pill kind={drawerWebhook.zero_downtime ? 'green' : 'gray'}>{drawerWebhook.zero_downtime ? 'Yes' : 'No'}</Pill></div>+ <div className="git-pill-row"><Pill kind={drawerWebhook.zero_downtime ? 'green' : 'gray'}>{drawerWebhook.zero_downtime ? 'Yes' : 'No'}</Pill></div></div></div></div>@@ -1713,7 +1713,7 @@ function Git({ basePath = '/git' }) {<div className="dom-specs"><div className="sk-spec-card"><div className="sk-spec-card__label">{t('app.git.status4', 'Status')}</div>- <div style={{ marginTop: 8 }}><Pill kind={statusKind(drawerDeployment.status)}>{drawerDeployment.status}</Pill></div>+ <div className="git-pill-row"><Pill kind={statusKind(drawerDeployment.status)}>{drawerDeployment.status}</Pill></div>{drawerDeployment.duration_seconds != null && <div className="sk-spec-card__sub">{drawerDeployment.duration_seconds}s</div>}</div><div className="sk-spec-card">diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsxindex a8830c3a..8a77fd86 100644--- a/frontend/src/pages/Servers.jsx+++ b/frontend/src/pages/Servers.jsx@@ -631,15 +631,15 @@ const PairAgentForm = ({ groups, onClose, onClaimed }) => {autoFocusautoComplete="off"spellCheck={false}- style={{ fontFamily: 'monospace', fontSize: '1.25rem', letterSpacing: '0.15em', textAlign: 'center' }}+ className="server-pair-code"required/><span className="form-hint">{t('app.servers.theCodeIsShownInThe', 'The code is shown in the terminal output or system tray.')}</span>- {lookupError && <div className="error-message" style={{ marginTop: '0.5rem' }}>{lookupError}</div>}+ {lookupError && <div className="error-message server-pair-error">{lookupError}</div>}</div>{lookupResult && (- <div className="success-banner" style={{ marginTop: '0.5rem' }}>+ <div className="success-banner server-pair-banner"><div><strong>{t('app.servers.agentFound', 'Agent found')}</strong><p className="success-subtitle">@@ -647,9 +647,9 @@ const PairAgentForm = ({ groups, onClose, onClaimed }) => {<>{t('app.servers.server2', 'Server:')} <code>{lookupResult.system_info.display_name}</code><br /></>)}{t('app.servers.hostname', 'Hostname:')} <code>{lookupResult.system_info?.hostname || 'unknown'}</code><br />- {t('app.servers.fingerprint', 'Fingerprint:')} <code style={{ fontFamily: 'monospace' }}>{lookupResult.pubkey_fpr}</code>+ {t('app.servers.fingerprint', 'Fingerprint:')} <code className="server-pair-fpr">{lookupResult.pubkey_fpr}</code></p>- <p className="text-muted" style={{ marginTop: '0.25rem', fontSize: '0.85em' }}>+ <p className="text-muted server-pair-note">{t('app.servers.confirmThisFingerprintMatchesTheOne', 'Confirm this fingerprint matches the one shown by the agent before continuing.')}</p></div>@@ -665,7 +665,7 @@ const PairAgentForm = ({ groups, onClose, onClaimed }) => {placeholder={t('app.servers.shownOnTheAgentSPairing', 'Shown on the agent\'s pairing screen')}autoComplete="off"spellCheck={false}- style={{ fontFamily: 'monospace', fontSize: '1.1rem', letterSpacing: '0.08em' }}+ className="server-pair-passphrase"required/></div>@@ -892,7 +892,7 @@ Install-ServerKitAgent -Server "${window.location.origin}" -Token "${registratio<details className="install-fallback"><summary>{t('app.servers.needToInstallTheAgentFirst', 'Need to install the agent first? Use the one-liner installer.')}</summary>- <div className="install-tabs" style={{ marginTop: '0.75rem' }}>+ <div className="install-tabs install-tabs--after-summary"><InstallTabtitle={t('app.servers.linux', 'Linux')}description={t('app.servers.curlTarSudoAndSystemd', 'curl, tar, sudo, and systemd')}diff --git a/frontend/src/styles/pages/_git.scss b/frontend/src/styles/pages/_git.scssindex e8809b77..106aca0d 100644--- a/frontend/src/styles/pages/_git.scss+++ b/frontend/src/styles/pages/_git.scss@@ -335,6 +335,26 @@display: flex;flex-wrap: wrap;gap: $space-2;+ margin-top: $space-2;+ }++ // ── spec-card atoms ──────────────────────────────────────+ // Clone URLs render smaller than the default spec-card value+ .git-url-value {+ font-size: 13px;+ }++ // Status pill sits on its own row below the label+ .git-pill-row {+ margin-top: $space-2;+ }++ // Dismiss "×" in the page-level error banner+ .git-error-dismiss {+ float: right;+ background: none;+ border: none;+ cursor: pointer;}// ── repository drawer: branch selector + mini tabs ──────@@ -552,6 +572,11 @@}}+ // Danger Zone block below the settings spec cards+ .git-danger-zone-wrap {+ margin-top: $space-6;+ }+// ── Repositories tab ─────────────────────────────────────.git-repos-table {th:nth-child(2) { width: 170px; }diff --git a/frontend/src/styles/pages/_servers.scss b/frontend/src/styles/pages/_servers.scssindex e5d7de70..bf26567d 100644--- a/frontend/src/styles/pages/_servers.scss+++ b/frontend/src/styles/pages/_servers.scss@@ -710,6 +710,34 @@font-size: $font-size-xs;line-height: 1.4;}++ // Pairing inputs read as machine strings, not prose.+ .server-pair-code {+ font-family: $font-mono;+ font-size: $font-size-xl;+ letter-spacing: 0.15em;+ text-align: center;+ }++ .server-pair-passphrase {+ font-family: $font-mono;+ font-size: $font-size-lg;+ letter-spacing: 0.08em;+ }++ .server-pair-error,+ .server-pair-banner {+ margin-top: $space-2;+ }++ .server-pair-fpr {+ font-family: $font-mono;+ }++ .server-pair-note {+ margin-top: $space-1;+ font-size: 0.85em;+ }}.form-disclosure {@@ -2040,6 +2068,10 @@gap: $space-4;}+.install-tabs--after-summary {+ margin-top: $space-3;+}+.install-tab {background: var(--surface);border: 1px solid var(--border-soft);