improve: clarify SQL save target tooltip

This commit is contained in:
t8y2 committed 2026-09-01 18:07:19 +08:00
1 parent 1f274c57e3
commit c4cdcbc486
9 files changed
+13 -1

No files matched your search

@@ -133,7 +133,11 @@ const supportsExPaste = computed(() => supportsSqlInListPaste(props.activeConnec
const supportsTransaction = computed(() => supportsTransactionFeature(props.activeConnection?.db_type));
const hasDefaultDatabaseOption = computed(() => activeDatabaseOptions.value.includes(""));
const schemaDatabaseKey = computed(() => props.activeTab.database || (isSingleDb.value ? "_" : ""));
const saveTooltip = computed(() => (props.activeTab.objectSource ? t("objects.saveSource") : t("toolbar.saveSql")));
const saveTooltip = computed(() => {
if (props.activeTab.objectSource) return t("objects.saveSource");
if (props.activeTab.externalSqlPath) return t("toolbar.saveSqlFile");
return t("toolbar.saveSql");
});
const executeShortcutDisplay = computed(() => formatShortcutDisplay(settingsStore.editorSettings.shortcuts.executeSql));
const executeShortcutTooltip = computed(() => t("toolbar.executeShortcut", { shortcut: executeShortcutDisplay.value }));
// executableSql 在无选区时可能是整篇文档;只要有 DML 语句出现就显示预览按钮,