Skip to content

Commit

Permalink
2024090901
Browse files Browse the repository at this point in the history
  • Loading branch information
Spectrollay committed Sep 9, 2024
1 parent 4bf8cb5 commit c7dbc75
Show file tree
Hide file tree
Showing 16 changed files with 444 additions and 290 deletions.
8 changes: 8 additions & 0 deletions Feed/update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<link>https://spectrollay.github.io/minecraft_repository_test/updatelog/</link>
<description>星月Minecraft版本库是一个开放共享的资源站,专注于收录Minecraft发布过的所有版本.</description>
<language>zh-cn</language>
<item>
<title>版本库已更新 4.6.5.51.Canary</title>
<link>https://spectrollay.github.io/minecraft_repository_test/</link>
<description>更新内容详见:
<a href="https://spectrollay.github.io/minecraft_repository_test/updatelog/">开发日志</a>
</description>
<pubDate>Mon, 09 Sep 2024 22:00:00 GMT</pubDate>
</item>
<item>
<title>版本库已更新 4.6.5.50.Canary</title>
<link>https://spectrollay.github.io/minecraft_repository_test/</link>
Expand Down
26 changes: 13 additions & 13 deletions Verification/file-hashes.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"404.html": "b724c56bbefba662700eadea51a4b5b9",
"advanced\\debug.html": "f3f599c403fbe59bb6cf99fc2ac1dd21",
"advanced\\settings.html": "74024a6deb37c32f09e15ee77621b996",
"advanced\\settings.html": "54b3711fe9143fd8d7186255b4b73309",
"advanced\\status.html": "ac6adf46440b16e99c3151b8c8c9ba94",
"default\\coming_soon.html": "541c00b3ff6cdea5f7bf7129b131c5dd",
"default\\error_default.html": "13ebe0116389f9e10d0ec6dc2a8af39a",
"default\\error_no-access.html": "b2d0b116e80f954ffd8416d3cef8627e",
"default\\error_not-found.html": "9125c5cbfa529d708e78254b8333152f",
"donate.html": "26df29641e07c5a582eca1068971fb48",
"experiments\\exp.css": "f227348871eca5403b0aca19d0edd65e",
"experiments\\exp.js": "91ebfaa6d90350f16bfabb60ab0df26c",
"experiments\\flags.html": "fe30ad879a59198ce60634f7385abcd6",
"experiments\\index.css": "0ef80c42887552a3734a200d13a3e8cd",
"experiments\\index.html": "ec259e3546b3f1fddc9aa8c0e923d920",
"experiments\\index.js": "fd29a9466e3324e94dbf8f7235acc6c1",
"Feed\\database.xml": "c3b1879c690866f41a3479f7ed28edb6",
"Feed\\main.xml": "f5be196f7e0f95f94eee17f5c73efcd5",
"Feed\\messages.xml": "1c24a98ff83bdc56d026043d412bd778",
"Feed\\update.xml": "19ddc1049f06c89cc2c6b1eb65838c3d",
"flags\\index.html": "d645714594ec9c14b02ddfe5cacf271d",
"Feed\\update.xml": "7fee6d4fc5a33c073a7736029fb154a5",
"flags\\index.html": "a58d058834f9236883db1104c2d2d074",
"fonts\\Minecraft-Five-Bold.otf": "17ba4c2007cf79329c4b84e8dbc6fd34",
"fonts\\Minecraft-Five.otf": "070d5f6822481c45102b7c8e71619fe1",
"fonts\\Minecraft-Seven.otf": "29cc62e5424a2e7fd7a546e491837e17",
Expand Down Expand Up @@ -128,14 +128,14 @@
"images\\update\\logo\\Update_Aquatic.png": "cc3e6f78620f02b96f3dd1ee6bc788ae",
"images\\update\\logo\\Village&Pillage.png": "afa9288d18710378aa0b997c4559aa5b",
"images\\Write.png": "9eb90637a35e8f1fd31aea178b024d3c",
"index.html": "e8a12dc58d958131c2acad66c1b333d7",
"index.html": "5a31632d5cdcc72dfbfd69743ac4bb89",
"issue_tracker\\index.html": "edc1f27b2d6381751ed4d60d7aa53ccc",
"javascript\\accessibility.js": "722948e45907330bc74f30ecb8e6beb4",
"javascript\\advanced.js": "0d38129123a736a59d09970b876f11ec",
"javascript\\custom_elements.js": "f9c1f72cad6afebd7983f4ffc93ae185",
"javascript\\accessibility.js": "4c3d2f7fe221a2bc26da35c85eb344f4",
"javascript\\advanced.js": "288d119cbdc37f0fddc5dc651bab47d8",
"javascript\\custom_elements.js": "04446e8fe8e97792ae231631e133b3fe",
"javascript\\editions.js": "795a056b1011d662f3cbd38c41962bee",
"javascript\\public_define.js": "2c411443fb954f9aa5418a41f1ec69fb",
"javascript\\public_script.js": "954a52994db77927dac0db9116e5f90f",
"javascript\\public_define.js": "41a9db737fdd735ce80f2a707a02e80d",
"javascript\\public_script.js": "92f0dffd50c059db5fb0378f60cd9168",
"notifications\\index.html": "aa15a9909792415b682b4fd6d9866f49",
"README-en_US.md": "8c9ce26d032adfdc4e620dc53d683e74",
"README.md": "f6ad7532a8a75f70ec4240a668ee3bb4",
Expand All @@ -151,5 +151,5 @@
"stylesheet\\loading_mask.css": "2701a0ba77a2b46b52280505bb0194af",
"stylesheet\\public_style.css": "a221d9cf3686e0757b093661e857312f",
"Template\\index.html": "d90907446df4ac3d061035c95d0d22b7",
"updatelog\\index.html": "814895e28fa1b5767fd244ffad80567e"
"updatelog\\index.html": "4592cd6e5617f7801dbd4486c6c7bcac"
}
2 changes: 1 addition & 1 deletion Verification/project-hash.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"projectHash": "ed885f553ceb2afe9f5bdbc457de3324"
"projectHash": "61fe1cec5075f981f21d7a63c2a4538f"
}
53 changes: 50 additions & 3 deletions advanced/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@
<custom-button data="setting|red|||false||" js="leaveTest();" text="离开"></custom-button>
</div>
</div>
<div class="setting_title exp_accessibility">无障碍</div>
<div class="main_block setting_block exp_accessibility">
使用文本转语音
</div>
<div class="main_block setting_block exp_accessibility">
文本转语音音量
</div>
<div class="main_block setting_block exp_accessibility">
高对比度UI
</div>
<div class="main_block setting_block exp_accessibility">
通知持续时间
</div>
<div class="setting_title">外观</div>
<div class="main_block setting_block">
主题
Expand Down Expand Up @@ -139,7 +152,11 @@
<custom-button data="setting|normal|||false||" js="flagsPage();" text="查看"></custom-button>
</div>
</div>
<div class="main_block setting_block">
<div class="main_block setting_block new_flags_page">
<div class="setting_content">新的实验性内容页面</div>
<custom-switch active="off" id="new_flags_page" status="enabled"></custom-switch>
</div>
<div class="main_block setting_block exp_envi_guide">
<div class="setting_content">环境指南</div>
<div class="setting_control_right">
</div>
Expand All @@ -157,7 +174,7 @@
<custom-button data="setting|red|||false||" js="showModal('reload_page_warning');" text="重载"></custom-button>
</div>
</div>
<div class="main_block setting_block">
<div class="main_block setting_block debug_mode">
<div class="setting_content">加载调试程序</div>
<div class="setting_control_right">
<custom-button data="setting|red|||false||" js="jumpToPage('/minecraft_repository_test/default/error_no-access.html');" text="调试"></custom-button>
Expand Down Expand Up @@ -270,7 +287,7 @@
<modal_button_group>
<modal_button_list>
<custom-button data="modal|normal|||false||" js="hideModal(this);" text="取消"></custom-button>
<custom-button data="modal|red|||false||" js="hideModal(this);clearStorage();mainPage();" text="我知道我在做什么!"></custom-button>
<custom-button data="modal|red|||false||" js="hideModal(this);clearStorage();" text="我知道我在做什么!"></custom-button>
</modal_button_list>
</modal_button_group>
</modal_button_area>
Expand Down Expand Up @@ -378,6 +395,26 @@
window.addEventListener('load', function () {
hide_mask();
});

// 新的实验性内容页面 TODO: 在旧的实验性内容页面被移除时时删除
const newFlagsPageElement = document.getElementsByClassName('new_flags_page');
if (!rootPath.includes('_test')) {
newFlagsPageElement[0].style.display = 'none';
}

// 实验性无障碍 TODO: 在移除实验性无障碍时移除相关代码
expAccessibilityState = localStorage.getItem('(/minecraft_repository_test/)experimental_accessibility');
accessibility_elements = document.querySelectorAll('.exp_accessibility');

if (expAccessibilityState === 'on') {
accessibility_elements.forEach(accessibility_element => {
accessibility_element.style.display = 'flex';
})
} else {
accessibility_elements.forEach(accessibility_element => {
accessibility_element.style.display = 'none';
})
}
</script>
<link href="/minecraft_repository_test/stylesheet/advanced.css" rel="stylesheet">
<script src="/minecraft_repository_test/javascript/advanced.js"></script>
Expand Down Expand Up @@ -411,6 +448,16 @@
#setting_version_detail {
display: flex;
align-items: center;
justify-items: center;
}

/* 使开关区域与按钮区域等宽 */
custom-switch {
width: 132px;
}

.switch_content {
display: flex;
justify-content: center;
}
</style>
Expand Down
21 changes: 0 additions & 21 deletions experiments/exp.css

This file was deleted.

9 changes: 7 additions & 2 deletions experiments/exp.js → experiments/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
* SOFTWARE.
*/

// 实验性
console.log("实验性内容");
.exp_envi_guide {
display: none !important;
}

.debug_mode {
display: none !important;
}
19 changes: 12 additions & 7 deletions experiments/flags.html → experiments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,37 +90,42 @@
<br>
<div class="flex">
<div class="setting_content">设置页面</div>
<custom-switch active="on" status="disabled"></custom-switch>
<custom-switch active="on" id="experimental_settings" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">环境指南页面</div>
<custom-switch active="off" status="disabled"></custom-switch>
<custom-switch active="off" id="experimental_envi_guide" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">自定义元素</div>
<custom-switch active="on" status="disabled"></custom-switch>
<custom-switch active="on" id="experimental_custom_elements" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">惰性加载机制</div>
<custom-switch active="on" status="disabled"></custom-switch>
<custom-switch active="on" id="experimental_lazy_load" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">响应式设计</div>
<custom-switch active="on" status="disabled"></custom-switch>
<custom-switch active="on" id="experimental_responsive_design" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">无障碍体验优化</div>
<custom-switch active="on" status="disabled"></custom-switch>
<custom-switch active="on" id="experimental_accessibility" status="enabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">服务响应优化</div>
<custom-switch active="off" status="disabled"></custom-switch>
<custom-switch active="off" id="experimental_service_response_optimization" status="disabled"></custom-switch>
</div>
<divider></divider>
<div class="flex">
<div class="setting_content">返回重载优化</div>
<custom-switch active="off" id="experimental_back_reload_optimization" status="disabled"></custom-switch>
</div>
<br>
</div>
Expand Down
71 changes: 71 additions & 0 deletions experiments/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright © 2020. Spectrollay
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

// 实验性
console.log("实验性内容");

const exp_css = document.createElement('link');
exp_css.rel = 'stylesheet';
exp_css.href = '/minecraft_repository_test/experiments/index.css';

document.head.appendChild(exp_css);


// 新的实验性页面
let newFlagsPageSwitch = document.getElementById('new_flags_page');
let newFlagsPageState;

if (newFlagsPageSwitch) {
newFlagsPageState = localStorage.getItem('(/minecraft_repository_test/)new_flags_page');
if (newFlagsPageState === 'on') {
newFlagsPageSwitch.setAttribute('active', 'on');
} else {
newFlagsPageSwitch.setAttribute('active', 'off');
}
}

function flagsPage() {
rootPath = '/' + (window.location.pathname.split('/').filter(Boolean).length > 0 ? window.location.pathname.split('/').filter(Boolean)[0] + '/' : '');
newFlagsPageState = localStorage.getItem('(/minecraft_repository_test/)new_flags_page');
if (newFlagsPageState === 'on') {
setTimeout(function () {
window.location.href = "/minecraft_repository_test/flags/";
}, 600);
} else {
setTimeout(function () {
window.location.href = "/minecraft_repository_test/experiments/";
}, 600);
}
}


// 实验性无障碍
let expAccessibilitySwitch = document.getElementById('experimental_accessibility');
let expAccessibilityState = localStorage.getItem('(/minecraft_repository_test/)experimental_accessibility');

if (expAccessibilitySwitch) {
if (expAccessibilityState === 'on') {
expAccessibilitySwitch.setAttribute('active', 'on');
} else {
expAccessibilitySwitch.setAttribute('active', 'off');
}
}
Loading

0 comments on commit c7dbc75

Please sign in to comment.