diff --git a/.gitignore b/.gitignore index 9b2add5..be9b7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ client/build/ # Ignore coverage coverage/ dist/ +新增功能.md \ No newline at end of file diff --git a/client/css/phone.css b/client/css/phone.css index 44545dc..4119563 100644 --- a/client/css/phone.css +++ b/client/css/phone.css @@ -70,10 +70,9 @@ * { touch-action: pan-y; - } - - .sidebar, - .rightbar { + } .sidebar, + .rightbar, + .settings-sidebar { position: fixed; top: 0; bottom: 0; @@ -95,6 +94,19 @@ transform: translateX(0); } + .settings-sidebar { + left: 0; + max-width: 80vw; + width: 80vw !important; + transform: translateX(-100%); + border-right: 1px solid #e0e0e0; + z-index: 1001; /* Higher than normal sidebar */ + } + + .settings-sidebar.mobile-open { + transform: translateX(0); + } + .rightbar { right: 0; max-width: 70vw; @@ -143,11 +155,11 @@ .mobile-info-btn:active { background: #e0e0e0; transform: scale(0.93); - } - - .settings-panel-card { + } .settings-panel-card { left: 2vw !important; } + + /* Settings sidebar mobile styles - removed duplicate rules since they are above */ } .member.private-chat-active { diff --git a/client/css/style.css b/client/css/style.css index 1087509..62660aa 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -52,74 +52,102 @@ body { display: block; } -.settings-panel { - display: none; - position: fixed; - left: 0; - top: 0; - right: 0; - bottom: 0; - z-index: 9999; - pointer-events: none; - background: none; -} - -.settings-panel-card { +/* New settings sidebar styles */ +.settings-sidebar { + width: 250px; background: #fff; - border-radius: 16px; - box-shadow: 0 2px 24px rgba(60, 80, 100, 0.18); - padding: 15px 15px 15px 15px; - min-width: 210px; - position: absolute; + border-right: 1px solid #e0e0e0; display: flex; flex-direction: column; - gap: 10px; - pointer-events: auto; - opacity: 0; - transform: translateY(-10px) scale(0.95); - transition: opacity 0.3s ease, transform 0.3s ease; + box-shadow: 2px 0 8px #e0e0e0a0; + transition: width 0.3s ease; + position: relative; } -.settings-panel-card.open-anim { - opacity: 1; - transform: translateY(0) scale(1); +.settings-header { + display: flex; + align-items: center; + padding: 17.2px 18px 10px 17px; + background: #fff; + border-bottom: 1px solid #dcdcdc; + position: relative; } -.settings-panel-card.close-anim { - opacity: 0; - transform: translateY(-10px) scale(0.95); +.settings-back-btn { + background: none; + border: none; + cursor: pointer; + padding: 4px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + transition: background-color 0.2s ease; + margin-right: 12px; +} + +.settings-back-btn:hover { + background: #f5f5f5; } .settings-title { font-size: 1.3rem; font-weight: 600; - margin-bottom: 10px; + margin: 0; color: #30a8f7; - text-align: left; +} + +.settings-content { + flex: 1; + padding: 20px; + overflow-y: auto; + background: #fff; +} + +.settings-section { + margin-bottom: 24px; +} + +.settings-section-title { + font-size: 1.1rem; + font-weight: 600; + margin-bottom: 12px; + color: #222; + border-bottom: 1px solid #f0f0f0; + padding-bottom: 8px; } .settings-item { display: flex; align-items: center; justify-content: space-between; - font-size: 1.08rem; - color: #222; - margin-bottom: 8px; -} - -.settings-item select { font-size: 1rem; - border-radius: 8px; - border: 1px solid #e0e0e0; - padding: 4px 10px; - background: #fafbfc; - outline: none; - transition: border-color 0.2s ease, background-color 0.2s ease; + color: #222; + margin-bottom: 12px; + padding: 8px 0; } -.settings-item select:focus { - border-color: #30a8f7; - background: #fff; +.settings-item-label { + flex: 1; + margin-right: 12px; +} + +.settings-item-description { + font-size: 0.9rem; + color: #666; + margin-top: 4px; +} + +/* Old settings panel - hide */ +.settings-panel { + display: none !important; +} + +/* Old settings panel styles - remove */ +.settings-panel-card, +.settings-panel-card.open-anim, +.settings-panel-card.close-anim { + display: none !important; } .switch { diff --git a/client/index.html b/client/index.html index 562aaa8..813b838 100644 --- a/client/index.html +++ b/client/index.html @@ -15,10 +15,23 @@ - -