mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 17:16:01 +00:00
redis key tab name & icon
This commit is contained in:
@@ -4,7 +4,13 @@
|
||||
const getCurrentEditor = () => getActiveComponent('DbKeyDetailTab');
|
||||
|
||||
export const matchingProps = ['conid', 'database', 'isDefaultBrowser'];
|
||||
export const allowAddToFavorites = props => true;
|
||||
export const allowAddToFavorites = props => false;
|
||||
|
||||
function getKeyText(key) {
|
||||
const keySplit = key.split(':');
|
||||
if (keySplit.length > 1) return keySplit[keySplit.length - 1];
|
||||
return key;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -25,7 +31,9 @@
|
||||
import DbKeyItemDetail from '../dbkeyvalue/DbKeyItemDetail.svelte';
|
||||
import DbKeyAddItemModal from '../modals/DbKeyAddItemModal.svelte';
|
||||
import ErrorMessageModal from '../modals/ErrorMessageModal.svelte';
|
||||
import { changeTab } from '../utility/common';
|
||||
|
||||
export let tabid;
|
||||
export let conid;
|
||||
export let database;
|
||||
export let key;
|
||||
@@ -39,6 +47,11 @@
|
||||
let refreshToken = 0;
|
||||
let editedValue = null;
|
||||
|
||||
$: changeTab(tabid, tab => ({
|
||||
...tab,
|
||||
title: getKeyText(key),
|
||||
}));
|
||||
|
||||
function handleChangeTtl(keyInfo) {
|
||||
showModal(InputTextModal, {
|
||||
value: keyInfo.ttl,
|
||||
|
||||
Reference in New Issue
Block a user