Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

feat(cloud): refine portal layout and control density

Timothy Yinb64d97070464
diff --git a/apps/cloud/app/assets/cloud.css b/apps/cloud/app/assets/cloud.css
index b4be3fdb..1e2fcef6 100644
--- a/apps/cloud/app/assets/cloud.css
+++ b/apps/cloud/app/assets/cloud.css
@@ -545,261 +545,578 @@
font-weight: 550;
margin-bottom: 4px;
}
-/* Portal */
+/* Portal: a compact workspace, with controls scoped away from the public site. */
.cf-portal {
- max-width: 1600px;
- margin: auto;
+ --radius: 10px;
+ width: 100%;
min-height: 100dvh;
- display: flex;
- flex-direction: column;
+ font-size: 13px;
+ line-height: 1.5;
}
.cf-portal-header {
- height: 85px;
- padding: 0 40px;
+ position: sticky;
+ top: 0;
+ z-index: 30;
+ height: 60px;
+ padding: 0 24px;
display: flex;
- justify-content: space-between;
align-items: center;
+ justify-content: space-between;
+ gap: 16px;
border-bottom: 1px solid var(--border);
+ background: var(--background);
+}
+.cf-portal-brand {
+ display: flex;
+ align-items: center;
+ gap: 20px;
+ min-width: 0;
+}
+.cf-portal .cf-brand {
+ font-size: 17px;
+ gap: 8px;
+ white-space: nowrap;
+}
+.cf-portal .cf-brand-logo {
+ width: 27px;
+ height: 27px;
+}
+.cf-portal .cf-brand-edition {
+ margin-inline-start: 4px;
+ letter-spacing: 0;
+ font-size: 12px;
+}
+.cf-header-divider {
+ height: 18px;
+ width: 1px;
+ background: var(--border);
+}
+.cf-header-location {
+ color: var(--muted-foreground);
+ font-size: 12px;
}
.cf-portal-grid {
display: grid;
- grid-template-columns: 230px minmax(0, 1fr);
- flex: 1;
+ grid-template-columns: 200px minmax(0, 1fr);
+ min-height: calc(100dvh - 60px);
}
.cf-sidebar {
+ position: sticky;
+ top: 60px;
+ align-self: start;
+ height: calc(100dvh - 60px);
border-right: 1px solid var(--border);
- padding: 36px 22px 24px;
+ padding: 22px 12px 16px;
display: flex;
flex-direction: column;
}
.cf-nav-label {
- font-size: 9px;
- letter-spacing: 0.13em;
+ padding: 0 10px 10px;
color: var(--muted-foreground);
- padding: 0 13px 12px;
+ font-size: 10px;
+ letter-spacing: 0.08em;
}
.cf-sidebar nav {
display: flex;
flex-direction: column;
- gap: 4px;
+ gap: 3px;
}
.cf-sidebar nav a {
display: flex;
align-items: center;
- gap: 10px;
- padding: 10px 13px;
- border-radius: 7px;
+ gap: 9px;
+ min-height: 36px;
+ padding: 7px 10px;
+ border-radius: 6px;
color: var(--muted-foreground);
- font-size: 13px;
+ font-size: 12px;
+ font-weight: 500;
}
-.cf-sidebar nav a:hover,
-.cf-sidebar nav a.active {
+.cf-sidebar nav svg {
+ width: 16px;
+ height: 16px;
+}
+.cf-sidebar nav a:hover {
+ background: var(--secondary);
color: var(--foreground);
+}
+.cf-sidebar nav a.active {
background: var(--secondary);
+ color: var(--primary);
+ box-shadow: inset 0 0 0 1px var(--border);
}
.cf-sidebar-bottom {
margin-top: auto;
- padding: 60px 13px 0;
+ padding: 32px 10px 0;
+ font-size: 10px;
color: var(--muted-foreground);
- font-size: 11px;
}
.cf-sidebar-bottom a {
display: flex;
align-items: center;
gap: 6px;
- margin-top: 9px;
+ margin-top: 8px;
color: var(--foreground);
+ font-size: 11px;
}
.cf-portal-main {
- padding: 48px clamp(24px, 4vw, 64px) 70px;
min-width: 0;
+ padding: 30px 36px 48px;
+}
+.cf-portal-content {
+ max-width: 1120px;
+ margin-inline: auto;
}
-.cf-page-heading {
+.cf-portal .cf-page-heading {
display: flex;
- gap: 20px;
+ align-items: center;
justify-content: space-between;
+ gap: 16px;
+ margin-bottom: 24px;
+}
+.cf-portal .cf-page-title {
+ font-size: 25px;
+ line-height: 1.25;
+ letter-spacing: -0.8px;
+ overflow-wrap: anywhere;
+}
+.cf-portal .cf-page-description {
+ margin-top: 5px !important;
+ max-width: 720px;
+ font-size: 13px;
+ line-height: 1.55;
+}
+.cf-portal .cf-button {
+ height: 34px;
+ padding: 0 12px;
+ gap: 6px;
+ font-size: 12px;
+ border-radius: 6px;
+}
+.cf-portal .cf-button-sm {
+ height: 30px;
+ padding-inline: 10px;
+ font-size: 11px;
+}
+.cf-portal .cf-button-icon {
+ width: 34px;
+ height: 34px;
+ padding: 0;
+}
+.cf-portal .cf-input {
+ min-height: 36px;
+ padding: 7px 10px;
+ font-size: 13px;
+ border-radius: 6px;
+}
+.cf-portal .cf-badge {
+ font-size: 10px;
+ line-height: 1.5;
+ padding: 2px 7px;
+ white-space: nowrap;
+}
+.cf-portal .cf-notice {
+ padding: 10px 12px;
+ margin-block: 14px;
+ border-radius: 6px;
+ font-size: 12px;
+}
+.cf-portal .cf-error-message {
+ font-size: 12px;
+}
+.cf-workspace-toolbar {
+ display: flex;
align-items: center;
- margin-bottom: 30px;
+ justify-content: space-between;
+ gap: 12px;
+ min-height: 38px;
+ margin-bottom: 12px;
}
-.cf-page-heading .cf-eyebrow {
- margin-bottom: 10px;
+.cf-workspace-toolbar > span {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ font-size: 12px;
+ font-weight: 550;
}
-.cf-empty {
- text-align: center;
- padding: 65px 24px;
- margin: 26px 0;
+.cf-workspace-toolbar svg {
+ color: var(--muted-foreground);
}
-.cf-empty-icon {
- width: 60px;
- height: 60px;
+.cf-sites-table {
+ border: 1px solid var(--border);
+ background: var(--card);
+ border-radius: 9px;
+ overflow: hidden;
+}
+.cf-site-columns,
+.cf-site-row {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) 110px 78px 18px;
+ align-items: center;
+ gap: 16px;
+ padding-inline: 18px;
+}
+.cf-site-columns {
+ height: 34px;
+ color: var(--muted-foreground);
+ background: var(--muted);
+ border-bottom: 1px solid var(--border);
+ font-size: 10px;
+ font-weight: 550;
+}
+.cf-sites-list {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+.cf-sites-list li + li {
+ border-top: 1px solid var(--border);
+}
+.cf-site-row {
+ min-height: 66px;
+ padding-block: 12px;
+ color: var(--foreground);
+ transition: background 0.15s;
+}
+.cf-site-row:hover {
+ background: var(--secondary);
+}
+.cf-site-identity {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ min-width: 0;
+}
+.cf-site-icon {
display: grid;
place-items: center;
+ width: 34px;
+ height: 34px;
+ border: 1px solid var(--border);
+ border-radius: 7px;
background: var(--secondary);
color: var(--primary);
- border: 1px solid var(--border);
- border-radius: 15px;
- margin: auto auto 22px;
+ flex-shrink: 0;
}
-.cf-empty h2 {
- font-size: 21px;
- font-weight: 500;
- letter-spacing: -0.5px;
- margin-bottom: 10px;
+.cf-site-name {
+ font-size: 13px;
+ font-weight: 550;
+ line-height: 1.5;
+ overflow-wrap: anywhere;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
}
-.cf-empty p {
- max-width: 390px;
- margin: auto;
+.cf-site-role {
+ font-size: 11px;
color: var(--muted-foreground);
- line-height: 1.8;
}
-.cf-empty .cf-button {
- margin-top: 25px;
+.cf-row-arrow {
+ color: var(--muted-foreground);
}
-.cf-section-label {
- font-size: 12px;
- font-weight: 550;
- margin-bottom: 12px !important;
+.cf-catalog-note {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 6px;
+ margin-top: 14px !important;
+ color: var(--muted-foreground);
+ font-size: 11px;
}
-.cf-info-grid,
-.cf-site-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 18px;
+.cf-catalog-note a {
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
+ margin-left: auto;
+ color: var(--foreground);
}
-.cf-info-card {
+.cf-portal-empty {
+ display: flex;
+ align-items: center;
+ gap: 14px;
padding: 24px;
}
-.cf-info-card > svg {
- color: var(--primary);
- margin-bottom: 18px;
-}
-.cf-info-card h2 {
+.cf-portal-empty h2 {
font-size: 14px;
font-weight: 550;
- margin-bottom: 8px;
}
-.cf-info-card p {
+.cf-portal-empty p {
+ font-size: 12px;
+ color: var(--muted-foreground);
+ margin-top: 4px !important;
+}
+.cf-create-panel {
+ margin-bottom: 16px;
+}
+.cf-panel-heading {
+ padding: 16px 20px;
+ border-bottom: 1px solid var(--border);
+}
+.cf-panel-heading h2 {
+ font-size: 13px;
+ font-weight: 600;
+}
+.cf-panel-heading p {
+ margin-top: 4px !important;
color: var(--muted-foreground);
font-size: 12px;
- line-height: 1.8;
}
-.cf-site-link {
- display: block;
- padding: 24px;
+.cf-create-panel .cf-form {
+ padding: 18px 20px;
+}
+.cf-portal .cf-form {
+ display: grid;
+ gap: 14px;
+ min-width: 0;
+}
+.cf-create-fields {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 16px;
+}
+.cf-portal .cf-field {
+ display: grid;
+ gap: 6px;
+ min-width: 0;
+}
+.cf-portal label,
+.cf-field-label {
+ font-size: 12px;
+ font-weight: 500;
+}
+.cf-field-hint {
+ color: var(--muted-foreground);
+ font-size: 12px;
+ line-height: 1.6;
+}
+.cf-address-preview {
+ overflow-wrap: anywhere;
+ padding: 9px 11px;
border: 1px solid var(--border);
- border-radius: var(--radius);
- background: var(--card);
- transition:
- border-color 0.2s,
- box-shadow 0.2s;
+ border-radius: 6px;
+ background: var(--muted);
+ font-size: 12px;
+ line-height: 1.5;
}
-.cf-site-link:hover {
- border-color: var(--ring);
- box-shadow: 0 5px 20px #00000005;
+.cf-site-actions {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 8px;
+}
+.cf-back-link {
+ display: inline-flex;
+ align-items: center;
+ gap: 5px;
+ font-size: 11px;
+ color: var(--muted-foreground);
+ margin-bottom: 16px;
}
-.cf-site-top {
+.cf-detail-header {
display: flex;
- justify-content: space-between;
align-items: center;
- margin-bottom: 30px;
+ gap: 12px;
+ min-width: 0;
}
-.cf-site-icon {
- width: 42px;
- height: 42px;
+.cf-site-facts {
display: grid;
- place-items: center;
- background: var(--secondary);
- color: var(--primary);
- border-radius: 9px;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ gap: 16px;
+ padding: 14px 0;
+ margin: 0 0 20px;
+ border-block: 1px solid var(--border);
}
-.cf-site-link h2 {
- font-size: 17px;
- font-weight: 550;
- letter-spacing: -0.4px;
+.cf-site-facts dt {
+ font-size: 10px;
+ color: var(--muted-foreground);
+ margin-bottom: 4px;
}
-.cf-site-meta {
+.cf-site-facts dd {
display: flex;
- justify-content: space-between;
align-items: center;
- gap: 10px;
- color: var(--muted-foreground);
- margin-top: 8px;
+ gap: 5px;
+ margin: 0;
font-size: 12px;
}
-.cf-portal-footer {
+.cf-site-workbench {
+ display: grid;
+ grid-template-columns: minmax(0, 700px) minmax(180px, 1fr);
+ align-items: start;
+ gap: 24px;
+}
+.cf-site-settings .cf-form {
+ max-width: 520px;
+}
+.cf-panel-body {
+ display: grid;
+ gap: 20px;
+ padding: 18px 20px;
+}
+.cf-readonly-field {
+ display: grid;
+ gap: 7px;
+}
+.cf-panel-footer {
display: flex;
+ align-items: center;
justify-content: space-between;
- padding: 20px 40px;
+ flex-wrap: wrap;
+ gap: 10px;
+ padding: 12px 20px;
border-top: 1px solid var(--border);
- font-size: 10px;
+}
+.cf-panel-footer p {
+ font-size: 11px;
+ color: var(--muted-foreground);
+}
+.cf-workbench-note {
+ max-width: 280px;
+ padding: 4px 0;
+}
+.cf-note-icon {
+ display: block;
+ color: var(--primary);
+ margin-bottom: 8px;
+}
+.cf-workbench-note h2 {
+ font-size: 12px;
+ font-weight: 550;
+}
+.cf-workbench-note p {
+ margin-top: 6px !important;
color: var(--muted-foreground);
+ font-size: 12px;
+ line-height: 1.65;
}
-.cf-portal-footer a {
+.cf-workbench-note a {
display: inline-flex;
align-items: center;
- gap: 4px;
+ gap: 5px;
+ margin-top: 12px;
+ font-size: 11px;
}
.cf-settings-card {
- margin-top: 25px;
+ margin-top: 16px;
overflow: hidden;
}
.cf-setting-row {
display: flex;
align-items: center;
justify-content: space-between;
- gap: 20px;
- padding: 22px 26px;
+ gap: 16px;
+ padding: 16px 20px;
}
.cf-setting-row + .cf-setting-row {
border-top: 1px solid var(--border);
}
.cf-setting-row h2 {
- font-size: 13px;
+ font-size: 12px;
font-weight: 550;
margin-bottom: 3px;
}
.cf-setting-row p {
font-size: 12px;
color: var(--muted-foreground);
+ overflow-wrap: anywhere;
}
-.cf-back-link {
- display: inline-flex;
- align-items: center;
- gap: 7px;
+.cf-security-card {
+ display: grid;
+ grid-template-columns: 220px minmax(0, 1fr);
+ padding: 22px;
+ gap: 28px;
+ margin-block: 16px;
+}
+.cf-settings-intro h2 {
+ font-size: 13px;
+ font-weight: 600;
+ margin-bottom: 6px;
+}
+.cf-settings-intro p {
+ color: var(--muted-foreground);
+ font-size: 12px;
+ line-height: 1.65;
+}
+.cf-settings-intro > .cf-badge {
+ margin-top: 10px;
+}
+.cf-settings-body {
+ min-width: 0;
+ max-width: 540px;
+}
+.cf-security-card form {
+ display: grid;
+ gap: 8px;
+ max-width: 440px;
+}
+.cf-security-card form > .cf-button {
+ justify-self: start;
+ margin-top: 6px;
+}
+.cf-security-card label {
+ display: block;
+ font-size: 12px;
+ margin-bottom: 6px;
+}
+.cf-security-card form label:not(:first-child) {
+ margin-top: 8px;
+}
+.cf-security-card .cf-settings-body > .cf-input {
+ max-width: 440px;
+}
+.cf-security-card .cf-auth-hint {
+ margin-top: 10px !important;
+}
+.cf-security-card .cf-settings-body > p {
font-size: 12px;
color: var(--muted-foreground);
- margin-bottom: 30px;
+ line-height: 1.6;
}
-.cf-detail-header {
+.cf-security-actions {
display: flex;
- align-items: center;
- gap: 15px;
+ flex-wrap: wrap;
+ gap: 8px;
+ margin-block: 14px;
+}
+.cf-totp-setup {
+ margin-block: 18px;
+}
+.cf-totp-setup img {
+ border-radius: 8px;
+ background: white;
+ max-width: 100%;
+ height: auto;
+}
+.cf-secret-value {
+ overflow-wrap: anywhere;
+ font-family: monospace;
+ font-size: 12px;
}
-.cf-detail-header .cf-site-icon {
- width: 55px;
- height: 55px;
+.cf-recovery-codes {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 8px;
+ padding: 12px 0;
+ list-style: none;
}
-.cf-details {
- margin-top: 28px;
+.cf-passkey-list {
+ list-style: none;
+ padding: 0;
+ margin-top: 14px;
}
-.cf-detail-row {
- padding: 18px 24px;
+.cf-passkey-list li {
display: flex;
- justify-content: space-between;
- gap: 20px;
align-items: center;
-}
-.cf-detail-row + .cf-detail-row {
+ justify-content: space-between;
+ gap: 12px;
+ padding-block: 10px;
border-top: 1px solid var(--border);
-}
-.cf-detail-row dt {
font-size: 12px;
- color: var(--muted-foreground);
}
-.cf-detail-row dd {
- font-size: 13px;
- margin: 0;
+.cf-portal-mobile-actions {
+ display: none;
}
+
.cf-error {
display: flex;
flex-direction: column;
@@ -841,9 +1158,6 @@
.cf-auth-visual {
padding: 32px;
}
- .cf-portal-grid {
- grid-template-columns: 190px minmax(0, 1fr);
- }
}
@media (max-width: 700px) {
.cf-marketing {
@@ -920,57 +1234,6 @@
.cf-auth-form {
padding: 50px 0;
}
- .cf-portal-header {
- height: 74px;
- padding: 0 20px;
- }
- .cf-portal-header .cf-badge {
- display: none;
- }
- .cf-portal-grid {
- grid-template-columns: minmax(0, 1fr);
- }
- .cf-sidebar {
- border-right: 0;
- border-bottom: 1px solid var(--border);
- padding: 10px 20px;
- }
- .cf-nav-label,
- .cf-sidebar-bottom {
- display: none;
- }
- .cf-sidebar nav {
- flex-direction: row;
- }
- .cf-sidebar nav a {
- min-width: 0;
- flex: 1;
- justify-content: center;
- padding-inline: 8px;
- }
- .cf-portal-main {
- padding: 30px 20px 45px;
- }
- .cf-portal-footer {
- padding: 18px 20px;
- gap: 10px;
- }
- .cf-page-heading {
- align-items: flex-start;
- flex-direction: column;
- gap: 14px;
- }
- .cf-info-grid,
- .cf-site-grid {
- grid-template-columns: 1fr;
- }
- .cf-setting-row {
- padding: 20px;
- flex-wrap: wrap;
- }
- .cf-detail-row {
- padding: 16px 20px;
- }
}
@media (prefers-reduced-motion: reduce) {
.cf-root *,
@@ -1042,8 +1305,7 @@
.cf-marketing-nav {
gap: 18px;
}
-.cf-auth-tabs,
-.cf-security-actions {
+.cf-auth-tabs {
display: flex;
flex-wrap: wrap;
gap: 8px;
@@ -1058,72 +1320,6 @@
color: inherit;
font: inherit;
}
-.cf-security-card {
- padding: clamp(20px, 4vw, 32px);
- margin-block: 20px;
-}
-.cf-security-card h2 {
- margin: 0 0 8px;
- font-size: 19px;
-}
-.cf-security-card p {
- color: var(--muted-foreground);
- line-height: 1.7;
-}
-.cf-security-card form {
- display: grid;
- gap: 12px;
- max-width: 440px;
- margin-block: 20px;
-}
-.cf-security-card label {
- display: block;
- font-size: 14px;
- margin-block: 12px 8px;
-}
-.cf-security-card > .cf-input {
- max-width: 440px;
-}
-.cf-totp-setup {
- margin-block: 24px;
-}
-.cf-totp-setup img {
- border-radius: 12px;
- background: white;
-}
-.cf-secret-value {
- overflow-wrap: anywhere;
- font-family: monospace;
-}
-.cf-recovery-codes {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 12px;
- padding: 16px;
- list-style: none;
-}
-.cf-passkey-list {
- list-style: none;
- padding: 0;
-}
-.cf-passkey-list li {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 16px;
- padding-block: 16px;
- border-top: 1px solid var(--border);
-}
-@media (max-width: 600px) {
- .cf-portal-header {
- flex-wrap: wrap;
- gap: 12px;
- }
- .cf-recovery-codes {
- grid-template-columns: 1fr;
- }
-}
-
/* A single quiet header row on small screens; secondary actions live together. */
.cf-mobile-header-actions {
display: none;
@@ -1204,87 +1400,218 @@
}
}
-.cf-site-create {
- margin-block: 1.5rem;
-}
-.cf-site-create .cf-form {
- padding: 1.5rem;
- max-width: 40rem;
-}
-.cf-site-address {
- padding: 1rem;
- overflow-wrap: anywhere;
- font-size: 0.875rem;
-}
-.cf-site-actions {
- display: flex;
- flex-wrap: wrap;
- gap: 0.75rem;
-}
-
-.cf-site-create .cf-form {
- display: grid;
- gap: 20px;
- min-width: 0;
-}
-.cf-site-create .cf-field {
- display: grid;
- gap: 8px;
- min-width: 0;
-}
-.cf-site-create label {
- font-size: 13px;
- font-weight: 550;
-}
-.cf-site-settings {
- padding: 24px;
-}
-.cf-site-settings .cf-form {
- padding: 24px 0 0;
-}
-.cf-site-settings .cf-site-address {
- padding: 16px 0;
-}
-.cf-site-create .cf-page-description {
- font-size: 13px;
-}
-
/* Keep native pinch zoom available; 16px controls avoid iOS focus magnification. */
@media (max-width: 700px), (pointer: coarse) {
.cf-root :is(input, select, textarea) {
font-size: 16px;
}
}
-.cf-portal-mobile-actions {
- display: none;
+
+@media (max-width: 1100px) {
+ .cf-portal-main {
+ padding: 26px 24px 40px;
+ }
+ .cf-security-card {
+ grid-template-columns: 180px minmax(0, 1fr);
+ gap: 20px;
+ }
+ .cf-site-workbench {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 18px;
+ }
+ .cf-workbench-note {
+ max-width: 560px;
+ padding: 0 2px;
+ }
}
@media (max-width: 700px) {
.cf-portal-header {
- height: 72px;
- min-height: 72px;
+ height: 60px;
padding-inline: 16px;
+ gap: 10px;
flex-wrap: nowrap;
+ }
+ .cf-portal .cf-brand {
+ font-size: 17px;
+ }
+ .cf-header-divider,
+ .cf-header-location,
+ .cf-portal-desktop-actions {
+ display: none;
+ }
+ .cf-portal-mobile-actions {
+ display: flex;
+ flex: 0 0 auto;
+ }
+ .cf-portal-grid {
+ grid-template-columns: minmax(0, 1fr);
+ grid-template-rows: auto 1fr;
+ min-height: calc(100dvh - 60px);
+ }
+ .cf-sidebar {
+ height: auto;
+ z-index: 20;
+ background: var(--background);
+ padding: 5px 12px;
+ border-right: 0;
+ border-bottom: 1px solid var(--border);
+ }
+ .cf-nav-label,
+ .cf-sidebar-bottom {
+ display: none;
+ }
+ .cf-sidebar nav {
+ flex-direction: row;
+ gap: 4px;
+ }
+ .cf-sidebar nav a {
+ flex: 1;
+ justify-content: center;
+ min-width: 0;
+ min-height: 40px;
+ padding: 7px 8px;
+ gap: 6px;
+ font-size: 12px;
+ }
+ .cf-portal-main {
+ padding: 22px 16px 32px;
+ }
+ .cf-portal .cf-page-heading {
+ margin-bottom: 20px;
+ gap: 12px;
+ align-items: flex-start;
+ }
+ .cf-portal .cf-page-title {
+ font-size: 22px;
+ letter-spacing: -0.6px;
+ }
+ .cf-portal .cf-page-description {
+ font-size: 12px;
+ }
+ .cf-portal .cf-button,
+ .cf-portal .cf-button-sm {
+ min-height: 40px;
+ height: auto;
+ padding: 8px 11px;
+ font-size: 12px;
+ }
+ .cf-portal .cf-button-icon {
+ width: 40px;
+ height: 40px;
+ padding: 0;
+ }
+ .cf-portal .cf-input {
+ min-height: 42px;
+ font-size: 16px;
+ }
+ .cf-site-columns {
+ display: none;
+ }
+ .cf-site-row {
+ grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
+ padding: 14px;
+ min-height: 70px;
}
- .cf-portal-header > .cf-brand {
- font-size: 18px;
- gap: 8px;
+ .cf-site-identity {
+ gap: 9px;
+ }
+ .cf-site-name {
+ font-size: 12px;
+ }
+ .cf-site-row .cf-site-role,
+ .cf-site-row .cf-row-arrow {
+ display: none;
+ }
+ .cf-catalog-note {
+ font-size: 10px;
+ line-height: 1.7;
+ }
+ .cf-catalog-note a {
+ margin-left: 0;
+ flex-basis: 100%;
+ padding-left: 20px;
+ }
+ .cf-create-fields {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 14px;
+ }
+ .cf-panel-heading,
+ .cf-panel-body,
+ .cf-create-panel .cf-form {
+ padding: 16px;
+ }
+ .cf-portal .cf-form {
+ gap: 12px;
+ }
+ .cf-panel-footer {
+ padding: 12px 16px;
+ }
+ .cf-security-card {
+ grid-template-columns: minmax(0, 1fr);
+ gap: 18px;
+ padding: 16px;
+ margin-block: 14px;
+ }
+ .cf-security-card form {
+ max-width: none;
+ }
+ .cf-security-card form > .cf-button {
+ max-width: 100%;
+ white-space: normal;
+ }
+ .cf-security-actions .cf-button {
+ white-space: normal;
+ }
+ .cf-security-card .cf-settings-body > .cf-input {
+ max-width: none;
+ }
+ .cf-settings-intro p {
+ font-size: 12px;
+ }
+ .cf-settings-body {
+ max-width: none;
+ }
+ .cf-setting-row {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 12px;
+ padding: 16px;
+ }
+ .cf-setting-row > div {
min-width: 0;
}
- .cf-portal-header .cf-brand-logo {
- width: 28px;
- height: 28px;
+ .cf-portal-empty {
+ align-items: flex-start;
+ padding: 20px 16px;
}
- .cf-portal-header .cf-brand-edition {
+ .cf-site-facts {
+ gap: 12px;
+ grid-template-columns: 1fr 1fr;
+ }
+ .cf-site-facts > div:last-child {
+ grid-column: 1 / -1;
+ }
+ .cf-site-facts dd {
font-size: 12px;
- margin-inline-start: 4px;
- letter-spacing: 0;
}
- .cf-portal-desktop-actions {
+ .cf-detail-header {
+ align-items: flex-start;
+ gap: 10px;
+ }
+ .cf-detail-header .cf-site-icon {
display: none;
}
- .cf-portal-mobile-actions {
- display: flex;
- flex: 0 0 auto;
+ .cf-recovery-codes {
+ grid-template-columns: minmax(0, 1fr);
+ }
+}
+@media (pointer: coarse) {
+ .cf-portal :is(input.cf-input, select, textarea) {
+ font-size: 16px;
+ }
+ .cf-portal .cf-button,
+ .cf-portal .cf-button-sm {
+ min-height: 40px;
}
}
diff --git a/apps/cloud/app/components/CloudPortalShell.vue b/apps/cloud/app/components/CloudPortalShell.vue
index 1a3e0381..f76bf21a 100644
--- a/apps/cloud/app/components/CloudPortalShell.vue
+++ b/apps/cloud/app/components/CloudPortalShell.vue
@@ -16,7 +16,14 @@ const { busy, error, signOut } = useCloudSignOut()
<template>
<div class="cf-portal">
<header class="cf-portal-header">
- <CloudBrand cloud />
+ <div class="cf-portal-brand">
+ <CloudBrand cloud /><span
+ class="cf-header-divider"
+ aria-hidden="true"
+ /><span class="cf-header-location">{{
+ route.path.startsWith('/sites') ? 'Workspace' : 'Account settings'
+ }}</span>
+ </div>
<div class="cf-header-actions cf-portal-desktop-actions">
<CloudBadge>Cloud preview</CloudBadge
><CloudButton
@@ -57,7 +64,10 @@ const { busy, error, signOut } = useCloudSignOut()
</div>
</header>
<div class="cf-portal-grid">
- <aside class="cf-sidebar">
+ <aside
+ class="cf-sidebar"
+ aria-label="Workspace"
+ >
<p class="cf-nav-label">YOUR SPACE</p>
<nav aria-label="Portal navigation">
<NuxtLink
@@ -88,7 +98,7 @@ const { busy, error, signOut } = useCloudSignOut()
{{ error }}
</p>
<div class="cf-sidebar-bottom">
- <p>A little guidance?</p>
+ <p>ChronoFrame Cloud</p>
<a
href="https://docs.chronoframe.art/"
target="_blank"
@@ -103,14 +113,8 @@ const { busy, error, signOut } = useCloudSignOut()
class="cf-portal-main"
tabindex="-1"
>
- <slot />
+ <div class="cf-portal-content"><slot /></div>
</main>
</div>
- <footer class="cf-portal-footer">
- <span>Made for the way you see.</span
- ><a href="https://github.com/HoshinoSuzumi/chronoframe"
- >Built in the open <ArrowUpRight :size="12"
- /></a>
- </footer>
</div>
</template>
diff --git a/apps/cloud/app/components/CloudSiteCreate.vue b/apps/cloud/app/components/CloudSiteCreate.vue
index 6d809ef7..3eacf683 100644
--- a/apps/cloud/app/components/CloudSiteCreate.vue
+++ b/apps/cloud/app/components/CloudSiteCreate.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
-import { Plus, ArrowRight } from 'lucide-vue-next'
+import { Plus, ArrowRight, Layers } from 'lucide-vue-next'
+defineProps<{ workspaceName?: string }>()
const open = ref(false)
const name = ref('')
const slug = ref('')
@@ -18,6 +19,11 @@ async function show() {
await nextTick()
document.getElementById('site-name')?.focus()
}
+async function cancel() {
+ open.value = false
+ await nextTick()
+ document.getElementById('create-site-trigger')?.focus()
+}
async function create() {
if (busy.value) return
busy.value = true
@@ -45,66 +51,72 @@ async function create() {
}
</script>
<template>
- <CloudCard class="cf-settings-card cf-site-create">
- <div class="cf-setting-row">
- <div>
- <h2>Your next perspective</h2>
- <p>
- Create a private draft. You can add photographs and publish in a later
- stage.
- </p>
- </div>
- <CloudButton
- v-if="!open"
- @click="show"
- ><Plus :size="16" />Create site</CloudButton
- >
+ <div class="cf-workspace-toolbar">
+ <span><Layers :size="15" />{{ workspaceName || 'My workspace' }}</span
+ ><CloudButton
+ v-if="!open"
+ id="create-site-trigger"
+ size="sm"
+ @click="show"
+ ><Plus :size="15" />Create site</CloudButton
+ >
+ </div>
+ <CloudCard
+ v-if="open"
+ class="cf-create-panel"
+ >
+ <div class="cf-panel-heading">
+ <h2>Create a site</h2>
+ <p>
+ Start with a private draft. Your address is reserved until publishing is
+ available.
+ </p>
</div>
<form
- v-if="open"
class="cf-form"
@submit.prevent="create"
>
- <div class="cf-field">
- <label for="site-name">Site name</label
- ><CloudInput
- id="site-name"
- v-model="name"
- required
- maxlength="80"
- autocomplete="off"
- :disabled="busy"
- />
+ <div class="cf-create-fields">
+ <div class="cf-field">
+ <label for="site-name">Site name</label
+ ><CloudInput
+ id="site-name"
+ v-model="name"
+ required
+ maxlength="80"
+ autocomplete="off"
+ :disabled="busy"
+ />
+ </div>
+ <div class="cf-field">
+ <label for="site-slug">Site address</label
+ ><CloudInput
+ id="site-slug"
+ v-model="slug"
+ required
+ minlength="3"
+ maxlength="40"
+ pattern="[a-z0-9][a-z0-9-]{1,38}[a-z0-9]"
+ autocomplete="off"
+ autocapitalize="none"
+ spellcheck="false"
+ aria-describedby="site-address-help site-address-preview"
+ :disabled="busy"
+ />
+ </div>
</div>
- <div class="cf-field">
- <label for="site-slug">Site address</label
- ><CloudInput
- id="site-slug"
- v-model="slug"
- required
- minlength="3"
- maxlength="40"
- pattern="[a-z0-9][a-z0-9-]{1,38}[a-z0-9]"
- autocomplete="off"
- autocapitalize="none"
- spellcheck="false"
- aria-describedby="site-address-help"
- :disabled="busy"
- />
- <p
- id="site-address-help"
- class="cf-page-description"
- >
- 3–40 lowercase letters, numbers or hyphens; start and end with a
- letter or number. Some addresses are reserved.
- </p>
- </div>
- <p class="cf-site-address">
+ <p
+ id="site-address-preview"
+ class="cf-address-preview"
+ >
{{ slug || 'your-site' }}.site.chronoframe.art
</p>
- <p class="cf-page-description">
- This address is reserved for your draft. Public access is not enabled
- yet. The address cannot be changed here.
+ <p
+ id="site-address-help"
+ class="cf-field-hint"
+ >
+ Use 3–40 lowercase letters, numbers or hyphens. Some addresses are
+ reserved. The address cannot be changed here.
</p>
<p
v-if="error"
@@ -118,12 +130,12 @@ async function create() {
type="submit"
:disabled="busy || !name.trim() || !validSlug"
>{{ busy ? 'Creating…' : 'Create draft'
- }}<ArrowRight :size="15" /></CloudButton
+ }}<ArrowRight :size="14" /></CloudButton
><CloudButton
type="button"
variant="ghost"
:disabled="busy"
- @click="open = false"
+ @click="cancel"
>Cancel</CloudButton
>
</div>
diff --git a/apps/cloud/app/components/CloudSiteSettings.vue b/apps/cloud/app/components/CloudSiteSettings.vue
index 277cb03b..29ea196d 100644
--- a/apps/cloud/app/components/CloudSiteSettings.vue
+++ b/apps/cloud/app/components/CloudSiteSettings.vue
@@ -51,8 +51,11 @@ async function save(unpublish = false) {
}
</script>
<template>
- <CloudCard class="cf-settings-card cf-site-create cf-site-settings">
- <h2 class="cf-section-label">Site settings</h2>
+ <CloudCard class="cf-site-settings">
+ <div class="cf-panel-heading">
+ <h2>General settings</h2>
+ <p>The essentials for your gallery.</p>
+ </div>
<div
v-if="loadError"
role="alert"
@@ -65,74 +68,84 @@ async function save(unpublish = false) {
>
</div>
<template v-else-if="data">
- <p
- v-if="data.site.slug"
- class="cf-site-address"
- >
- {{ data.site.slug }}.site.chronoframe.art
- </p>
- <p
- v-else
- class="cf-page-description"
- >
- This existing site keeps its current domain settings.
- </p>
- <p
- v-if="!data.site.published"
- class="cf-page-description"
- >
- Your draft is private. Publishing will become available when photo
- storage and delivery are ready.
- </p>
- <form
- v-if="data.site.role === 'admin'"
- class="cf-form"
- @submit.prevent="save()"
- >
- <div class="cf-field">
- <label for="settings-site-name">Site name</label
- ><CloudInput
- id="settings-site-name"
- v-model="name"
- required
- maxlength="80"
- :disabled="busy"
- />
- </div>
- <div class="cf-site-actions">
- <CloudButton
- type="submit"
- :disabled="busy || !name.trim()"
- >{{ busy ? 'Saving…' : 'Save changes' }}</CloudButton
- ><CloudButton
- type="button"
- variant="ghost"
- :disabled="busy"
- @click="reload"
- >Reload settings</CloudButton
- ><CloudButton
- v-if="data.site.published"
- type="button"
- variant="destructive"
- :disabled="busy"
- @click="save(true)"
- >Unpublish site</CloudButton
+ <div class="cf-panel-body">
+ <div class="cf-readonly-field">
+ <span class="cf-field-label">Default address</span>
+ <p
+ v-if="data.site.slug"
+ class="cf-address-preview"
+ >
+ {{ data.site.slug }}.site.chronoframe.art
+ </p>
+ <p
+ v-else
+ class="cf-field-hint"
>
+ This existing site keeps its current domain settings.
+ </p>
+ <p
+ v-if="!data.site.published"
+ class="cf-field-hint"
+ >
+ Reserved for your private draft. Public access is not enabled yet.
+ </p>
</div>
- </form>
- <p
- v-else
- class="cf-page-description"
- >
- Only workspace administrators can change these settings.
- </p>
- <p
- v-if="message"
- :role="failed ? 'alert' : 'status'"
- class="cf-notice"
+ <form
+ v-if="data.site.role === 'admin'"
+ class="cf-form"
+ @submit.prevent="save()"
+ >
+ <div class="cf-field">
+ <label for="settings-site-name">Site name</label
+ ><CloudInput
+ id="settings-site-name"
+ v-model="name"
+ required
+ maxlength="80"
+ :disabled="busy"
+ />
+ </div>
+ <div class="cf-site-actions">
+ <CloudButton
+ type="submit"
+ :disabled="busy || !name.trim()"
+ >{{ busy ? 'Saving…' : 'Save changes' }}</CloudButton
+ ><CloudButton
+ type="button"
+ variant="ghost"
+ :disabled="busy"
+ @click="reload"
+ >Reload settings</CloudButton
+ >
+ </div>
+ </form>
+ <p
+ v-else
+ class="cf-field-hint"
+ >
+ Only workspace administrators can change these settings.
+ </p>
+ <p
+ v-if="message"
+ :role="failed ? 'alert' : 'status'"
+ class="cf-notice"
+ >
+ {{ message }}
+ </p>
+ </div>
+ <div
+ v-if="data.site.role === 'admin' && data.site.published"
+ class="cf-panel-footer"
>
- {{ message }}
- </p>
+ <p>Take this gallery offline.</p>
+ <CloudButton
+ type="button"
+ variant="destructive"
+ :disabled="busy"
+ @click="save(true)"
+ >Unpublish site</CloudButton
+ >
+ </div>
</template>
</CloudCard>
</template>
diff --git a/apps/cloud/app/pages/account/index.vue b/apps/cloud/app/pages/account/index.vue
index 72f4e4e4..9ca49e87 100644
--- a/apps/cloud/app/pages/account/index.vue
+++ b/apps/cloud/app/pages/account/index.vue
@@ -11,10 +11,9 @@ const { data: security } = await useFetch('/api/auth/security')
><motion.div v-bind="entrance"
><div class="cf-page-heading">
<div>
- <p class="cf-eyebrow">YOUR SPACE</p>
<h1 class="cf-page-title">Your account</h1>
<p class="cf-page-description">
- A few essentials, so you can get back to what matters.
+ Your profile, preferences and session.
</p>
</div>
<CloudBadge tone="success"
@@ -24,7 +23,7 @@ const { data: security } = await useFetch('/api/auth/security')
<CloudCard class="cf-settings-card"
><div class="cf-setting-row">
<div>
- <h2>Sign-in method</h2>
+ <h2>Email address</h2>
<p>{{ security?.email }}</p>
</div>
<CloudButton
@@ -55,10 +54,6 @@ const { data: security } = await useFetch('/api/auth/security')
</div>
<CloudThemeToggle /></div
></CloudCard>
- <div class="cf-notice">
- <strong>Your email is verified.</strong>Your workspace is ready. Create
- and manage your gallery drafts from Your sites.
- </div>
<CloudCard class="cf-settings-card"
><div class="cf-setting-row">
<div>
diff --git a/apps/cloud/app/pages/account/security.vue b/apps/cloud/app/pages/account/security.vue
index a41b23a2..0e619e1f 100644
--- a/apps/cloud/app/pages/account/security.vue
+++ b/apps/cloud/app/pages/account/security.vue
@@ -130,10 +130,9 @@ async function deletePasskey(id: number) {
<CloudPortalShell
><div class="cf-page-heading">
<div>
- <p class="cf-eyebrow">YOUR ACCOUNT</p>
<h1 class="cf-page-title">Security</h1>
<p class="cf-page-description">
- Keep your space yours. {{ security?.email }}
+ Manage sign-in methods for {{ security?.email }}.
</p>
</div>
</div>
@@ -152,54 +151,57 @@ async function deletePasskey(id: number) {
{{ notice }}
</p>
<CloudCard class="cf-security-card"
- ><h2>Password</h2>
- <p>Use a unique password with at least 12 characters.</p>
- <form
- v-if="security?.hasPassword"
- @submit.prevent="changePassword"
- >
- <label for="current-password">Current password</label
- ><CloudInput
- id="current-password"
- v-model="password"
- type="password"
- autocomplete="current-password"
- :disabled="busy"
- required
- /><label for="new-password">New password</label
- ><CloudInput
- id="new-password"
- v-model="newPassword"
- type="password"
- autocomplete="new-password"
- minlength="12"
- maxlength="128"
- :disabled="busy"
- required
- /><CloudButton
- type="submit"
- :loading="busy"
- >Update password</CloudButton
- >
- </form>
- <p v-else>
- You signed in with an email code.
- <NuxtLink
- class="cf-text-link"
- to="/forgot-password"
- >Email yourself a link to set a password</NuxtLink
+ ><div class="cf-settings-intro">
+ <h2>Password</h2>
+ <p>Use a unique password with at least 12 characters.</p>
+ </div>
+ <div class="cf-settings-body">
+ <form
+ v-if="security?.hasPassword"
+ @submit.prevent="changePassword"
>
- before enabling two-step verification.
- </p></CloudCard
+ <label for="current-password">Current password</label
+ ><CloudInput
+ id="current-password"
+ v-model="password"
+ type="password"
+ autocomplete="current-password"
+ :disabled="busy"
+ required
+ /><label for="new-password">New password</label
+ ><CloudInput
+ id="new-password"
+ v-model="newPassword"
+ type="password"
+ autocomplete="new-password"
+ minlength="12"
+ maxlength="128"
+ :disabled="busy"
+ required
+ /><CloudButton
+ type="submit"
+ :loading="busy"
+ >Update password</CloudButton
+ >
+ </form>
+ <p v-else>
+ You signed in with an email code.
+ <NuxtLink
+ class="cf-text-link"
+ to="/forgot-password"
+ >Email yourself a link to set a password</NuxtLink
+ >
+ before enabling two-step verification.
+ </p>
+ </div></CloudCard
>
<CloudCard class="cf-security-card"
- ><div class="cf-setting-row">
+ ><div class="cf-settings-intro">
<div>
<h2>Two-step verification</h2>
<p>
- After password sign-in, verify an email or authenticator code. A
- connected authenticator also protects email-code sign-in. Passkeys
- already verify you on your device.
+ Add a code after password sign-in. Connected authenticators also
+ protect email-code sign-in. Passkeys use device verification.
</p>
</div>
<CloudBadge
@@ -207,149 +209,155 @@ async function deletePasskey(id: number) {
>{{ security?.twoFactorEnabled ? 'Enabled' : 'Off' }}</CloudBadge
>
</div>
- <template v-if="security?.hasPassword"
- ><label for="security-password"
- >Confirm your password to change security settings</label
- ><CloudInput
- id="security-password"
- v-model="password"
- type="password"
- autocomplete="current-password"
- :disabled="busy"
- />
- <div class="cf-security-actions">
- <CloudButton
- v-if="!security.twoFactorEnabled"
- :disabled="busy || !password"
- @click="enable('otp')"
- >Enable email verification</CloudButton
- ><CloudButton
- v-if="!security.hasAuthenticator"
- variant="secondary"
- :disabled="busy || !password"
- @click="enable('totp')"
- >Set up authenticator</CloudButton
- ><CloudButton
- v-if="security.twoFactorEnabled"
- variant="destructive"
- :disabled="busy || !password"
- @click="disable"
- >Disable two-step verification</CloudButton
- >
- </div>
- <div
- v-if="totpURI"
- class="cf-totp-setup"
- >
- <img
- v-if="qr"
- :src="qr"
- width="240"
- height="240"
- alt="Scan this private QR code with your authenticator app"
+ <div class="cf-settings-body">
+ <template v-if="security?.hasPassword"
+ ><label for="security-password"
+ >Confirm your password to change security settings</label
+ ><CloudInput
+ id="security-password"
+ v-model="password"
+ type="password"
+ autocomplete="current-password"
+ :disabled="busy"
/>
- <details>
- <summary>Cannot scan the QR code?</summary>
- <p class="cf-secret-value">{{ totpURI }}</p>
- </details>
- <form @submit.prevent="confirmAuthenticator">
- <label for="totp-code">Authenticator code</label
- ><CloudInput
- id="totp-code"
- v-model="code"
- inputmode="numeric"
- autocomplete="one-time-code"
- pattern="[0-9]{6}"
- maxlength="6"
- required
- :disabled="busy"
- /><CloudButton
- type="submit"
- :loading="busy"
- >Verify and enable</CloudButton
+ <div class="cf-security-actions">
+ <CloudButton
+ v-if="!security.twoFactorEnabled"
+ :disabled="busy || !password"
+ @click="enable('otp')"
+ >Enable email verification</CloudButton
+ ><CloudButton
+ v-if="!security.hasAuthenticator"
+ variant="secondary"
+ :disabled="busy || !password"
+ @click="enable('totp')"
+ >Set up authenticator</CloudButton
+ ><CloudButton
+ v-if="security.twoFactorEnabled"
+ variant="destructive"
+ :disabled="busy || !password"
+ @click="disable"
+ >Disable two-step verification</CloudButton
>
- </form>
- </div>
- <div v-if="security.hasAuthenticator">
- <p>
- Authenticator connected. Recovery codes are single use. Generating
- new codes replaces the old ones.
- </p>
- <CloudButton
- variant="secondary"
- :disabled="busy || !password"
- @click="regenerate"
- >Replace recovery codes</CloudButton
+ </div>
+ <div
+ v-if="totpURI"
+ class="cf-totp-setup"
>
- </div>
- <div
- v-if="backupCodes.length"
- class="cf-notice"
- >
- <strong>Save these recovery codes privately.</strong>
- <p>These are only shown here. Keep them outside this browser.</p>
- <ul class="cf-recovery-codes">
- <li
- v-for="item in backupCodes"
- :key="item"
+ <img
+ v-if="qr"
+ :src="qr"
+ width="240"
+ height="240"
+ alt="Scan this private QR code with your authenticator app"
+ />
+ <details>
+ <summary>Cannot scan the QR code?</summary>
+ <p class="cf-secret-value">{{ totpURI }}</p>
+ </details>
+ <form @submit.prevent="confirmAuthenticator">
+ <label for="totp-code">Authenticator code</label
+ ><CloudInput
+ id="totp-code"
+ v-model="code"
+ inputmode="numeric"
+ autocomplete="one-time-code"
+ pattern="[0-9]{6}"
+ maxlength="6"
+ required
+ :disabled="busy"
+ /><CloudButton
+ type="submit"
+ :loading="busy"
+ >Verify and enable</CloudButton
+ >
+ </form>
+ </div>
+ <div v-if="security.hasAuthenticator">
+ <p>
+ Authenticator connected. Recovery codes are single use. Generating
+ new codes replaces the old ones.
+ </p>
+ <CloudButton
+ variant="secondary"
+ :disabled="busy || !password"
+ @click="regenerate"
+ >Replace recovery codes</CloudButton
>
- <code>{{ item }}</code>
- </li>
- </ul>
- <CloudButton
- variant="secondary"
- @click="backupCodes = []"
- >I have saved my codes</CloudButton
+ </div>
+ <div
+ v-if="backupCodes.length"
+ class="cf-notice"
>
- </div></template
- ></CloudCard
+ <strong>Save these recovery codes privately.</strong>
+ <p>These are only shown here. Keep them outside this browser.</p>
+ <ul class="cf-recovery-codes">
+ <li
+ v-for="item in backupCodes"
+ :key="item"
+ >
+ <code>{{ item }}</code>
+ </li>
+ </ul>
+ <CloudButton
+ variant="secondary"
+ @click="backupCodes = []"
+ >I have saved my codes</CloudButton
+ >
+ </div></template
+ >
+ </div></CloudCard
>
<CloudCard class="cf-security-card"
- ><h2>Passkeys</h2>
- <p>
- Use your device lock, fingerprint or security key. Your device creates
- the keys automatically.
- </p>
- <form @submit.prevent="addPasskey">
- <label for="passkey-name">Passkey name</label
- ><CloudInput
- id="passkey-name"
- v-model="passkeyName"
- maxlength="80"
- autocomplete="off"
- placeholder="For example, my laptop"
- :disabled="busy"
- /><CloudButton
- type="submit"
- :loading="busy"
- >Create passkey</CloudButton
- >
- </form>
- <ul
- v-if="security?.passkeys.length"
- class="cf-passkey-list"
- >
- <li
- v-for="key in security.passkeys"
- :key="key.id"
- >
- <span>{{ key.name || 'Passkey' }}</span
- ><CloudButton
- variant="destructive"
- size="sm"
+ ><div class="cf-settings-intro">
+ <h2>Passkeys</h2>
+ <p>
+ Use your device lock, fingerprint or security key. Your device creates
+ the keys automatically.
+ </p>
+ </div>
+ <div class="cf-settings-body">
+ <form @submit.prevent="addPasskey">
+ <label for="passkey-name">Passkey name</label
+ ><CloudInput
+ id="passkey-name"
+ v-model="passkeyName"
+ maxlength="80"
+ autocomplete="off"
+ placeholder="For example, my laptop"
:disabled="busy"
- :aria-label="`Remove ${key.name || 'passkey'}`"
- @click="deletePasskey(key.id)"
- >Remove</CloudButton
+ /><CloudButton
+ type="submit"
+ :loading="busy"
+ >Create passkey</CloudButton
+ >
+ </form>
+ <ul
+ v-if="security?.passkeys.length"
+ class="cf-passkey-list"
+ >
+ <li
+ v-for="key in security.passkeys"
+ :key="key.id"
>
- </li>
- </ul>
- <p
- v-else
- class="cf-auth-hint"
- >
- No passkeys yet.
- </p></CloudCard
+ <span>{{ key.name || 'Passkey' }}</span
+ ><CloudButton
+ variant="destructive"
+ size="sm"
+ :disabled="busy"
+ :aria-label="`Remove ${key.name || 'passkey'}`"
+ @click="deletePasskey(key.id)"
+ >Remove</CloudButton
+ >
+ </li>
+ </ul>
+ <p
+ v-else
+ class="cf-auth-hint"
+ >
+ No passkeys yet.
+ </p>
+ </div></CloudCard
></CloudPortalShell
>
</template>
diff --git a/apps/cloud/app/pages/sites/[siteId]/index.vue b/apps/cloud/app/pages/sites/[siteId]/index.vue
index c4ee07f7..1f55fa4e 100644
--- a/apps/cloud/app/pages/sites/[siteId]/index.vue
+++ b/apps/cloud/app/pages/sites/[siteId]/index.vue
@@ -1,6 +1,12 @@
<script setup lang="ts">
import { motion } from 'motion-v'
-import { ArrowLeft, Images, ImagePlus, ShieldCheck } from 'lucide-vue-next'
+import {
+ ArrowLeft,
+ ArrowUpRight,
+ Images,
+ ImagePlus,
+ ShieldCheck,
+} from 'lucide-vue-next'
const entrance = useCloudMotion()
import type { EntrySiteContext } from '@chronoframe/contracts/entry'
@@ -50,68 +56,55 @@ onBeforeUnmount(() => stream?.close())
><motion.div
v-if="context"
v-bind="entrance"
- ><NuxtLink
+ >
+ <NuxtLink
to="/sites"
class="cf-back-link"
- ><ArrowLeft :size="15" />All sites</NuxtLink
+ ><ArrowLeft :size="14" />All sites</NuxtLink
>
<div class="cf-page-heading">
<div class="cf-detail-header">
- <span class="cf-site-icon"
- ><Images
- :size="26"
- :stroke-width="1.5"
- /></span>
+ <span class="cf-site-icon"><Images :size="20" /></span>
<div>
- <p class="cf-eyebrow">SITE OVERVIEW</p>
<h1 class="cf-page-title">{{ context.name }}</h1>
+ <p class="cf-page-description">Gallery settings and access.</p>
</div>
</div>
- <CloudBadge :tone="context.published ? 'success' : 'warning'">{{
- context.published ? 'Published' : 'Not published'
+ <CloudBadge :tone="context.published ? 'success' : 'neutral'">{{
+ context.published ? 'Published' : 'Draft'
}}</CloudBadge>
</div>
- <CloudCard class="cf-details"
- ><dl>
- <div class="cf-detail-row">
- <dt>Your role</dt>
- <dd class="cf-capitalize">{{ context.role }}</dd>
- </div>
- <div class="cf-detail-row">
- <dt>Publication status</dt>
- <dd>{{ context.published ? 'Published' : 'Not published' }}</dd>
- </div>
- <div class="cf-detail-row">
- <dt>Access</dt>
- <dd class="cf-inline-status">
- <ShieldCheck :size="14" />Membership verified
- </dd>
- </div>
- </dl></CloudCard
- >
- <CloudSiteSettings :site-id="context.siteId" />
- <CloudCard
- v-if="!context.capabilities.mediaManagement"
- class="cf-empty"
- ><div class="cf-empty-icon">
- <ImagePlus
- :size="27"
- :stroke-width="1.4"
- />
+ <dl class="cf-site-facts">
+ <div>
+ <dt>Your role</dt>
+ <dd class="cf-capitalize">{{ context.role }}</dd>
</div>
- <h2>A space for what comes next.</h2>
- <p>
- Photo storage, uploads and publishing are coming in the next stage.
- For now, you can review your site and membership details here.
- </p>
- <CloudButton
- as-child
- variant="secondary"
- ><a href="https://docs.chronoframe.art/"
- >Read the documentation</a
- ></CloudButton
- ></CloudCard
- >
- </motion.div></CloudPortalShell
- >
+ <div>
+ <dt>Publication</dt>
+ <dd>{{ context.published ? 'Published' : 'Private draft' }}</dd>
+ </div>
+ <div>
+ <dt>Access</dt>
+ <dd><ShieldCheck :size="13" />Membership verified</dd>
+ </div>
+ </dl>
+ <div class="cf-site-workbench">
+ <CloudSiteSettings :site-id="context.siteId" />
+ <aside
+ v-if="!context.capabilities.mediaManagement"
+ class="cf-workbench-note"
+ aria-label="Photo management information"
+ >
+ <span class="cf-note-icon"><ImagePlus :size="18" /></span>
+ <h2>Photo management</h2>
+ <p>
+ Storage, uploads and new publishing options are coming in the next
+ stage.
+ </p>
+ <a href="https://docs.chronoframe.art/"
+ >Read the documentation<ArrowUpRight :size="13"
+ /></a>
+ </aside>
+ </div> </motion.div
+ ></CloudPortalShell>
</template>
diff --git a/apps/cloud/app/pages/sites/index.vue b/apps/cloud/app/pages/sites/index.vue
index e82dc9ad..398cec26 100644
--- a/apps/cloud/app/pages/sites/index.vue
+++ b/apps/cloud/app/pages/sites/index.vue
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { motion } from 'motion-v'
-import { ArrowUpRight, Images, Compass, ShieldCheck } from 'lucide-vue-next'
+import { ArrowUpRight, Images, ShieldCheck } from 'lucide-vue-next'
const entrance = useCloudMotion()
const workspace = ref<{ name: string } | null>(null)
const workspaceError = ref(false)
@@ -31,14 +31,12 @@ const sites = computed(() =>
</script>
<template>
<CloudPortalShell
- ><motion.div v-bind="entrance"
- ><div class="cf-page-heading">
+ ><motion.div v-bind="entrance">
+ <div class="cf-page-heading">
<div>
- <p class="cf-eyebrow">YOUR SPACE</p>
<h1 class="cf-page-title">Your sites</h1>
<p class="cf-page-description">
- A home for each of your perspectives. Your galleries, all in one
- place.
+ Manage your galleries, settings and access.
</p>
</div>
<CloudBadge
@@ -46,12 +44,6 @@ const sites = computed(() =>
{{ sites.length === 1 ? 'site' : 'sites' }}</CloudBadge
>
</div>
- <p
- v-if="workspace"
- class="cf-section-label"
- >
- {{ workspace.name }}
- </p>
<div
v-if="workspaceError"
class="cf-notice"
@@ -64,73 +56,71 @@ const sites = computed(() =>
>Try again</CloudButton
>
</div>
- <CloudSiteCreate v-if="workspace" />
+ <CloudSiteCreate
+ v-if="workspace"
+ :workspace-name="workspace.name"
+ />
<div
v-if="sites.length"
- class="cf-site-grid"
+ class="cf-sites-table"
>
- <NuxtLink
- v-for="site in sites"
- :key="site.siteId"
- :to="`/sites/${site.siteId}`"
- :aria-label="site.name"
- class="cf-site-link"
- ><div class="cf-site-top">
- <span class="cf-site-icon"><Images :size="20" /></span
- ><CloudBadge :tone="site.published ? 'success' : 'warning'">{{
- site.published ? 'Published' : 'Not published'
- }}</CloudBadge>
- </div>
- <h2>{{ site.name }}</h2>
- <div class="cf-site-meta">
- <span class="cf-capitalize">{{ site.role }}</span
- ><ArrowUpRight
- :size="18"
- aria-label="Open site"
- /></div
- ></NuxtLink>
- </div>
- <CloudCard
- v-else
- class="cf-empty"
- ><div class="cf-empty-icon">
- <Images
- :size="27"
- :stroke-width="1.4"
- />
+ <div
+ class="cf-site-columns"
+ aria-hidden="true"
+ >
+ <span>Site</span><span>Status</span><span>Role</span><span />
</div>
- <h2>Your next chapter starts here.</h2>
- <p>
- You have no sites yet. Create your first draft above to reserve an
- address and start shaping your gallery.
- </p>
- <CloudButton
- as-child
- variant="secondary"
- ><a href="https://docs.chronoframe.art/"
- >Explore the documentation
- <ArrowUpRight :size="15" /></a></CloudButton
- ></CloudCard>
- <div class="cf-section">
- <h2 class="cf-section-label">A few things to know</h2>
- <div class="cf-info-grid">
- <CloudCard class="cf-info-card"
- ><Compass :size="21" />
- <h2>One account. Your own perspective.</h2>
- <p>
- Sites are the home for your photographs. Each one has its own
- identity and access permissions.
- </p></CloudCard
- ><CloudCard class="cf-info-card"
- ><ShieldCheck :size="21" />
- <h2>A shared space, thoughtfully private.</h2>
- <p>
- You only see sites you belong to. Your account and each gallery
- have separate access boundaries.
- </p></CloudCard
+ <ul class="cf-sites-list">
+ <li
+ v-for="site in sites"
+ :key="site.siteId"
>
- </div>
+ <NuxtLink
+ :to="`/sites/${site.siteId}`"
+ :aria-label="site.name"
+ :aria-describedby="`site-status-${site.siteId} site-role-${site.siteId}`"
+ class="cf-site-row"
+ >
+ <span class="cf-site-identity"
+ ><span class="cf-site-icon"><Images :size="17" /></span
+ ><span
+ class="cf-site-name"
+ :title="site.name"
+ >{{ site.name }}</span
+ ></span
+ >
+ <span :id="`site-status-${site.siteId}`"
+ ><CloudBadge :tone="site.published ? 'success' : 'neutral'">{{
+ site.published ? 'Published' : 'Draft'
+ }}</CloudBadge></span
+ >
+ <span
+ :id="`site-role-${site.siteId}`"
+ class="cf-site-role cf-capitalize"
+ >{{ site.role }}</span
+ ><ArrowUpRight
+ :size="15"
+ class="cf-row-arrow"
+ aria-hidden="true"
+ />
+ </NuxtLink>
+ </li>
+ </ul>
</div>
- </motion.div></CloudPortalShell
- >
+ <CloudCard
+ v-else
+ class="cf-portal-empty"
+ ><span class="cf-site-icon"><Images :size="20" /></span>
+ <div>
+ <h2>No sites yet</h2>
+ <p>Create a draft above to reserve your gallery’s address.</p>
+ </div></CloudCard
+ >
+ <p class="cf-catalog-note">
+ <ShieldCheck :size="14" />Only sites you belong to appear here.<a
+ href="https://docs.chronoframe.art/"
+ >View documentation<ArrowUpRight :size="12"
+ /></a>
+ </p> </motion.div
+ ></CloudPortalShell>
</template>