Procházet zdrojové kódy

Merge pull request #242 from visuddhinanda/master

佛历坐标+优化channal列表
Bhikkhu-Kosalla před 5 roky
rodič
revize
11e7a4ca9f
6 změnil soubory, kde provedl 334 přidání a 130 odebrání
  1. 35 36
      README.md
  2. 271 89
      app/calendar/index.html
  3. 4 3
      app/calendar/index1.html
  4. 6 2
      app/term/note.js
  5. 1 0
      app/term/term.css
  6. 17 0
      database_log

+ 35 - 36
README.md

@@ -12,41 +12,40 @@ cd mint; mkdir tmp; chown -R www:www tmp
 
 ### 工具
 
-
 推荐使用 **VSCode**, 常用插件列表
 
-- [ESLint](https://github.com/Microsoft/vscode-eslint)
-- [Rust(rls)](https://github.com/rust-lang/rls-vscode)
-- [Icons](https://github.com/vscode-icons/vscode-icons)
-- [OneDark Pro](https://github.com/Binaryify/OneDark-Pro)
-- [Better Toml](https://github.com/bungcip/better-toml)
-- [Prettier - Code formatter](https://github.com/prettier/prettier-vscode)
-- [SQL Formatter](https://github.com/kufii/vscode-sql-formatter)
+-   [ESLint](https://github.com/Microsoft/vscode-eslint)
+-   [Rust(rls)](https://github.com/rust-lang/rls-vscode)
+-   [Icons](https://github.com/vscode-icons/vscode-icons)
+-   [OneDark Pro](https://github.com/Binaryify/OneDark-Pro)
+-   [Better Toml](https://github.com/bungcip/better-toml)
+-   [Prettier - Code formatter](https://github.com/prettier/prettier-vscode)
+-   [SQL Formatter](https://github.com/kufii/vscode-sql-formatter)
 
 ### Git commit message 规范
 
-- 遵循 git pull request 流程
-- 所有代码必须经过格式化
-- 禁止提交测试中间数据、key、db 等文件
-- Git commit message 格式
-  - 每条 message 不超过一行
-  - 每个 commit 应该是独立的一个 issue 任务
-  - message 格式 `:code: message body`
-  - code 定义
-    - bug fix: `:bug:`
-    - new feature: `:construction:`
-    - document: `:pencil:`
-    - ops: `:rocket:`
-    - config file: `:wrench:`
-    - test case: `::white_check_mark:`
+-   遵循 git pull request 流程
+-   所有代码必须经过格式化
+-   禁止提交测试中间数据、key、db 等文件
+-   Git commit message 格式
+    -   每条 message 不超过一行
+    -   每个 commit 应该是独立的一个 issue 任务
+    -   message 格式 `:code: message body`
+    -   code 定义
+        -   bug fix: `:bug:`
+        -   new feature: `:construction:`
+        -   document: `:pencil:`
+        -   ops: `:rocket:`
+        -   config file: `:wrench:`
+        -   test case: `::white_check_mark:`
 
 ### 资源格式
 
-- 文字统一使用**markdown**格式
-- 图片
-  - 尽量使用**png**格式
-  - 如果是 svg 或 graphiz 绘图,**附带源代码**
-  - **禁止**使用未经授权的图片
+-   文字统一使用**markdown**格式
+-   图片
+    -   尽量使用**png**格式
+    -   如果是 svg 或 graphiz 绘图,**附带源代码**
+    -   **禁止**使用未经授权的图片
 
 ## 部署
 
@@ -59,18 +58,18 @@ $ RUST_LOG=info axis -i staging -r deploy
 
 ### 后端
 
-- [MinIO is a high performance object storage server compatible with Amazon S3 APIs](https://github.com/minio/minio)
-- [Diesel: A safe, extensible ORM and Query Builder for Rust](https://github.com/diesel-rs/diesel)
-- [Actix web is a small, pragmatic, and extremely fast rust web framework](https://github.com/actix/actix-web)
+-   [MinIO is a high performance object storage server compatible with Amazon S3 APIs](https://github.com/minio/minio)
+-   [Diesel: A safe, extensible ORM and Query Builder for Rust](https://github.com/diesel-rs/diesel)
+-   [Actix web is a small, pragmatic, and extremely fast rust web framework](https://github.com/actix/actix-web)
 
 ### 前端
 
-- [Pluggable enterprise-level react application framework](https://umijs.org/)
-- [Ant Desigh Pro](https://pro.ant.design/docs/getting-started)
-- [Third-Party Libraries](https://ant.design/docs/react/recommendation)
+-   [Pluggable enterprise-level react application framework](https://umijs.org/)
+-   [Ant Desigh Pro](https://pro.ant.design/docs/getting-started)
+-   [Third-Party Libraries](https://ant.design/docs/react/recommendation)
 
 ### Git
 
-- [About git pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
-- [how to write a git commit message:](https://chris.beams.io/posts/git-commit/)
-- [An emoji guide for your commit messages](https://gitmoji.carloscuesta.me/)
+-   [About git pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
+-   [how to write a git commit message:](https://chris.beams.io/posts/git-commit/)
+-   [An emoji guide for your commit messages](https://gitmoji.carloscuesta.me/)

+ 271 - 89
app/calendar/index.html

@@ -19,16 +19,7 @@
 		<!--获取语言-->
 
 		<script>
-			var g_language = "en";
-			var g_currLink = "";
-			function lang_init(strPage) {
-				g_currLink = strPage;
-			}
-			function setLang(strLang) {
-				g_language = strLang;
-				setCookie("language", g_language, 365);
-				window.location.assign(location.pathname + "?language=" + g_language);
-			}
+			var g_language = getCookie("language");
 		</script>
 		<script>
 			var localString = new Array();
@@ -90,6 +81,11 @@
 				local: "本地",
 				loading: "载入中",
 				sun_set: "日落",
+				unknown: "未知",
+				altitude: "海拔",
+				today: "今天",
+				week: "周",
+				list: "列表",
 			};
 			localString["zh-tw"] = {
 				and_another: "又 ",
@@ -149,6 +145,11 @@
 				local: "本地",
 				loading: "載入中",
 				sun_set: "日落",
+				unknown: "未知",
+				altitude: "海拔",
+				today: "今天",
+				week: "周",
+				list: "列表",
 			};
 			localString["default"] = {
 				and_another: " and ",
@@ -208,6 +209,11 @@
 				local: "local",
 				loading: "loading",
 				sun_set: "sunset",
+				unknown: "unknown",
+				altitude: "Altitude",
+				today: "today",
+				week: "week",
+				list: "list",
 			};
 			localString["en"] = {
 				and_another: " and ",
@@ -267,6 +273,11 @@
 				local: "local",
 				loading: "loading",
 				sun_set: "sunset",
+				unknown: "unknown",
+				altitude: "Altitude",
+				today: "today",
+				week: "week",
+				list: "list",
 			};
 			localString["my"] = {
 				and_another: " and ",
@@ -326,6 +337,11 @@
 				local: "local",
 				loading: "loading",
 				sun_set: "sunset",
+				unknown: "unknown",
+				altitude: "Altitude",
+				today: "today",
+				week: "week",
+				list: "list",
 			};
 			localString["si"] = {
 				and_another: " ච ",
@@ -385,6 +401,11 @@
 				local: "local",
 				loading: "loading",
 				sun_set: "sunset",
+				unknown: "unknown",
+				altitude: "Altitude",
+				today: "today",
+				week: "week",
+				list: "list",
 			};
 			var pali_month_name = [
 				{ id: "1", value: "jeṭṭha", season: "gimhāna", season_icon: "☀" }, //5.X-四-十五-心
@@ -468,18 +489,35 @@
 				g_coordinate_this.AT = curr_position.split("#")[0];
 				g_coordinate_this.LT = curr_position.split("#")[1];
 				g_coordinate_this.height = curr_position.split("#")[2];
+				var AT_string =
+					angle_trans(g_coordinate_this.AT)[0] +
+					"°" +
+					angle_trans(g_coordinate_this.AT)[1] +
+					"’" +
+					angle_trans(g_coordinate_this.AT)[2] +
+					"”";
 				if (g_coordinate_this.AT >= 0) {
-					var AT_string = angle_trans(g_coordinate_this.AT) + "N";
+					AT_string += "N";
 				} else {
-					var AT_string = angle_trans(g_coordinate_this.AT) + "S";
+					AT_string += "S";
 				}
+				var LT_string =
+					angle_trans(g_coordinate_this.LT)[0] +
+					"°" +
+					angle_trans(g_coordinate_this.LT)[1] +
+					"’" +
+					angle_trans(g_coordinate_this.LT)[2] +
+					"”";
 				if (g_coordinate_this.LT >= 0) {
-					var LT_string = angle_trans(g_coordinate_this.LT) + "E";
+					LT_string += "E";
+				} else {
+					LT_string += "W";
+				}
+				if (g_coordinate_this.height != "null") {
+					var height_string = g_coordinate_this.height + "M";
 				} else {
-					var LT_string = angle_trans(g_coordinate_this.LT) + "W";
+					var height_string = localString[g_language].unknown;
 				}
-				let height_string = g_coordinate_this.height + "M";
-				$("#selected_position_string").html(AT_string + " " + LT_string + " " + height_string);
 			} else {
 				getLocation();
 			}
@@ -509,41 +547,6 @@
 				sun_position = SunCalc.getPosition(today, g_coordinate_this.AT, g_coordinate_this.LT);
 				moon_position = SunCalc.getMoonPosition(today, g_coordinate_this.AT, g_coordinate_this.LT);
 				moon_Illumination = SunCalc.getMoonIllumination(today);
-				$("#today_dawn").html(sun_times.dawn.toLocaleTimeString()); //破晓
-				$("#today_solarNoon").html(sun_times.solarNoon.toLocaleTimeString()); //正午
-				$("#today_sunset").html(sun_times.sunset.toLocaleTimeString()); //日落
-				$("#today_sun_azimuth").html(angle_trans((sun_position.azimuth / Math.PI) * 180)); //太阳水平弧度
-				$("#today_moon_azimuth").html(angle_trans((moon_position.azimuth / Math.PI) * 180)); //月亮水平弧度
-				$("#today_moon_phase").html(phase(today).phase); //月相值
-				$("#today_moon_percent").html(phase(today).illuminated); //月照度
-				$("#today_moon_angle").html(angle_trans((moon_Illumination.angle / Math.PI) * 180)); //月相角
-				$("#angle_sun_e_moon").html(
-					angle_trans((Math.abs(Math.PI + sun_position.azimuth - moon_position.azimuth) / Math.PI) * 180)
-				); //月亮水平弧度
-				$("#curr_time").html(today.toLocaleTimeString()); //当前时间
-				$("#now_time").html(g_now_date.toLocaleTimeString()); //现在
-				$("#curr_time_unix").html(today.getTime()); //時間戳
-
-				let earth_angle_string = "";
-				earth_angle_string += get_position(today).solar_position_angle + "——";
-				earth_angle_string += get_position(today).solar_position_angle_round + "——";
-				earth_angle_string += get_position(today).solar_station + "——";
-				earth_angle_string += get_station_name(today).solar.icon;
-				$("#earth_angle").html(earth_angle_string); //地球角度
-
-				let moon_angle_string = "";
-				moon_angle_string += get_position(today).lunar_position_angle + "——";
-				moon_angle_string += get_position(today).lunar_position_angle_round + "——";
-				moon_angle_string += get_position(today).lunar_station + "——";
-				moon_angle_string += get_station_name(today).lunar.value;
-				$("#moon_angle").html(moon_angle_string); //月亮角度——角度差算法
-
-				let moon_angle_string2 = "";
-				moon_angle_string2 += get_position(today).lunar_position_angle2 + "——";
-				moon_angle_string2 += get_position(today).lunar_position_angle_round2 + "——";
-				moon_angle_string2 += get_position(today).lunar_station2 + "——";
-				moon_angle_string2 += get_station_name(today).lunar.value;
-				$("#moon_angle2").html(moon_angle_string2); //月亮角度——向量差算法
 			}
 			//根据时间计算偏角,输出
 			function get_position(date_time) {
@@ -623,12 +626,8 @@
 					$("#selected_position_string").html("Geolocation is not supported by this browser.");
 				}
 			}
-			function showPosition(position) {
-				alert("get cordinate success");
-				g_coordinate_this.AT = position.coords.latitude; //纬度
-				g_coordinate_this.LT = position.coords.longitude; //经度
-				g_coordinate_this.height = position.coords.altitude; //海拔高度
-				/*/手动输入
+			function position_input() {
+				//手动输入
 				var LT = Number($("#LT_°")[0].value);
 				LT += Number($("#LT_’")[0].value) / 60;
 				LT += Number($("#LT_”")[0].value) / 3600;
@@ -640,25 +639,7 @@
 				if (AT != 0) {
 					g_coordinate_this.LT = LT;
 					g_coordinate_this.AT = AT;
-				}*/
-
-				let position_string =
-					g_coordinate_this.AT + "#" + g_coordinate_this.LT + "#" + g_coordinate_this.height;
-				localStorage.setItem("local_position", position_string);
-
-				if (g_coordinate_this.AT >= 0) {
-					var AT_string = angle_trans(g_coordinate_this.AT) + "N";
-				} else {
-					var AT_string = angle_trans(g_coordinate_this.AT) + "S";
 				}
-				if (g_coordinate_this.LT >= 0) {
-					var LT_string = angle_trans(g_coordinate_this.LT) + "E";
-				} else {
-					var LT_string = angle_trans(g_coordinate_this.LT) + "W";
-				}
-				let height_string = g_coordinate_this.height + "M";
-				$("#selected_position_string").html(AT_string + " " + LT_string + " " + height_string);
-				$("#position_input").hide();
 			}
 			function showError(error) {
 				switch (error.code) {
@@ -677,19 +658,14 @@
 				}
 			}
 			function angle_trans(angle) {
-				var angle_str = "";
+				var angle_str = new Array();
 				var num_d = Math.floor(angle);
 				var num_m = Math.floor((angle - num_d) * 60);
 				var num_s = Math.round((angle - num_d) * 60 - num_m);
-				if (num_d != 0) {
-					angle_str += num_d + "°";
-				}
-				if (num_m != 0) {
-					angle_str += num_m + "’";
-				}
-				if (num_s != 0) {
-					angle_str += num_s + "”";
-				}
+				angle_str.push(num_d);
+				angle_str.push(num_m);
+				angle_str.push(num_s);
+
 				return angle_str;
 			}
 			function input_position() {
@@ -812,6 +788,7 @@
 					dayMaxEvents: true, // allow "more" link when too many events
 					//resources: g_event_list_arr,
 					events: g_event_list_arr,
+					defaultTimedEventDuration: "00:01",
 					eventClick: function (info) {
 						info.jsEvent.preventDefault(); // don't let the browser navigate
 
@@ -819,7 +796,6 @@
 							window.open(info.event.url);
 						}
 					},
-
 					loading: function (bool) {
 						if (bool) {
 							loadingEl.style.display = "inline"; // show
@@ -829,7 +805,6 @@
 					},
 
 					eventTimeFormat: { hour: "numeric", minute: "2-digit" },
-
 					dateClick: function (arg) {
 						console.log("dateClick", calendar.formatIso(arg.date));
 					},
@@ -839,7 +814,6 @@
 				});
 
 				calendar.render();
-
 				// load the list of available timezones, build the <select> options
 				// it's HIGHLY recommended to use a different library for network requests, not this internal util func
 				FullCalendar.requestJson(
@@ -913,6 +887,9 @@
 			.tzo {
 				color: #000;
 			}
+			input[type="number" i] {
+				width: 2.5em;
+			}
 		</style>
 	</head>
 	<body>
@@ -930,7 +907,66 @@
 					<option value="UTC">UTC</option>
 				</select>
 			</div>
-
+			<div style="display: inline-block; width: 50%; justify-content: center; margin-left: 20%">
+				<div style="line-height: 2em; margin-top: 7px">
+					<script>
+						document.write(localString[g_language].atitude);
+					</script>
+					<span id="AT_str" onclick="show_ele(this)"></span>
+					<span class="coordinate_input" style="flex: 7; white-space: nowrap; display: none">
+						<input id="AT_°" type="number" min="0" max="89" /> °
+						<input id="AT_’" type="number" min="0" max="59" /> ’
+						<input id="AT_”" type="number" min="0" max="59" /> ”
+						<select id="NS">
+							<option value="+">N</option>
+							<option value="-">S</option>
+						</select>
+						<button onclick="show_ele('#AT_str')">
+							<script>
+								document.write(localString[g_language].confirm);
+							</script>
+						</button>
+					</span>
+				</div>
+				<div style="line-height: 2em">
+					<script>
+						document.write(localString[g_language].longitude);
+					</script>
+					<span id="LT_str" onclick="show_ele(this)"></span>
+					<span
+						class="coordinate_input"
+						onblur="show_ele(this)"
+						style="flex: 7; white-space: nowrap; display: none"
+					>
+						<input id="LT_°" type="number" min="0" max="179" style="width: 3em" /> °
+						<input id="LT_’" type="number" min="0" max="59" /> ’
+						<input id="LT_”" type="number" min="0" max="59" /> ”
+						<select id="WE">
+							<option value="+">E</option>
+							<option value="-">W</option>
+						</select>
+						<button onclick="show_ele('#LT_str')">
+							<script>
+								document.write(localString[g_language].confirm);
+							</script>
+						</button>
+					</span>
+				</div>
+				<div style="line-height: 2em">
+					<script>
+						document.write(localString[g_language].altitude);
+					</script>
+					<span id="altitude_string" onclick="show_ele(this)"></span>
+					<span class="coordinate_input" style="flex: 7; white-space: nowrap; display: none">
+						<input id="HT_M" type="number" min="0" max="19999" style="width: 4em" /> M
+						<button onclick="show_ele('#altitude_string')">
+							<script>
+								document.write(localString[g_language].confirm);
+							</script>
+						</button>
+					</span>
+				</div>
+			</div>
 			<div class="right">
 				<span id="loading">
 					<script>
@@ -945,4 +981,150 @@
 
 		<div id="calendar"></div>
 	</body>
+	<script>
+		function position_modify() {
+			var LT = Number($("#LT_°")[0].value);
+			LT += Number($("#LT_’")[0].value) / 60;
+			LT += Number($("#LT_”")[0].value) / 3600;
+			LT = Number($("#WE")[0].value + LT);
+			var AT = Number($("#AT_°")[0].value);
+			AT += Number($("#AT_’")[0].value) / 60;
+			AT += Number($("#AT_”")[0].value) / 3600;
+			AT = Number($("#NS")[0].value + AT);
+			if (AT != 0) {
+				g_coordinate_this.LT = LT;
+				g_coordinate_this.AT = AT;
+			}
+			//将新的坐标数据存到localStorage
+			let position_string = g_coordinate_this.AT + "#" + g_coordinate_this.LT + "#" + g_coordinate_this.height;
+			localStorage.setItem("local_position", position_string);
+		}
+		function position_modify_confirm(obj) {
+			position_modify();
+
+			show_ele(obj);
+		}
+		function show_ele(obj) {
+			if ($(obj).siblings("span").css("display") == "none") {
+				$(obj).hide();
+				$(obj).siblings("span").show();
+			} else {
+				$(obj).show();
+				$(obj).siblings("span").hide();
+			}
+		}
+		function getLocation() {
+			//自动定位
+			if (navigator.geolocation) {
+				navigator.geolocation.getCurrentPosition(showPosition, showError);
+			} else {
+				$("#selected_position_string").html("Geolocation is not supported by this browser.");
+			}
+		}
+		function position_input() {
+			//手动输入
+			var LT = Number($("#LT_°")[0].value);
+			LT += Number($("#LT_’")[0].value) / 60;
+			LT += Number($("#LT_”")[0].value) / 3600;
+			LT = Number($("#WE")[0].value + LT);
+			var AT = Number($("#AT_°")[0].value);
+			AT += Number($("#AT_’")[0].value) / 60;
+			AT += Number($("#AT_”")[0].value) / 3600;
+			AT = Number($("#NS")[0].value + AT);
+			if (AT != 0) {
+				g_coordinate_this.LT = LT;
+				g_coordinate_this.AT = AT;
+			}
+		}
+		function showError(error) {
+			switch (error.code) {
+				case error.PERMISSION_DENIED:
+					alert("定位失败,用户拒绝请求地理定位");
+					break;
+				case error.POSITION_UNAVAILABLE:
+					alert("定位失败,位置信息是不可用");
+					break;
+				case error.TIMEOUT:
+					alert("定位失败,请求获取用户位置超时");
+					break;
+				case error.UNKNOWN_ERROR:
+					alert("定位失败,定位系统失效");
+					break;
+			}
+		}
+
+		$("#AT_str").html(AT_string);
+		$("#LT_str").html(LT_string);
+		$("#altitude_string").html(height_string);
+		$("#AT_°")[0].value = angle_trans(g_coordinate_this.AT)[0];
+		$("#AT_’")[0].value = angle_trans(g_coordinate_this.AT)[1];
+		$("#AT_”")[0].value = angle_trans(g_coordinate_this.AT)[2];
+		$("#LT_°")[0].value = angle_trans(g_coordinate_this.LT)[0];
+		$("#LT_’")[0].value = angle_trans(g_coordinate_this.LT)[1];
+		$("#LT_”")[0].value = angle_trans(g_coordinate_this.LT)[2];
+		$("#HT_M")[0].value = g_coordinate_this.height;
+
+		$(document).ready(function () {
+			$("button").each(function () {
+				if ($(this).html() == "today") {
+					$(this).html(localString[g_language].today);
+				}
+				if ($(this).html() == "list") {
+					$(this).html(localString[g_language].list);
+				}
+				if ($(this).html() == "week") {
+					$(this).html(localString[g_language].week);
+				}
+				if ($(this).html() == "month") {
+					$(this).html(localString[g_language].month);
+				}
+				if ($(this).html() == "day") {
+					$(this).html(localString[g_language].day);
+				}
+			});
+		});
+		$(document).ready(function () {
+			$("button").click(function () {
+				$("button").each(function () {
+					if ($(this).html().indexOf("today") != -1) {
+						$(this).html(localString[g_language].today);
+					}
+					if ($(this).html().indexOf("list") != -1) {
+						$(this).html(localString[g_language].list);
+					}
+					if ($(this).html().indexOf("week") != -1) {
+						$(this).html(localString[g_language].week);
+					}
+					if ($(this).html().indexOf("month") != -1) {
+						$(this).html(localString[g_language].month);
+					}
+					if ($(this).html().indexOf("day") != -1 && $(this).html().indexOf("today") == -1) {
+						$(this).html(localString[g_language].day);
+					}
+				});
+			});
+		});
+
+		$(document).ready(function () {
+			$("div").click(function () {
+				$("button").each(function () {
+					if ($(this).html().indexOf("today") != -1) {
+						$(this).html(localString[g_language].today);
+					}
+					if ($(this).html().indexOf("list") != -1) {
+						$(this).html(localString[g_language].list);
+					}
+					if ($(this).html().indexOf("week") != -1) {
+						$(this).html(localString[g_language].week);
+					}
+					if ($(this).html().indexOf("month") != -1) {
+						$(this).html(localString[g_language].month);
+					}
+					if ($(this).html().indexOf("day") != -1 && $(this).html().indexOf("today") == -1) {
+						$(this).html(localString[g_language].day);
+					}
+				});
+			});
+		});
+	</script>
 </html>

+ 4 - 3
app/calendar/index1.html

@@ -518,15 +518,16 @@
 						<script>
 							document.write(localString[g_language].atitude);
 						</script></span
-					><span style="flex: 7; white-space: nowrap">
+					>
+					<span style="flex: 7; white-space: nowrap">
 						<input id="AT_°" type="number" min="0" max="90" /> °
 						<input id="AT_’" type="number" min="0" max="60" /> ’
 						<input id="AT_”" type="number" min="0" max="60" /> ”
 						<select id="NS">
 							<option value="+">N</option>
 							<option value="-">S</option>
-						</select></span
-					>
+						</select>
+					</span>
 				</div>
 				<div style="display: flex">
 					<span style="flex: 3; justify-content: flex-end; display: flex; margin: auto 1em auto 0"

+ 6 - 2
app/term/note.js

@@ -632,7 +632,7 @@ function add_new_tran_button_click(obj) {
 				$(obj).parent().attr("end") +
 				"' ,'" +
 				iterator.id +
-				"')";
+				"',this)";
 			html += '">' + iterator.name + "</li>";
 		}
 	}
@@ -646,7 +646,7 @@ function add_new_tran_button_click(obj) {
 	}
 }
 
-function new_sentence(book, para, begin, end, channel) {
+function new_sentence(book, para, begin, end, channel, obj) {
 	let newsent = { id: "", text: "", lang: "", channal: channel };
 
 	for (let iterator of _arrData) {
@@ -663,6 +663,10 @@ function new_sentence(book, para, begin, end, channel) {
 			}
 		}
 	}
+	if ($(obj).parent().parent().css("display") == "block") {
+		$(obj).parent().parent().hide();
+	}
+
 	note_edit_sentence(book, para, begin, end, channel);
 }
 

+ 1 - 0
app/term/term.css

@@ -223,6 +223,7 @@ note > .tran .tran_text_tool_bar::after,
 .tran_text_tool_bar li {
 	list-style: none;
 	display: flex;
+	white-space: nowrap;
 }
 .tran_text_tool_bar .icon {
 	margin: auto 0.4em auto 0;

+ 17 - 0
database_log

@@ -0,0 +1,17 @@
+# 数据库更改日志
+
+## 2020/12/20
+
+### 路径与文件名
+
+/../tmp/appdata/palicanon/pali_sent_sim.db3
+
+### 数据结构
+
+```
+CREATE TABLE pali_sent_sim (
+    id        INTEGER PRIMARY KEY,
+    sim_sents TEXT
+);
+
+```