Skip to content

Commit

Permalink
fix: v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xinshangshangxin committed Jul 10, 2024
1 parent e7f3ec3 commit da3cb86
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
37 changes: 20 additions & 17 deletions patches/siyuan/disable-update.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
From 5ead51c0bbaf9e90363bf7b125de6e4f11ce5d2d Mon Sep 17 00:00:00 2001
From: feng <[email protected]>
Date: Thu, 17 Aug 2023 13:50:31 +0800
Subject: [PATCH] feat: disable update

---
kernel/api/system.go | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/kernel/api/system.go b/kernel/api/system.go
index fc23d6800..253bb2b61 100644
--- a/kernel/api/system.go
+++ b/kernel/api/system.go
@@ -165,16 +165,17 @@ func addCustomEmoji(name string, items *[]map[string]interface{}) {
diff --git forkSrcPrefix/kernel/api/system.go forkDstPrefix/kernel/api/system.go
index 312bcbea50e14045d5b8716a73f5c786dbf95236..f021de720cb177e5cba9257894cbf28dd8d211ee 100644
--- forkSrcPrefix/kernel/api/system.go
+++ forkDstPrefix/kernel/api/system.go
@@ -184,16 +184,17 @@ func addCustomEmoji(name string, items *[]map[string]interface{}) {
}

func checkUpdate(c *gin.Context) {
Expand All @@ -37,6 +28,18 @@ index fc23d6800..253bb2b61 100644
}

func exportLog(c *gin.Context) {
--
2.37.5

diff --git forkSrcPrefix/kernel/model/mount.go forkDstPrefix/kernel/model/mount.go
index 1ec00f1784be5d89a8ecae59f9807f6da1f20ca5..9dcbddba692ba2af923179eee296b69d403f92d5 100644
--- forkSrcPrefix/kernel/model/mount.go
+++ forkDstPrefix/kernel/model/mount.go
@@ -223,8 +223,8 @@ func Mount(boxID string) (alreadyMount bool, err error) {
util.PushErrMsg(Conf.Language(52), 7000)

// 每次打开帮助文档时自动检查版本更新并提醒 https://github.com/siyuan-note/siyuan/issues/5057
- time.Sleep(time.Second * 10)
- CheckUpdate(true)
+ // time.Sleep(time.Second * 10)
+ // CheckUpdate(true)
}()
}

12 changes: 8 additions & 4 deletions patches/siyuan/mock-vip-user.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
diff --git forkSrcPrefix/kernel/api/setting.go forkDstPrefix/kernel/api/setting.go
index 733c4eefd439b34b2856222f3dd0d9cdea56d19c..9d33ff2588aef54d848bb20566659c10be90836f 100644
index 9010350078560bb298de72bc73d54e51db60f21b..dfe9ab286f50431bdb30c633b8e63886b5046419 100644
--- forkSrcPrefix/kernel/api/setting.go
+++ forkDstPrefix/kernel/api/setting.go
@@ -533,7 +533,7 @@ func setAppearance(c *gin.Context) {
ret.Data = model.Conf.Appearance
@@ -586,7 +586,7 @@ func getPublish(c *gin.Context) {
}
}

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

@@ -551,6 +551,44 @@ func getCloudUser(c *gin.Context) {
@@ -608,6 +608,48 @@ func getCloudUser(c *gin.Context) {
ret.Data = model.Conf.GetUser()
}

+func getCloudUser(c *gin.Context) {
+ ret := gulu.Ret.NewResult()
+ defer c.JSON(http.StatusOK, ret)
+
+ if !model.IsAdminRoleContext(c) {
+ return
+ }
+
+ user := &conf.User{
+ UserId: "0",
+ UserName: "_",
Expand Down

0 comments on commit da3cb86

Please sign in to comment.