Skip to content

Commit

Permalink
⚡ 修改类型定义.
Browse files Browse the repository at this point in the history
  • Loading branch information
lijiahangmax committed Jul 24, 2024
1 parent 0240a12 commit 3513196
Show file tree
Hide file tree
Showing 57 changed files with 89 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@
</script>

<script lang="ts" setup>
import type { CronPropType } from './const.types';
import type { CronPropType } from './const';
import { computed, onMounted, reactive, ref, watch } from 'vue';
import { cronEmits, cronDefaultProps, convertWeekToQuartz } from './const.types';
import { cronEmits, cronDefaultProps, convertWeekToQuartz } from './const';
import { useDebounceFn } from '@vueuse/core';
import { dateFormat } from '@/utils';
import { copy } from '@/hooks/copy';
Expand Down
4 changes: 2 additions & 2 deletions orion-visor-ui/src/store/modules/terminal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
TerminalShortcutSetting,
TerminalState
} from './types';
import type { ITerminalSession, PanelSessionTabType, TerminalPanelTabItem } from '@/views/host/terminal/types/terminal.type';
import type { ITerminalSession, PanelSessionTabType, TerminalPanelTabItem } from '@/views/host/terminal/types/define';
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
import { getCurrentAuthorizedHost } from '@/api/asset/asset-authorized-data';
import type { HostQueryResponse } from '@/api/asset/host';
Expand All @@ -18,7 +18,7 @@ import { defineStore } from 'pinia';
import { getPreference, updatePreference } from '@/api/user/preference';
import { nextId } from '@/utils';
import { Message } from '@arco-design/web-vue';
import { TerminalTabs } from '@/views/host/terminal/types/terminal.const';
import { TerminalTabs } from '@/views/host/terminal/types/const';
import TerminalTabManager from '@/views/host/terminal/handler/terminal-tab-manager';
import TerminalSessionManager from '@/views/host/terminal/handler/terminal-session-manager';
import TerminalPanelManager from '@/views/host/terminal/handler/terminal-panel-manager';
Expand Down
2 changes: 1 addition & 1 deletion orion-visor-ui/src/store/modules/terminal/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ISftpTransferManager, ITerminalPanelManager, ITerminalSessionManager, ITerminalTabManager } from '@/views/host/terminal/types/terminal.type';
import type { ISftpTransferManager, ITerminalPanelManager, ITerminalSessionManager, ITerminalTabManager } from '@/views/host/terminal/types/define';
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
import type { TerminalTheme } from '@/api/asset/host-terminal';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@
</script>

<script lang="ts" setup>
import type { ISshSession } from '../../types/terminal.type';
import type { ISshSession } from '../../types/define';
import type { CommandSnippetWrapperResponse, CommandSnippetQueryResponse } from '@/api/asset/command-snippet';
import { ref, watch, provide } from 'vue';
import useVisible from '@/hooks/visible';
import useLoading from '@/hooks/loading';
import { deleteCommandSnippet, getCommandSnippetList } from '@/api/asset/command-snippet';
import { useCacheStore, useTerminalStore } from '@/store';
import { openUpdateSnippetKey, removeSnippetKey } from './types/const';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
import CommandSnippetListItem from './command-snippet-list-item.vue';
import CommandSnippetListGroup from './command-snippet-list-group.vue';
import CommandSnippetFormDrawer from './command-snippet-form-drawer.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@
</script>

<script lang="ts" setup>
import type { ISshSession } from '../../types/terminal.type';
import type { ISshSession } from '../../types/define';
import type { CommandSnippetQueryResponse } from '@/api/asset/command-snippet';
import { useTerminalStore } from '@/store';
import { useDebounceFn } from '@vueuse/core';
import { copy } from '@/hooks/copy';
import { inject } from 'vue';
import { openUpdateSnippetKey, removeSnippetKey } from './types/const';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
const props = defineProps<{
item: CommandSnippetQueryResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
</script>

<script lang="ts" setup>
import type { TerminalTabItem, CombinedHandlerItem } from '../../types/terminal.type';
import type { TerminalTabItem, CombinedHandlerItem } from '../../types/define';
import type { HostQueryResponse } from '@/api/asset/host';
import { onMounted, ref } from 'vue';
import { useTerminalStore } from '@/store';
import { PanelSessionType, TerminalTabs } from '../../types/terminal.const';
import { PanelSessionType, TerminalTabs } from '../../types/const';
const totalCount = 7;
const { tabManager, hosts, openSession } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</script>
<script lang="ts" setup>
import type { SidebarAction } from '../../types/terminal.type';
import type { SidebarAction } from '../../types/define';
defineProps<Partial<{
actions: Array<SidebarAction>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</script>

<script lang="ts" setup>
import type { SidebarAction } from '../../types/terminal.type';
import type { SidebarAction } from '../../types/define';
import { useFullscreen } from '@vueuse/core';
import { computed } from 'vue';
import { useTerminalStore } from '@/store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</script>

<script lang="ts" setup>
import type { SidebarAction } from '../../types/terminal.type';
import { TerminalTabs } from '../../types/terminal.const';
import type { SidebarAction } from '../../types/define';
import { TerminalTabs } from '../../types/const';
import { useTerminalStore } from '@/store';
import IconActions from './icon-actions.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</script>

<script lang="ts" setup>
import type { ISshSession } from '../../types/terminal.type';
import { TerminalTabs, TerminalShortcutKeys, PanelSessionType } from '../../types/terminal.const';
import type { ISshSession } from '../../types/define';
import { TerminalTabs, TerminalShortcutKeys, PanelSessionType } from '../../types/const';
import { useTerminalStore } from '@/store';
import { onMounted, onUnmounted, watch } from 'vue';
import { addEventListen, removeEventListen } from '@/utils/event';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</script>

<script lang="ts" setup>
import type { SidebarAction } from '../../types/terminal.type';
import type { SidebarAction } from '../../types/define';
import IconActions from './icon-actions.vue';
const emits = defineEmits(['openCommandSnippet', 'openPathBookmark', 'openTransferList', 'screenshot']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
</script>

<script lang="ts" setup>
import type { ISshSession, ITerminalTabManager, TerminalPanelTabItem } from '../../types/terminal.type';
import type { ISshSession, ITerminalTabManager, TerminalPanelTabItem } from '../../types/define';
import { watch } from 'vue';
import { useTerminalStore } from '@/store';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
import SshView from '../ssh/ssh-view.vue';
import SftpView from '../sftp/sftp-view.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<script lang="ts" setup>
import { useTerminalStore } from '@/store';
import { ref, onMounted, onUnmounted } from 'vue';
import { TerminalShortcutKeys, TerminalTabs } from '../../types/terminal.const';
import { TerminalShortcutKeys, TerminalTabs } from '../../types/const';
import { addEventListen, removeEventListen } from '@/utils/event';
import TerminalPanel from './terminal-panel.vue';
import HostListModal from '../new-connection/host-list-modal.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@
</script>

<script lang="ts" setup>
import type { PanelSessionTabType } from '../../types/terminal.type';
import type { PanelSessionTabType } from '../../types/define';
import type { HostQueryResponse } from '@/api/asset/host';
import { computed, ref } from 'vue';
import { useTerminalStore } from '@/store';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
import useVisible from '@/hooks/visible';
const { hosts, openSession } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
import { dataColor } from '@/utils';
import { tagColor } from '@/views/asset/host-list/types/const';
import { updateHostExtra } from '@/api/asset/host-extra';
import { openSettingModalKey, PanelSessionType, ExtraSettingItems } from '../../types/terminal.const';
import { openSettingModalKey, PanelSessionType, ExtraSettingItems } from '../../types/const';
import { useTerminalStore } from '@/store';
const props = defineProps<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import type { AuthorizedHostQueryResponse } from '@/api/asset/asset-authorized-data';
import type { HostQueryResponse } from '@/api/asset/host';
import { computed, onMounted, provide, ref, watch } from 'vue';
import { NewConnectionType, openSettingModalKey } from '../../types/terminal.const';
import { NewConnectionType, openSettingModalKey } from '../../types/const';
import HostGroupView from './host-group-view.vue';
import HostListView from './host-list-view.vue';
import HostSettingModal from '../setting/extra/host-setting-modal.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<script lang="ts" setup>
import type { SelectOptionData } from '@arco-design/web-vue';
import { onBeforeMount, ref } from 'vue';
import { NewConnectionType, newConnectionTypeKey } from '../../types/terminal.const';
import { NewConnectionType, newConnectionTypeKey } from '../../types/const';
import { useDictStore, useTerminalStore } from '@/store';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { dataColor } from '@/utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
</script>

<script lang="ts" setup>
import type { ISshSession } from '../../types/terminal.type';
import type { ISshSession } from '../../types/define';
import type { PathBookmarkWrapperResponse, PathBookmarkQueryResponse } from '@/api/asset/path-bookmark';
import { ref, provide, watch } from 'vue';
import useVisible from '@/hooks/visible';
import useLoading from '@/hooks/loading';
import { deletePathBookmark, getPathBookmarkList } from '@/api/asset/path-bookmark';
import { useCacheStore, useTerminalStore } from '@/store';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
import { openUpdatePathKey, removePathKey } from './types/const';
import PathBookmarkListItem from './path-bookmark-list-item.vue';
import PathBookmarkListGroup from './path-bookmark-list-group.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import { createPathBookmark, updatePathBookmark } from '@/api/asset/path-bookmark';
import formRules from './types/form.rules';
import { PathBookmarkType } from './types/const';
import { pathBookmarkTypeKey } from '../../types/terminal.const';
import { pathBookmarkTypeKey } from '../../types/const';
import { useDictStore } from '@/store';
import { Message } from '@arco-design/web-vue';
import PathBookmarkGroupSelect from './path-bookmark-group-select.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@
</script>

<script lang="ts" setup>
import type { ISftpSession, ISshSession } from '../../types/terminal.type';
import type { ISftpSession, ISshSession } from '../../types/define';
import type { PathBookmarkQueryResponse } from '@/api/asset/path-bookmark';
import { useTerminalStore } from '@/store';
import { useDebounceFn } from '@vueuse/core';
import { copy } from '@/hooks/copy';
import { inject } from 'vue';
import { getParentPath } from '@/utils/file';
import { openUpdatePathKey, PathBookmarkType, removePathKey } from './types/const';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
const props = defineProps<{
item: PathBookmarkQueryResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

<script lang="ts" setup>
import type { TerminalActionBarSetting } from '@/store/modules/terminal/types';
import type { SidebarAction } from '../../../types/terminal.type';
import type { SidebarAction } from '../../../types/define';
import { computed, ref, watch } from 'vue';
import { useTerminalStore } from '@/store';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { ActionBarItems } from '../../../types/terminal.const';
import { ActionBarItems } from '../../../types/const';
import { isSecureEnvironment } from '@/utils/env';
import IconActions from '../../layout/icon-actions.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
import type { TerminalDisplaySetting } from '@/store/modules/terminal/types';
import { ref, watch, onMounted } from 'vue';
import { useDictStore, useTerminalStore } from '@/store';
import { fontFamilyKey, fontSizeKey, fontWeightKey, cursorStyleKey } from '../../../types/terminal.const';
import { fontFamilyKey, fontSizeKey, fontWeightKey, cursorStyleKey } from '../../../types/const';
import { labelFilter } from '@/types/form';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { defaultFontFamily } from '@/types/xterm';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@
</script>

<script lang="ts" setup>
import type { ContextMenuItem } from '../../../types/terminal.type';
import type { ContextMenuItem } from '../../../types/define';
import { computed, ref, watch } from 'vue';
import { useTerminalStore } from '@/store';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { ActionBarItems } from '../../../types/terminal.const';
import { ActionBarItems } from '../../../types/const';
import { isSecureEnvironment } from '@/utils/env';
const { preference, updateTerminalPreference } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import { ref } from 'vue';
import useLoading from '@/hooks/loading';
import useVisible from '@/hooks/visible';
import { ExtraSettingItems } from '../../../types/terminal.const';
import { ExtraSettingItems } from '../../../types/const';
import { updateHostExtra } from '@/api/asset/host-extra';
import { Message } from '@arco-design/web-vue';
import SshSettingForm from './ssh-setting-form.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
</script>

<script lang="ts" setup>
import type { LabelExtraSettingModel } from '../../../types/terminal.type';
import type { LabelExtraSettingModel } from '../../../types/define';
import { onMounted, ref } from 'vue';
import { tabColorKey } from '../../../types/terminal.const';
import { tabColorKey } from '../../../types/const';
import { getHostExtraItem } from '@/api/asset/host-extra';
import { useDictStore } from '@/store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
</script>

<script lang="ts" setup>
import type { SshExtraSettingModel } from '../../../types/terminal.type';
import type { SshExtraSettingModel } from '../../../types/define';
import { onMounted, ref } from 'vue';
import { getHostExtraItem } from '@/api/asset/host-extra';
import { ExtraSshAuthType, extraSshAuthTypeKey } from '../../../types/terminal.const';
import { ExtraSshAuthType, extraSshAuthTypeKey } from '../../../types/const';
import { useDictStore } from '@/store';
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
import HostIdentitySelector from '@/components/asset/host-identity/selector/index.vue';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import { ref, watch } from 'vue';
import { useDictStore, useTerminalStore } from '@/store';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { emulationTypeKey } from '../../../types/terminal.const';
import { emulationTypeKey } from '../../../types/const';
import BlockSettingItem from '../block-setting-item.vue';
const { toOptions } = useDictStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
import type { TerminalShortcutKeyEditable } from '@/store/modules/terminal/types';
import type { VNodeRef } from 'vue';
import { setAutoFocus } from '@/utils/dom';
import { TerminalShortcutKeys } from '../../../types/terminal.const';
import { TerminalShortcutKeys } from '../../../types/const';
defineProps<{
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import { ref, onMounted, onUnmounted } from 'vue';
import { getDefaultPreference, getPreference } from '@/api/user/preference';
import { TerminalPreferenceItem } from '@/store/modules/terminal';
import { TerminalShortcutItems, TerminalShortcutType } from '../../../types/terminal.const';
import { TerminalShortcutItems, TerminalShortcutType } from '../../../types/const';
import { useTerminalStore } from '@/store';
import useLoading from '@/hooks/loading';
import { useDebounceFn } from '@vueuse/core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
</script>

<script lang="ts" setup>
import type { ISftpSession } from '../../types/terminal.type';
import type { ISftpSession } from '../../types/define';
import useVisible from '@/hooks/visible';
import { nextTick, ref } from 'vue';
import { useTerminalStore } from '@/store';
import { permission10toString } from '@/utils/file';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
const { visible, setVisible } = useVisible();
const { sessionManager } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
</script>

<script lang="ts" setup>
import type { ISftpSession } from '../../types/terminal.type';
import type { ISftpSession } from '../../types/define';
import useVisible from '@/hooks/visible';
import { nextTick, ref } from 'vue';
import { useTerminalStore } from '@/store';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
const { visible, setVisible } = useVisible();
const { sessionManager } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
</script>

<script lang="ts" setup>
import type { ISftpSession } from '../../types/terminal.type';
import type { ISftpSession } from '../../types/define';
import useVisible from '@/hooks/visible';
import { nextTick, ref } from 'vue';
import { useTerminalStore } from '@/store';
import { PanelSessionType } from '../../types/terminal.const';
import { PanelSessionType } from '../../types/const';
const { visible, setVisible } = useVisible();
const { sessionManager } = useTerminalStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@
<script lang="ts" setup>
import type { PathAnalysis } from '@/utils/file';
import type { ISftpSession } from '../../types/terminal.type';
import type { ISftpSession } from '../../types/define';
import { inject, nextTick, ref, watch } from 'vue';
import { getParentPath, getPathAnalysis } from '@/utils/file';
import { openSftpCreateModalKey, openSftpUploadModalKey } from '../../types/terminal.const';
import { openSftpCreateModalKey, openSftpUploadModalKey } from '../../types/const';
import { useTerminalStore } from '@/store';
const props = defineProps<{
Expand Down
Loading

0 comments on commit 3513196

Please sign in to comment.