Compare commits

...

95 Commits

Author SHA1 Message Date
401dcddb10
尝试进行一个fix 2024-04-21 17:19:04 +08:00
517db988cf
要命.png 2024-04-21 17:19:03 +08:00
a7553bb958
改回这玩意 2024-04-21 17:19:02 +08:00
82877e5872
这样 2024-04-21 17:19:01 +08:00
11a6772862
草,我傻比(不是 2024-04-21 17:19:00 +08:00
06eaeed25a
HtmlRenderer.jT -> HtmlRenderer.PlrGroup 2024-04-21 17:18:59 +08:00
0cf493bcae
HtmlRenderer.ax -> HtmlRenderer.PlrView 2024-04-21 17:18:58 +08:00
bdb8e43448
HtmlRenderer.jz -> HtmlRenderer.addPlrToTable 2024-04-21 17:18:56 +08:00
508f485d8c
HtmlRenderer.lp -> HtmlRenderer._updateToHtml 2024-04-21 17:18:55 +08:00
2beffd3f80
cleanup 2024-04-21 17:18:54 +08:00
98d37f01c6
看不懂,告辞(不是 2024-04-21 17:18:53 +08:00
aa64b4054f
yea? 2024-04-21 17:18:52 +08:00
de340e5134
naa 2024-04-21 17:18:51 +08:00
2afdabfd63
加一点信息 2024-04-21 17:18:50 +08:00
a661d55d1f
再妥协一下 2024-04-21 17:18:50 +08:00
df15584b62
fine…… 2024-04-21 17:18:49 +08:00
71347c5484
部署! 2024-04-21 17:18:48 +08:00
6962063c69
欸? 2024-04-21 17:18:48 +08:00
a8d23feddd
ruaaa 2024-04-21 17:18:47 +08:00
8ee43aef51
Create static.yml 2024-04-21 17:18:46 +08:00
f94057cc3b
稍微妥协一下得了 2024-04-21 17:18:46 +08:00
7f96a37934
不需要你啦,GitHub Actions 2024-04-21 17:18:45 +08:00
7394146e6a
yea? 2024-04-21 17:18:44 +08:00
77f3e2b460
gogogo 2024-04-21 17:18:44 +08:00
f19cda5a6a
2024-04-21 17:18:43 +08:00
c1dcca7c95
进行一个部署脚本的编写 2024-04-21 17:18:42 +08:00
4adb379180
似乎进行一个fix? 2024-04-21 17:18:41 +08:00
cc3739f9d7
rua 2024-04-21 17:18:40 +08:00
9fcf476bb3
T.b7 -> T.Grp 2024-04-21 17:18:39 +08:00
d4bd75d041
T.create_player -> T.choose_boss 2024-04-21 17:18:38 +08:00
3f6c715812
一些研究 2024-04-21 17:18:37 +08:00
e4fc8bf46e
H.uk -> H._installSpecializedAsCheck 2024-04-21 17:18:35 +08:00
d447f5c9db
H.aH -> H._rtiToString 2024-04-21 17:18:34 +08:00
d8e9a2a766
H.ob -> H._Error_compose 2024-04-21 17:18:33 +08:00
fad98e0aff
H.oo -> H._failedAsCheck 2024-04-21 17:18:32 +08:00
70800c71d3
H.ui -> H._generalNullableAsCheckImplementation 2024-04-21 17:18:31 +08:00
3253d254f8
优先修复一个傻逼问题 2024-04-21 17:18:30 +08:00
d459b058be
P.kZ -> P._RootZone_bindCallback_closure 2024-04-21 17:18:29 +08:00
d3737db200
P.cN -> P._FutureListener 2024-04-21 17:18:27 +08:00
afe86f5e73
P.ot -> P._rootRun 2024-04-21 17:18:26 +08:00
5845d454ae
P.uA -> P._rootRunUnary 2024-04-21 17:18:24 +08:00
d5fd66105f
P.kX -> P._RootZone 2024-04-21 17:18:23 +08:00
1e2d311ea9
what 2024-04-21 17:18:22 +08:00
47cfc77879
顺便把后面这里的也替换掉 2024-04-21 17:18:20 +08:00
4cd9893a88
P.ca -> P._newHashTable 2024-04-21 17:18:19 +08:00
b0184dc072
P.a0 -> P.create_meta_map P.dD -> P.create_StringInt_map 2024-04-21 17:18:18 +08:00
1ab4565935
W.cq -> W.File 2024-04-21 17:18:16 +08:00
654839e7f0
fix T.DummyRunUpdates in static 2024-04-21 17:18:16 +08:00
fd8b430a7c
fix static _startMicrotaskLoop 2024-04-21 17:18:15 +08:00
aaf6f8a484
P.zZ -> P.StreamIterator_StreamIterator 2024-04-21 17:18:14 +08:00
640801b6d9
P.oN -> P>scheduleMicrotask 2024-04-21 17:18:13 +08:00
735459c882
P.uC -> P._schedulePriorityAsyncCallback 2024-04-21 17:18:12 +08:00
5959c6f9e4
P.ou -> P._scheduleAsyncCallback 2024-04-21 17:18:11 +08:00
03dd723851
P.uD -> P._startMicrotaskLoop 2024-04-21 17:18:10 +08:00
e05b60656b
P.uw -> P._microtaskLoop 2024-04-21 17:18:09 +08:00
f9f940230e
P.uz -> P._registerErrorHandler 2024-04-21 17:18:07 +08:00
db2aa5792b
P.mk -> P._Future__chainCoreFuture 2024-04-21 17:18:06 +08:00
916053e870
P.iC -> P>_rootHandleUncaughtError 2024-04-21 17:18:05 +08:00
b203b84f10
P.c0 -> P._Future__propagateToListeners 2024-04-21 17:18:03 +08:00
c2e290a1b1
P.kR -> P._Future__propagateToListeners_handleWhenCompleteCallback 2024-04-21 17:18:02 +08:00
f15e3440e1
P.async_return -> P._asyncReturn 2024-04-21 17:18:01 +08:00
b4c720fd9d
P.Timer_impl -> P.Timerimpl 2024-04-21 17:17:59 +08:00
16288fd3d2
T.l8 -> T._TimerImpl 2024-04-21 17:17:58 +08:00
940e478f37
P.kA -> P._AsyncRun__initializeScheduleImmediate_closure 2024-04-21 17:17:57 +08:00
8568bda570
P.kP -> P._Future__propagateToListeners_handleError 2024-04-21 17:17:56 +08:00
e0fdfd87ff
P.kS -> P._Future__propagateToListeners_handleWhenCompleteCallback_closure 2024-04-21 17:17:54 +08:00
818de03445
P.kQ -> P._Future__propagateToListeners_handleValueCallback 2024-04-21 17:17:53 +08:00
25b4a0c07c
研究一下 benchmark 2024-04-21 17:17:52 +08:00
72471a8d63
Revert "T.h8 -> T.SklAttack"
This reverts commit 0cd5fe2b3d.

# Conflicts:
#	branch/latest/md5.js
2024-04-21 17:17:51 +08:00
e20b856b17
T.nX -> T.DummyRunUpdates 2024-04-21 17:17:50 +08:00
a3f9d3c262
T.rT -> T.DummyRunUpdates 2024-04-21 17:17:49 +08:00
74c5961743
T.aX -> T.RunUpdate 2024-04-21 17:17:47 +08:00
2d1853c8b0
T.RunUpdate -> T.RunUpdate_init 2024-04-21 17:17:46 +08:00
5c96c353b5
T.h2 -> T.RunUpdateCancel 2024-04-21 17:17:44 +08:00
8212bea543
T.RunUpdateCancel -> T.RunUpdateCancel_init 2024-04-21 17:17:43 +08:00
d3b182886b
T.dX -> T.RunUpdateWin 2024-04-21 17:17:42 +08:00
a85eb5973e
T.e0 -> T.ShieldStat 2024-04-21 17:17:41 +08:00
8e81a4d491
T.ik -> T.ShieldStat 2024-04-21 17:17:40 +08:00
ee0b7fcf5b
T.ah -> T.PostDamageEntry 2024-04-21 17:17:39 +08:00
e5d92bcbc6
this! 2024-04-21 17:17:37 +08:00
d978cbf546
T.cA -> T.PostDamageImpl 2024-04-21 17:17:36 +08:00
59369560dd
T.bq -> T.PostActionEntry 2024-04-21 17:17:35 +08:00
e1cf1969d7
T.aM -> T.Minion 2024-04-21 17:17:34 +08:00
a69c842cf2
T.dB -> T.LazyState 2024-04-21 17:17:33 +08:00
f6898e5f05
T.hD -> T.SklSimpleAttack 2024-04-21 17:17:32 +08:00
1b4b54b88e
T.h8 -> T.SklAttack 2024-04-21 17:17:31 +08:00
a551f480d5
T.dd -> T.BerserkState 2024-04-21 17:17:29 +08:00
0c92c4d8cc
T.fX -> T.PlrZombie 2024-04-21 17:17:28 +08:00
b86642ed5d
T.fD -> T.getMinionName 2024-04-21 17:17:27 +08:00
e66b627413
T.dI -> T.MinionCount 2024-04-21 17:17:26 +08:00
281489b92d
T.x -> T.IMeta 2024-04-21 17:17:24 +08:00
e5079ce7ea
T.hY -> T.ZombieState 2024-04-21 17:17:22 +08:00
99bc7c5b70
T.fC ->T.MergeState 2024-04-21 17:17:21 +08:00
538986917b
T.dj -> T.CharmState 2024-04-21 17:17:19 +08:00
5e1c74f25d
T.CharmState -> T.CharmState_init 2024-04-21 17:16:03 +08:00
6 changed files with 1073 additions and 869 deletions

48
.github/workflows/static.yml vendored Normal file
View File

@ -0,0 +1,48 @@
# Simple workflow for deploying static content to GitHub Pages
name: GitHub pages 部署
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 运行部署脚本
run: python3 deploy.py
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -560,13 +560,23 @@
0%,
80%,
100% {
transform: scale(0);
transform: scale(0)
}
40% {
transform: scale(1);
transform: scale(1)
}
}
#version-marker {
background-color: white;
position: absolute;
top: 20px;
left: 20px;
border-radius: 5px;
/* border: 2px solid marker_color */
padding: 10px;
}
</style>
<style id="pstyle">
</style>
@ -618,6 +628,8 @@
<body>
<div id="done_target" class="done_target" style="display: none;"></div>
<!-- 用于标记是否完事 默认隐藏-->
<div id="version-marker" style="display: none;"></div>
<!-- 左上角一个用于标记版本号的 div, 默认状况下不显示, 部署时使用脚本替换内容, 颜色同理 -->
<img src="thumb.jpg" width="0" height="0" />
<div class='ad_h'></div>
<div class='ad_v'></div>

View File

@ -567,6 +567,16 @@
transform: scale(1);
}
}
#version-marker {
background-color: white;
position: absolute;
top: 20px;
left: 20px;
border-radius: 5px;
/* border: 2px solid marker_color */
padding: 10px;
}
</style>
<style id="pstyle">
</style>
@ -618,6 +628,8 @@
<body>
<div id="done_target" class="done_target" style="display: none;"></div>
<!-- 用于标记是否完事 默认隐藏-->
<div id="version-marker" style="display: none;"></div>
<!-- 左上角一个用于标记版本号的 div, 默认状况下不显示, 部署时使用脚本替换内容, 颜色同理 -->
<img src="thumb.jpg" width="0" height="0" />
<div class='ad_h'></div>
<div class='ad_v'></div>

File diff suppressed because it is too large Load Diff

124
deploy.py Normal file
View File

@ -0,0 +1,124 @@
import os
import random
from subprocess import run
from pathlib import Path
ON_CF = os.getenv("CF_PAGES") == "1"
if ON_CF:
print("Running on Cloudflare Pages, trying to git fetch --all")
result = run(["git", "fetch", "--all"], check=False)
print(f"git fetch --all: {result}")
# 提前尝试输出一遍下面这堆信息
run(["git", "branch", "--show-current"], check=False)
run(["git", "rev-parse", "HEAD"], check=False)
run(["git", "describe", "--tags"], check=False)
run(["git", "log", "-1", "--pretty=%B"], check=False)
def get_env_info() -> dict[str, str]:
# 读取环境变量
env_info = {}
# git branch
if ON_CF:
branch = os.getenv("CF_PAGES_BRANCH") or "unknown"
else:
branch = run(
["git", "branch", "--show-current"],
capture_output=True,
text=True,
encoding="utf-8",
).stdout
env_info["branch"] = branch.strip()
# git commit hash
if ON_CF:
commit = os.getenv("CF_PAGES_COMMIT_SHA") or "unknown"
else:
commit = run(
["git", "rev-parse", "HEAD"],
capture_output=True,
text=True,
encoding="utf-8",
).stdout
env_info["commit"] = commit.strip()
# git commit message
message = run(
["git", "log", "-1", "--pretty=%B"],
capture_output=True,
text=True,
encoding="utf-8",
)
env_info["message"] = message.stdout.strip()
# git tag
if ON_CF:
tag = run(
["git", "describe", "--tags"], capture_output=True, text=True, encoding="utf-8"
).stdout.split("-")[0] or "cf_pages"
else:
tag = run(
["git", "describe", "--tags"], capture_output=True, text=True, encoding="utf-8"
).stdout.split("-")[0]
env_info["tag"] = tag.strip()
return env_info
if __name__ == "__main__":
# 虽然但是, 我还是决定用 python 写这个脚本
border_raw = "/* border: 2px solid marker_color */"
border_template = "border: 2px solid {};"
marker_raw = '<div id="version-marker" style="display: none;"></div>'
marker_template = '<div id="version-marker">{}</div>'
# 读取环境变量
env_info = get_env_info()
tag = env_info["tag"]
branch = env_info["branch"]
commit = env_info["commit"]
message = env_info["message"]
for file in Path.cwd().rglob("index.html"):
try:
with open(file, "r", encoding="utf-8") as f:
raw_content = f.read()
except Exception as e:
print(f"Error: {e}")
continue
print(f"Reading: {file}")
# 替换内容
# 首先判断是否是 /branch 目录下的 index.html
if "branch" in str(file):
# 如果是, 则将颜色替换为 random(这里是为了区分不同的分支, 并且颜色相对固定)
file_branch_name = file.parent.name
randomer = random.Random(file_branch_name)
hash_color = randomer.randint(0, 0xFFFFFF)
border = border_template.format(f"#{hash_color:06x}")
# git 信息:
version_info = f"{file_branch_name}/{branch}:{tag}-{commit[:6]}<br/>{message}"
marker = marker_template.format(version_info)
print(f"Branch: {file_branch_name}\n{border}\n{marker}\n")
else:
# 淡绿色!
border = border_template.format("greenyellow")
# git 信息:
version_info = f"{branch}:{tag}-{commit[:6]}"
marker = marker_template.format(version_info)
print(f"Master: {border}\n{marker}\n")
raw_content = raw_content.replace(border_raw, border).replace(
marker_raw, marker
)
# 写入文件
try:
with open(file, "w", encoding="utf-8") as f:
f.write(raw_content)
except Exception as e:
print(f"Error writing file: {e}")
continue

View File

@ -569,6 +569,16 @@
transform: scale(1);
}
}
#version-marker {
background-color: white;
position: absolute;
top: 20px;
left: 20px;
border-radius: 5px;
/* border: 2px solid marker_color */
padding: 10px;
}
</style>
<style id="pstyle">
</style>
@ -620,6 +630,8 @@
<body>
<div id="done_target" class="done_target" style="display: none;"></div>
<!-- 用于标记是否完事 默认隐藏-->
<div id="version-marker" style="display: none;"></div>
<!-- 左上角一个用于标记版本号的 div, 默认状况下不显示, 部署时使用脚本替换内容, 颜色同理 -->
<img src="thumb.jpg" width="0" height="0" />
<div class='ad_h'></div>
<div class='ad_v'></div>