Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-07-05 00:51:23 +08:00
commit e17a9d1ee4
8 changed files with 16 additions and 5 deletions

View file

@ -1,4 +1,6 @@
{
"asc": "Ascending",
"desc": "Descending",
"hideCol": "Hide column",
"hideAll": "Hide all",
"showAll": "Show all",

View file

@ -1,4 +1,6 @@
{
"asc": "Ascendente",
"desc": "Descendente",
"hideCol": "Ocultar columna",
"hideAll": "Ocultar todo",
"showAll": "Mostrar todo",

View file

@ -1,4 +1,6 @@
{
"asc": "Ascendant",
"desc": "Descendant",
"hideCol": "Masquer la colonne",
"hideAll": "Masquer tout",
"showAll": "Afficher tout",

View file

@ -1,4 +1,6 @@
{
"asc": "升序",
"desc": "降序",
"hideCol": "隱藏列",
"hideAll": "隱藏全部",
"showAll": "顯示全部",

View file

@ -1,4 +1,6 @@
{
"asc": "升序",
"desc": "降序",
"hideCol": "隐藏列",
"hideAll": "隐藏全部",
"showAll": "显示全部",

View file

@ -126,7 +126,7 @@ export const showHeaderCellMenu = (protyle: IProtyle, blockElement: HTMLElement,
menu.addSeparator();
menu.addItem({
icon: "iconUp",
label: window.siyuan.languages.fileNameNatASC,
label: window.siyuan.languages.asc,
click() {
fetchPost("/api/av/renderAttributeView", {id: avId}, (response) => {
transaction(protyle, [{
@ -150,7 +150,7 @@ export const showHeaderCellMenu = (protyle: IProtyle, blockElement: HTMLElement,
});
menu.addItem({
icon: "iconDown",
label: window.siyuan.languages.fileNameNatDESC,
label: window.siyuan.languages.desc,
click() {
fetchPost("/api/av/renderAttributeView", {id: avId}, (response) => {
transaction(protyle, [{

View file

@ -300,8 +300,8 @@ const getSortsHTML = (data: IAV) => {
</select>
<span class="fn__space"></span>
<select class="b3-select" style="width: 106px;margin: 4px 0">
<option value="ASC" ${item.order === "ASC" ? "selected" : ""}>${window.siyuan.languages.fileNameNatASC}</option>
<option value="DESC" ${item.order === "DESC" ? "selected" : ""}>${window.siyuan.languages.fileNameNatDESC}</option>
<option value="ASC" ${item.order === "ASC" ? "selected" : ""}>${window.siyuan.languages.asc}</option>
<option value="DESC" ${item.order === "DESC" ? "selected" : ""}>${window.siyuan.languages.desc}</option>
</select>
<svg class="b3-menu__action" data-type="removeSort"><use xlink:href="#iconTrashcan"></use></svg>
</button>`;

View file

@ -37,9 +37,10 @@ func InsertElem[T any](ret []T, index int, value T) []T {
}
func EscapeHTML(s string) string {
if strings.Contains(s, "&amp;") {
if strings.Contains(s, "&amp;") || strings.Contains(s, "&quot;") || strings.Contains(s, "&lt;") || strings.Contains(s, "&gt;") || strings.Contains(s, "&#39;") || strings.Contains(s, "&apos;") {
return s
}
if strings.ContainsAny(s, "<>\"'") {
return html.EscapeString(s)
}