增加透传给前端的自定义字段方便前端扩展功能

This commit is contained in:
naiba
2024-09-28 00:16:54 +08:00
parent bdf36276da
commit 106d58575b
12 changed files with 40 additions and 18 deletions

View File

@@ -226,6 +226,9 @@ other = "Secret"
[Note]
other = "Note"
[PublicNote]
other = "Public Note"
[LinuxOneKeyInstall]
other = "Linux One-Command Install"

View File

@@ -226,6 +226,9 @@ other = "Secreto"
[Note]
other = "Nota"
[PublicNote]
other = "Nota Pública"
[LinuxOneKeyInstall]
other = "Instalación Linux con Un Solo Clic"

View File

@@ -226,6 +226,9 @@ other = "密钥"
[Note]
other = "备注"
[PublicNote]
other = "公开备注"
[LinuxOneKeyInstall]
other = "Linux 一键安装"

View File

@@ -226,6 +226,9 @@ other = "金鑰"
[Note]
other = "備註"
[PublicNote]
other = "公開備註"
[LinuxOneKeyInstall]
other = "Linux 一鍵安裝"

View File

@@ -331,6 +331,7 @@ function addOrEditServer(server, conf) {
.find("input[name=DisplayIndex]")
.val(server ? server.DisplayIndex : null);
modal.find("textarea[name=Note]").val(server ? server.Note : null);
modal.find("textarea[name=PublicNote]").val(server ? server.PublicNote : null);
if (server) {
modal.find(".secret.field").attr("style", "");
modal.find(".command.field").attr("style", "");

View File

@@ -10,7 +10,7 @@
<script src="https://unpkg.com/semantic-ui@2.4.0/dist/semantic.min.js"></script>
<script src="/static/semantic-ui-alerts.min.js"></script>
<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
<script src="/static/main.js?v20240714"></script>
<script src="/static/main.js?v2024927"></script>
<script>
(function () {
updateLang({{.LANG }});

View File

@@ -56,6 +56,10 @@
<label>{{tr "Note"}}</label>
<textarea name="Note"></textarea>
</div>
<div class="field">
<label>{{tr "PublicNote"}}</label>
<textarea name="PublicNote"></textarea>
</div>
<div class="command field">
<label>{{tr "LinuxOneKeyInstall"}}</label>
<div class="ui message">

View File

@@ -36,6 +36,7 @@
<th>{{tr "Secret"}}</th>
<th>{{tr "OneKeyInstall"}}</th>
<th>{{tr "Note"}}</th>
<th>{{tr "PublicNote"}}</th>
<th>{{tr "Administration"}}</th>
</tr>
</thead>
@@ -76,12 +77,13 @@
</button>
</td>
<td style="word-break: break-word;white-space: pre-wrap;">{{$server.Note}}</td>
<td style="word-break: break-word;white-space: pre-wrap;">{{$server.PublicNote}}</td>
<td>
<div class="ui mini icon buttons">
<button class="ui button" onclick="connectToServer({{$server.ID}})">
<i class="terminal icon"></i>
</button>
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
<button class="ui button" onclick="addOrEditServer({{$server.MarshalForDashboard}})">
<i class="edit icon"></i>
</button>
<button class="ui button"