This commit is contained in:
Daniel 2023-06-08 22:48:32 +08:00
parent 2b57a21f05
commit eafed90b76
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -206,8 +206,9 @@ func serveAppearance(ginServer *gin.Engine) {
if strings.Contains(userAgentHeader, "Electron") {
location.Path = "/stage/build/app/"
} else if strings.Contains(userAgentHeader, "Pad") {
// Improve detecting Pad device, treat it as desktop device https://github.com/siyuan-note/siyuan/issues/8435
} else if strings.Contains(userAgentHeader, "Pad") ||
(strings.ContainsAny(userAgentHeader, "Android") && !strings.Contains(userAgentHeader, "Mobile")) {
// Improve detecting Pad device, treat it as desktop device https://github.com/siyuan-note/siyuan/issues/8435 https://github.com/siyuan-note/siyuan/issues/8497
location.Path = "/stage/build/desktop/"
} else {
if idx := strings.Index(userAgentHeader, "Mozilla/"); 0 < idx {