Skip to content

Commit

Permalink
正式发布2.2.1版本
Browse files Browse the repository at this point in the history
本次优化:
优化关于页面样式
修复哈希对比结果添加部分颜色缺失的问题
为写入剪贴板发生错误时添加详细报错信息
优化提示语
  • Loading branch information
Super12138 committed Oct 20, 2024
1 parent 6951126 commit 3ea1aee
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
11 changes: 7 additions & 4 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1 class="align-center hidden" id="dragTip">松开鼠标以读取文件</h1>
上次修改时间:<code id="fileDate" style="margin-right: 5px;">未选择文件</code>
</p>

<strong class="color-red">本应用的所有操作均在您的设备上运行,不会收集任何信息,请放心使用!</strong>
<strong class="color-red">所有计算操作均在您的设备上运行,不会收集任何信息,请放心使用!</strong>
<br>
<br>
<p class="mdui-valign"><mdui-checkbox id="isClipboard"></mdui-checkbox>计算完成后将校验值写入剪贴板(仅在生成模式下生效)</p>
Expand Down Expand Up @@ -112,15 +112,18 @@ <h1 id="outputTitle"></h1>
<mdui-button slot="action" id="settingsSaveBtn" variant="tonal">保存</mdui-button>
</mdui-dialog>

<mdui-dialog headline="关于" id="about">
<p id="version"></p>
<mdui-dialog headline="关于" id="about" class="align-center">
<img width="120px" src="icon-512.png" />
<p class="headline-small no-margin" style="margin-top: 10px;;">Hash Checker</p>
<p id="version" class="no-margin" style="margin-top: 5px;"></p>
<p>
本应用在 <a target="_blank" href="https://github.com/Super12138/Hash-Checker/">GitHub</a> 上开源
<br>
<a target="_blank" href="https://github.com/Super12138/">Super12138</a> 开发
</p>
<img width="50%" src="./src/assets/gpl.svg">
<img width="45%" src="./src/assets/gpl.svg">
<p>遵循 GPL-3.0 协议</p>
<mdui-divider></mdui-divider>
<p>开源库<br>
<a target="_blank" href="https://github.com/vitejs/vite">Vite</a>
<br>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ code {
color: #00C853 !important;
}

.no-margin {
margin: 0;
}

/* 滚动条 */
/* body::-webkit-scrollbar {
width: 6px;
Expand Down Expand Up @@ -192,7 +196,8 @@ h1 {
font-weight: var(--mdui-typescale-headline-medium-weight);
}

h2 {
h2,
.headline-small {
line-height: var(--mdui-typescale-headline-small-line-height);
font-size: var(--mdui-typescale-headline-small-size);
letter-spacing: var(--mdui-typescale-headline-small-tracking);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ dropZone.addEventListener('drop', (e: DragEvent) => {

// 初始化
window.addEventListener("load", () => {
initPWA();
if (VARIANT !== "desktop") initPWA();

const isFirstUse: boolean = string2Boolean(getStorageItem("firstUse", false));
const cacheSizeValue: string = getStorageItem("cacheSize", 2048);
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/pwa/sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ registerRoute(new NavigationRoute(
));

self.skipWaiting();
clientsClaim();

clientsClaim();
2 changes: 1 addition & 1 deletion frontend/src/utils/clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function writeClipboard(text: string) {
} catch (e) {
dialog({
headline: '错误',
description: '无法写入剪贴板',
description: `无法写入剪贴板${e})`,
actions: [
{
text: '确定'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function compareHash(userHash: string, genHash: string): HTMLSpanElement
differences.forEach((part: Change) => {
const span: HTMLSpanElement = document.createElement('span');
if (part.added) {
span.style.color = 'color-red';
span.classList.add('color-red')
}
if (part.removed) {
span.style.textDecoration = 'line-through';
Expand Down

0 comments on commit 3ea1aee

Please sign in to comment.