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.

fix(cloud): refine mobile portal and isolate unpublish edits

Timothy Yin5486b8b35925
diff --git a/apps/cloud/app/assets/cloud.css b/apps/cloud/app/assets/cloud.css
index 2c7a0aeb..b4be3fdb 100644
--- a/apps/cloud/app/assets/cloud.css
+++ b/apps/cloud/app/assets/cloud.css
@@ -1248,3 +1248,43 @@
.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: 700px) {
+ .cf-portal-header {
+ height: 72px;
+ min-height: 72px;
+ padding-inline: 16px;
+ flex-wrap: nowrap;
+ gap: 10px;
+ }
+ .cf-portal-header > .cf-brand {
+ font-size: 18px;
+ gap: 8px;
+ min-width: 0;
+ }
+ .cf-portal-header .cf-brand-logo {
+ width: 28px;
+ height: 28px;
+ }
+ .cf-portal-header .cf-brand-edition {
+ font-size: 12px;
+ margin-inline-start: 4px;
+ letter-spacing: 0;
+ }
+ .cf-portal-desktop-actions {
+ display: none;
+ }
+ .cf-portal-mobile-actions {
+ display: flex;
+ flex: 0 0 auto;
+ }
+}
diff --git a/apps/cloud/app/components/CloudPortalShell.vue b/apps/cloud/app/components/CloudPortalShell.vue
index 6e447a71..1a3e0381 100644
--- a/apps/cloud/app/components/CloudPortalShell.vue
+++ b/apps/cloud/app/components/CloudPortalShell.vue
@@ -6,7 +6,10 @@ import {
BookOpen,
ShieldCheck,
LogOut,
+ Menu,
} from 'lucide-vue-next'
+import { PopoverRoot, PopoverTrigger, PopoverContent } from 'reka-ui'
+const mobileMenuOpen = ref(false)
const route = useRoute()
const { busy, error, signOut } = useCloudSignOut()
</script>
@@ -14,7 +17,7 @@ const { busy, error, signOut } = useCloudSignOut()
<div class="cf-portal">
<header class="cf-portal-header">
<CloudBrand cloud />
- <div class="cf-header-actions">
+ <div class="cf-header-actions cf-portal-desktop-actions">
<CloudBadge>Cloud preview</CloudBadge
><CloudButton
variant="ghost"
@@ -24,6 +27,34 @@ const { busy, error, signOut } = useCloudSignOut()
><LogOut :size="15" />Sign out</CloudButton
><CloudThemeToggle />
</div>
+ <div class="cf-portal-mobile-actions">
+ <PopoverRoot v-model:open="mobileMenuOpen">
+ <PopoverTrigger as-child
+ ><CloudButton
+ variant="ghost"
+ size="icon"
+ aria-label="Open account menu"
+ ><Menu :size="20" /></CloudButton
+ ></PopoverTrigger>
+ <PopoverContent
+ class="cf-mobile-menu"
+ align="end"
+ :side-offset="12"
+ :collision-padding="16"
+ aria-label="Account menu"
+ >
+ <div class="cf-mobile-menu-theme">
+ <span>Appearance</span><CloudThemeToggle />
+ </div>
+ <CloudButton
+ variant="ghost"
+ :loading="busy"
+ @click="signOut"
+ ><LogOut :size="16" />Sign out</CloudButton
+ >
+ </PopoverContent>
+ </PopoverRoot>
+ </div>
</header>
<div class="cf-portal-grid">
<aside class="cf-sidebar">
diff --git a/apps/cloud/app/components/CloudSiteSettings.vue b/apps/cloud/app/components/CloudSiteSettings.vue
index 8120fe2d..277cb03b 100644
--- a/apps/cloud/app/components/CloudSiteSettings.vue
+++ b/apps/cloud/app/components/CloudSiteSettings.vue
@@ -26,7 +26,7 @@ async function save(unpublish = false) {
const result = await $fetch(`/api/sites/${props.siteId}/settings`, {
method: 'PATCH',
body: {
- name: name.value,
+ name: unpublish ? data.value.site.name : name.value,
revision: data.value.site.revision,
published: unpublish ? false : !!data.value.site.published,
},