Skip to content

Commit

Permalink
新增rkey配置选项
Browse files Browse the repository at this point in the history
  • Loading branch information
xiyuesaves committed Jun 12, 2024
1 parent eda7b40 commit 1d0a02f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/html/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -1018,22 +1018,29 @@ <h2>预载hookVue模块</h2>
<li class="vertical-list-item">
<div>
<h2>更新自动重启</h2>
<span class="secondary-text">插件自更新后,自动重启</span>
<span class="secondary-text">插件更新后,自动重启</span>
</div>
<div class="autoRelanch q-switch" data-config="autoRelanch">
<span class="q-switch__handle"></span>
</div>
</li>
<!-- <hr class="horizontal-dividing-line" />
<hr class="horizontal-dividing-line" />
<li class="vertical-list-item">
<div>
<h2>rkey接口</h2>
<span class="secondary-text">使用第三方接口获取图片rkey</span>
<h2>自定义rkey获取地址</h2>
<span class="secondary-text">
使用第三方接口获取图片rkey,不填写将使用固定rkey
<br />
<strong>轻量工具箱不提供该服务,请自行搭建</strong>
<br />
服务搭建参考
<a class="removeMaskLink link" data-href="https://github.com/linyuchen/Lagrange.Core">Lagrange.Core</a>
</span>
</div>
</li>
<li class="vertical-list-item">
<input placeholder="rkey-api" class="input-text text_color" type="text" spellcheck="false" />
</li> -->
<input placeholder="" class="rkey-api-url input-text text_color" type="text" spellcheck="false" />
</li>
</ul>
</setting-panel>
<!-- 其他-debug -->
Expand Down
8 changes: 8 additions & 0 deletions src/pages/configView.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,14 @@ async function onConfigView(view) {
tailList.createNewTail();
});

// rkey接口请求地址
const rkeyApiUrl = view.querySelector(".rkey-api-url");
rkeyApiUrl.value = options.rkeyAPI;
rkeyApiUrl.addEventListener("input", (e) => {
options.rkeyAPI = e.target.value;
debounceSetOptions();
});

// 打开当前版本的更新日志
view.querySelector(".tag-version").addEventListener("click", () => {
fetch(`local:///${LiteLoader.plugins.lite_tools.path.plugin}/changeLog.md`)
Expand Down

0 comments on commit 1d0a02f

Please sign in to comment.