diff --git a/backend/utils/string/common.go b/backend/utils/string/common.go index c93d177..e0746a9 100644 --- a/backend/utils/string/common.go +++ b/backend/utils/string/common.go @@ -1,9 +1,10 @@ package strutil -import "unicode/utf8" +import ( + "unicode" +) func containsBinary(str string) bool { - //buf := []byte(str) //size := 0 //for start := 0; start < len(buf); start += size { // var r rune @@ -11,9 +12,11 @@ func containsBinary(str string) bool { // return true // } //} - - if !utf8.ValidString(str) { - return true + rs := []rune(str) + for _, r := range rs { + if !unicode.IsPrint(r) { + return true + } } return false } diff --git a/frontend/src/AppContent.vue b/frontend/src/AppContent.vue index 99aa974..0f742d0 100644 --- a/frontend/src/AppContent.vue +++ b/frontend/src/AppContent.vue @@ -69,6 +69,16 @@ const wrapperStyle = computed(() => { borderRadius: '10px', } }) +const spinStyle = computed(() => { + return hideRadius.value + ? { + backgroundColor: themeVars.value.bodyColor, + } + : { + backgroundColor: themeVars.value.bodyColor, + borderRadius: '10px', + } +}) const onToggleFullscreen = (fullscreen) => { hideRadius.value = fullscreen @@ -82,10 +92,14 @@ const onToggleFullscreen = (fullscreen) => { const onToggleMaximize = (isMaximised) => { if (isMaximised) { maximised.value = true - hideRadius.value = isMacOS() + if (!isMacOS()) { + hideRadius.value = true + } } else { maximised.value = false - hideRadius.value = !isMacOS() + if (!isMacOS()) { + hideRadius.value = false + } } } @@ -105,10 +119,7 @@ onMounted(async () => {