v5.4.1 bug修复

(更新来自 @tjy-gitnub)
-修复pwa将动态请求拦截的灾难性事故
-调整大家梦寐以求的开始菜单滚动条
-新增开始菜单固定项右键取消固定选项
-适配主题格式的一些更改
-细节优化和修复
This commit is contained in:
tjy-gitnub
2023-06-13 08:21:57 +08:00
parent 988ad3ffc6
commit 2afc151276
4 changed files with 50 additions and 12 deletions
+10
View File
@@ -2319,4 +2319,14 @@ list>span.focs.cl{
.buttons>.cancel {
background-color: var(--bggrey);
}
/* 一些奇怪的东西 */
.window.whiteboard>.titbar>p{
color: #000 !important;;
}
:root.dark .window.whiteboard>.titbar>p{
text-shadow: 0 0 5px #fff,0 0 5px #fff;
}
+11 -3
View File
@@ -1061,6 +1061,14 @@
<div class="cnt update">
<h1 class="tit"><span></span>更新记录</h1>
<div style="margin-left: 20px;">
<details><summary><span>v5.4.1</span> bug修复</summary><p>
&emsp;&emsp;<strong>(更新来自 @tjy-gitnub)</strong><br />
&emsp;&emsp;-修复pwa将动态请求拦截的灾难性事故<br />
&emsp;&emsp;-调整大家梦寐以求的开始菜单滚动条<br />
&emsp;&emsp;-新增开始菜单固定项右键取消固定选项<br />
&emsp;&emsp;-适配主题格式的一些更改<br />
&emsp;&emsp;-细节优化和修复</p>
</details>
<details><summary><span>v5.4.0</span> 新版logo与图标,UI优化,自定主题与winver</summary><p>
&emsp;&emsp;<strong>(更新来自 @tjy-gitnub,其实我想发v6的)</strong><br />
&emsp;&emsp;-新Logo:新版logo<br />
@@ -1603,9 +1611,9 @@
</div>
</div>
</div>
<div class="window whiteboard" onmousedown="focwin('whiteboard')" ontouchstart="focwin('whiteboard')">
<div class="titbar" oncontextmenu="return showcm(event,'titbar','whiteboard')" ondblclick="maxwin('whiteboard')">
<img src="icon/whiteboard.png" class="icon" onclick="return showcm(event,'titbar','whiteboard')">
<div class="window whiteboard">
<div class="titbar">
<img src="icon/whiteboard.png" class="icon">
<p>Whiteboard</p>
<div>
<a class="a wbtg red" onclick="hidewin('whiteboard')"><i class="bi bi-x-lg"></i></a>
+14 -8
View File
@@ -403,12 +403,11 @@ let apps = {
$.get('https://api.github.com/repos/tjy-gitnub/win12-theme/contents').then(cs => {
cs.forEach(c => {
if(c.type=='dir'){
let ul;
$.get(c.url).then(cnt=>{
cnt.forEach(cn=>{
if(cn.name=='theme'){
$.get('https://tjy-gitnub.github.io/win12-theme/'+cn.path).then(inf=>{
infjs=eval('('+inf+')');
if(cn.name=='theme.json'){
$.getJSON('https://tjy-gitnub.github.io/win12-theme/'+cn.path).then(inf=>{
infjs=inf;
cnt.forEach(fbg=>{
console.log(fbg,infjs);
if(fbg.name==infjs.bg){
@@ -429,9 +428,9 @@ let apps = {
$.get('https://api.github.com/repos/tjy-gitnub/win12-theme/contents/'+infp).then(cnt=>{
console.log('https://api.github.com/repos/tjy-gitnub/win12-theme/contents/'+infp);
cnt.forEach(cn=>{
if(cn.name=='theme'){
$.get('https://tjy-gitnub.github.io/win12-theme/'+cn.path).then(inf=>{
infjs=eval('('+inf+')');
if(cn.name=='theme.json'){
$.getJSON('https://tjy-gitnub.github.io/win12-theme/'+cn.path).then(inf=>{
infjs=inf;
cnt.forEach(fbg=>{
console.log(fbg,infjs);
if(fbg.name==infjs.bg){
@@ -512,6 +511,11 @@ let apps = {
apps.whiteboard.ctx.lineJoin = 'round';
apps.whiteboard.ctx.lineCap = 'round';
apps.whiteboard.changeColor(apps.whiteboard.color);
if ($(':root').hasClass('dark')) {
$('.window.whiteboard>.titbar>p').text('Blackboard');
}else{
$('.window.whiteboard>.titbar>p').text('Whiteboard');
}
},
changeColor: (color) => {
apps.whiteboard.color = color;
@@ -1729,8 +1733,10 @@ function toggletheme() {
$('.dock.theme').toggleClass('dk');
$(':root').toggleClass('dark');
if ($(':root').hasClass('dark')) {
$('.window.whiteboard>.titbar>p').text('Blackboard');
setData('theme', 'dark');
} else {
$('.window.whiteboard>.titbar>p').text('Whiteboard');
setData('theme', 'light');
}
}
@@ -1900,7 +1906,7 @@ document.getElementsByTagName('body')[0].onload = function nupd() {
}
apps.webapps.init();
//getdata
if (localStorage.getItem('theme') == 'dark') $(':root').addClass('dark');
if (localStorage.getItem('theme') == 'dark')$(':root').addClass('dark');
if(localStorage.getItem('color1')){
$(':root').css('--theme-1', localStorage.getItem('color1'));
$(':root').css('--theme-2', localStorage.getItem('color2'));
+15 -1
View File
@@ -1,15 +1,29 @@
// v5.4.0
// v5.4.1
let userdata = {
'theme': 'light',
'color1': '#ad6eca',
'color2': '#3b91d8'
};
let dongtai=[
'api.github.com',
'tjy-gitnub.io/win12-theme',
'win12server.freehk.svipss.top'
]
this.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request).then(res => {
let fl=false;
dongtai.forEach(d=>{
if(event.request.url.indexOf(d)>0){
fl=true;
return;
}
});
if(fl){console.log('动态请求',event.request.url);return fetch(event.request);}
return res ||
fetch(event.request)
.then(responese => {
console.log(event.request);
const responeseClone = responese.clone();
caches.open('def').then(cache => {
console.log('下载数据', responeseClone.url);