mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 10:16:10 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0c0d02c6a6
18 changed files with 60 additions and 40 deletions
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "اليوم",
|
||||
"262": "غدًا",
|
||||
"263": "التالي %d أيام",
|
||||
"264": "الحقل [%s] فارغ"
|
||||
"264": "الحقل [%s] فارغ",
|
||||
"265": "خارج النطاق"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Heute",
|
||||
"262": "Morgen",
|
||||
"263": "Nächste %d Tage",
|
||||
"264": "Das Feld [%s] ist leer"
|
||||
"264": "Das Feld [%s] ist leer",
|
||||
"265": "Außerhalb des Bereichs"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Today",
|
||||
"262": "Tomorrow",
|
||||
"263": "Next %d days",
|
||||
"264": "Field [%s] is empty"
|
||||
"264": "Field [%s] is empty",
|
||||
"265": "Out of range"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Hoy",
|
||||
"262": "Mañana",
|
||||
"263": "Próximos %d días",
|
||||
"264": "El campo [%s] está vacío"
|
||||
"264": "El campo [%s] está vacío",
|
||||
"265": "Fuera de rango"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Aujourd'hui",
|
||||
"262": "Demain",
|
||||
"263": "Les %d prochains jours",
|
||||
"264": "Le champ [%s] est vide"
|
||||
"264": "Le champ [%s] est vide",
|
||||
"265": "Hors de portée"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "היום",
|
||||
"262": "מחר",
|
||||
"263": "ה-%d ימים הבאים",
|
||||
"264": "השדה [%s] ריק"
|
||||
"264": "השדה [%s] ריק",
|
||||
"265": "מחוץ לטווח"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Oggi",
|
||||
"262": "Domani",
|
||||
"263": "Prossimi %d giorni",
|
||||
"264": "Il campo [%s] è vuoto"
|
||||
"264": "Il campo [%s] è vuoto",
|
||||
"265": "Fuori intervallo"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今日",
|
||||
"262": "明日",
|
||||
"263": "次の %d 日間",
|
||||
"264": "フィールド [%s] の値が空です"
|
||||
"264": "フィールド [%s] の値が空です",
|
||||
"265": "範囲外"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Dzisiaj",
|
||||
"262": "Jutro",
|
||||
"263": "Następne %d dni",
|
||||
"264": "Pole [%s] jest puste"
|
||||
"264": "Pole [%s] jest puste",
|
||||
"265": "Poza zakresem"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Hoje",
|
||||
"262": "Amanhã",
|
||||
"263": "Próximos %d dias",
|
||||
"264": "O campo [%s] está vazio"
|
||||
"264": "O campo [%s] está vazio",
|
||||
"265": "Fora do intervalo"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "Сегодня",
|
||||
"262": "Завтра",
|
||||
"263": "Следующие %d дней",
|
||||
"264": "Поле [%s] имеет пустое значение"
|
||||
"264": "Поле [%s] имеет пустое значение",
|
||||
"265": "Вне диапазона"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今天",
|
||||
"262": "明天",
|
||||
"263": "未來 %d 天",
|
||||
"264": "字段 [%s] 值為空"
|
||||
"264": "字段 [%s] 值為空",
|
||||
"265": "不在範圍內"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1641,6 +1641,7 @@
|
|||
"261": "今天",
|
||||
"262": "明天",
|
||||
"263": "未来 %d 天",
|
||||
"264": "字段 [%s] 值为空"
|
||||
"264": "字段 [%s] 值为空",
|
||||
"265": "不在范围内"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -678,6 +678,10 @@ for (let i = argStart; i < process.argv.length; i++) {
|
|||
|
||||
app.whenReady().then(() => {
|
||||
const resetTrayMenu = (tray, lang, mainWindow) => {
|
||||
if (!mainWindow || mainWindow.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const trayMenuTemplate = [{
|
||||
label: mainWindow.isVisible() ? lang.hideWindow : lang.showWindow, click: () => {
|
||||
showHideWindow(tray, lang, mainWindow);
|
||||
|
|
@ -726,6 +730,10 @@ app.whenReady().then(() => {
|
|||
}
|
||||
};
|
||||
const showHideWindow = (tray, lang, mainWindow) => {
|
||||
if (!mainWindow || mainWindow.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mainWindow.isVisible()) {
|
||||
if (mainWindow.isMinimized()) {
|
||||
mainWindow.restore();
|
||||
|
|
@ -1113,23 +1121,24 @@ app.whenReady().then(() => {
|
|||
if (exitWS) {
|
||||
return;
|
||||
}
|
||||
let tray;
|
||||
if ("win32" === process.platform || "linux" === process.platform) {
|
||||
// 系统托盘
|
||||
tray = new Tray(path.join(appDir, "stage", "icon-large.png"));
|
||||
tray.setToolTip(`${path.basename(data.workspaceDir)} - SiYuan v${appVer}`);
|
||||
const mainWindow = getWindowByContentId(event.sender.id);
|
||||
if (!mainWindow) {
|
||||
return;
|
||||
}
|
||||
resetTrayMenu(tray, data.languages, mainWindow);
|
||||
tray.on("click", () => {
|
||||
showHideWindow(tray, data.languages, mainWindow);
|
||||
});
|
||||
}
|
||||
|
||||
workspaces.find(item => {
|
||||
if (!item.workspaceDir) {
|
||||
item.workspaceDir = data.workspaceDir;
|
||||
let tray;
|
||||
if ("win32" === process.platform || "linux" === process.platform) {
|
||||
// 系统托盘
|
||||
tray = new Tray(path.join(appDir, "stage", "icon-large.png"));
|
||||
tray.setToolTip(`${path.basename(data.workspaceDir)} - SiYuan v${appVer}`);
|
||||
const mainWindow = getWindowByContentId(event.sender.id);
|
||||
if (!mainWindow || mainWindow.isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
resetTrayMenu(tray, data.languages, mainWindow);
|
||||
tray.on("click", () => {
|
||||
showHideWindow(tray, data.languages, mainWindow);
|
||||
});
|
||||
}
|
||||
item.tray = tray;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,8 +197,8 @@ type View struct {
|
|||
GroupItemIDs []string `json:"groupItemIds,omitempty"` // 分组项目 ID 列表,用于维护分组中的所有项目
|
||||
GroupCalc *GroupCalc `json:"groupCalc,omitempty"` // 分组计算规则
|
||||
GroupName string `json:"groupName,omitempty"` // 分组名称
|
||||
GroupFolded bool `json:"groupFolded,omitempty"` // 分组是否折叠
|
||||
GroupHidden bool `json:"groupHidden,omitempty"` // 分组是否隐藏
|
||||
GroupFolded bool `json:"groupFolded"` // 分组是否折叠
|
||||
GroupHidden bool `json:"groupHidden"` // 分组是否隐藏
|
||||
}
|
||||
|
||||
// GroupCalc 描述了分组计算规则和结果的结构。
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ type BaseInstance struct {
|
|||
PageSize int `json:"pageSize"` // 每页项目数
|
||||
ShowIcon bool `json:"showIcon"` // 是否显示字段图标
|
||||
WrapField bool `json:"wrapField"` // 是否换行字段内容
|
||||
Folded bool `json:"folded,omitempty"` // 是否折叠
|
||||
Hidden bool `json:"hidden,omitempty"` // 是否隐藏
|
||||
|
||||
Groups []Viewable `json:"groups,omitempty"` // 分组实例列表
|
||||
GroupCalc *GroupCalc `json:"groupCalc,omitempty"` // 分组计算规则和结果
|
||||
|
|
|
|||
|
|
@ -1373,13 +1373,11 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
}
|
||||
|
||||
if "" == viewID && "" != blockID {
|
||||
if "" != blockID {
|
||||
node, _, getErr := getNodeByBlockID(nil, blockID)
|
||||
if nil != getErr {
|
||||
logging.LogWarnf("get node by block ID [%s] failed: %s", blockID, getErr)
|
||||
} else {
|
||||
viewID = node.IALAttr(av.NodeAttrView)
|
||||
}
|
||||
node, _, getErr := getNodeByBlockID(nil, blockID)
|
||||
if nil != getErr {
|
||||
logging.LogWarnf("get node by block ID [%s] failed: %s", blockID, getErr)
|
||||
} else {
|
||||
viewID = node.IALAttr(av.NodeAttrView)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1438,7 +1436,7 @@ func renderAttributeView(attrView *av.AttributeView, blockID, viewID, query stri
|
|||
}
|
||||
}
|
||||
|
||||
// 如果存在分组的话渲染分组视图视图
|
||||
// 如果存在分组的话渲染分组视图
|
||||
var groups []av.Viewable
|
||||
for _, groupView := range view.Groups {
|
||||
switch groupView.LayoutType {
|
||||
|
|
@ -1619,6 +1617,8 @@ func genAttrViewViewGroups(view *av.View, attrView *av.AttributeView) {
|
|||
|
||||
if defaultGroupName == name {
|
||||
name = fmt.Sprintf(Conf.language(264), groupKey.Name)
|
||||
} else if notInRange == name {
|
||||
name = fmt.Sprintf(Conf.language(265))
|
||||
}
|
||||
v.Name = name
|
||||
view.Groups = append(view.Groups, v)
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ func CheckAuth(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// 放过 /appearance/
|
||||
// 放过 /appearance/ 等(不要扩大到 /stage/ 否则鉴权会有问题)
|
||||
if strings.HasPrefix(c.Request.RequestURI, "/appearance/") ||
|
||||
strings.HasPrefix(c.Request.RequestURI, "/stage/build/export/") ||
|
||||
strings.HasPrefix(c.Request.RequestURI, "/stage/protyle/") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue