better for bmtedge

This commit is contained in:
janson 2023-06-15 10:12:08 +08:00
parent 1cb903957b
commit 74cf5b700f
3 changed files with 16 additions and 23 deletions

View File

@ -8,7 +8,7 @@ local m, s, o
m = taskd.docker_map("bmtedge", "bmtedge", "/usr/libexec/istorec/bmtedge.sh",
translate("BlueMountain Edge"),
"蓝山云-流量宝由蓝山联合金山云推出的一款镜像软件,通过简单安装后可快速加入蓝山的边缘计算生态,在线共享带宽即可赚钱,每月可获取一定的现金报!了解更多,请登录「<a href=\"www.bmtcloud.com.cn\" target=\"_blank\" >蓝山云官网</a>」")
"蓝山云-流量宝由蓝山联合金山云推出的一款镜像软件,通过简单安装后可快速加入蓝山的边缘计算生态,在线共享带宽即可赚钱,每月可获取一定的现金报!了解更多,请登录「<a href=\"www.bmtcloud.com.cn\" target=\"_blank\" >蓝山云官网</a>」")
s = m:section(SimpleSection, translate("Service Status"), translate("BlueMountain Edge status:"), "注意网心云会以超级权限运行!")
s:append(Template("bmtedge/status"))

View File

@ -11,15 +11,7 @@ local uid = uci:get_first("bmtedge", "bmtedge", "uid", ""),
<label class="cbi-value-title"><%:Status%></label>
<div class="cbi-value-field">
<% if container_running then %>
<button class="cbi-button cbi-button-success" disabled="true"><%:BlueMountain Edge is running%></button>
<div class="cbi-value cbi-value-last">
<label class="cbi-value-title">&nbsp;</label>
<div class="cbi-value-field">
<input type="button" class="btn cbi-button cbi-button-apply" id="btnShowQr" name="start" value="显示二维码" />
</div>
</div>
<button class="cbi-button cbi-button-success" id="btnShowQr"><%:Running, click to show QR%></button>
<% else %>
<button class="cbi-button cbi-button-negative" disabled="true"><%:BlueMountain Edge is not running%></button>
<% end %>
@ -32,28 +24,25 @@ local uid = uci:get_first("bmtedge", "bmtedge", "uid", ""),
height: 256px;
">
</div>
<h6>用“蓝山云”小程序扫码,请查看:<a href="https://doc.linkease.com" target="_blank">教程</a></h6>
<h6>用“蓝山云”小程序扫码,请查看:<a href="https://doc.linkease.com/zh/guide/istoreos/software/bmtedge.html" target="_blank">教程</a></h6>
</div>
<script>
(function() {
'use strict';
var shown = false;
var tryShowTips = function() {
var tryShowQr = function() {
if (shown) {
return;
}
shown = true;
new QRCode(document.getElementById("qrimage"), "lsyK17032_"+"<%=uid%>");
$("#winContainer").show();
$("#winContainer").find(".button").click(function(){
$("#winContainer").hide();
show = false;
});
};
$('#btnShowQr').click(function(){
new QRCode(document.getElementById("qrimage"), "lsyK17032_"+"<%=uid%>");
tryShowTips();
$('#btnShowQr').click(function(e){
e.preventDefault();
tryShowQr();
});
})();

View File

@ -22,14 +22,18 @@ msgstr "以下参数只在安装或者升级时才会生效:"
msgid "Status"
msgstr "状态"
msgid "BlueMountain Edge is running"
msgstr "蓝山云运行中"
msgid "Running, click to show QR"
msgstr "运行中,点击查看二维码"
msgid "BlueMountain Edge is not running"
msgstr "蓝山云未运行"
msgid "Open the BlueMountain Edge"
msgstr "打开蓝山云"
msgid "Use “蓝山云” Wechat Little APP to scan the QR, click:"
msgstr "用“蓝山云”小程序扫码,请查看:"
msgid "Guide"
msgstr "教程"
msgid "UID"
msgstr "唯一标识"