diff --git a/src/components/dialog/CreateEditDialog.vue b/src/components/dialog/CreateEditDialog.vue index 58eadebf340b7..3c8c0a1308699 100644 --- a/src/components/dialog/CreateEditDialog.vue +++ b/src/components/dialog/CreateEditDialog.vue @@ -1,30 +1,31 @@ diff --git a/src/components/file/UploadFilesDialog.vue b/src/components/file/UploadFilesDialog.vue index b0cbb806df7b3..d4062ccadfb23 100644 --- a/src/components/file/UploadFilesDialog.vue +++ b/src/components/file/UploadFilesDialog.vue @@ -124,7 +124,6 @@ const onUploadConfirm = async () => { }; const onFilesChange = (fileList: FileWithPath[]) => { - console.debug(fileList); if (!fileList.length) return; files.value = fileList; diff --git a/src/components/git/GitForm.vue b/src/components/git/GitForm.vue index 49a808547c9f7..85d6f01a53c0e 100644 --- a/src/components/git/GitForm.vue +++ b/src/components/git/GitForm.vue @@ -21,6 +21,7 @@ form.auth_type === 'http' ? ['fa', 'fa-link'] : ['fa', 'fa-key'] " :label="form.auth_type?.toUpperCase()" + size="large" /> diff --git a/src/components/git/GitStatus.vue b/src/components/git/GitStatus.vue index af5757c27df2d..9433b88b174d1 100644 --- a/src/components/git/GitStatus.vue +++ b/src/components/git/GitStatus.vue @@ -1,5 +1,6 @@ - + + diff --git a/src/components/index.ts b/src/components/index.ts index 9e171ecf3b0e4..2b7370846e871 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -41,6 +41,7 @@ import FileEditorSettingsDialog from './file/FileEditorSettingsDialog.vue'; import FileTab from './file/FileTab.vue'; import FileUpload from './file/FileUpload.vue'; import UploadFilesDialog from './file/UploadFilesDialog.vue'; +import UploadGitFilesDialog from './file/UploadGitFilesDialog.vue'; import FilterCondition from './filter/FilterCondition.vue'; import FilterConditionList from './filter/FilterConditionList.vue'; import FilterInput from './filter/FilterInput.vue'; @@ -53,6 +54,7 @@ import FormTableField from './form/FormTableField.vue'; import CreateEditGitDialog from './git/CreateEditGitDialog.vue'; import GitFileStatus from './git/GitFileStatus.vue'; import GitForm from './git/GitForm.vue'; +import GitStatus from './git/GitStatus.vue'; import AtomMaterialIcon from './icon/AtomMaterialIcon.vue'; import Icon from './icon/Icon.vue'; import MenuItemIcon from './icon/MenuItemIcon.vue'; @@ -126,11 +128,8 @@ import TableHeaderDialogFilter from './table/TableHeaderDialogFilter.vue'; import TableHeaderDialogSort from './table/TableHeaderDialogSort.vue'; import CheckTag from './tag/CheckTag.vue'; import CheckTagGroup from './tag/CheckTagGroup.vue'; -import CreateEditTagDialog from './tag/CreateEditTagDialog.vue'; import LinkTag from './tag/LinkTag.vue'; import Tag from './tag/Tag.vue'; -import TagForm from './tag/TagForm.vue'; -import TagList from './tag/TagList.vue'; import CreateTaskDialog from './task/CreateTaskDialog.vue'; import TaskCommand from './task/TaskCommand.vue'; import TaskForm from './task/TaskForm.vue'; @@ -190,6 +189,7 @@ export { FileTab as ClFileTab, FileUpload as ClFileUpload, UploadFilesDialog as ClUploadFilesDialog, + UploadGitFilesDialog as ClUploadGitFilesDialog, FilterCondition as ClFilterCondition, FilterConditionList as ClFilterConditionList, FilterInput as ClFilterInput, @@ -202,6 +202,7 @@ export { CreateEditGitDialog as ClCreateEditGitDialog, GitFileStatus as ClGitFileStatus, GitForm as ClGitForm, + GitStatus as ClGitStatus, AtomMaterialIcon as ClAtomMaterialIcon, Icon as ClIcon, MenuItemIcon as ClMenuItemIcon, @@ -275,11 +276,8 @@ export { TableHeaderDialogSort as ClTableHeaderDialogSort, CheckTag as ClCheckTag, CheckTagGroup as ClCheckTagGroup, - CreateEditTagDialog as ClCreateEditTagDialog, LinkTag as ClLinkTag, Tag as ClTag, - TagForm as ClTagForm, - TagList as ClTagList, CreateTaskDialog as ClCreateTaskDialog, TaskCommand as ClTaskCommand, TaskForm as ClTaskForm, diff --git a/src/components/nav/NavActionGroup.vue b/src/components/nav/NavActionGroup.vue index dc0d3bb685dd5..de20eed02a329 100644 --- a/src/components/nav/NavActionGroup.vue +++ b/src/components/nav/NavActionGroup.vue @@ -1,3 +1,5 @@ + + - - diff --git a/src/components/nav/NavSidebar.vue b/src/components/nav/NavSidebar.vue index 107cf63ad6356..6566f9c66565d 100644 --- a/src/components/nav/NavSidebar.vue +++ b/src/components/nav/NavSidebar.vue @@ -103,7 +103,7 @@ export default defineComponent({ return items.filter(d => d.title ?.toLocaleLowerCase() - .includes(searchString.value.toLocaleLowerCase()), + .includes(searchString.value.toLocaleLowerCase()) ); }); @@ -228,12 +228,13 @@ export default defineComponent({ } diff --git a/src/components/tag/CheckTagGroup.vue b/src/components/tag/CheckTagGroup.vue index 3d23fc6ae16e3..7121ebc26e215 100644 --- a/src/components/tag/CheckTagGroup.vue +++ b/src/components/tag/CheckTagGroup.vue @@ -1,3 +1,41 @@ + + - - diff --git a/src/components/tag/LinkTag.vue b/src/components/tag/LinkTag.vue index ef07755f65878..7100e48028f4d 100644 --- a/src/components/tag/LinkTag.vue +++ b/src/components/tag/LinkTag.vue @@ -1,3 +1,22 @@ + + - - diff --git a/src/components/tag/Tag.vue b/src/components/tag/Tag.vue index 14232bb70d7c4..daa26949eb22e 100644 --- a/src/components/tag/Tag.vue +++ b/src/components/tag/Tag.vue @@ -1,3 +1,101 @@ + + - - diff --git a/src/components/tag/TagList.vue b/src/components/tag/TagList.vue deleted file mode 100644 index 65a9159600ba8..0000000000000 --- a/src/components/tag/TagList.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/components/task/TaskStatus.vue b/src/components/task/TaskStatus.vue index e2ea6b342997b..8ddbe0429b3db 100644 --- a/src/components/task/TaskStatus.vue +++ b/src/components/task/TaskStatus.vue @@ -17,7 +17,7 @@ const props = defineProps<{ }>(); const emit = defineEmits<{ - (e: 'click', _: void): void; + (e: 'click'): void; }>(); // i18n diff --git a/src/i18n/lang/en/components/git.ts b/src/i18n/lang/en/components/git.ts index 040e1665f212d..0228dfbb6f265 100644 --- a/src/i18n/lang/en/components/git.ts +++ b/src/i18n/lang/en/components/git.ts @@ -45,11 +45,13 @@ const git: LComponentsGit = { actions: { title: 'Git Actions', label: { + retry: 'Retry', pull: 'Pull', commit: 'Commit', checkout: 'Checkout', }, tooltip: { + retry: 'Retry', pull: 'Pull', commit: 'Commit and Push', checkout: 'Checkout', diff --git a/src/i18n/lang/zh/components/git.ts b/src/i18n/lang/zh/components/git.ts index 6425320e98b4c..a2470ced62210 100644 --- a/src/i18n/lang/zh/components/git.ts +++ b/src/i18n/lang/zh/components/git.ts @@ -45,11 +45,13 @@ const git: LComponentsGit = { actions: { title: 'Git 操作', label: { + retry: '重试', pull: '拉取', commit: '提交', checkout: '签出', }, tooltip: { + retry: '重试', pull: '拉取', commit: '拉取并推送', checkout: '签出', diff --git a/src/interfaces/components/tag/CheckTag.d.ts b/src/interfaces/components/tag/CheckTag.d.ts deleted file mode 100644 index dd242be05dd75..0000000000000 --- a/src/interfaces/components/tag/CheckTag.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface CheckTagProps extends TagProps { - modelValue?: boolean; -} diff --git a/src/interfaces/components/tag/CheckTagGroup.d.ts b/src/interfaces/components/tag/CheckTagGroup.d.ts deleted file mode 100644 index fa0f3415afeea..0000000000000 --- a/src/interfaces/components/tag/CheckTagGroup.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -interface CheckTagGroupProps { - modelValue: string[]; - options: SelectOption[]; - disabled: boolean; - className?: string; -} diff --git a/src/interfaces/components/tag/LinkTag.d.ts b/src/interfaces/components/tag/LinkTag.d.ts deleted file mode 100644 index d4745e5e79cff..0000000000000 --- a/src/interfaces/components/tag/LinkTag.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -interface LinkTagProps extends TagProps { - path?: string; -} diff --git a/src/interfaces/components/tag/Tag.d.ts b/src/interfaces/components/tag/Tag.d.ts index ff293c8d35601..3546cd3345496 100644 --- a/src/interfaces/components/tag/Tag.d.ts +++ b/src/interfaces/components/tag/Tag.d.ts @@ -1,21 +1,20 @@ -export declare global { - interface TagProps { - label?: string; - tooltip?: string; - type?: BasicType; - color?: string; - backgroundColor?: string; - borderColor?: string; - icon?: Icon; - spinning?: boolean; - width?: string; - effect?: BasicEffect; - clickable?: boolean; - closable?: boolean; - disabled?: boolean; - tag?: Tag; - className?: string; - } - - type TagData = TagProps; +interface TagProps { + label?: string; + tooltip?: string; + type?: BasicType; + color?: string; + backgroundColor?: string; + borderColor?: string; + icon?: string | string[]; + size?: BasicSize; + spinning?: boolean; + width?: string; + effect?: BasicEffect; + clickable?: boolean; + closable?: boolean; + disabled?: boolean; + tag?: Tag; + className?: string; } + +type TagData = TagProps; diff --git a/src/interfaces/components/tag/TagList.d.ts b/src/interfaces/components/tag/TagList.d.ts deleted file mode 100644 index 95f6316259c22..0000000000000 --- a/src/interfaces/components/tag/TagList.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -interface TagListProps { - tags: Tag[]; - clickable: boolean; -} diff --git a/src/interfaces/element/index.d.ts b/src/interfaces/element/index.d.ts index 03d020e6f3e6c..df5450f40cb6f 100644 --- a/src/interfaces/element/index.d.ts +++ b/src/interfaces/element/index.d.ts @@ -1,14 +1,7 @@ export declare global { - type BasicType = - | '' - | 'primary' - | 'success' - | 'warning' - | 'danger' - | 'info' - | 'plain'; + type BasicType = 'primary' | 'success' | 'warning' | 'danger' | 'info'; type BasicEffect = 'dark' | 'light' | 'plain'; - type BasicSize = 'mini' | 'small' | 'medium' | 'large'; + type BasicSize = 'small' | 'default' | 'large'; type ElFormValidator = (rule: any, value: any, callback: any) => void; diff --git a/src/interfaces/i18n/components/git.d.ts b/src/interfaces/i18n/components/git.d.ts index 3b30327ca498e..b546e239099d5 100644 --- a/src/interfaces/i18n/components/git.d.ts +++ b/src/interfaces/i18n/components/git.d.ts @@ -45,11 +45,13 @@ interface LComponentsGit { actions: { title: string; label: { + retry: string; pull: string; commit: string; checkout: string; }; tooltip: { + retry: string; pull: string; commit: string; checkout: string; diff --git a/src/interfaces/store/index.d.ts b/src/interfaces/store/index.d.ts index dba29e6a53a61..de47ab1c4bf02 100644 --- a/src/interfaces/store/index.d.ts +++ b/src/interfaces/store/index.d.ts @@ -81,6 +81,7 @@ export declare global { sidebarCollapsed: boolean; actionsCollapsed: boolean; tabs: NavItem[]; + disabledTabKeys: string[]; afterSave: (() => Promise)[]; } @@ -140,6 +141,8 @@ export declare global { expandActions: StoreMutation>; collapseActions: StoreMutation>; setTabs: StoreMutation; + setDisabledTabKeys: StoreMutation; + resetDisabledTabKeys: StoreMutation; setAfterSave: StoreMutation, (() => Promise)[]>; } diff --git a/src/interfaces/store/modules/git.d.ts b/src/interfaces/store/modules/git.d.ts index 88e36a9e15b21..444a776ca1555 100644 --- a/src/interfaces/store/modules/git.d.ts +++ b/src/interfaces/store/modules/git.d.ts @@ -42,6 +42,7 @@ interface GitStoreActions extends BaseStoreActions, BaseFileStoreActions { getGit: StoreAction; + cloneGit: StoreAction; getGitRemoteRefs: StoreAction; getGitBranches: StoreAction; getGitTags: StoreAction; diff --git a/src/layouts/content/detail/DetailLayout.vue b/src/layouts/content/detail/DetailLayout.vue index 5dbb201ec8211..c8f45dfb066bf 100644 --- a/src/layouts/content/detail/DetailLayout.vue +++ b/src/layouts/content/detail/DetailLayout.vue @@ -1,3 +1,85 @@ + + - - diff --git a/src/views/tag/detail/tabs/TagDetailTabOverview.vue b/src/views/tag/detail/tabs/TagDetailTabOverview.vue deleted file mode 100644 index fdab146c4f5ba..0000000000000 --- a/src/views/tag/detail/tabs/TagDetailTabOverview.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/src/views/tag/list/TagViewList.vue b/src/views/tag/list/TagViewList.vue deleted file mode 100644 index d62a8ce7912ba..0000000000000 --- a/src/views/tag/list/TagViewList.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/src/views/tag/list/useTagList.ts b/src/views/tag/list/useTagList.ts deleted file mode 100644 index 30033324041b4..0000000000000 --- a/src/views/tag/list/useTagList.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { useStore } from 'vuex'; -import { computed, h } from 'vue'; -import useList from '@/layouts/content/list/list'; -import NavLink from '@/components/nav/NavLink.vue'; -import ColorPicker from '@/components/color/ColorPicker.vue'; -import { getActionColumn } from '@/utils/table'; -import { ACTION_ADD, ACTION_DELETE, ACTION_VIEW } from '@/constants/action'; -import Tag from '@/components/tag/Tag.vue'; -import { translate } from '@/utils/i18n'; -import { sendEvent } from '@/admin/umeng'; - -// i18n -const t = translate; - -const useTagList = () => { - // store - const ns = 'tag'; - const store = useStore(); - const { commit } = store; - - // nav actions - const navActions = computed(() => [ - { - name: 'common', - children: [ - { - action: ACTION_ADD, - id: 'add-btn', - className: 'add-btn', - buttonType: 'label', - label: t('views.tags.navActions.new.label'), - tooltip: t('views.tags.navActions.new.tooltip'), - icon: ['fa', 'plus'], - type: 'success', - onClick: () => { - commit(`${ns}/showDialog`, 'create'); - - sendEvent('click_tag_list_new'); - }, - }, - ], - }, - ]); - - // table columns - const tableColumns = computed>(() => [ - { - key: 'name', - label: t('views.tags.table.columns.name'), - icon: ['fa', 'font'], - width: '160', - align: 'left', - value: (row: Tag) => - h(NavLink, { - path: `/tags/${row._id}`, - label: row.name, - }), - }, - { - key: 'color', - label: t('views.tags.table.columns.color'), - icon: ['fa', 'palette'], - width: '120', - value: ({ color }: Tag) => { - return h(ColorPicker, { - modelValue: color, - disabled: true, - }); - }, - }, - { - key: 'col', - label: t('views.tags.table.columns.model'), - icon: ['fa', 'table'], - width: '120', - // value: ({color}: Tag) => { - // return h(Tag, { - // modelValue: color, - // disabled: true, - // }); - // } - }, - { - key: 'description', - label: t('views.tags.table.columns.description'), - icon: ['fa', 'comment-alt'], - width: 'auto', - }, - getActionColumn('/tags', ns, [ACTION_VIEW, ACTION_DELETE]), - ]); - - // options - const opts = { - navActions, - tableColumns, - } as UseListOptions; - - return { - ...useList(ns, store, opts), - }; -}; - -export default useTagList;