补充代码;减少diff
This commit is contained in:
parent
e3e04e0f73
commit
c3fe4591c6
|
@ -513,8 +513,6 @@ export async function boot() {
|
||||||
}
|
}
|
||||||
delete _status.htmlbg;
|
delete _status.htmlbg;
|
||||||
|
|
||||||
const isFirstStartAfterUpdate = !!window.noname_update;
|
|
||||||
|
|
||||||
// 无名杀更新日志
|
// 无名杀更新日志
|
||||||
if (window.noname_update) {
|
if (window.noname_update) {
|
||||||
Reflect.set(lib, "version", window.noname_update.version);
|
Reflect.set(lib, "version", window.noname_update.version);
|
||||||
|
@ -529,7 +527,7 @@ export async function boot() {
|
||||||
html`
|
html`
|
||||||
<div
|
<div
|
||||||
style="position: relative;width:50px;height:50px;border-radius:50px;background-image:url('${description
|
style="position: relative;width:50px;height:50px;border-radius:50px;background-image:url('${description
|
||||||
.author.avatar_url}');background-size:cover;vertical-align:middle;"
|
.author.avatar_url}');background-size:cover;vertical-align:middle;"
|
||||||
></div>
|
></div>
|
||||||
${description.author.login}于${description.published_at}发布
|
${description.author.login}于${description.published_at}发布
|
||||||
`.trim(),
|
`.trim(),
|
||||||
|
@ -643,11 +641,15 @@ export async function boot() {
|
||||||
}
|
}
|
||||||
// await Promise.allSettled(_status.extensionLoading);
|
// await Promise.allSettled(_status.extensionLoading);
|
||||||
|
|
||||||
|
const isFirstStartAfterUpdate = lib.version && lib.version != lib.config.version;
|
||||||
|
|
||||||
if (isFirstStartAfterUpdate && extErrorList.length) {
|
if (isFirstStartAfterUpdate && extErrorList.length) {
|
||||||
const stacktraces = extErrorList.map(e => e instanceof Error ? e.stack : String(e)).join("\n\n")
|
const stacktraces = extErrorList.map(e => e instanceof Error ? e.stack : String(e)).join("\n\n")
|
||||||
// game.saveConfig("update_first_log", stacktraces);
|
// game.saveConfig("update_first_log", stacktraces);
|
||||||
if(confirm(`扩展加载出错!是否重新载入游戏?\n本次更新可能导致了扩展出现了错误:\n${stacktraces}`)){
|
if(confirm(`扩展加载出错!是否重新载入游戏?\n本次更新可能导致了扩展出现了错误:\n\n${stacktraces}`)){
|
||||||
game.reload();
|
game.reload();
|
||||||
|
clearTimeout(resetGameTimeout);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,11 +790,11 @@ function initSheet(libConfig) {
|
||||||
bstyle = bstyle.slice(7);
|
bstyle = bstyle.slice(7);
|
||||||
}
|
}
|
||||||
Reflect.get(ui, "css").border_stylesheet.sheet.insertRule(
|
Reflect.get(ui, "css").border_stylesheet.sheet.insertRule(
|
||||||
'#window .player>.framebg,#window #arena.long.mobile:not(.fewplayer) .player[data-position="0"]>.framebg{display:block;background-image:url("' +
|
'#window .player>.framebg,#window #arena.long.mobile:not(.fewplayer) .player[data-position="0"]>.framebg{display:block;background-image:url("' +
|
||||||
lib.assetURL +
|
lib.assetURL +
|
||||||
"theme/style/player/" +
|
"theme/style/player/" +
|
||||||
bstyle +
|
bstyle +
|
||||||
'1.png")}',
|
'1.png")}',
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
Reflect.get(ui, "css").border_stylesheet.sheet.insertRule(
|
Reflect.get(ui, "css").border_stylesheet.sheet.insertRule(
|
||||||
|
@ -829,14 +831,14 @@ function initSheet(libConfig) {
|
||||||
if (libConfig.control_style == "wood") {
|
if (libConfig.control_style == "wood") {
|
||||||
Reflect.get(ui, "css").control_stylesheet = lib.init.sheet(
|
Reflect.get(ui, "css").control_stylesheet = lib.init.sheet(
|
||||||
"#window .control,#window .menubutton,#window #system>div>div,#window #system>div>.pressdown2{background-image:" +
|
"#window .control,#window .menubutton,#window #system>div>div,#window #system>div>.pressdown2{background-image:" +
|
||||||
str +
|
str +
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
Reflect.get(ui, "css").control_stylesheet = lib.init.sheet(
|
Reflect.get(ui, "css").control_stylesheet = lib.init.sheet(
|
||||||
"#window .control,.menubutton:not(.active):not(.highlight):not(.red):not(.blue),#window #system>div>div{background-image:" +
|
"#window .control,.menubutton:not(.active):not(.highlight):not(.red):not(.blue),#window #system>div>div{background-image:" +
|
||||||
str +
|
str +
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue