mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 Improve detect Pad device https://github.com/siyuan-note/siyuan/issues/8497
This commit is contained in:
parent
2b57a21f05
commit
eafed90b76
1 changed files with 3 additions and 2 deletions
|
|
@ -206,8 +206,9 @@ func serveAppearance(ginServer *gin.Engine) {
|
||||||
|
|
||||||
if strings.Contains(userAgentHeader, "Electron") {
|
if strings.Contains(userAgentHeader, "Electron") {
|
||||||
location.Path = "/stage/build/app/"
|
location.Path = "/stage/build/app/"
|
||||||
} else if strings.Contains(userAgentHeader, "Pad") {
|
} else if strings.Contains(userAgentHeader, "Pad") ||
|
||||||
// Improve detecting Pad device, treat it as desktop device https://github.com/siyuan-note/siyuan/issues/8435
|
(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/"
|
location.Path = "/stage/build/desktop/"
|
||||||
} else {
|
} else {
|
||||||
if idx := strings.Index(userAgentHeader, "Mozilla/"); 0 < idx {
|
if idx := strings.Index(userAgentHeader, "Mozilla/"); 0 < idx {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue