mirror of
https://github.com/tjy-gitnub/win12.git
synced 2026-09-01 15:46:40 +08:00
v5.4.1 bug修复
(更新来自 @tjy-gitnub) -修复pwa将动态请求拦截的灾难性事故 -调整大家梦寐以求的开始菜单滚动条 -新增开始菜单固定项右键取消固定选项 -适配主题格式的一些更改 -细节优化和修复
This commit is contained in:
+10
@@ -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
@@ -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>
|
||||
  <strong>(更新来自 @tjy-gitnub)</strong><br />
|
||||
  -修复pwa将动态请求拦截的灾难性事故<br />
|
||||
  -调整大家梦寐以求的开始菜单滚动条<br />
|
||||
  -新增开始菜单固定项右键取消固定选项<br />
|
||||
  -适配主题格式的一些更改<br />
|
||||
  -细节优化和修复</p>
|
||||
</details>
|
||||
<details><summary><span>v5.4.0</span> 新版logo与图标,UI优化,自定主题与winver</summary><p>
|
||||
  <strong>(更新来自 @tjy-gitnub,其实我想发v6的)</strong><br />
|
||||
  -新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
@@ -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'));
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user