Skip to content

Commit 5dc06c3

Browse files
committed
更新[BoxJs TF]: 新增壁纸模式、悬浮按钮手势
1 parent 1e25d03 commit 5dc06c3

3 files changed

Lines changed: 64 additions & 5 deletions

File tree

‎box/chavy.boxjs.html‎

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<div id="BG"></div>
8787
<div id="app" v-cloak>
8888
<v-app v-if="box" :style="appViewStyle">
89-
<v-app-bar app v-bind="appBarBind" v-if="!box.usercfgs.isHidedSearchBar">
89+
<v-app-bar app v-bind="appBarBind" v-show="!box.usercfgs.isHidedSearchBar">
9090
<!-- 搜索条 -->
9191
<v-autocomplete v-bind="ui.searchBar" :label="title" @click="ui.searchDialog.show = true" hide-no-data hide-details solo>
9292
<template #prepend-inner>
@@ -256,6 +256,22 @@
256256
<v-avatar size="32"><img :src="box.syscfgs.orz3.icon" /></v-avatar>
257257
</v-btn>
258258
</v-list-item>
259+
<v-list-item class="mt-4">
260+
<v-switch
261+
dense
262+
class="mt-0"
263+
label="壁纸模式"
264+
v-model="isWallpaperMode"
265+
@change="saveUserCfgs"
266+
:persistent-hint="true"
267+
hint="同时隐藏顶栏、底栏、图标"
268+
>
269+
</v-switch>
270+
<v-spacer></v-spacer>
271+
<v-btn fab small text>
272+
<v-avatar size="32"><v-icon>mdi-image</v-icon></v-avatar>
273+
</v-btn>
274+
</v-list-item>
259275
<v-list-item class="mt-4">
260276
<v-switch
261277
dense
@@ -420,7 +436,7 @@
420436
<v-snackbar top app v-model="ui.snackbar.show" v-bind="ui.snackbar">{{ui.snackbar.msg}}</v-snackbar>
421437
<!-- 主页 -->
422438
<v-container fluid v-show="view === ''">
423-
<v-row no-gutters>
439+
<v-row no-gutters v-show="!box.usercfgs.isHidedAppIcons">
424440
<v-col cols="3" md="2" v-for="(app, appIdx) in favApps" :key="app.id" class="d-flex justify-space-around">
425441
<div class="ma-2" @click="switchAppView(app.id)">
426442
<v-card v-if="isDarkMode" style="border-radius: 12px;">
@@ -1041,7 +1057,7 @@ <h2>{{curbak.name}}</h2>
10411057
</v-container>
10421058
</v-main>
10431059
<!-- 底部 -->
1044-
<v-bottom-navigation app grow color="primary" :value="view">
1060+
<v-bottom-navigation app grow color="primary" :value="view" v-show="!box.usercfgs.isHidedNaviBottom">
10451061
<v-progress-linear :active="isLoading" height="2" absolute top indeterminate></v-progress-linear>
10461062
<v-btn @click="switchView('')" value="">首页<v-icon>mdi-home</v-icon></v-btn>
10471063
<v-btn @click="switchView('app')" value="app">应用<v-icon>mdi-application</v-icon></v-btn>
@@ -1068,7 +1084,17 @@ <h2>{{curbak.name}}</h2>
10681084
:right="!box.usercfgs.isLeftBoxIcon === true"
10691085
>
10701086
<template #activator>
1071-
<v-btn fab text @dblclick="reload()">
1087+
<v-btn
1088+
fab
1089+
text
1090+
@dblclick="reload()"
1091+
v-touch="{
1092+
left: () => box.usercfgs.isLeftBoxIcon = true,
1093+
right: () => box.usercfgs.isLeftBoxIcon = false,
1094+
up: () => reload(),
1095+
down: () => isWallpaperMode = !!!isWallpaperMode
1096+
}"
1097+
>
10721098
<v-avatar><img :src="box.syscfgs.boxjs.icons[iconThemeIdx]" /></v-avatar>
10731099
</v-btn>
10741100
</template>
@@ -1243,6 +1269,21 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
12431269
isWebApp() {
12441270
return window.navigator.standalone
12451271
},
1272+
// 是否壁纸模式
1273+
isWallpaperMode: {
1274+
get() {
1275+
return this.box.usercfgs.isWallpaperMode
1276+
},
1277+
set(val) {
1278+
const cfgs = {
1279+
isHidedSearchBar: val === true,
1280+
isHidedAppIcons: val === true,
1281+
isHidedNaviBottom: val === true
1282+
}
1283+
Object.assign(this.box.usercfgs, cfgs)
1284+
this.box.usercfgs.isWallpaperMode = val === true
1285+
}
1286+
},
12461287
// 当前环境: Surge、QuanX、Loon、NodeJs
12471288
env: {
12481289
// 获取当前容器环境

‎box/chavy.boxjs.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const $ = new Env('BoxJs')
22

3-
$.version = '0.7.39'
3+
$.version = '0.7.40'
44
$.versionType = 'beta'
55

66
/**

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"releases": [
3+
{
4+
"version": "0.7.40",
5+
"tags": ["beta"],
6+
"author": "@chavyleung",
7+
"icon": "https://avatars3.githubusercontent.com/u/29748519",
8+
"repo": "https://github.com/chavyleung",
9+
"msg": "更新[BoxJs TF]: 新增壁纸模式、悬浮按钮手势",
10+
"notes": [
11+
{
12+
"name": "新增",
13+
"descs": ["壁纸模式", "悬浮按钮手势"]
14+
},
15+
{
16+
"name": "悬浮按钮手势",
17+
"descs": ["上滑: 刷新页面 (效果同双击)", "左滑: 悬浮按钮左靠", "右滑: 悬浮按钮右靠", "下滑: 切换壁纸模式"]
18+
}
19+
]
20+
},
321
{
422
"version": "0.7.39",
523
"tags": ["beta"],

0 commit comments

Comments
 (0)