Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
custom-skills
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazy-template
custom-skills
Commits
83bc95aa
Commit
83bc95aa
authored
Mar 21, 2026
by
yuxiaodi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
489af456
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
app.py
app.py
+12
-10
No files found.
app.py
View file @
83bc95aa
...
...
@@ -47,8 +47,7 @@ def _render_home_html(request: Request) -> str:
<tr class="skill-row">
<td class="skill-name"><code>{safe_fname}</code></td>
<td class="skill-actions">
<a class="btn btn-primary" href="{safe_url}" download>下载</a>
<button type="button" class="btn btn-secondary copy-btn" data-url="{safe_url}">复制链接</button>
<button type="button" class="btn btn-primary copy-btn" data-url="{safe_url}">复制链接</button>
</td>
</tr>"""
...
...
@@ -239,14 +238,13 @@ def _render_home_html(request: Request) -> str:
<p class="lead">在 IDE 中开发技能、打包后直接复制链接交给 Eazybot 安装或自行下载保存</p>
<div class="intro">
<p>您可以在 IDE 对话框中描述想开发的技能,由 <strong>Eazy Develop</strong> 协助完成;也可自行在 <code>skills/</code> 目录下开发,并使用 <code>make skill</code> 打包。</p>
<p>部署后
可通过下方链接下载 <code>.skill</code> 压缩包,或
将链接提供给 <strong>Eazybot</strong> 自动安装。(开发环境中链接可能为临时地址,部署后为稳定链接。)</p>
<p>部署后
复制下方链接,在浏览器中打开即可下载 <code>.skill</code> 压缩包;也可
将链接提供给 <strong>Eazybot</strong> 自动安装。(开发环境中链接可能为临时地址,部署后为稳定链接。)</p>
</div>
<div class="default-dl">
<label>默认
下载(第一个 .skill
)</label>
<label>默认
链接(在浏览器中打开即可下载第一个 <code>.skill</code>
)</label>
<div class="url-row">
<input type="text" readonly value="{safe_default}" id="default-url" />
<a class="btn btn-primary" href="{safe_default}" download>下载</a>
<button type="button" class="btn btn-secondary copy-btn" data-url="{safe_default}">复制链接</button>
<button type="button" class="btn btn-primary copy-btn" data-url="{safe_default}">复制链接</button>
</div>
</div>
<h2>已打包的技能</h2>
...
...
@@ -254,7 +252,7 @@ def _render_home_html(request: Request) -> str:
<thead>
<tr>
<th>文件名</th>
<th style="text-align:right">
操作
</th>
<th style="text-align:right">
链接
</th>
</tr>
</thead>
<tbody>
...
...
@@ -267,16 +265,20 @@ def _render_home_html(request: Request) -> str:
<script>
(function () {{
var toast = document.getElementById("toast");
function showToast() {{
function showToast(msg) {{
if (msg) toast.textContent = msg;
toast.classList.add("show");
clearTimeout(showToast._t);
showToast._t = setTimeout(function () {{ toast.classList.remove("show"); }}, 2000);
showToast._t = setTimeout(function () {{
toast.classList.remove("show");
toast.textContent = "已复制到剪贴板";
}}, 2500);
}}
document.querySelectorAll(".copy-btn").forEach(function (btn) {{
btn.addEventListener("click", function () {{
var url = btn.getAttribute("data-url");
if (navigator.clipboard && navigator.clipboard.writeText) {{
navigator.clipboard.writeText(url).then(
showToast
).catch(function () {{
navigator.clipboard.writeText(url).then(
function () {{ showToast(); }}
).catch(function () {{
fallbackCopy(url);
}});
}} else {{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment