Skip to content

Commit d8ef66a

Browse files
committed
更新[BoxJs TF]: 移除主屏幕的左右滑动手势
1 parent 61f117f commit d8ef66a

3 files changed

Lines changed: 21 additions & 75 deletions

File tree

‎box/chavy.boxjs.html‎

Lines changed: 12 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
<v-list-item>
225225
<v-list-item-content>
226226
<v-select
227+
autofocus
227228
hide-details
228229
v-model="box.usercfgs.theme"
229230
:items="[{text: '跟随系统', value: 'auto'}, {text: '暗黑', value: 'dark'}, {text: '明亮', value: 'light'}]"
@@ -287,7 +288,7 @@
287288
v-model="box.usercfgs.isHidedSearchBar"
288289
@change="saveUserCfgs"
289290
:persistent-hint="true"
290-
hint="右侧向左滑呼出侧栏"
291+
hint="主屏幕下滑可恢复显示"
291292
>
292293
</v-switch>
293294
<v-spacer></v-spacer>
@@ -303,7 +304,7 @@
303304
v-model="box.usercfgs.isHidedNaviBottom"
304305
@change="saveUserCfgs"
305306
:persistent-hint="true"
306-
hint="右侧向左滑呼出侧栏"
307+
hint="隐藏后只能在侧栏恢复"
307308
>
308309
</v-switch>
309310
<v-spacer></v-spacer>
@@ -472,22 +473,6 @@
472473
if (isWallpaperMode) {
473474
isWallpaperMode = !isWallpaperMode
474475
}
475-
},
476-
left: () => {
477-
if (isWallpaperMode) {
478-
switchView('')
479-
isWallpaperMode = !isWallpaperMode
480-
} else {
481-
switchView('app')
482-
}
483-
},
484-
right: () => {
485-
if (isWallpaperMode) {
486-
switchView('')
487-
isWallpaperMode = !isWallpaperMode
488-
} else {
489-
isWallpaperMode = !isWallpaperMode
490-
}
491476
}
492477
}"
493478
>
@@ -518,14 +503,7 @@
518503
</v-row>
519504
</v-container>
520505
<!-- 应用列表 -->
521-
<v-container
522-
fluid
523-
v-show="view === 'app' && !curapp"
524-
v-touch="{
525-
left: () => switchView('sub'),
526-
right: () => switchView('')
527-
}"
528-
>
506+
<v-container fluid v-show="view === 'app' && !curapp">
529507
<!-- 收藏应用 -->
530508
<v-expansion-panels multiple class="mb-4" v-if="favApps.length > 0" v-model="box.usercfgs.favapppanel">
531509
<v-expansion-panel>
@@ -626,14 +604,7 @@
626604
</v-expansion-panels>
627605
</v-container>
628606
<!-- 订阅列表 -->
629-
<v-container
630-
fluid
631-
v-show="view === 'sub'"
632-
v-touch="{
633-
left: () => switchView('my'),
634-
right: () => switchView('app')
635-
}"
636-
>
607+
<v-container fluid v-show="view === 'sub'">
637608
<template v-if="appSubs.length === 0">
638609
<v-btn block class="primary" @click="addAppSubDialog = true">添加订阅</v-btn>
639610
<v-btn block class="primary" @click="open('https://chavyleung.gitbook.io/boxjs/awesome/subscriptions')">
@@ -726,17 +697,7 @@
726697
</v-dialog>
727698
</v-container>
728699
<!-- 我的 -->
729-
<v-container
730-
fluid
731-
v-show="view === 'my'"
732-
v-touch="{
733-
left: () => {
734-
isWallpaperMode = !isWallpaperMode
735-
switchView('')
736-
},
737-
right: () => switchView('sub')
738-
}"
739-
>
700+
<v-container fluid v-show="view === 'my'">
740701
<v-card class="mx-auto">
741702
<v-card-title class="headline">
742703
{{box.usercfgs.name ? box.usercfgs.name : '大侠, 留个名字吧!'}}
@@ -822,13 +783,7 @@
822783
</v-card>
823784
</v-container>
824785
<!-- 代码编辑 -->
825-
<v-container
826-
fluid
827-
v-show="view === 'coding'"
828-
v-touch="{
829-
right: back
830-
}"
831-
>
786+
<v-container fluid v-show="view === 'coding'">
832787
<v-card rounded="0" flat style="width: inherit;">
833788
<v-subheader>
834789
<h2>脚本编辑器</h2>
@@ -841,13 +796,7 @@ <h2>脚本编辑器</h2>
841796
<div class="pa-0" id="container" style="width: inherit; height: inherit;"></div>
842797
</v-container>
843798
<!-- 应用详情 -->
844-
<v-container
845-
fluid
846-
v-if="view === 'app' && !!curapp"
847-
v-touch="{
848-
right: back
849-
}"
850-
>
799+
<v-container fluid v-if="view === 'app' && !!curapp">
851800
<v-subheader>
852801
<h2 :style="appTitleStyle">{{curapp.name}}</h2>
853802
<v-spacer></v-spacer>
@@ -1113,13 +1062,7 @@ <h2 :style="appTitleStyle">{{curapp.name}}</h2>
11131062
</v-card>
11141063
</v-container>
11151064
<!-- 备份详情 -->
1116-
<v-container
1117-
fluid
1118-
v-else-if="view === 'bak' && !!curbak"
1119-
v-touch="{
1120-
right: back
1121-
}"
1122-
>
1065+
<v-container fluid v-else-if="view === 'bak' && !!curbak">
11231066
<v-subheader>
11241067
<h2 :style="appTitleStyle">{{curbak.name}}</h2>
11251068
<v-spacer></v-spacer>
@@ -1908,13 +1851,12 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
19081851
this.ui.isWaitToggleSearchBar = false
19091852
}, 1000),
19101853
handleHistory(path) {
1911-
const { hash } = window.location.href;
1912-
const state = { title: 'BoxJs', url: '/' + (hash ? hash : '#/') }
1854+
const { hash } = window.location.href
1855+
const state = { title: 'BoxJs', url: '/' + (hash ? hash : '#/') }
19131856
if (!history.state) {
19141857
history.replaceState(state, '')
19151858
}
1916-
1917-
state.url = path;
1859+
state.url = path
19181860
history.pushState(state, '', path)
19191861
},
19201862
// 页面返回

‎box/chavy.boxjs.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const $ = new Env('BoxJs')
33
// 为 eval 准备的上下文环境
44
const $eval_env = {}
55

6-
$.version = '0.7.50'
6+
$.version = '0.7.51'
77
$.versionType = 'beta'
88

99
/**

‎box/release/box.release.tf.json‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
22
"releases": [
33
{
4-
"version": "0.7.50",
4+
"version": "0.7.51",
55
"tags": ["beta"],
6-
"author": "@id77",
6+
"author": "@id77 @chavyleung",
77
"icon": "https://avatars3.githubusercontent.com/u/29748519",
88
"repo": "https://github.com/chavyleung",
9-
"msg": "更新[BoxJs TF]: 优化页面后退事件逻辑",
9+
"msg": "更新[BoxJs TF]: 移除主屏幕的左右滑动手势",
1010
"notes": [
11+
{
12+
"name": "移除",
13+
"descs": ["主屏幕的左右滑动手势", "原因: 与浏览器前进后退容易发生冲突"]
14+
},
1115
{
1216
"name": "优化",
13-
"descs": ["页面后退事件逻辑"]
17+
"descs": ["页面后退事件逻辑", "部分侧栏设置的小字说明"]
1418
}
1519
]
1620
},

0 commit comments

Comments
 (0)