Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(frontend): branch minor fixes (#10706)

Liu Ji8bb8af00af97
diff --git a/frontend/src/components/Branch/BranchDetailView.vue b/frontend/src/components/Branch/BranchDetailView.vue
index 67d8d08aed..3937c385c3 100644
--- a/frontend/src/components/Branch/BranchDetailView.vue
+++ b/frontend/src/components/Branch/BranchDetailView.vue
@@ -199,7 +199,8 @@ const { runSQLCheck } = provideSQLCheckContext();
const schemaDesignerRef = ref<InstanceType<typeof SchemaDesignEditorLite>>();
const state = reactive<LocalState>({
branchId: "",
- showDiff: false,
+ // default true to child branches, default false to main branches
+ showDiff: props.dirtyBranch.parentBranch ? true : false,
isEditing: false,
isEditingBranchId: false,
isReverting: false,
diff --git a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
index 1cc860f4dc..307edb43f1 100644
--- a/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
+++ b/frontend/src/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.vue
@@ -21,6 +21,7 @@
:bordered="true"
:bottom-bordered="true"
class="schema-editor-table-column-editor"
+ :class="[disableDiffColoring && 'disable-diff-coloring']"
/>
</div>
@@ -177,12 +178,13 @@ const state = reactive<LocalState>({
const {
resourceType,
+ disableDiffColoring,
+ selectionEnabled,
markEditStatus,
getColumnStatus,
getColumnConfig,
upsertColumnConfig,
useConsumePendingScrollToColumn,
- selectionEnabled,
getAllColumnsSelectionState,
updateAllColumnsSelection,
} = useSchemaEditorContext();
@@ -779,15 +781,15 @@ useConsumePendingScrollToColumn(
.schema-editor-table-column-editor :deep(.n-data-table-td.text-cell) {
@apply pr-1 py-0;
}
-.schema-editor-table-column-editor
+.schema-editor-table-column-editor:not(.disable-diff-coloring)
:deep(.n-data-table-tr.created .n-data-table-td) {
@apply text-green-700 !bg-green-50;
}
-.schema-editor-table-column-editor
+.schema-editor-table-column-editor:not(.disable-diff-coloring)
:deep(.n-data-table-tr.dropped .n-data-table-td) {
@apply text-red-700 cursor-not-allowed !bg-red-50 opacity-70;
}
-.schema-editor-table-column-editor
+.schema-editor-table-column-editor:not(.disable-diff-coloring)
:deep(.n-data-table-tr.updated .n-data-table-td) {
@apply text-yellow-700 !bg-yellow-50;
}