Skip to content

Commit a61588a

Browse files
heihu520claude
andcommitted
Fix settings persistence UI and Android Chrome scrolling.
Add a dedicated save action on the settings page so toggles and schedule changes can be persisted, and relax the mobile touch-action override that was blocking vertical scrolling in Android Chrome. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 62fe32e commit a61588a

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

frontend/src/i18n/messages.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ export const messages = {
437437
invalid: 'Invalid',
438438
},
439439
testConnection: 'Test Connection',
440+
save: 'Save',
440441
testAndSave: 'Test & Save',
441442
baseUrlPlaceholder: 'https://your-cpa.example.com',
442443
tokenPlaceholder: 'Bearer token',
@@ -445,6 +446,7 @@ export const messages = {
445446
testReachable: '{message} ({count} accounts)',
446447
testReachableBasic: '{message}',
447448
savedReachable: 'Saved. {count} accounts reachable.',
449+
saved: 'Saved.',
448450
savedReachableSyncing: 'Saved. {count} accounts synced into inventory.',
449451
savedReachableSyncingBasic: 'Saved. Inventory synced.',
450452
connectionSummary: '{message} ({count} accounts · {checkedAt})',
@@ -895,6 +897,7 @@ export const messages = {
895897
invalid: '配置无效',
896898
},
897899
testConnection: '测试连接',
900+
save: '保存',
898901
testAndSave: '测试并保存',
899902
baseUrlPlaceholder: 'https://your-cpa.example.com',
900903
tokenPlaceholder: 'Bearer token',
@@ -903,6 +906,7 @@ export const messages = {
903906
testReachable: '{message}({count} 个账号)',
904907
testReachableBasic: '{message}',
905908
savedReachable: '已保存。可访问 {count} 个账号。',
909+
saved: '已保存。',
906910
savedReachableSyncing: '已保存。已将 {count} 个账号同步到库存。',
907911
savedReachableSyncingBasic: '已保存,库存已同步。',
908912
connectionSummary: '{message}({count} 个账号 · {checkedAt})',

frontend/src/style.css

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4964,22 +4964,14 @@ select {
49644964
}
49654965

49664966
.app-shell--mobile .app-main,
4967-
.app-shell--mobile .app-main *,
49684967
.app-shell--mobile .topbar,
4969-
.app-shell--mobile .topbar *,
49704968
.app-shell--mobile .view-shell,
4971-
.app-shell--mobile .view-shell *,
49724969
.app-shell--mobile .hero-panel,
4973-
.app-shell--mobile .hero-panel *,
49744970
.app-shell--mobile .stats-grid,
4975-
.app-shell--mobile .stats-grid *,
49764971
.app-shell--mobile .stat-card,
4977-
.app-shell--mobile .stat-card *,
49784972
.app-shell--mobile .dashboard-grid,
4979-
.app-shell--mobile .dashboard-grid *,
4980-
.app-shell--mobile .panel,
4981-
.app-shell--mobile .panel * {
4982-
touch-action: pan-y pinch-zoom;
4973+
.app-shell--mobile .panel {
4974+
touch-action: auto;
49834975
}
49844976

49854977
.app-shell--mobile .view-shell {

frontend/src/views/SettingsView.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ async function testOnly() {
124124
}
125125
}
126126
127+
async function saveSettingsOnly() {
128+
try {
129+
await settingsStore.saveSettings()
130+
ElMessage.success(t('settings.saved'))
131+
} catch (error) {
132+
ElMessage.error(toErrorMessage(error))
133+
}
134+
}
135+
127136
async function changeLocale(locale: string) {
128137
try {
129138
await settingsStore.saveLocalePreference(locale)
@@ -626,6 +635,7 @@ async function deleteConnection(connectionId: string) {
626635

627636
<div class="hero-actions">
628637
<el-button plain @click="testOnly">{{ t('settings.testConnection') }}</el-button>
638+
<el-button type="primary" :loading="settingsStore.saving" @click="saveSettingsOnly">{{ t('settings.save') }}</el-button>
629639
</div>
630640
</el-form>
631641
</section>

0 commit comments

Comments
 (0)