mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
8e8d9bba10
1 changed files with 1 additions and 9 deletions
|
|
@ -266,8 +266,7 @@ func watchTheme(folder string) {
|
|||
}
|
||||
|
||||
//logging.LogInfof(event.String())
|
||||
if event.Op&fsnotify.Write == fsnotify.Write &&
|
||||
(strings.HasSuffix(event.Name, "theme.css") || strings.HasSuffix(event.Name, "custom.css")) {
|
||||
if event.Op&fsnotify.Write == fsnotify.Write && (strings.HasSuffix(event.Name, "theme.css")) {
|
||||
var themeName string
|
||||
if themeName = isCurrentUseTheme(event.Name); "" == themeName {
|
||||
break
|
||||
|
|
@ -279,13 +278,6 @@ func watchTheme(folder string) {
|
|||
})
|
||||
break
|
||||
}
|
||||
|
||||
if strings.HasSuffix(event.Name, "custom.css") {
|
||||
util.BroadcastByType("main", "refreshtheme", 0, "", map[string]interface{}{
|
||||
"theme": "/appearance/themes/" + themeName + "/custom.css?" + fmt.Sprintf("%d", time.Now().Unix()),
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
case err, ok := <-themeWatcher.Errors:
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue