mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 16:43:59 +00:00
db diff UI
This commit is contained in:
@@ -51,6 +51,20 @@
|
|||||||
onClick: () => getCurrentEditor().refreshModels(),
|
onClick: () => getCurrentEditor().refreshModels(),
|
||||||
testEnabled: () => getCurrentEditor() != null,
|
testEnabled: () => getCurrentEditor() != null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function stateOrder(state) {
|
||||||
|
switch (state) {
|
||||||
|
case 'added':
|
||||||
|
return 1;
|
||||||
|
case 'changed':
|
||||||
|
return 2;
|
||||||
|
case 'removed':
|
||||||
|
return 3;
|
||||||
|
case 'equal':
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -296,7 +310,7 @@
|
|||||||
|
|
||||||
<div class="tableWrapper">
|
<div class="tableWrapper">
|
||||||
<ScrollableTableControl
|
<ScrollableTableControl
|
||||||
rows={diffRows}
|
rows={_.sortBy(diffRows, x => stateOrder(x.state))}
|
||||||
bind:selectedIndex={pairIndex}
|
bind:selectedIndex={pairIndex}
|
||||||
selectable
|
selectable
|
||||||
disableFocusOutline
|
disableFocusOutline
|
||||||
|
|||||||
Reference in New Issue
Block a user