mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 09:05:59 +00:00
web-svelte => web
This commit is contained in:
53
packages/web/src/appobj/AppObjectCore.svelte
Normal file
53
packages/web/src/appobj/AppObjectCore.svelte
Normal file
@@ -0,0 +1,53 @@
|
||||
<script lang="ts">
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
|
||||
export let isBold;
|
||||
export let prefix;
|
||||
export let icon;
|
||||
export let isBusy;
|
||||
export let title;
|
||||
export let statusIcon;
|
||||
export let statusTitle;
|
||||
export let extInfo;
|
||||
</script>
|
||||
|
||||
<div class="main" class:isBold draggable>
|
||||
{prefix}
|
||||
{#if isBusy}
|
||||
<FontIcon icon="icon loading" />
|
||||
{:else}
|
||||
<FontIcon {icon} />
|
||||
{/if}
|
||||
{title}
|
||||
{#if statusIcon}
|
||||
<span class="status">
|
||||
<FontIcon icon={statusIcon} title={statusTitle} />
|
||||
</span>
|
||||
{/if}
|
||||
{#if extInfo}
|
||||
<span class="ext-info">
|
||||
{extInfo}
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
<slot />
|
||||
|
||||
<style>
|
||||
.main {
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
}
|
||||
.isBold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.status {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.ext-info {
|
||||
font-weight: normal;
|
||||
margin-left: 5px;
|
||||
color: vra(--theme-font-3);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user