mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "ant",
|
||||
"author": "Vanessa",
|
||||
"url": "https://github.com/Vanessa219",
|
||||
"version": "1.36.0"
|
||||
}
|
||||
@@ -25,7 +25,7 @@ const getPluginStyle = async () => {
|
||||
};
|
||||
|
||||
const getIconScript = (servePath: string) => {
|
||||
const isBuiltInIcon = ["ant", "material"].includes(window.siyuan.config.appearance.icon);
|
||||
const isBuiltInIcon = ["material"].includes(window.siyuan.config.appearance.icon);
|
||||
const html = isBuiltInIcon ? "" : `<script src="${servePath}appearance/icons/material/icon.js?v=${Constants.SIYUAN_VERSION}"></script>`;
|
||||
return html + `<script src="${servePath}appearance/icons/${window.siyuan.config.appearance.icon}/icon.js?v=${Constants.SIYUAN_VERSION}"></script>`;
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ export const loadAssets = (data: Config.IAppearance) => {
|
||||
}
|
||||
|
||||
// load icons
|
||||
const isBuiltInIcon = ["ant", "material"].includes(data.icon);
|
||||
const isBuiltInIcon = ["material"].includes(data.icon);
|
||||
const iconScriptElement = document.getElementById("iconScript");
|
||||
const iconDefaultScriptElement = document.getElementById("iconDefaultScript");
|
||||
// 不能使用 data.iconVer,因为其他主题也需要加载默认图标,此时 data.iconVer 为其他图标的版本号
|
||||
|
||||
@@ -416,5 +416,5 @@ func isBuiltInTheme(name string) bool {
|
||||
|
||||
// isBuiltInIcon 通过包名或目录名判断是否为内置图标
|
||||
func isBuiltInIcon(name string) bool {
|
||||
return "ant" == name || "material" == name
|
||||
return "material" == name
|
||||
}
|
||||
|
||||
@@ -197,6 +197,10 @@ func InitConf() {
|
||||
util.Lang = Conf.Lang
|
||||
}
|
||||
Conf.Appearance.Lang = Conf.Lang
|
||||
if "ant" == Conf.Appearance.Icon {
|
||||
// v3.6.6 移除了 ant 图标包,如果用户之前选择了 ant 图标包,升级后改为 material 图标包,避免图标显示异常 https://github.com/siyuan-note/siyuan/issues/7976
|
||||
Conf.Appearance.Icon = "material"
|
||||
}
|
||||
if nil == Conf.UILayout {
|
||||
Conf.UILayout = &conf.UILayout{}
|
||||
}
|
||||
|
||||
@@ -933,8 +933,8 @@ func ExportMarkdownHTML(id, savePath string, docx, merge bool) (name, dom string
|
||||
|
||||
// 只复制图标文件夹中的 icon.js 文件
|
||||
iconName := Conf.Appearance.Icon
|
||||
// 如果使用的不是内建图标(ant 或 material),需要复制 material 作为后备
|
||||
if iconName != "ant" && iconName != "material" && iconName != "" {
|
||||
// 如果使用的不是内建图标(material),需要复制 material 作为后备
|
||||
if iconName != "material" && iconName != "" {
|
||||
srcIconFile := filepath.Join(appearancePath, "icons", "material", "icon.js")
|
||||
toIconDir := filepath.Join(savePath, "appearance", "icons", "material")
|
||||
if err := os.MkdirAll(toIconDir, 0755); err != nil {
|
||||
@@ -1130,8 +1130,8 @@ func ExportHTML(id, savePath string, pdf, keepFold, merge bool) (name, dom strin
|
||||
|
||||
// 只复制图标文件夹中的 icon.js 文件
|
||||
iconName := Conf.Appearance.Icon
|
||||
// 如果使用的不是内建图标(ant 或 material),需要复制 material 作为后备
|
||||
if iconName != "ant" && iconName != "material" && iconName != "" {
|
||||
// 如果使用的不是内建图标(material),需要复制 material 作为后备
|
||||
if iconName != "material" && iconName != "" {
|
||||
srcIconFile := filepath.Join(appearancePath, "icons", "material", "icon.js")
|
||||
toIconDir := filepath.Join(savePath, "appearance", "icons", "material")
|
||||
if err := os.MkdirAll(toIconDir, 0755); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user