Compare commits

..

No commits in common. "c0fdfc0ce7eefa4bc2bcedaa4faf35fe7f410123" and "cc696f9642ec6e058e2d761956bff4976deb1692" have entirely different histories.

8 changed files with 20 additions and 47 deletions

View File

@ -2561,7 +2561,6 @@ func (b *browserService) GetSlowLogs(server string, num int64) (resp types.JSRes
resp.Msg = err.Error()
return
}
num = max(1, num)
client, ctx := item.client, item.ctx
var logs []redis.SlowLog

View File

@ -12,10 +12,9 @@ import WindowClose from '@/components/icons/WindowClose.vue'
import Pin from '@/components/icons/Pin.vue'
import OffScreen from '@/components/icons/OffScreen.vue'
import ContentEditor from '@/components/content_value/ContentEditor.vue'
import { isEmpty, toString } from 'lodash'
import { toString } from 'lodash'
const props = defineProps({
keyPath: String,
show: {
type: Boolean,
},
@ -59,8 +58,8 @@ const emit = defineEmits([
watchEffect(
() => {
if (props.show && !isEmpty(props.keyPath)) {
onFormatChanged(props.decode, props.format)
if (props.show && props.value != null) {
onFormatChanged()
} else {
viewAs.value = ''
}
@ -128,8 +127,6 @@ const onFormatChanged = async (decode = null, format = null) => {
editingContent.value = viewAs.value = value
viewAs.decode = decode || retDecode
viewAs.format = format || retFormat
emit('update:decode', viewAs.decode)
emit('update:format', viewAs.format)
} finally {
loading.value = false
}

View File

@ -178,7 +178,6 @@ const onListLimitChanged = (limit) => {
<n-form-item :label="$t('slog.limit')">
<n-input-number
v-model:value="data.listLimit"
:min="1"
:max="9999"
style="width: 120px"
@update:value="onListLimitChanged" />

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, h, nextTick, reactive, ref } from 'vue'
import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import AddLink from '@/components/icons/AddLink.vue'
import { NButton, NIcon, useThemeVars } from 'naive-ui'
@ -142,8 +142,6 @@ const startEdit = async (no, key, value) => {
currentEditRow.no = no
currentEditRow.key = key
currentEditRow.value = value
currentEditRow.decode = props.decode
currentEditRow.format = props.format
}
const saveEdit = async (field, value, decode, format) => {
@ -185,11 +183,8 @@ const resetEdit = () => {
currentEditRow.no = 0
currentEditRow.key = ''
currentEditRow.value = null
if (currentEditRow.format !== props.format || currentEditRow.decode !== props.decode) {
nextTick(() => onFormatChanged(currentEditRow.decode, currentEditRow.format))
}
// currentEditRow.format = formatTypes.RAW
// currentEditRow.decode = decodeTypes.NONE
currentEditRow.format = formatTypes.RAW
currentEditRow.decode = decodeTypes.NONE
}
const actionColumn = {
@ -402,12 +397,11 @@ defineExpose({
class="entry-editor-container flex-item-expand"
style="width: 100%">
<content-entry-editor
v-model:decode="currentEditRow.decode"
v-model:format="currentEditRow.format"
v-model:fullscreen="fullEdit"
:decode="currentEditRow.decode"
:field="currentEditRow.key"
:field-label="$t('common.field')"
:key-path="props.keyPath"
:format="currentEditRow.format"
:show="inEdit"
:value="currentEditRow.value"
:value-label="$t('common.value')"

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, h, nextTick, reactive, ref } from 'vue'
import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import AddLink from '@/components/icons/AddLink.vue'
import { NButton, NIcon, useThemeVars } from 'naive-ui'
@ -116,8 +116,6 @@ const valueColumn = computed(() => ({
const startEdit = async (no, value) => {
currentEditRow.no = no
currentEditRow.value = value
currentEditRow.decode = props.decode
currentEditRow.format = props.format
}
/**
@ -162,9 +160,6 @@ const saveEdit = async (pos, value, decode, format) => {
const resetEdit = () => {
currentEditRow.no = 0
currentEditRow.value = null
if (currentEditRow.format !== props.format || currentEditRow.decode !== props.decode) {
nextTick(() => onFormatChanged(currentEditRow.decode, currentEditRow.format))
}
}
const actionColumn = {
@ -375,13 +370,12 @@ defineExpose({
class="entry-editor-container flex-item-expand"
style="width: 100%">
<content-entry-editor
v-model:decode="currentEditRow.decode"
v-model:format="currentEditRow.format"
v-model:fullscreen="fullEdit"
:decode="currentEditRow.decode"
:field="currentEditRow.no"
:field-label="$t('common.index')"
:field-readonly="true"
:key-path="props.keyPath"
:format="currentEditRow.format"
:show="inEdit"
:value="currentEditRow.value"
:value-label="$t('common.value')"

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, h, nextTick, reactive, ref } from 'vue'
import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import AddLink from '@/components/icons/AddLink.vue'
import { NButton, NIcon, useThemeVars } from 'naive-ui'
@ -115,8 +115,6 @@ const valueColumn = computed(() => ({
const startEdit = async (no, value) => {
currentEditRow.no = no
currentEditRow.value = value
currentEditRow.decode = props.decode
currentEditRow.format = props.format
}
/**
@ -159,9 +157,6 @@ const saveEdit = async (pos, value, decode, format) => {
const resetEdit = () => {
currentEditRow.no = 0
currentEditRow.value = null
if (currentEditRow.format !== props.format || currentEditRow.decode !== props.decode) {
nextTick(() => onFormatChanged(currentEditRow.decode, currentEditRow.format))
}
}
const actionColumn = {
@ -372,13 +367,12 @@ defineExpose({
class="entry-editor-container flex-item-expand"
style="width: 100%">
<content-entry-editor
v-model:decode="currentEditRow.decode"
v-model:format="currentEditRow.format"
v-model:fullscreen="fullEdit"
:decode="currentEditRow.decode"
:field="currentEditRow.no"
:field-label="$t('common.index')"
:field-readonly="true"
:key-path="props.keyPath"
:format="currentEditRow.format"
:show="inEdit"
:value="currentEditRow.value"
:value-label="$t('common.value')"

View File

@ -1,5 +1,5 @@
<script setup>
import { computed, h, nextTick, reactive, ref } from 'vue'
import { computed, h, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import AddLink from '@/components/icons/AddLink.vue'
import { NButton, NIcon, useThemeVars } from 'naive-ui'
@ -166,8 +166,6 @@ const startEdit = async (no, score, value) => {
currentEditRow.no = no
currentEditRow.score = score
currentEditRow.value = value
currentEditRow.decode = props.decode
currentEditRow.format = props.format
}
const saveEdit = async (field, value, decode, format) => {
@ -206,9 +204,8 @@ const resetEdit = () => {
currentEditRow.no = 0
currentEditRow.score = 0
currentEditRow.value = null
if (currentEditRow.format !== props.format || currentEditRow.decode !== props.decode) {
nextTick(() => onFormatChanged(currentEditRow.decode, currentEditRow.format))
}
currentEditRow.format = formatTypes.RAW
currentEditRow.decode = decodeTypes.NONE
}
const actionColumn = {
@ -406,12 +403,11 @@ defineExpose({
class="entry-editor-container flex-item-expand"
style="width: 100%">
<content-entry-editor
v-model:decode="currentEditRow.decode"
v-model:format="currentEditRow.format"
v-model:fullscreen="fullEdit"
:decode="currentEditRow.decode"
:field="currentEditRow.score"
:field-label="$t('common.score')"
:key-path="props.keyPath"
:format="currentEditRow.format"
:show="inEdit"
:value="currentEditRow.value"
:value-label="$t('common.value')"

View File

@ -109,7 +109,7 @@ func main() {
Icon: icon,
},
WebviewIsTransparent: false,
WindowIsTranslucent: false,
WindowIsTranslucent: true,
},
Windows: &windows.Options{
WebviewIsTransparent: true,