diff --git a/crates/im-web/assets/main.css b/crates/im-web/assets/main.css index 3bc5912..df23d77 100644 --- a/crates/im-web/assets/main.css +++ b/crates/im-web/assets/main.css @@ -362,6 +362,7 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { } .profile-heading { + flex: 1; display: flex; flex-direction: column; gap: 6px; @@ -398,35 +399,37 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { font-size: 13px; } -.profile-photo-actions { +.auth-card .profile-photo-form { display: flex; + flex-direction: row; + flex-wrap: wrap; gap: 8px; align-items: center; } -.profile-photo-actions .profile-upload { - flex: 1; - width: auto; +.auth-card .profile-photo-form label.admin-action { + display: inline-flex; + align-items: center; + box-sizing: border-box; + cursor: pointer; } -#profile-photo-remove { +.profile-file-hidden { display: none; } -.profile-file { - height: auto; - padding: 7px 12px; - font-size: 12px; - color: var(--muted); +.profile-photo-save { + display: none; } -.profile-file::file-selector-button { - margin-right: 10px; - padding: 4px 10px; - background: var(--panel-sunken); - border: 1px solid var(--border-strong); - border-radius: var(--radius); - color: var(--ink); - font-family: var(--font-sans); - font-size: 12px; + +.profile-photo-form:has(.profile-file-hidden:valid) .profile-photo-save { + display: inline-flex; +} + +#profile-photo-remove { + display: none; +} + +.profile-avatar-upload { cursor: pointer; } diff --git a/crates/im-web/src/pages.rs b/crates/im-web/src/pages.rs index dd95e41..e0e5e0c 100644 --- a/crates/im-web/src/pages.rs +++ b/crates/im-web/src/pages.rs @@ -427,7 +427,15 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { (wordmark(cx).await?)
- (avatar(cx, user).await?) + if user.has_photo { + (avatar(cx, user).await?) + } else { + // iz's no-photo idiom: the face itself is the + // upload affordance — the label opens the picker. + + }
(user.name.clone())
@@ -440,6 +448,43 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { "Admin" }
+
+ + + // No script on im: where iz auto-submits on + // change, a quiet Save appears once the input + // holds a file (`:has(:valid)`, CSS-only). + + if user.has_photo { + + } +
if let Some(code) = ok { @@ -458,41 +503,6 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result {
(joined)
-
- -
- - if user.has_photo { - - } -
-
"Public profile" if user.has_photo {