Skip to content

Commit 18ca835

Browse files
committed
更新[BoxJs TF]: 优化首屏加载闪屏问题
1 parent 2039985 commit 18ca835

3 files changed

Lines changed: 32 additions & 3 deletions

File tree

‎box/chavy.boxjs.html‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
padding-top: constant(safe-area-inset-top) !important;
2424
padding-top: env(safe-area-inset-top);
2525
}
26+
@media (prefers-color-scheme: light) {
27+
body {
28+
background-color: #fff;
29+
}
30+
}
31+
@media (prefers-color-scheme: dark) {
32+
body {
33+
background-color: #121212;
34+
}
35+
}
2636
.v-app-bar,
2737
.v-navigation-drawer__content {
2838
box-sizing: content-box;
@@ -466,7 +476,7 @@
466476
</v-container>
467477
<!-- 代码编辑 -->
468478
<v-container fluid class="fill-height" v-show="view === 'coding'" v-scroll="onScroll">
469-
<v-card flat style="width: 100%;">
479+
<v-card flat style="width: inherit;">
470480
<v-subheader>
471481
<h2>脚本编辑器</h2>
472482
<v-spacer></v-spacer>
@@ -475,7 +485,7 @@ <h2>脚本编辑器</h2>
475485
</v-btn>
476486
</v-subheader>
477487
</v-card>
478-
<div class="pa-0" id="container" style="width: 100%; height: 100%;"></div>
488+
<div class="pa-0" id="container" style="width: inherit; height: inherit;"></div>
479489
</v-container>
480490
<!-- 应用详情 -->
481491
<v-container fluid v-if="view === 'app' && !!curapp" v-scroll="onScroll">
@@ -1224,6 +1234,8 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
12241234
'background-size': 'cover',
12251235
'background-repeat': 'no-repeat'
12261236
}
1237+
// 主题发生变化时给 <body> 设置背景色
1238+
document.querySelector('body').setAttribute('style', `background-color: ${this.isDarkMode ? '#121212' : '#fff'};`)
12271239
return style
12281240
},
12291241
appIconFontStyle() {

‎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.21'
3+
$.version = '0.7.22'
44
$.versionType = 'beta'
55

66
/**

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
{
22
"releases": [
3+
{
4+
"version": "0.7.22",
5+
"tags": ["beta"],
6+
"author": "@chavyleung",
7+
"icon": "https://avatars3.githubusercontent.com/u/29748519",
8+
"repo": "https://github.com/chavyleung",
9+
"notes": [
10+
{
11+
"name": "优化",
12+
"descs": ["首屏加载闪屏问题"]
13+
},
14+
{
15+
"name": "说明",
16+
"descs": ["首屏背景颜色会跟随 iOS 的主题颜色", "如果系统主题是黑色, 但 BoxJs 的主题是白色, 仍然会有一个黑到白的过程", "反之亦然"]
17+
}
18+
]
19+
},
320
{
421
"version": "0.7.21",
522
"tags": ["beta"],

0 commit comments

Comments
 (0)