Skip to content

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

Show red text on SQL label if it's missing

天舟de96b1c6e4dc
diff --git a/frontend/src/components/IssueTaskStatementPanel.vue b/frontend/src/components/IssueTaskStatementPanel.vue
index 0938f59472..0864e7eaa0 100644
--- a/frontend/src/components/IssueTaskStatementPanel.vue
+++ b/frontend/src/components/IssueTaskStatementPanel.vue
@@ -1,6 +1,9 @@
<template>
<div class="flex justify-between">
- <div class="textlabel">
+ <div
+ class="text-sm font-medium"
+ :class="isEmpty(state.editStatement) ? 'text-red-600' : 'text-control'"
+ >
{{ rollback ? "Rollback SQL" : "SQL" }}
<span v-if="create && !rollback" class="text-red-600">*</span>
</div>
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index 2fa4a250fd..631a76abc1 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -1,4 +1,5 @@
import axios from "axios";
+import isEmpty from "lodash-es/isEmpty";
import moment from "moment";
import { createApp } from "vue";
import App from "./App.vue";
@@ -141,6 +142,7 @@ Promise.all([
app.config.globalProperties.isRelease = isRelease();
app.config.globalProperties.sizeToFit = sizeToFit;
app.config.globalProperties.urlfy = urlfy;
+ app.config.globalProperties.isEmpty = isEmpty;
app.config.globalProperties.environmentName = environmentName;
app.config.globalProperties.environmentSlug = environmentSlug;
app.config.globalProperties.projectName = projectName;