mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 13:53:59 +00:00
left panel
This commit is contained in:
@@ -1,4 +1,16 @@
|
|||||||
html, body {
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, Segoe WPC, Segoe UI, HelveticaNeue-Light, Ubuntu, Droid Sans,
|
||||||
|
sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
/* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
*/
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* html, body {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -60,4 +72,4 @@ button:not(:disabled):active {
|
|||||||
|
|
||||||
button:focus {
|
button:focus {
|
||||||
border-color: #666;
|
border-color: #666;
|
||||||
}
|
} */
|
||||||
|
|||||||
18
packages/web-svelte/src/widgets/ConnectionList.svelte
Normal file
18
packages/web-svelte/src/widgets/ConnectionList.svelte
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<script>
|
||||||
|
import InlineButton from './InlineButton.svelte';
|
||||||
|
import SearchInput from './SearchInput.svelte';
|
||||||
|
import WidgetsInnerContainer from './WidgetsInnerContainer.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="search-box">
|
||||||
|
<SearchInput placeholder="Search connection" />
|
||||||
|
<InlineButton>Refresh</InlineButton>
|
||||||
|
</div>
|
||||||
|
<WidgetsInnerContainer>CONNECTIONS</WidgetsInnerContainer>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1 +1,16 @@
|
|||||||
<div></div>
|
<script>
|
||||||
|
import ConnectionList from './ConnectionList.svelte';
|
||||||
|
|
||||||
|
import WidgetColumnBar from './WidgetColumnBar.svelte';
|
||||||
|
import WidgetColumnBarItem from './WidgetColumnBarItem.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<WidgetColumnBar>
|
||||||
|
<WidgetColumnBarItem title="Connections" name="connections" height="50%">
|
||||||
|
<ConnectionList />
|
||||||
|
</WidgetColumnBarItem>
|
||||||
|
<WidgetColumnBarItem title="Tables, views, functions" name="dbObjects">
|
||||||
|
TABLES
|
||||||
|
<!-- <SqlObjectListWrapper /> -->
|
||||||
|
</WidgetColumnBarItem>
|
||||||
|
</WidgetColumnBar>
|
||||||
|
|||||||
47
packages/web-svelte/src/widgets/InlineButton.svelte
Normal file
47
packages/web-svelte/src/widgets/InlineButton.svelte
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<script>
|
||||||
|
export let disabled;
|
||||||
|
export let square;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="outer buttonLike" class:disabled class:square>
|
||||||
|
<div class="inner">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.outer {
|
||||||
|
background: linear-gradient(to bottom, var(--theme-bg-2) 5%, var(--theme-bg-3) 100%);
|
||||||
|
background-color: var(--theme-bg-2);
|
||||||
|
border: 1px solid var(--theme-bg-3);
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: var(--theme-font-1);
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 3px;
|
||||||
|
margin: 0;
|
||||||
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.outer.disabled {
|
||||||
|
color: var(--theme-font-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.outer:hover:not(.disabled) {
|
||||||
|
border: 1px solid var(--theme-bg-2);
|
||||||
|
background: linear-gradient(to bottom, var(--theme-bg-3) 5%, var(--theme-bg-2) 100%);
|
||||||
|
background-color: var(--theme-bg-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner {
|
||||||
|
margin: auto;
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square {
|
||||||
|
width: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
14
packages/web-svelte/src/widgets/SearchInput.svelte
Normal file
14
packages/web-svelte/src/widgets/SearchInput.svelte
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<script>
|
||||||
|
export let placeholder;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<input type="text" {placeholder} />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
input {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 10px;
|
||||||
|
width: 10px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
13
packages/web-svelte/src/widgets/WidgetColumnBar.svelte
Normal file
13
packages/web-svelte/src/widgets/WidgetColumnBar.svelte
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<div class="main-container">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.main-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: column;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
23
packages/web-svelte/src/widgets/WidgetColumnBarItem.svelte
Normal file
23
packages/web-svelte/src/widgets/WidgetColumnBarItem.svelte
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<script>
|
||||||
|
export let title;
|
||||||
|
export let visible = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="title" on:click={() => (visible = !visible)}>{title}</div>
|
||||||
|
|
||||||
|
{#if visible}
|
||||||
|
<slot />
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.title {
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
background-color: var(--theme-bg-4);
|
||||||
|
border: 1px solid var(--theme-border);
|
||||||
|
}
|
||||||
|
.title:hover {
|
||||||
|
background-color: var(--theme-bg-3);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
10
packages/web-svelte/src/widgets/WidgetsInnerContainer.svelte
Normal file
10
packages/web-svelte/src/widgets/WidgetsInnerContainer.svelte
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<div><slot /></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
flex: 1 1;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
width: var(--dim-left-panel-width);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user