From 332931343f36897a5ef8df83f82fb5329f5d98fb Mon Sep 17 00:00:00 2001 From: V Date: Mon, 16 Dec 2024 10:29:42 +0800 Subject: [PATCH 1/3] :art: https://github.com/siyuan-note/siyuan/pull/13241 --- app/appearance/themes/daylight/theme.css | 11 ++++++----- app/appearance/themes/midnight/theme.css | 11 ++++++----- app/src/util/assets.ts | 4 ---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/appearance/themes/daylight/theme.css b/app/appearance/themes/daylight/theme.css index 1a54e6c21..9f230e267 100644 --- a/app/appearance/themes/daylight/theme.css +++ b/app/appearance/themes/daylight/theme.css @@ -22,11 +22,11 @@ --b3-theme-on-error: #fff; /* 字体 */ - --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", arial, sans-serif, emojis; --b3-font-family-protyle: var(--b3-font-family); --b3-font-family-code: "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family); --b3-font-family-graph: arial; - --b3-font-family-emoji: "Emojis"; + --b3-font-family-emoji: emojis; --b3-font-family-math: KaTeX_Math; --b3-font-size: 14px; @@ -200,16 +200,17 @@ --b3-parent-background: var(--b3-theme-background); } +/* 微软字体斜体会被相邻背景遮挡,将 arial 放置其前 https://github.com/siyuan-note/siyuan/issues/11841;"Segoe UI" 和 Noto-COLRv1-2.047 冲突,故移除。 */ :root:lang(zh_CN) { - --b3-font-family: "Helvetica Neue", "PingFang SC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft Yahei", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "PingFang SC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Source Han Sans SC", arial, "Microsoft Yahei", sans-serif, emojis; } :root:lang(zh_CHT) { - --b3-font-family: "Helvetica Neue", "PingFang TC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "PingFang TC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans TC", "Source Han Sans TC", "Microsoft JhengHei", arial, sans-serif, emojis; } :root:lang(ja_JP) { - --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Yu Gothic UI", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Yu Gothic UI", arial, sans-serif, emojis; } /* https://github.com/siyuan-note/siyuan/issues/6440 */ diff --git a/app/appearance/themes/midnight/theme.css b/app/appearance/themes/midnight/theme.css index 15d48b127..15435aca1 100644 --- a/app/appearance/themes/midnight/theme.css +++ b/app/appearance/themes/midnight/theme.css @@ -22,11 +22,11 @@ --b3-theme-on-error: #fff; /* 字体 */ - --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", arial, sans-serif, emojis; --b3-font-family-protyle: var(--b3-font-family); --b3-font-family-code: "JetBrainsMono-Regular", mononoki, Consolas, "Liberation Mono", Menlo, Courier, monospace, var(--b3-font-family); --b3-font-family-graph: arial; - --b3-font-family-emoji: "Emojis"; + --b3-font-family-emoji: emojis; --b3-font-family-math: KaTeX_Math; --b3-font-size: 14px; @@ -200,16 +200,17 @@ --b3-parent-background: var(--b3-theme-background); } +/* 微软字体斜体会被相邻背景遮挡,将 arial 放置其前 https://github.com/siyuan-note/siyuan/issues/11841;"Segoe UI" 和 Noto-COLRv1-2.047 冲突,故移除。 */ :root:lang(zh_CN) { - --b3-font-family: "Helvetica Neue", "PingFang SC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft Yahei", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "PingFang SC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Source Han Sans SC", arial, "Microsoft Yahei", sans-serif, emojis; } :root:lang(zh_CHT) { - --b3-font-family: "Helvetica Neue", "PingFang TC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans TC", "Source Han Sans TC", "Microsoft JhengHei", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "PingFang TC", "Luxi Sans", "DejaVu Sans", "Hiragino Sans TC", "Source Han Sans TC", "Microsoft JhengHei", arial, sans-serif, emojis; } :root:lang(ja_JP) { - --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Yu Gothic UI", sans-serif, "Arial", "Emojis"; + --b3-font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans", "Yu Gothic UI", arial, sans-serif, emojis; } /* https://github.com/siyuan-note/siyuan/issues/6440 */ diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts index cd382f388..fe6eacfed 100644 --- a/app/src/util/assets.ts +++ b/app/src/util/assets.ts @@ -221,10 +221,6 @@ export const setInlineStyle = (set = true) => { if (window.siyuan.config.editor.fontFamily) { style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {font-family: "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family)}`; } - // Windows 斜体遮挡添加 "Segoe UI" 字体 https://github.com/siyuan-note/siyuan/issues/11841 - if (navigator.platform.indexOf('Win') > -1) { - style += `\n.b3-typography em, .b3-typography span[data-type~=em], .protyle-wysiwyg em, .protyle-wysiwyg span[data-type~=em] { font-family: emojis, "Segoe UI"; }`; - } // pad 端菜单移除显示,如工作空间 if ("ontouchend" in document) { style += "\n.b3-menu .b3-menu__action {opacity: 0.68;}"; From b3b8266c7269490f4f086b5e4c45a948177848e5 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 16 Dec 2024 11:30:42 +0800 Subject: [PATCH 2/3] :art: Improve create time display https://github.com/siyuan-note/siyuan/issues/13477 --- kernel/util/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/util/time.go b/kernel/util/time.go index 7adab564d..b22c6c937 100644 --- a/kernel/util/time.go +++ b/kernel/util/time.go @@ -186,7 +186,7 @@ func humanizeTimeMagnitudes(lang string) (labels map[string]interface{}, magnitu {humanize.Month, labels["xw"].(string), humanize.Week}, {2 * humanize.Month, labels["1M"].(string), 1}, {humanize.Year, labels["xM"].(string), humanize.Month}, - {18 * humanize.Month, labels["1y"].(string), 1}, + {23 * humanize.Month, labels["1y"].(string), 1}, {2 * humanize.Year, labels["2y"].(string), 1}, {humanize.LongTime, labels["xy"].(string), humanize.Year}, {math.MaxInt64, labels["max"].(string), 1}, From f83abb9273e82c33e51cf6c23506e40c22849601 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 16 Dec 2024 12:00:38 +0800 Subject: [PATCH 3/3] :art: The database primary key field displays the icon of the bound doc https://github.com/siyuan-note/siyuan/issues/13378 --- kernel/model/attribute_view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 84cf00413..929fd149b 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -2011,7 +2011,7 @@ func addAttributeViewBlock(now int64, avID, blockID, previousBlockID, addingBloc IsDetached: isDetached, CreatedAt: now, UpdatedAt: now, - Block: &av.ValueBlock{ID: addingBlockID, Content: addingBlockContent, Created: now, Updated: now}} + Block: &av.ValueBlock{ID: addingBlockID, Icon: blockIcon, Content: addingBlockContent, Created: now, Updated: now}} blockValues.Values = append(blockValues.Values, blockValue) // 如果存在过滤条件,则将过滤条件应用到新添加的块上