mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 06:06:01 +00:00
tab status bar improved
This commit is contained in:
16
packages/web/src/widgets/StatusBarTabItem.svelte
Normal file
16
packages/web/src/widgets/StatusBarTabItem.svelte
Normal file
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onDestroy, onMount } from 'svelte';
|
||||
|
||||
import uuidv1 from 'uuid/v1';
|
||||
import { updateStatuBarInfoItem } from './StatusBar.svelte';
|
||||
|
||||
export let text;
|
||||
|
||||
const key = uuidv1();
|
||||
const tabid = getContext('tabid');
|
||||
|
||||
onMount(() => {
|
||||
updateStatuBarInfoItem(tabid, key, { text });
|
||||
});
|
||||
onDestroy(() => updateStatuBarInfoItem(tabid, key, null));
|
||||
</script>
|
||||
Reference in New Issue
Block a user