Skip to content

Commit 8aec297

Browse files
committed
fix(mobile): improve iOS Safari compatibility and bump version to 2.3.2
- Prevent auto-zoom on touch devices via any-pointer: coarse 16px font-size guard - Add 100dvh dynamic viewport height fallbacks across views - Support vertical scrolling during virtual keyboard display on admin login page - Refactor admin layout main container to use flexbox instead of calc(100vh - 64px) - Bump version to 2.3.2 across all configurations and tests
1 parent 16d1e49 commit 8aec297

16 files changed

Lines changed: 42 additions & 18 deletions

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "r2filebox-frontend",
33
"private": true,
4-
"version": "2.3.1",
4+
"version": "2.3.2",
55
"license": "LGPL-3.0-or-later",
66
"type": "module",
77
"engines": {

frontend/src/styles/main.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ html,
190190
body,
191191
#app {
192192
min-height: 100vh;
193+
min-height: 100dvh;
193194
background: var(--surface-canvas);
194195
color: var(--text-primary);
195196
}
@@ -854,3 +855,18 @@ a:focus-visible,
854855
outline-color: Highlight;
855856
}
856857
}
858+
859+
/*
860+
* Prevent touch browsers such as iOS Safari from auto-zooming
861+
* focused form controls whose computed font size is below 16px.
862+
*
863+
* Keep this rule at the native control level so Element Plus
864+
* defaults and future form components cannot reintroduce the issue.
865+
*/
866+
@media (any-pointer: coarse) {
867+
input,
868+
textarea,
869+
select {
870+
font-size: 16px !important;
871+
}
872+
}

frontend/src/views/admin/Login.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,12 @@ const handleLogin = async () => {
200200
.login-container {
201201
position: relative;
202202
min-height: 100vh;
203+
min-height: 100dvh;
203204
display: flex;
204-
align-items: center;
205+
align-items: flex-start;
205206
justify-content: center;
206-
overflow: hidden;
207+
overflow-x: hidden;
208+
overflow-y: auto;
207209
}
208210
209211
.sr-only {
@@ -228,7 +230,7 @@ const handleLogin = async () => {
228230
.login-card {
229231
width: 100%;
230232
max-width: 420px;
231-
margin: 20px;
233+
margin: auto 20px;
232234
padding: 42px 34px 30px;
233235
border-top: 3px solid var(--primary-color);
234236
}

frontend/src/views/admin/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ const confirmLogout = async () => {
306306
<style scoped>
307307
.admin-layout {
308308
height: 100vh;
309+
height: 100dvh;
309310
position: relative;
310311
overflow: hidden;
311312
background: var(--surface-canvas);
@@ -573,8 +574,9 @@ const confirmLogout = async () => {
573574
574575
/* 内容区 */
575576
.admin-main {
577+
flex: 1 1 auto;
578+
min-height: 0;
576579
padding: 22px;
577-
height: calc(100vh - 64px);
578580
overflow-y: auto;
579581
}
580582

frontend/src/views/home/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ const handleDialogClosed = () => {
294294
.home-container {
295295
position: relative;
296296
min-height: 100vh;
297+
min-height: 100dvh;
297298
overflow-x: hidden;
298299
}
299300
@@ -303,6 +304,7 @@ const handleDialogClosed = () => {
303304
display: flex;
304305
width: min(100% - 40px, 960px);
305306
min-height: 100vh;
307+
min-height: 100dvh;
306308
margin: 0 auto;
307309
padding: 28px 0 24px;
308310
flex-direction: column;

frontend/src/views/share/View.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ watch(() => route.params.code, (value) => {
272272
.share-view-container {
273273
position: relative;
274274
min-height: 100vh;
275+
min-height: 100dvh;
275276
overflow-x: hidden;
276277
}
277278
@@ -283,6 +284,7 @@ watch(() => route.params.code, (value) => {
283284
margin: 0 auto;
284285
padding: 28px 0;
285286
min-height: 100vh;
287+
min-height: 100dvh;
286288
display: flex;
287289
flex-direction: column;
288290
gap: 14px;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "r2filebox",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"private": true,
55
"license": "LGPL-3.0-or-later",
66
"engines": {

vitest.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default defineConfig({
1717
ADMIN_PASSWORD: 'local-test-password',
1818
CODE_HASH_PEPPER: '1111111111111111111111111111111111111111111111111111111111111111',
1919
SESSION_SECRET: '2222222222222222222222222222222222222222222222222222222222222222',
20-
APP_VERSION: '2.3.1',
20+
APP_VERSION: '2.3.2',
2121
R2_BUCKET_NAME: 'r2filebox-files',
2222
D1_DATABASE_NAME: 'r2filebox-db',
2323
},

0 commit comments

Comments
 (0)