Merge branch 'feature-linux-appimage-build' of github.com:raojinlin/tiny-rdm into feature-linux-appimage-build
This commit is contained in:
commit
0c784b1cf0
|
@ -3,6 +3,7 @@ package convutil
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
"unicode/utf16"
|
"unicode/utf16"
|
||||||
|
@ -21,7 +22,7 @@ func (UnicodeJsonConvert) Decode(str string) (string, bool) {
|
||||||
(strings.HasPrefix(trimedStr, "[") && strings.HasSuffix(trimedStr, "]")) {
|
(strings.HasPrefix(trimedStr, "[") && strings.HasSuffix(trimedStr, "]")) {
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
if err := json.Indent(&out, []byte(trimedStr), "", " "); err == nil {
|
if err := json.Indent(&out, []byte(trimedStr), "", " "); err == nil {
|
||||||
if quoteStr, ok := UnquoteUnicodeJson([]byte(trimedStr)); ok {
|
if quoteStr, ok := UnquoteUnicodeJson(out.Bytes()); ok {
|
||||||
return string(quoteStr), true
|
return string(quoteStr), true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,9 +51,7 @@ func UnquoteUnicodeJson(s []byte) ([]byte, bool) {
|
||||||
if s[r+offset] == '"' && s[r+offset-1] != '\\' {
|
if s[r+offset] == '"' && s[r+offset-1] != '\\' {
|
||||||
offset += 1
|
offset += 1
|
||||||
if ub, ok := unquoteBytes(s[r : r+offset]); ok {
|
if ub, ok := unquoteBytes(s[r : r+offset]); ok {
|
||||||
unquoted.WriteByte('"')
|
unquoted.WriteString(strconv.Quote(string(ub)))
|
||||||
unquoted.Write(ub)
|
|
||||||
unquoted.WriteByte('"')
|
|
||||||
} else {
|
} else {
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
|
@ -652,7 +652,11 @@ const clientTableColumns = computed(() => {
|
||||||
:label="$t('status.connected_clients')"
|
:label="$t('status.connected_clients')"
|
||||||
:value="get(serverInfo, 'Clients.connected_clients', '0')">
|
:value="get(serverInfo, 'Clients.connected_clients', '0')">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<n-tooltip trigger="click" width="70vw" @update-show="onShowClients">
|
<n-tooltip
|
||||||
|
:content-style="{ backgroundColor: themeVars.tableColor }"
|
||||||
|
trigger="click"
|
||||||
|
width="70vw"
|
||||||
|
@update-show="onShowClients">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<n-button :bordered="false" size="small">↘</n-button>
|
<n-button :bordered="false" size="small">↘</n-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue