Skip to content

Commit

Permalink
feat(ui): language changes take effect immediately (#43)
Browse files Browse the repository at this point in the history
* update README

* feat(ui): language changes take effect immediately
  • Loading branch information
Broken-Deer authored Oct 1, 2024
1 parent b679975 commit 84a0929
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 408 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[简体中文](./README.zh.md)

Please go to the [official website](https://launcher.btlcraft.top) to download the launcher!
Please go to the [official website](https://amethyst.btlcraft.top) to download the launcher!

## Features

Expand Down Expand Up @@ -43,12 +43,12 @@ You need to find all the words related to the name of this program in the source

## Manual build

Make sure you have completed [prep](https://tauri.app/zh-cn/v1/guides/getting-started/prerequisites) first.
Make sure you have completed [prep](https://v2.tauri.app/start/prerequisites) first.

Execute the following command to pull the code:

```bash
git clone https://github.com/Broken-Deer/amethyst-launcher.git
git clone https://github.com/Conic-Sections/amethyst-launcher.git
cd amethyst-launcher
```

Expand Down
6 changes: 3 additions & 3 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[English README](./README.md)

请到 [官网](https://launcher.btlcraft.top) 下载启动器!
请到 [官网](https://amethyst.btlcraft.top) 下载启动器!

## 特性

Expand Down Expand Up @@ -45,12 +45,12 @@

## 手动构建

请先确保已完成[预先准备](https://tauri.app/zh-cn/v1/guides/getting-started/prerequisites)
请先确保已完成[预先准备](https://v2.tauri.app/start/prerequisites)

执行以下命令来拉取代码:

```bash
git clone https://github.com/Broken-Deer/amethyst-launcher.git
git clone https://github.com/Conic-Sections/amethyst-launcher.git
cd amethyst-launcher
```

Expand Down
111 changes: 55 additions & 56 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark" />
<title>Amethyst Launcher</title>
<link rel="stylesheet" href="./src/assets/styles/main.css" />
<link rel="stylesheet" href="./src/assets/styles/icons.css" />
<link rel="stylesheet" href="./src/assets/styles/transitions.css" />
<!-- Default themes -->
<link rel="stylesheet" href="./src/assets/styles/dark-theme.css" />
<link rel="stylesheet" href="./src/assets/styles/high-contrast-dark.css" />
<link rel="stylesheet" href="./src/assets/styles/light-theme.css" />
<style>
body {
}
</style>
</head>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark" />
<title>Amethyst Launcher</title>
<link rel="stylesheet" href="./src/assets/styles/main.css" />
<link rel="stylesheet" href="./src/assets/styles/icons.css" />
<link rel="stylesheet" href="./src/assets/styles/transitions.css" />
<!-- Default themes -->
<link rel="stylesheet" href="./src/assets/styles/dark-theme.css" />
<link rel="stylesheet" href="./src/assets/styles/high-contrast-dark.css" />
<link rel="stylesheet" href="./src/assets/styles/light-theme.css" />
<style>
body {}
</style>
</head>

<body style="transform: scale(0.93); opacity: 0">
<!-- <div id="window" style="position: relative; transform: scale(0.92); opacity: 0; outline: 1px solid #f00;" data-tauri-drag-region> -->
<div id="window" data-tauri-drag-region></div>
<script type="module" src="./src/main.ts"></script>
<!-- <div class="ball-a"></div> -->
<!-- <div class="ball-b"></div> -->
<style id="fix-webkitgtk"></style>
<script></script>
<div id="model-shadow"></div>
<style>
#model-shadow {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #00000079;
z-index: -1;
transition: all 0.3s ease;
opacity: 0;
}
</style>
<style id="no-animations">
.no-animations * {
animation: none !important;
transition: none !important;
}
</style>
<script>
document.onkeydown = (event) => {
if (window.event && window.event.keyCode == 123) {
event.keyCode = 0
event.returnValue = false
<body style="transform: scale(0.93); opacity: 0">
<!-- <div id="window" style="position: relative; transform: scale(0.92); opacity: 0; outline: 1px solid #f00;" data-tauri-drag-region> -->
<div id="window" data-tauri-drag-region></div>
<script type="module" src="./src/main.ts"></script>
<!-- <div class="ball-a"></div> -->
<!-- <div class="ball-b"></div> -->
<style id="fix-webkitgtk"></style>
<script></script>
<div id="model-shadow"></div>
<style>
#model-shadow {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: #00000079;
z-index: -1;
transition: all 0.3s ease;
opacity: 0;
}
if (window.event && window.event.keyCode == 13) {
window.event.keyCode = 505
</style>
<style id="no-animations">
.no-animations * {
animation: none !important;
transition: none !important;
}
</style>
<script>
document.onkeydown = (event) => {
if (window.event && window.event.keyCode == 123) {
event.keyCode = 0
event.returnValue = false
}
if (window.event && window.event.keyCode == 13) {
window.event.keyCode = 505
}
}
}
// 禁止右键
// document.oncontextmenu = function (event) {
// if (window.event) {
Expand All @@ -76,7 +76,6 @@
// return false
// }
// }
</script>
</body>

</script>
</body>
</html>
Loading

0 comments on commit 84a0929

Please sign in to comment.