fix(oracle): preserve DATE time in display and export

This commit is contained in:
zipg authored and GitHub committed 2026-07-09 15:04:34 +08:00
1 parent aa0abcd670
commit ce8cb2b509
17 files changed
+504 -58

No files matched your search

@@ -156,6 +156,7 @@ describe("queryStore database open state", () => {
vi.unstubAllGlobals();
const storage = installLocalStorage();
storage.set("dbx-editor-settings", JSON.stringify({ openTabsRestoreMode: "none" }));
storage.set("dbx-app-state:open_tabs", JSON.stringify({ tabs: JSON.parse(persistedTabs), activeTabId: "tab-1" }));
storage.set(OPEN_TABS_STORAGE_KEY, persistedTabs);
storage.set(ACTIVE_TAB_STORAGE_KEY, "tab-1");
setActivePinia(createPinia());
@@ -170,6 +171,7 @@ describe("queryStore database open state", () => {
expect(store.activeTabId).toBeNull();
expect(storage.get(OPEN_TABS_STORAGE_KEY)).toBeUndefined();
expect(storage.get(ACTIVE_TAB_STORAGE_KEY)).toBeUndefined();
expect(JSON.parse(storage.get("dbx-app-state:open_tabs") ?? "{}")).toEqual({ tabs: [], activeTabId: null });
});
it("restores only pinned tabs when launch restore mode is pinned", async () => {
+6
View File
@@ -681,6 +681,12 @@ export const useQueryStore = defineStore("query", () => {
if (saved?.tabs && Array.isArray(saved.tabs)) {
const restored = restoreSavedTabsFromPayload(saved);
applyRestoredOpenTabs(restored);
if (useSettingsStore().editorSettings.openTabsRestoreMode === "none") {
// Restore is explicitly disabled, so stale saved payloads should not
// reappear if the user later changes the setting.
clearLegacySavedTabs();
await saveTabs(tabs.value, activeTabId.value).catch(() => undefined);
}
isOpenTabsLoaded.value = true;
return;
}