Compare commits

..

No commits in common. "e1f022908ceb9fda5b68abbbb8b255eca4c6bcb8" and "e271eafc9e90167468d6759344df804ae1cd5e46" have entirely different histories.

4 changed files with 7 additions and 28 deletions

View File

@ -9,7 +9,6 @@ import (
"fmt" "fmt"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
"github.com/wailsapp/wails/v2/pkg/runtime" "github.com/wailsapp/wails/v2/pkg/runtime"
"math"
"net/url" "net/url"
"os" "os"
"slices" "slices"
@ -999,17 +998,10 @@ func (b *browserService) GetKeyDetail(param types.KeyDetailParam) (resp types.JS
if doFilter && !strings.Contains(val, param.MatchPattern) { if doFilter && !strings.Contains(val, param.MatchPattern) {
continue continue
} }
entry := types.ZSetEntryItem{ items = append(items, types.ZSetEntryItem{
Score: z.Score,
Value: val, Value: val,
} })
if math.IsInf(z.Score, 1) {
entry.ScoreStr = "+inf"
} else if math.IsInf(z.Score, -1) {
entry.ScoreStr = "-inf"
} else {
entry.Score = z.Score
}
items = append(items, entry)
if doConvert { if doConvert {
if dv, _, _ := convutil.ConvertTo(val, param.Decode, param.Format, decoder); dv != val { if dv, _, _ := convutil.ConvertTo(val, param.Decode, param.Format, decoder); dv != val {
items[len(items)-1].DisplayValue = dv items[len(items)-1].DisplayValue = dv

View File

@ -31,7 +31,6 @@ type SetEntryItem struct {
type ZSetEntryItem struct { type ZSetEntryItem struct {
Score float64 `json:"s"` Score float64 `json:"s"`
ScoreStr string `json:"ss,omitempty"`
Value string `json:"v"` Value string `json:"v"`
DisplayValue string `json:"dv,omitempty"` DisplayValue string `json:"dv,omitempty"`
} }

View File

@ -68,11 +68,6 @@ const onClearFilter = () => {
onClearMatch() onClearMatch()
} }
const onUpdateMatch = () => {
inputData.filter = inputData.match
onClearMatch()
}
const onClearMatch = () => { const onClearMatch = () => {
const changed = !isEmpty(inputData.match) const changed = !isEmpty(inputData.match)
inputData.match = '' inputData.match = ''
@ -102,9 +97,9 @@ defineExpose({
@keyup.enter="onKeyup"> @keyup.enter="onKeyup">
<template #prefix> <template #prefix>
<slot name="prefix" /> <slot name="prefix" />
<n-tooltip v-if="hasMatch" placement="bottom"> <n-tooltip v-if="hasMatch">
<template #trigger> <template #trigger>
<n-tag closable size="small" @close="onClearMatch" @dblclick="onUpdateMatch"> <n-tag closable size="small" @close="onClearMatch">
{{ inputData.match }} {{ inputData.match }}
</n-tag> </n-tag>
</template> </template>
@ -146,11 +141,4 @@ defineExpose({
</n-input-group> </n-input-group>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped></style>
//:deep(.n-input__prefix) {
// max-width: 50%;
//}
//:deep(.n-tag__content) {
// overflow: hidden;
//}
</style>

View File

@ -120,7 +120,7 @@ const scoreColumn = computed(() => ({
// return true // return true
// }, // },
render: (row) => { render: (row) => {
return row.ss || row.s return row.s
}, },
})) }))