Skip to content

Commit 5dbb4de

Browse files
committed
code lint
1 parent 51518b2 commit 5dbb4de

6 files changed

Lines changed: 9 additions & 20 deletions

File tree

packages/koko/app/tests/terminal/terminal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { MESSAGE_TYPE } from "@jumpserver/connectors-core";
22
import { afterEach, expect, it, vi } from "vitest";
33
import { computed, ref } from "vue";
44

5-
import { resolveClipboardAccess, validateClipboardText } from "#koko/utils/clipboardAcl";
65
import {
76
buildJSONEnvelope,
87
buildTerminalInput,
@@ -33,6 +32,7 @@ import {
3332
import { useKokoTerminalInput } from "#koko/composables/terminal/useTerminalInput";
3433
import { useKokoTerminalMessageHandler } from "#koko/composables/terminal/useTerminalMessageHandler";
3534
import { saveZmodemPacketsToDisk, sendZmodemFiles } from "#koko/composables/terminal/zmodemBrowser";
35+
import { resolveClipboardAccess, validateClipboardText } from "#koko/utils/clipboardAcl";
3636

3737
it("combines token actions with clipboard policy and text limits", () => {
3838
const access = resolveClipboardAccess(

packages/koko/app/tests/terminal/terminalAiPresentation.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { expect, it } from "vitest";
22

3-
import en from "../../../../../i18n/locales/en.json";
4-
import zh from "../../../../../i18n/locales/zh.json";
53
import {
64
terminalAiAclKey,
75
terminalAiBackgroundReasonKey,
86
terminalAiErrorKey,
97
terminalAiExecutionKey,
108
terminalAiProgressKey
119
} from "#koko/composables/terminal/terminalAiPresentation";
10+
import en from "../../../../../i18n/locales/en.json";
11+
import zh from "../../../../../i18n/locales/zh.json";
1212

1313
it("maps Terminal AI protocol values to localized presentation keys", () => {
1414
expect(terminalAiExecutionKey("pty")).toBe("RightPanel.AICurrentPty");

ui/chen/components/QueryConsolePanel.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,7 @@ onBeforeUnmount(clearMessageTimer);
211211
>
212212
Stop
213213
</UButton>
214-
<UButton
215-
v-else
216-
icon="i-lucide-play"
217-
size="sm"
218-
:disabled="Boolean(tab.state.loading)"
219-
@click="runSelectedQuery"
220-
>
214+
<UButton v-else icon="i-lucide-play" size="sm" :disabled="Boolean(tab.state.loading)" @click="runSelectedQuery">
221215
{{ hasSelection ? "Run selected" : "Run" }}
222216
</UButton>
223217
<UButton

ui/chen/components/ResourceTreeNode.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,7 @@ function handleContextMenu(event: MouseEvent) {
117117
<span v-else class="size-4" />
118118
<img v-if="datasourceIconSrc" :src="datasourceIconSrc" alt="" class="sidebar-icon-img" />
119119
<UIcon v-else :name="iconName" class="sidebar-icon" />
120-
<span
121-
class="min-w-0 flex-1 truncate"
122-
:title="node.type === 'recent-table' ? node.fullLabel : undefined"
123-
>
120+
<span class="min-w-0 flex-1 truncate" :title="node.type === 'recent-table' ? node.fullLabel : undefined">
124121
{{ node.label || node.name || node.key }}
125122
</span>
126123
<button

ui/chen/composables/useChenRecentTables.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ function recentTableLabel(node: ChenTreeNode, path: ChenTreeNode[], dbType: stri
3636
}
3737

3838
return path
39-
.filter((item) => item.type === "database" || item.type === "schema" || item.type === "table" || item.type === "view")
39+
.filter(
40+
(item) => item.type === "database" || item.type === "schema" || item.type === "table" || item.type === "view"
41+
)
4042
.map((item) => item.label || item.name || item.key)
4143
.join(".");
4244
}

ui/chen/workspaces/DatabaseSessionSurface.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,7 @@ async function applyTreeAction(node: ChenTreeNode, action: string) {
586586
break;
587587
case "view_data":
588588
openDataViewWorkspace(response.data, "Data View");
589-
recentTables.add(
590-
node,
591-
tree.findNodePathByKey(node.key),
592-
auth.profile.value?.dbType || props.tab.protocol
593-
);
589+
recentTables.add(node, tree.findNodePathByKey(node.key), auth.profile.value?.dbType || props.tab.protocol);
594590
if (!tree.expandedKeys.value.includes(RECENT_TABLES_ROOT_KEY)) {
595591
tree.expandedKeys.value = [RECENT_TABLES_ROOT_KEY, ...tree.expandedKeys.value];
596592
}

0 commit comments

Comments
 (0)