Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Dec 8, 2024
2 parents 4d32146 + 67f64f7 commit 57d521c
Show file tree
Hide file tree
Showing 22 changed files with 70 additions and 72 deletions.
3 changes: 1 addition & 2 deletions app/appearance/langs/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Blockzitat",
"export2": "Ankertext mit Block-URL",
"export3": "Nur Ankertext",
"export4": "Fußnoten",
"export4": "Fußnoten+Ankerhash",
"export5": "PDF-Annotation Referenz",
"export6": "Über die Verarbeitung von Ankertext in PDF-Annotationen beim Exportieren",
"export7": "Dateiname - Seitennummer - Ankertext",
"export8": "Nur Ankertext",
"export9": "Ankerhash",
"graphConfig2": "Referenzanzahlfilter",
"selectOpen": "Immer geöffnetes Dokument auswählen",
"selectOpen1": "Ausgewähltes geöffnetes Dokument",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Blockquote",
"export2": "Anchor text with block URL",
"export3": "Just anchor text",
"export4": "Footnotes",
"export4": "Footnotes+Anchor hash",
"export5": "PDF Annotation Ref",
"export6": "About the handling of anchor text in PDF annotations when exporting",
"export7": "File Name - Page Number - Anchor Text",
"export8": "Just anchor text",
"export9": "Anchor hash",
"graphConfig2": "Reference Count filter",
"selectOpen": "Always Select Opened Doc",
"selectOpen1": "Select Opened Doc",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Bloque de cita",
"export2": "Texto de anclaje con URL de bloque",
"export3": "Sólo texto de anclaje",
"export4": "Notas a pie de página",
"export4": "Notas a pie de página+Hash de anclaje",
"export5": "Ref. de anotación en PDF",
"export6": "Sobre el manejo del texto ancla en las anotaciones PDF al exportar",
"export7": "Nombre de archivo - Número de página - Texto ancla",
"export8": "Sólo texto ancla",
"export9": "Hash de anclaje",
"graphConfig2": "Filtro de recuento de referencias",
"selectOpen": "Seleccionar siempre el documento abierto",
"selectOpen1": "Seleccionar documento abierto",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Citation de bloc",
"export2": "Texte d'ancrage avec bloc URL",
"export3": "Juste du texte d'ancrage",
"export4": "Notes de bas de page",
"export4": "Notes de bas de page+Hash d'ancrage",
"export5": "Référence d'annotation PDF",
"export6": "À propos de la gestion du texte d'ancrage dans les annotations PDF lors de l'exportation",
"export7": "Nom de fichier - Numéro de page - Texte d'ancrage",
"export8": "Anchor text only",
"export9": "Hash d'ancrage",
"graphConfig2": "Filtre de compte de blocs de référence",
"selectOpen": "Localisez toujours les documents ouverts",
"selectOpen1": "Localiser les documents ouverts",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/he_IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "ציטוט",
"export2": "טקסט עוגן עם קישור בלוק",
"export3": "רק טקסט עוגן",
"export4": "הערות שוליים",
"export4": "ההאש של העוגן+הערות שוליים",
"export5": "הערות PDF",
"export6": "על טיפולי טקסט עוגן בהערות PDF בעת הייצוא",
"export7": "שם הקובץ - מספר עמוד - טקסט עוגן",
"export8": "רק טקסט עוגן",
"export9": "ההאש של העוגן",
"graphConfig2": "מסנן ספירת הפניות",
"selectOpen": "בחר תמיד את המסמך הפתוח",
"selectOpen1": "בחר את המסמך הפתוח",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Citazione",
"export2": "Testo dell'ancora con URL del blocco",
"export3": "Solo testo dell'ancora",
"export4": "Note a piè di pagina",
"export4": "Note a piè di pagina+Hash dell'ancora",
"export5": "Riferimento annotazione PDF",
"export6": "Riguardo alla gestione del testo dell'ancora nelle annotazioni PDF durante l'esportazione",
"export7": "Nome file - Numero pagina - Testo dell'ancora",
"export8": "Solo testo dell'ancora",
"export9": "Hash dell'ancora",
"graphConfig2": "Filtro Conteggio Riferimenti",
"selectOpen": "Seleziona sempre il documento aperto",
"selectOpen1": "Seleziona Documento Aperto",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "ブロック参照",
"export2": "ブロック URL 付きアンカーテキスト",
"export3": "アンカーテキストのみ",
"export4": "脚注",
"export4": "脚注+アンカーハッシュ",
"export5": "PDF 注釈の参照",
"export6": "エクスポート時の PDF 注釈内のアンカーテキストの処理方法",
"export7": "ファイル名 - ページ番号 - アンカーテキスト",
"export8": "アンカーテキストのみ",
"export9": "アンカーハッシュ",
"graphConfig2": "参照カウントフィルタ",
"selectOpen": "常に開いているドキュメントを選択",
"selectOpen1": "開いているドキュメントをツリーで選択",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Cytat",
"export2": "Tekst kotwicy z URL bloku",
"export3": "Tylko tekst kotwicy",
"export4": "Przypisy",
"export4": "Przypisy+Hash kotwicy",
"export5": "Odnośnik do adnotacji PDF",
"export6": "O sposobie obsługi tekstu kotwicy w adnotacjach PDF podczas eksportu",
"export7": "Nazwa pliku - Numer strony - Tekst kotwicy",
"export8": "Tylko tekst kotwicy",
"export9": "Hash kotwicy",
"graphConfig2": "Filtr liczby odniesień",
"selectOpen": "Zawsze wybieraj otwarty dokument",
"selectOpen1": "Wybierz otwarty dokument",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "Цитата",
"export2": "Текст якоря с URL блока",
"export3": "Просто текст якоря",
"export4": "Подписи",
"export4": "Подписи+Якорь хэш",
"export5": "PDF аннотация ссылка",
"export6": "О том, как обрабатывать текст якоря в PDF аннотациях при экспорте",
"export7": "Имя файла - Номер страницы - Текст якоря",
"export8": "Просто текст якоря",
"export9": "Якорь хэш",
"graphConfig2": "Фильтр по количеству ссылок",
"selectOpen": "Всегда выбирать открытый документ",
"selectOpen1": "Выбрать открытый документ",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "引述塊",
"export2": "錨文字塊鏈",
"export3": "僅錨文字",
"export4": "註腳",
"export4": "註腳+錨點哈希",
"export5": "PDF 標註引用",
"export6": "導出時關於 PDF 標註引出處錨文字的處理方式",
"export7": "文件名 - 頁碼 - 錨文字",
"export8": "僅錨文字",
"export9": "錨點哈希",
"graphConfig2": "引用塊次數過濾",
"selectOpen": "定位打開的文檔",
"selectOpen1": "定位打開的文檔",
Expand Down
3 changes: 1 addition & 2 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1110,12 +1110,11 @@
"export1": "引述块",
"export2": "锚文本块链",
"export3": "仅锚文本",
"export4": "脚注",
"export4": "脚注+锚点哈希",
"export5": "PDF 标注引用",
"export6": "导出时关于 PDF 标注引出处锚文本的处理方式",
"export7": "文件名 - 页码 - 锚文本",
"export8": "仅锚文本",
"export9": "锚点哈希",
"graphConfig2": "引用块次数过滤",
"selectOpen": "始终定位打开的文档",
"selectOpen1": "定位打开的文档",
Expand Down
1 change: 0 additions & 1 deletion app/src/config/exportConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const exportConfig = {
<option value="2" ${window.siyuan.config.export.blockRefMode === 2 ? "selected" : ""}>${window.siyuan.languages.export2}</option>
<option value="3" ${window.siyuan.config.export.blockRefMode === 3 ? "selected" : ""}>${window.siyuan.languages.export3}</option>
<option value="4" ${window.siyuan.config.export.blockRefMode === 4 ? "selected" : ""}>${window.siyuan.languages.export4}</option>
<option value="5" ${window.siyuan.config.export.blockRefMode === 5 ? "selected" : ""}>${window.siyuan.languages.export9}</option>
</select>
</div>
<div class="fn__flex b3-label config__item">
Expand Down
1 change: 1 addition & 0 deletions kernel/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func ServeAPI(ginServer *gin.Engine) {
ginServer.Handle("POST", "/api/system/exportConf", model.CheckAuth, model.CheckAdminRole, exportConf)
ginServer.Handle("POST", "/api/system/importConf", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, importConf)
ginServer.Handle("POST", "/api/system/getWorkspaceInfo", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, getWorkspaceInfo)
ginServer.Handle("POST", "/api/system/reloadUI", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, reloadUI)

ginServer.Handle("POST", "/api/storage/setLocalStorage", model.CheckAuth, model.CheckAdminRole, model.CheckReadonly, setLocalStorage)
ginServer.Handle("POST", "/api/storage/getLocalStorage", model.CheckAuth, getLocalStorage)
Expand Down
7 changes: 7 additions & 0 deletions kernel/api/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)

func reloadUI(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)

util.ReloadUI()
}

func getWorkspaceInfo(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
Expand Down
6 changes: 3 additions & 3 deletions kernel/conf/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ type Export struct {
// 内容块引用导出模式
// 2:锚文本块链
// 3:仅锚文本
// 4:块引转脚注
// 5:锚点哈希 https://github.com/siyuan-note/siyuan/issues/10265
// (0:使用原始文本,1:使用 Blockquote。0 和 1 都已经废弃 https://github.com/siyuan-note/siyuan/issues/3155)
// 4:块引转脚注+锚点哈希
// 5:锚点哈希 https://github.com/siyuan-note/siyuan/issues/10265 已经废弃 https://github.com/siyuan-note/siyuan/issues/13331)
// (0:使用原始文本,1:使用 Blockquote都已经废弃 https://github.com/siyuan-note/siyuan/issues/3155)
BlockRefMode int `json:"blockRefMode"`
BlockEmbedMode int `json:"blockEmbedMode"` // 内容块引用导出模式,0:使用原始文本,1:使用 Blockquote
BlockRefTextLeft string `json:"blockRefTextLeft"` // 内容块引用导出锚文本左侧符号,默认留空
Expand Down
2 changes: 1 addition & 1 deletion kernel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20241127120230-1ae6a9868a2d
github.com/88250/lute v1.7.7-0.20241206153537-408cb4f3fbab
github.com/88250/lute v1.7.7-0.20241208103455-3223b6b5f502
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
github.com/ConradIrwin/font v0.0.0-20240627033111-8567075b2bfe
Expand Down
4 changes: 2 additions & 2 deletions kernel/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20241127120230-1ae6a9868a2d h1:dexFyk3UkR4c2xpyrC4Zk4L28xFbfLYAeowIW/7QYEA=
github.com/88250/gulu v1.2.3-0.20241127120230-1ae6a9868a2d/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20241206153537-408cb4f3fbab h1:TRN5UZIude8Gmks6ODC6bpT6MklMhBCDwjclpsX0YgQ=
github.com/88250/lute v1.7.7-0.20241206153537-408cb4f3fbab/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/lute v1.7.7-0.20241208103455-3223b6b5f502 h1:agB9kKKmVrmMa4iSpI7YAN4O3OyV3W+w09CTwgnY7Z8=
github.com/88250/lute v1.7.7-0.20241208103455-3223b6b5f502/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/pdfcpu v0.3.14-0.20241201033812-5a93b7586a01 h1:AcFe63RXjIh1XtX/dc4Es3U8bYKjlEkvavHd1nFBOHM=
github.com/88250/pdfcpu v0.3.14-0.20241201033812-5a93b7586a01/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
Expand Down
9 changes: 7 additions & 2 deletions kernel/model/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package model

import (
"bytes"
"crypto/sha1"
"fmt"
"os"
"path/filepath"
Expand Down Expand Up @@ -266,9 +267,10 @@ func InitConf() {
if nil == Conf.Export {
Conf.Export = conf.NewExport()
}
if 0 == Conf.Export.BlockRefMode || 1 == Conf.Export.BlockRefMode {
if 0 == Conf.Export.BlockRefMode || 1 == Conf.Export.BlockRefMode || 5 == Conf.Export.BlockRefMode {
// 废弃导出选项引用块转换为原始块和引述块 https://github.com/siyuan-note/siyuan/issues/3155
Conf.Export.BlockRefMode = 4 // 改为脚注
// 锚点哈希模式和脚注模式合并 https://github.com/siyuan-note/siyuan/issues/13331
Conf.Export.BlockRefMode = 4 // 改为脚注+锚点哈希
}
if "" == Conf.Export.PandocBin {
Conf.Export.PandocBin = util.PandocBinPath
Expand Down Expand Up @@ -391,6 +393,9 @@ func InitConf() {
if 1 > Conf.Repo.RetentionIndexesDaily {
Conf.Repo.RetentionIndexesDaily = 2
}
if 0 < len(Conf.Repo.Key) {
logging.LogInfof("repo key [%x]", sha1.Sum(Conf.Repo.Key))
}

if nil == Conf.Search {
Conf.Search = conf.NewSearch()
Expand Down
Loading

0 comments on commit 57d521c

Please sign in to comment.