Răsfoiți Sursa

多语言multi-language #26

Bhikkhu-Kosalla 5 ani în urmă
părinte
comite
c2d50b3c3a

+ 1 - 0
app/public/css/notify.css

@@ -1,6 +1,7 @@
 	.pcd_notify{
 		position: fixed;
 		top:3.6em;
+		left: 40vw;
 		min-width:20em;
 		max-width:95%;
 		text-align:center;

+ 1 - 0
app/public/js/comm.js

@@ -145,6 +145,7 @@ function copy_to_clipboard(strInput) {
   if (document.execCommand("copy")) {
     document.execCommand("copy");
     console.log("复制成功");
+    ntf_show("“" + strInput + "”" + gLocal.gui.copied_to_clipboard);
   }
   document.body.removeChild(input);
 }

+ 3 - 1
app/public/js/notify.js

@@ -16,8 +16,9 @@ function ntf_init(lines = 5) {
   body.appendChild(divNotify);
   divNotify.style.display = "none";
 }
-
+var time_out_func
 function ntf_show(msg, timeout = 8) {
+
   if (ntf_msg_list.length < ntf_max_msg_line) {
     ntf_msg_list.push(msg);
   } else {
@@ -34,6 +35,7 @@ function ntf_show(msg, timeout = 8) {
       strHtml += strMsg;
       strHtml += "</div>";
     }
+    strHtml += "<button onclick='ntf_hide()' style='margin-left: 70%;'>" + gLocal.gui.I_know + "</button>"
     divNotify.innerHTML = strHtml;
     divNotify.style.display = "block";
     setTimeout("ntf_hide()", timeout * 1000);

+ 6 - 0
app/public/lang/default.json

@@ -511,6 +511,12 @@
 		"sign_up": "sign up",
 		"watch": "watch",
 		"watched": "watched",
+		"send": "send",
+		"accept_copy": "accept & copy",
+		"with_idea": "I have an idea…",
+		"text_num": "No. of text",
+		"copied_to_clipboard": "has been copied to clipboard.",
+		"I_know": "Got it!",
 		"": ""
 	},
 	"grammastr": [

+ 6 - 0
app/public/lang/en.json

@@ -510,6 +510,12 @@
 		"sign_up": "sign up",
 		"watch": "watch",
 		"watched": "watched",
+		"send": "send",
+		"accept_copy": "accept & copy",
+		"with_idea": "I have an idea…",
+		"text_num": "No. of text",
+		"copied_to_clipboard": "has been copied to clipboard.",
+		"I_know": "Got it!",
 		"": ""
 	},
 	"grammastr": [

+ 6 - 0
app/public/lang/my.json

@@ -510,6 +510,12 @@
 		"sign_up": "sign up",
 		"watch": "watch",
 		"watched": "watched",
+		"send": "send",
+		"accept_copy": "accept & copy",
+		"with_idea": "I have an idea…",
+		"text_num": "No. of text",
+		"copied_to_clipboard": "has been copied to clipboard.",
+		"I_know": "Got it!",
 		"": "",
 		"": ""
 	},

+ 6 - 0
app/public/lang/si.json

@@ -515,6 +515,12 @@
 		"sign_up": "sign up",
 		"watch": "watch",
 		"watched": "watched",
+		"send": "send",
+		"accept_copy": "accept & copy",
+		"with_idea": "I have an idea…",
+		"text_num": "No. of text",
+		"copied_to_clipboard": "has been copied to clipboard.",
+		"I_know": "Got it!",
 		"": "",
 		"": ""
 	},

+ 15 - 0
app/public/lang/zh-cn.json

@@ -512,6 +512,21 @@
 		"sign_up": "报名",
 		"watch": "关注",
 		"watched": "关注数",
+		"send": "发送",
+		"accept_copy": "采纳",
+		"with_idea": "我觉得……",
+		"text_num": "文本编号",
+		"copied_to_clipboard": "已复制到剪切板",
+		"I_know": "我知道了",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
+		"": "",
 		"": ""
 	},
 	"grammastr": [

+ 6 - 0
app/public/lang/zh-tw.json

@@ -512,6 +512,12 @@
 		"sign_up": "報名",
 		"watch": "關注",
 		"watched": "關注數",
+		"send": "傳送",
+		"accept_copy": "採納",
+		"with_idea": "我覺得……",
+		"text_num": "文字編號",
+		"copied_to_clipboard": "已複製到剪下板",
+		"I_know": "我知道了",
 		"": ""
 	},
 	"grammastr": [

+ 21 - 0
app/studio/css/style.css

@@ -4415,3 +4415,24 @@ note {
   border-radius: 5px;
   box-shadow: 0 0 10px var(--main-color);
 }
+@-webkit-keyframes spin {
+  from {
+      -webkit-transform: rotate(0deg);
+  }
+  to {
+      -webkit-transform: rotate(360deg);
+  }
+}
+
+@keyframes spin {
+  from {
+      transform: rotate(0deg);
+  }
+  to {
+      transform: rotate(360deg);
+  }
+}
+.icon_spin {
+  -webkit-animation: spin 1.5s linear infinite;
+  animation: spin 1.5s linear infinite;
+}

+ 1 - 1
app/studio/editor.php

@@ -138,7 +138,7 @@ else{$currDevice="computer";}
 		font-size: 80%;
 		border-top: 1px solid gray;
 		padding-top: 5px;
-		color: gray;
+		color: var(--detail-color);
 		display:flex;
 		justify-content: space-between;
 	}

Fișier diff suprimat deoarece este prea mare
+ 2 - 6
app/studio/index_tool_bar.php


+ 49 - 47
app/studio/js/render.js

@@ -665,7 +665,7 @@ function updateTranslationPreview_a(blockId, text) {
   newText = term_std_str_to_tran(newText);
   out += newText;
   if (out == "") {
-    out = "<span style='color:#ccbfbf;'>I have some ...</span>";
+    out = "<span style='color:#ccbfbf;'>" + gLocal.gui.with_idea + "</span>";
   }
   $("#tran_pre_" + blockId).html(out);
   term_updata_translation();
@@ -1204,7 +1204,7 @@ function renderNoteParBlockInner(elementBlock) {
   output +=
     '<button type="button" class="edit_note_button imgbutton" onclick="editor_note_edit(\'' +
     bId +
-    "')\"><svg class='icon'><use xlink:href='svg/icon.svg#ic_mode_edit'></use></svg></button>";
+    "')\"><svg class='icon' style='fill: var(--detail-color);'><use xlink:href='svg/icon.svg#ic_mode_edit'></use></svg></button>";
   for (iSen = 0; iSen < allSen.length; iSen++) {
     senText = getNodeText(allSen[iSen], "text");
     senA = getNodeText(allSen[iSen], "a");
@@ -1231,7 +1231,7 @@ function renderHeadingBlockInner(elementBlock) {
   output +=
     '<button type="button" class="edit_tool imgbutton" onclick="editor_heading_edit(\'' +
     bId +
-    "')\"><svg class='icon'><use xlink:href='svg/icon.svg#ic_mode_edit'></use></svg></button>";
+    "')\"><svg class='icon' style='fill: var(--detail-color);'><use xlink:href='svg/icon.svg#ic_mode_edit'></use></svg></button>";
 
   return output;
 }
@@ -1324,26 +1324,26 @@ function render_sent_tool_bar(elementBlock, begin) {
       iEnd;
   }
   output +=
-    "<span style='flex: 7;'><span style='background-color: silver;'>" +
+    "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" + gLocal.gui.text_num + ">" +
     sentIdString +
-    "<a onclick=\"copy_to_clipboard('" +
+    "</span><button class='icon_btn' onclick=\"copy_to_clipboard('" +
     sentIdStringLink +
     "')\" title=" + gLocal.gui.copy_to_clipboard + ">";
-  output += '<svg style="fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 12px;" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644" width="16" height="16"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
-  output += "</a>";
+  output += '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
+  output += "</button>";
   //	output += "<span>"+abook+"-"+aparagraph+"-"+iBegin+"-"+iEnd+"</span>";
   if (_display_sbs == 0) {
     //逐段模式
     output +=
-      "<a href='../pcdl/reader.php?view=para&book=" +
+      "<button class='icon_btn'  onclick=\"window.open('../pcdl/reader.php?view=para&book=" +
       abook +
       "&para=" +
       aparagraph +
-      "' target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+      "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
   } else {
     //逐句模式
     output +=
-      "<a href='../pcdl/reader.php?view=sent&book=" +
+      "<button class='icon_btn'  onclick=\"window.open('../pcdl/reader.php?view=sent&book=" +
       abook +
       "&para=" +
       aparagraph +
@@ -1351,12 +1351,12 @@ function render_sent_tool_bar(elementBlock, begin) {
       iBegin +
       "&end=" +
       iEnd +
-      "' target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+      "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
   }
-  output += '<svg style="fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 15px;" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291" width="200" height="200"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
-  output += "</a>";
+  output += '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
+  output += "</button>";
   output +=
-    "<span title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
+    "<button class='icon_btn' title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
     abook +
     "','" +
     aparagraph +
@@ -1364,8 +1364,8 @@ function render_sent_tool_bar(elementBlock, begin) {
     iBegin +
     "','" +
     iEnd +
-    "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 15px;" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290" width="16" height="16"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</span>";
-  output += "</span>";
+    "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</button>";
+  output += "</div>";
   output += "<guide gid='sent_func' style='margin:unset;'></guide>";
   output += "</span>";
   output +=
@@ -1624,15 +1624,15 @@ function renderWordParBlockInner(elementBlock) {
           book + "-" + paragraph + "-" + nextBegin + "-" + nextEnd;
         let sentIdStringLink = "{{" + sentIdString + "}}";
         output +=
-          "<span style='flex: 7;'><span style='background-color: silver;'>" +
+          "<span style='flex: 7;display: flex;'><div style='background-color: silver;'><span style='font-size: large; font-weight: bolder;' title=" + gLocal.gui.text_num + ">" +
           sentIdString +
-          "<a onclick=\"copy_to_clipboard('" +
+          "</span><button class='icon_btn' onclick=\"copy_to_clipboard('" +
           sentIdStringLink +
           "')\" title=" + gLocal.gui.copy_to_clipboard + ">";
-        output += '<svg style="fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 12px;" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644" width="16" height="16"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
-        output += "</a>";
+        output += '<svg style="fill: var(--link-color);" t="1601480724259" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4644"><path d="M791.272727 93.090909H139.636364v837.818182a93.090909 93.090909 0 0 1-93.090909-93.090909V93.090909a93.090909 93.090909 0 0 1 93.090909-93.090909h558.545454a93.090909 93.090909 0 0 1 93.090909 93.090909zM232.727273 186.181818h744.727272v837.818182H232.727273V186.181818z" p-id="4645"></path></svg>';
+        output += "</button>";
         output +=
-          "<span title='" + gLocal.gui.scan_in_reader + "'><a href='../pcdl/reader.php?view=sent&book=" +
+          "<button class='icon_btn'  onclick=\"window.open('../pcdl/reader.php?view=sent&book=" +
           book +
           "&para=" +
           paragraph +
@@ -1640,11 +1640,12 @@ function renderWordParBlockInner(elementBlock) {
           nextBegin +
           "&end=" +
           nextEnd +
-          "' target='_blank' >";
-        output += '<svg style="fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 15px;" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291" width="200" height="200"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
-        output += "</a></span>";
+          "')\" target='_blank' title='" + gLocal.gui.scan_in_reader + "'>";
+
+        output += '<svg style="fill: var(--link-color);" t="1601482753387" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="22291"><path d="M703.730499 544.578527a191.730499 191.730499 0 0 1 156.260356 302.806368l122.004508 122.004507a31.955083 31.955083 0 0 1-45.248398 45.184488l-121.940597-121.940598A191.730499 191.730499 0 1 1 703.730499 544.642437z m-6.391017-511.28133c38.857381 0 70.301183 30.67688 70.301183 68.511698v386.912146a255.640665 255.640665 0 1 0-69.022979 503.16474l-563.687667 0.06391c-38.857381 0-70.301183-30.67688-70.301183-68.447788V101.808895C64.628836 63.910166 96.072638 33.233286 134.930019 33.233286h562.409463z m6.391017 575.191496a127.820333 127.820333 0 1 0 0 255.640665 127.820333 127.820333 0 0 0 0-255.640665z m-351.505915 0h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511281h127.820332a31.955083 31.955083 0 0 0 0-63.910166z m0-191.730499h-127.820332a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h127.820332a31.955083 31.955083 0 0 0 0-63.910167z m191.730499-191.730499h-319.550831a31.955083 31.955083 0 0 0-5.751915 63.398885l5.751915 0.511282h319.550831a31.955083 31.955083 0 0 0 0-63.910167z" p-id="22292"></path></svg>';
+        output += "</button>";
         output +=
-          "<span title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
+          "<button class='icon_btn' title='" + gLocal.gui.relational_map + "' class='rel_map' onclick=\"sent_show_rel_map('" +
           book +
           "','" +
           paragraph +
@@ -1652,9 +1653,8 @@ function renderWordParBlockInner(elementBlock) {
           nextBegin +
           "','" +
           nextEnd +
-
-          "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--tool-bg-color);margin: 0 2px;  padding: 0 2px;  height: 15px;" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290" width="16" height="16"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</span>";
-        output += "</span>";
+          "')\">" + '<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' + "</button>";
+        output += "</div>";
         output += "<guide gid='sent_func' style='margin:unset;'></guide>";
         output += "</span>";
         output +=
@@ -1837,8 +1837,16 @@ function render_tran_sent_block(
   if (channal == 0) {
     output += "<span class='author'>" + sender + "</span><span>[滤]</span>";
   } else {
-    output +=
-      "<span><span class='send_status' id='send_" +
+    output += "<span style='width: 100%;display: contents;'>";
+    output += "<span>";
+    let thischannal = channal_getById(channal);
+    if (thischannal) {
+      output += thischannal.name;
+    } else {
+      output += "未知的频道名";
+    }
+    output += "</span>";
+    output += "<span style='margin-left: auto;' class='send_status' id='send_" +
       book +
       "_" +
       para +
@@ -1849,14 +1857,6 @@ function render_tran_sent_block(
       "_" +
       channal +
       "'></span>";
-    output += "<span>";
-    let thischannal = channal_getById(channal);
-    if (thischannal) {
-      output += thischannal.name;
-    } else {
-      output += "未知的频道名";
-    }
-    output += "</span>";
   }
   output += "</span><span></span>";
   output += "</div>";
@@ -1897,7 +1897,7 @@ function render_tran_sent_block(
     if (objSent.text == null || objSent.text == "") {
       output += "<span style='color:gray;'>";
       output +=
-        "<svg class='icon'><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_mode_edit'>";
+        "<svg class='icon' style='fill: var(--detail-color);'><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_mode_edit'>";
       output += "</span>";
     } else {
       output += objSent.text;
@@ -1950,10 +1950,10 @@ function render_tran_sent_block(
       "' >";
     output += objSent.text;
     output += "</textarea>";
-    output += "<div class='trans_text_info'>";
+    output += "<div class='trans_text_info' style='justify-content: flex-end;'>";
     output += "<span></span>";
     output +=
-      "<button onclick=\"trans_text_save('" +
+      "<button class='icon_btn' onclick=\"trans_text_save('" +
       book +
       "','" +
       para +
@@ -1963,9 +1963,10 @@ function render_tran_sent_block(
       end +
       "','" +
       channal +
-      "')\">保存</button>";
+      "')\" title=" + gLocal.gui.draft + ">" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#ic_save"></use></svg>'
+    output += "</button>";
     output +=
-      "<button onclick=\"trans_text_send('" +
+      "<button class='icon_btn' onclick=\"trans_text_send('" +
       book +
       "','" +
       para +
@@ -1975,7 +1976,8 @@ function render_tran_sent_block(
       end +
       "','" +
       channal +
-      "')\">发送</button>";
+      "')\" title=" + gLocal.gui.send + " disabled>" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="svg/icon.svg#send_by_paper_plane"></use></svg>'
+    output += "</button>";
 
     output += "</div>";
     output += "</div>";
@@ -1987,12 +1989,12 @@ function render_tran_sent_block(
       "<span></span>" +
       "<span><span class='tools'>";
 
-    output += "<button>采纳</button>";
+    output += "<button class='icon_btn' title=" + gLocal.gui.accept_copy + ">" + "<svg class='icon' style='fill: var(--link-color); height: 2em; width: 2em; '><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_move_to_inbox'></use></svg>" + "</button>";
 
     if (channal == 0) {
       //百家言 显示更多按钮
       output +=
-        "<button onclick=\"show_tran_net('" +
+        "<button class='icon_btn' onclick=\"show_tran_net('" +
         book +
         "','" +
         para +
@@ -2000,7 +2002,7 @@ function render_tran_sent_block(
         begin +
         "','" +
         end +
-        "')\">更多</button>";
+        "')\" title=" + gLocal.gui.message + ">" + '<svg class="icon" style="fill: var(--link-color); height: 2em; width: 2em;"><use xlink:href="plugin/system_message/icon.svg#icon_message"></use></svg>' + "</button>";
     }
 
     output += "</span><span>" + usent_count + "</span></span>";

Fișier diff suprimat deoarece este prea mare
+ 1 - 1
app/studio/svg/icon.svg


+ 22 - 22
app/usent/usent_ref.js

@@ -1,5 +1,5 @@
 var _usent_buffer = new Array();
-
+var now_time = new Date()
 class USentResult {
   constructor(filter = {}) {
     this.filter = filter;
@@ -31,7 +31,7 @@ class USentResult {
         try {
           let arrSent = JSON.parse(data);
           _usent_buffer = arrSent;
-        } catch (e) {}
+        } catch (e) { }
         break;
       case "":
         break;
@@ -116,16 +116,16 @@ class USentResult {
           for (const oneSent of sendSents) {
             $(
               "#send_" +
-                oneSent.book +
-                "_" +
-                oneSent.paragraph +
-                "_" +
-                oneSent.begin +
-                "_" +
-                oneSent.end +
-                "_" +
-                oneSent.channal
-            ).text("发送中");
+              oneSent.book +
+              "_" +
+              oneSent.paragraph +
+              "_" +
+              oneSent.begin +
+              "_" +
+              oneSent.end +
+              "_" +
+              oneSent.channal
+            ).html("<svg class='icon icon_spin' style='fill: var(--detail-color); '><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#loading'>");
           }
           $.post(
             "../usent/update.php",
@@ -139,16 +139,16 @@ class USentResult {
                 for (const iterator of result.update) {
                   $(
                     "#send_" +
-                      iterator.book +
-                      "_" +
-                      iterator.paragraph +
-                      "_" +
-                      iterator.begin +
-                      "_" +
-                      iterator.end +
-                      "_" +
-                      iterator.channal
-                  ).text("");
+                    iterator.book +
+                    "_" +
+                    iterator.paragraph +
+                    "_" +
+                    iterator.begin +
+                    "_" +
+                    iterator.end +
+                    "_" +
+                    iterator.channal
+                  ).html(now_time.toLocaleTimeString() + "<svg class='icon' style='fill: var(--detail-color);'><use xlink='http://www.w3.org/1999/xlink' href='svg/icon.svg#ic_done'>");
                 }
               }
             }

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff