ソースを参照

fix(miniprogram): center-align workbench title and user stack in one row

Co-authored-by: Cursor <cursoragent@cursor.com>
wuzilong 1 ヶ月 前
親
コミット
25eeb82db0
1 ファイル変更、12 行追加、37 行削除
  1. 12 37
      miniprogram/styles/mp-shell.scss

+ 12 - 37
miniprogram/styles/mp-shell.scss

@@ -48,37 +48,31 @@ page {
   padding-bottom: 48rpx;
   padding-bottom: 48rpx;
 }
 }
 
 
-/* 工作台:恢复绿色渐变大头;容器不预留胶囊,用户行可真正右对齐 */
+/* 工作台:绿色渐变;左右两列上下居中;右侧用户区不受胶囊列挤压 */
 .mp-header--workbench {
 .mp-header--workbench {
   padding-top: calc(72rpx + var(--sq-safe-top, env(safe-area-inset-top, 0px)));
   padding-top: calc(72rpx + var(--sq-safe-top, env(safe-area-inset-top, 0px)));
   padding-right: 32rpx;
   padding-right: 32rpx;
   padding-bottom: 56rpx;
   padding-bottom: 56rpx;
   padding-left: 32rpx;
   padding-left: 32rpx;
-  min-height: calc(280rpx + var(--sq-safe-top, 0px));
+  min-height: calc(240rpx + var(--sq-safe-top, 0px));
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
-.mp-header__title-row {
+.mp-header__body {
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
-  gap: 20rpx;
-  min-width: 0;
-  padding-right: var(--sq-capsule-right-safe, 96px);
+  justify-content: space-between;
+  gap: 24rpx;
+  width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
-.mp-header__logo {
-  width: 72rpx;
-  height: 72rpx;
-  flex-shrink: 0;
-  border-radius: 12rpx;
-  background: rgba(255, 255, 255, 0.18);
-}
-
 .mp-header__titles {
 .mp-header__titles {
   flex: 1;
   flex: 1;
   min-width: 0;
   min-width: 0;
+  padding-right: var(--sq-capsule-right-safe, 96px);
+  box-sizing: border-box;
 }
 }
 
 
 .mp-header__main {
 .mp-header__main {
@@ -104,37 +98,19 @@ page {
   text-align: left;
   text-align: left;
 }
 }
 
 
-.mp-header__user-row {
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-  justify-content: flex-end;
-  width: 100%;
-  margin-top: 28rpx;
-  box-sizing: border-box;
-}
-
 .mp-header__user-stack {
 .mp-header__user-stack {
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   align-items: flex-end;
   align-items: flex-end;
   justify-content: center;
   justify-content: center;
-  gap: 8rpx;
+  gap: 12rpx;
   flex-shrink: 0;
   flex-shrink: 0;
-  max-width: 70%;
-  text-align: right;
-  margin-left: auto;
-}
-
-.mp-header__welcome {
-  font-size: 22rpx;
-  line-height: 1.3;
-  opacity: 0.9;
+  max-width: 48%;
   text-align: right;
   text-align: right;
 }
 }
 
 
-.mp-header__user-name {
-  font-size: 28rpx;
+.mp-header__user-line {
+  font-size: 26rpx;
   font-weight: 600;
   font-weight: 600;
   line-height: 1.3;
   line-height: 1.3;
   max-width: 100%;
   max-width: 100%;
@@ -145,7 +121,6 @@ page {
 }
 }
 
 
 .mp-header__logout {
 .mp-header__logout {
-  margin-top: 4rpx;
   font-size: 22rpx;
   font-size: 22rpx;
   line-height: 1.3;
   line-height: 1.3;
   padding: 6rpx 16rpx;
   padding: 6rpx 16rpx;