mirror of https://github.com/halo-dev/halo
chore: organize and fix imports (#6152)
#### What type of PR is this? /area ui /kind improvement /milestone 2.17.x #### What this PR does / why we need it: 重新组织和固定 UI 部分代码的 imports 导入,防止后续因为 imports 的顺序造成不必要的 diff。 基于:https://github.com/halo-dev/halo/pull/6151 #### Does this PR introduce a user-facing change? ```release-note None ```pull/6137/head^2
parent
5aacd8a252
commit
a93479dc34
|
@ -1,5 +1,5 @@
|
|||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { watch, type Ref, ref, nextTick } from "vue";
|
||||
import { nextTick, ref, watch, type Ref } from "vue";
|
||||
|
||||
interface SnapshotContent {
|
||||
version: Ref<number>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { usePluginModuleStore } from "@/stores/plugin";
|
||||
import type { EntityFieldItem, PluginModule } from "@halo-dev/console-shared";
|
||||
import { onMounted, ref, type ComputedRef, type Ref, computed } from "vue";
|
||||
import { computed, onMounted, ref, type ComputedRef, type Ref } from "vue";
|
||||
|
||||
export function useEntityFieldItemExtensionPoint<T>(
|
||||
extensionPointName: string,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { usePluginModuleStore } from "@/stores/plugin";
|
||||
import type { OperationItem, PluginModule } from "@halo-dev/console-shared";
|
||||
import { onMounted, ref, type ComputedRef, type Ref, computed } from "vue";
|
||||
import { computed, onMounted, ref, type ComputedRef, type Ref } from "vue";
|
||||
|
||||
export function useOperationItemExtensionPoint<T>(
|
||||
extensionPointName: string,
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
// core libs
|
||||
// types
|
||||
import { computed, watch, type ComputedRef, type Ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { computed, ref, watch, type ComputedRef, type Ref } from "vue";
|
||||
|
||||
// libs
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import type { ConfigMap, Setting, SettingForm } from "@halo-dev/api-client";
|
||||
import type { FormKitSchemaCondition, FormKitSchemaNode } from "@formkit/core";
|
||||
import type { ConfigMap, Setting, SettingForm } from "@halo-dev/api-client";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
interface useSettingFormConvertReturn {
|
||||
formSchema: ComputedRef<
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { useGlobalInfoStore } from "@/stores/global-info";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import ShortUniqueId from "short-unique-id";
|
||||
import { slugify } from "transliteration";
|
||||
import { watch, type Ref } from "vue";
|
||||
import ShortUniqueId from "short-unique-id";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { useGlobalInfoStore } from "@/stores/global-info";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
const uid = new ShortUniqueId();
|
||||
const Strategy = {
|
||||
generateByTitle: (value: string) => {
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
<script lang="ts" setup>
|
||||
import GlobalSearchModal from "@/components/global-search/GlobalSearchModal.vue";
|
||||
import LoginModal from "@/components/login/LoginModal.vue";
|
||||
import { RoutesMenu } from "@/components/menu/RoutesMenu";
|
||||
import { useRouteMenuGenerator } from "@/composables/use-route-menu-generator";
|
||||
import { rbacAnnotations } from "@/constants/annotations";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { isMac } from "@/utils/device";
|
||||
import { coreMenuGroups } from "@console/router/constant";
|
||||
import {
|
||||
Dialog,
|
||||
IconAccountCircleLine,
|
||||
IconLogoutCircleRLine,
|
||||
IconMore,
|
||||
IconSearch,
|
||||
IconUserSettings,
|
||||
IconLogoutCircleRLine,
|
||||
VTag,
|
||||
VAvatar,
|
||||
Dialog,
|
||||
IconAccountCircleLine,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import { RoutesMenu } from "@/components/menu/RoutesMenu";
|
||||
import IconLogo from "~icons/core/logo?width=5rem&height=2rem";
|
||||
import { RouterView, useRoute, useRouter } from "vue-router";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import axios from "axios";
|
||||
import GlobalSearchModal from "@/components/global-search/GlobalSearchModal.vue";
|
||||
import LoginModal from "@/components/login/LoginModal.vue";
|
||||
import { coreMenuGroups } from "@console/router/constant";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { rbacAnnotations } from "@/constants/annotations";
|
||||
import { defineStore, storeToRefs } from "pinia";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {
|
||||
useOverlayScrollbars,
|
||||
type UseOverlayScrollbarsParams,
|
||||
} from "overlayscrollbars-vue";
|
||||
import { isMac } from "@/utils/device";
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import { useRouteMenuGenerator } from "@/composables/use-route-menu-generator";
|
||||
import { defineStore, storeToRefs } from "pinia";
|
||||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { RouterView, useRoute, useRouter } from "vue-router";
|
||||
import IconLogo from "~icons/core/logo?width=5rem&height=2rem";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
import { createApp } from "vue";
|
||||
import type { DirectiveBinding } from "vue";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { createPinia } from "pinia";
|
||||
import type { DirectiveBinding } from "vue";
|
||||
import { createApp } from "vue";
|
||||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
// setup
|
||||
import "@/setup/setupStyles";
|
||||
import { getBrowserLanguage, i18n, setupI18n } from "@/locales";
|
||||
import { setupComponents } from "@/setup/setupComponents";
|
||||
import { setupI18n, i18n, getBrowserLanguage } from "@/locales";
|
||||
import "@/setup/setupStyles";
|
||||
// core modules
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
import { useRoleStore } from "@/stores/role";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { useSystemConfigMapStore } from "@console/stores/system-configmap";
|
||||
import { setupApiClient } from "@/setup/setupApiClient";
|
||||
import { setupVueQuery } from "@/setup/setupVueQuery";
|
||||
import { useGlobalInfoStore } from "@/stores/global-info";
|
||||
import { useRoleStore } from "@/stores/role";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { hasPermission } from "@/utils/permission";
|
||||
import {
|
||||
setupCoreModules,
|
||||
setupPluginModules,
|
||||
} from "@console/setup/setupModules";
|
||||
import { setupApiClient } from "@/setup/setupApiClient";
|
||||
import { useSystemConfigMapStore } from "@console/stores/system-configmap";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import LazyImage from "@/components/image/LazyImage.vue";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { isImage } from "@/utils/image";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
VButton,
|
||||
VDescription,
|
||||
|
@ -6,15 +11,10 @@ import {
|
|||
VModal,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import LazyImage from "@/components/image/LazyImage.vue";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import { computed, ref } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { isImage } from "@/utils/image";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { useFetchAttachmentGroup } from "../composables/use-attachment-group";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import AttachmentPermalinkList from "./AttachmentPermalinkList.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import type { Group } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconCheckboxCircle,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import type { Group } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
Toast,
|
||||
|
@ -9,19 +15,13 @@ import {
|
|||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import type { OperationItem } from "@halo-dev/console-shared";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import type { Ref } from "vue";
|
||||
import { computed, inject, markRaw, ref, toRefs } from "vue";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import { useFetchAttachmentPolicy } from "../composables/use-attachment-policy";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import type { OperationItem } from "@halo-dev/console-shared";
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import { useFetchAttachmentPolicy } from "../composables/use-attachment-policy";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import { VButton } from "@halo-dev/components";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { useAttachmentPermalinkCopy } from "../composables/use-attachment";
|
||||
import { VButton } from "@halo-dev/components";
|
||||
import { computed, toRefs } from "vue";
|
||||
import { useAttachmentPermalinkCopy } from "../composables/use-attachment";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import type { Policy, PolicyTemplate } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import type { Policy } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Toast, VButton, VLoading, VModal, VSpace } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { Ref } from "vue";
|
||||
import type { Group } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import type { Ref } from "vue";
|
||||
|
||||
interface useFetchAttachmentGroupReturn {
|
||||
groups: Ref<Group[] | undefined>;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { Ref } from "vue";
|
||||
import type { Policy, PolicyTemplate } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import type { Ref } from "vue";
|
||||
|
||||
interface useFetchAttachmentPolicyReturn {
|
||||
policies: Ref<Policy[] | undefined>;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { matchMediaType } from "@/utils/media-type";
|
||||
import type { Attachment } from "@halo-dev/api-client";
|
||||
import { computed, nextTick, type Ref, ref, watch } from "vue";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { matchMediaType } from "@/utils/media-type";
|
||||
import { computed, nextTick, ref, watch, type Ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
interface useAttachmentControlReturn {
|
||||
attachments: Ref<Attachment[] | undefined>;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import { IconFolder } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import AttachmentList from "./AttachmentList.vue";
|
||||
import AttachmentSelectorModal from "./components/AttachmentSelectorModal.vue";
|
||||
import { IconFolder } from "@halo-dev/components";
|
||||
import { markRaw } from "vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<script lang="ts" setup>
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import type { ListedComment } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconMessage,
|
||||
IconRefreshLine,
|
||||
Toast,
|
||||
VButton,
|
||||
VCard,
|
||||
VEmpty,
|
||||
VLoading,
|
||||
VPageHeader,
|
||||
VPagination,
|
||||
VSpace,
|
||||
IconRefreshLine,
|
||||
VEmpty,
|
||||
Dialog,
|
||||
VLoading,
|
||||
Toast,
|
||||
} from "@halo-dev/components";
|
||||
import CommentListItem from "./components/CommentListItem.vue";
|
||||
import type { ListedComment } from "@halo-dev/api-client";
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { computed, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import CommentListItem from "./components/CommentListItem.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { usePluginModuleStore } from "@/stores/plugin";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type {
|
||||
|
@ -10,6 +9,7 @@ import type {
|
|||
Post,
|
||||
SinglePage,
|
||||
} from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import type {
|
||||
ListedComment,
|
||||
ListedReply,
|
||||
ReplyRequest,
|
||||
} from "@halo-dev/api-client";
|
||||
import {
|
||||
IconMotionLine,
|
||||
Toast,
|
||||
|
@ -7,18 +13,12 @@ import {
|
|||
VModal,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import type {
|
||||
ListedComment,
|
||||
ListedReply,
|
||||
ReplyRequest,
|
||||
} from "@halo-dev/api-client";
|
||||
// @ts-ignore
|
||||
import { Picker } from "emoji-mart";
|
||||
import i18n from "@emoji-mart/data/i18n/zh.json";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import i18n from "@emoji-mart/data/i18n/zh.json";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { Picker } from "emoji-mart";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import type { ListedComment, ListedReply } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconReplyLine,
|
||||
|
@ -10,12 +13,9 @@ import {
|
|||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import type { ListedComment, ListedReply } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { computed, inject, ref, type Ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import ReplyCreationModal from "./ReplyCreationModal.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import { IconMessage } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import CommentList from "./CommentList.vue";
|
||||
import CommentStatsWidget from "./widgets/CommentStatsWidget.vue";
|
||||
import { markRaw } from "vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useDashboardStats } from "@console/composables/use-dashboard-stats";
|
||||
import { VCard, IconMessage } from "@halo-dev/components";
|
||||
import { IconMessage, VCard } from "@halo-dev/components";
|
||||
|
||||
const { data: stats } = useDashboardStats();
|
||||
</script>
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<script lang="ts" setup>
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { ListedSinglePage, SinglePage } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
IconRefreshLine,
|
||||
IconDeleteBin,
|
||||
IconRefreshLine,
|
||||
Toast,
|
||||
VButton,
|
||||
VCard,
|
||||
VPagination,
|
||||
VSpace,
|
||||
Dialog,
|
||||
VDropdownItem,
|
||||
VEmpty,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VPageHeader,
|
||||
VStatusDot,
|
||||
VLoading,
|
||||
Toast,
|
||||
VDropdownItem,
|
||||
VPageHeader,
|
||||
VPagination,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import { ref, watch } from "vue";
|
||||
import type { ListedSinglePage, SinglePage } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ContributorList from "../_components/ContributorList.vue";
|
||||
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import EditorProviderSelector from "@/components/dropdown-selector/EditorProviderSelector.vue";
|
||||
import UrlPreviewModal from "@/components/preview/UrlPreviewModal.vue";
|
||||
import { useAutoSaveContent } from "@/composables/use-auto-save-content";
|
||||
import { useContentCache } from "@/composables/use-content-cache";
|
||||
import { useEditorExtensionPoints } from "@/composables/use-editor-extension-points";
|
||||
import { useSessionKeepAlive } from "@/composables/use-session-keep-alive";
|
||||
import { contentAnnotations } from "@/constants/annotations";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useContentSnapshot } from "@console/composables/use-content-snapshot";
|
||||
import { useSaveKeybinding } from "@console/composables/use-save-keybinding";
|
||||
import type { SinglePage, SinglePageRequest } from "@halo-dev/api-client";
|
||||
import {
|
||||
consoleApiClient,
|
||||
coreApiClient,
|
||||
ucApiClient,
|
||||
} from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconEye,
|
||||
|
@ -12,41 +29,24 @@ import {
|
|||
VPageHeader,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import SinglePageSettingModal from "./components/SinglePageSettingModal.vue";
|
||||
import type { SinglePage, SinglePageRequest } from "@halo-dev/api-client";
|
||||
import type { EditorProvider } from "@halo-dev/console-shared";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
import {
|
||||
computed,
|
||||
type ComputedRef,
|
||||
nextTick,
|
||||
onMounted,
|
||||
provide,
|
||||
ref,
|
||||
toRef,
|
||||
watch,
|
||||
type ComputedRef,
|
||||
} from "vue";
|
||||
import {
|
||||
consoleApiClient,
|
||||
coreApiClient,
|
||||
ucApiClient,
|
||||
} from "@halo-dev/api-client";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { useRouter } from "vue-router";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import { useContentCache } from "@/composables/use-content-cache";
|
||||
import { useEditorExtensionPoints } from "@/composables/use-editor-extension-points";
|
||||
import type { EditorProvider } from "@halo-dev/console-shared";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import EditorProviderSelector from "@/components/dropdown-selector/EditorProviderSelector.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import UrlPreviewModal from "@/components/preview/UrlPreviewModal.vue";
|
||||
import { contentAnnotations } from "@/constants/annotations";
|
||||
import { useRouter } from "vue-router";
|
||||
import SinglePageSettingModal from "./components/SinglePageSettingModal.vue";
|
||||
import { usePageUpdateMutate } from "./composables/use-page-update-mutate";
|
||||
import { useAutoSaveContent } from "@/composables/use-auto-save-content";
|
||||
import { useContentSnapshot } from "@console/composables/use-content-snapshot";
|
||||
import { useSaveKeybinding } from "@console/composables/use-save-keybinding";
|
||||
import { useSessionKeepAlive } from "@/composables/use-session-keep-alive";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import type { ListedSinglePage, SinglePage } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
@ -15,17 +19,13 @@ import {
|
|||
VPagination,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import SinglePageSettingModal from "./components/SinglePageSettingModal.vue";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import type { Ref } from "vue";
|
||||
import { computed, provide, ref, watch } from "vue";
|
||||
import type { ListedSinglePage, SinglePage } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import SinglePageListItem from "./components/SinglePageListItem.vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import SinglePageSettingModal from "./components/SinglePageSettingModal.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconHistoryLine,
|
||||
|
@ -10,14 +11,13 @@ import {
|
|||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useRoute } from "vue-router";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { computed, watch } from "vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { computed, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRoute } from "vue-router";
|
||||
import SnapshotContent from "./components/SnapshotContent.vue";
|
||||
import SnapshotListItem from "./components/SnapshotListItem.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
const route = useRoute();
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
IconEye,
|
||||
IconEyeOff,
|
||||
IconExternalLinkLine,
|
||||
VSpace,
|
||||
Dialog,
|
||||
VStatusDot,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
Toast,
|
||||
VDropdownItem,
|
||||
VDropdownDivider,
|
||||
} from "@halo-dev/components";
|
||||
import { computed, ref } from "vue";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { ListedSinglePage, SinglePage } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import {
|
||||
Dialog,
|
||||
IconExternalLinkLine,
|
||||
IconEye,
|
||||
IconEyeOff,
|
||||
Toast,
|
||||
VDropdownDivider,
|
||||
VDropdownItem,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import { useMutation, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { inject } from "vue";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import type { Ref } from "vue";
|
||||
import { computed, inject, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { RouterLink } from "vue-router";
|
||||
import ContributorList from "../../_components/ContributorList.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { toDatetimeLocal, toISOString } from "@/utils/date";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import useSlugify from "@console/composables/use-slugify";
|
||||
import { useThemeCustomTemplates } from "@console/modules/interface/themes/composables/use-theme";
|
||||
import { submitForm } from "@formkit/core";
|
||||
import type { SinglePage } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconRefreshLine,
|
||||
Toast,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { computed, toRefs } from "vue";
|
||||
import { Toast, VLoading } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { computed, toRefs } from "vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import type { ListedSnapshotDto, SinglePage } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast, VButton, VStatusDot, VTag } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { computed } from "vue";
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useMutation } from "@tanstack/vue-query";
|
||||
import type { SinglePage } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Toast } from "@halo-dev/components";
|
||||
import { useMutation } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
export function usePageUpdateMutate() {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import SinglePageList from "./SinglePageList.vue";
|
||||
import { IconPages } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import DeletedSinglePageList from "./DeletedSinglePageList.vue";
|
||||
import SinglePageEditor from "./SinglePageEditor.vue";
|
||||
import SinglePageStatsWidget from "./widgets/SinglePageStatsWidget.vue";
|
||||
import { IconPages } from "@halo-dev/components";
|
||||
import { markRaw } from "vue";
|
||||
import SinglePageList from "./SinglePageList.vue";
|
||||
import SinglePageSnapshots from "./SinglePageSnapshots.vue";
|
||||
import SinglePageStatsWidget from "./widgets/SinglePageStatsWidget.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { VCard, IconPages } from "@halo-dev/components";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { singlePageLabels } from "@/constants/labels";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { IconPages, VCard } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
|
||||
const { data: total } = useQuery({
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<script lang="ts" setup>
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
IconDeleteBin,
|
||||
IconRefreshLine,
|
||||
Dialog,
|
||||
Toast,
|
||||
VButton,
|
||||
VCard,
|
||||
VDropdownItem,
|
||||
VEmpty,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VLoading,
|
||||
VPageHeader,
|
||||
VPagination,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VLoading,
|
||||
Toast,
|
||||
VDropdownItem,
|
||||
} from "@halo-dev/components";
|
||||
import PostTag from "./tags/components/PostTag.vue";
|
||||
import { ref, watch } from "vue";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ContributorList from "../_components/ContributorList.vue";
|
||||
import PostTag from "./tags/components/PostTag.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
<script lang="ts" setup>
|
||||
import EditorProviderSelector from "@/components/dropdown-selector/EditorProviderSelector.vue";
|
||||
import UrlPreviewModal from "@/components/preview/UrlPreviewModal.vue";
|
||||
import { useAutoSaveContent } from "@/composables/use-auto-save-content";
|
||||
import { useContentCache } from "@/composables/use-content-cache";
|
||||
import { useEditorExtensionPoints } from "@/composables/use-editor-extension-points";
|
||||
import { useSessionKeepAlive } from "@/composables/use-session-keep-alive";
|
||||
import { contentAnnotations } from "@/constants/annotations";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useContentSnapshot } from "@console/composables/use-content-snapshot";
|
||||
import { useSaveKeybinding } from "@console/composables/use-save-keybinding";
|
||||
import type { Post, PostRequest } from "@halo-dev/api-client";
|
||||
import {
|
||||
consoleApiClient,
|
||||
coreApiClient,
|
||||
ucApiClient,
|
||||
} from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconBookRead,
|
||||
|
@ -12,41 +29,24 @@ import {
|
|||
VPageHeader,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import PostSettingModal from "./components/PostSettingModal.vue";
|
||||
import type { Post, PostRequest } from "@halo-dev/api-client";
|
||||
import type { EditorProvider } from "@halo-dev/console-shared";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
import {
|
||||
computed,
|
||||
type ComputedRef,
|
||||
nextTick,
|
||||
onMounted,
|
||||
provide,
|
||||
ref,
|
||||
toRef,
|
||||
watch,
|
||||
type ComputedRef,
|
||||
} from "vue";
|
||||
import {
|
||||
consoleApiClient,
|
||||
coreApiClient,
|
||||
ucApiClient,
|
||||
} from "@halo-dev/api-client";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { useRouter } from "vue-router";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import { useContentCache } from "@/composables/use-content-cache";
|
||||
import { useEditorExtensionPoints } from "@/composables/use-editor-extension-points";
|
||||
import type { EditorProvider } from "@halo-dev/console-shared";
|
||||
import { useLocalStorage } from "@vueuse/core";
|
||||
import EditorProviderSelector from "@/components/dropdown-selector/EditorProviderSelector.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import UrlPreviewModal from "@/components/preview/UrlPreviewModal.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import PostSettingModal from "./components/PostSettingModal.vue";
|
||||
import { usePostUpdateMutate } from "./composables/use-post-update-mutate";
|
||||
import { contentAnnotations } from "@/constants/annotations";
|
||||
import { useAutoSaveContent } from "@/composables/use-auto-save-content";
|
||||
import { useContentSnapshot } from "@console/composables/use-content-snapshot";
|
||||
import { useSaveKeybinding } from "@console/composables/use-save-keybinding";
|
||||
import { useSessionKeepAlive } from "@/composables/use-session-keep-alive";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { AxiosRequestConfig } from "axios";
|
||||
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import CategoryFilterDropdown from "@/components/filter/CategoryFilterDropdown.vue";
|
||||
import TagFilterDropdown from "@/components/filter/TagFilterDropdown.vue";
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
@ -15,20 +21,14 @@ import {
|
|||
VPagination,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import PostSettingModal from "./components/PostSettingModal.vue";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import type { Ref } from "vue";
|
||||
import { computed, provide, ref, watch } from "vue";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import UserFilterDropdown from "@/components/filter/UserFilterDropdown.vue";
|
||||
import CategoryFilterDropdown from "@/components/filter/CategoryFilterDropdown.vue";
|
||||
import TagFilterDropdown from "@/components/filter/TagFilterDropdown.vue";
|
||||
import PostListItem from "./components/PostListItem.vue";
|
||||
import PostBatchSettingModal from "./components/PostBatchSettingModal.vue";
|
||||
import PostListItem from "./components/PostListItem.vue";
|
||||
import PostSettingModal from "./components/PostSettingModal.vue";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import SnapshotContent from "@console/modules/contents/posts/components/SnapshotContent.vue";
|
||||
import SnapshotListItem from "@console/modules/contents/posts/components/SnapshotListItem.vue";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconHistoryLine,
|
||||
|
@ -10,14 +13,11 @@ import {
|
|||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useRoute } from "vue-router";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { computed, watch } from "vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import SnapshotContent from "@console/modules/contents/posts/components/SnapshotContent.vue";
|
||||
import SnapshotListItem from "@console/modules/contents/posts/components/SnapshotListItem.vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { computed, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
// core libs
|
||||
import { ref } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { ref } from "vue";
|
||||
|
||||
// components
|
||||
import {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
// core libs
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
|
||||
// components
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { Category } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconList,
|
||||
|
@ -16,7 +17,6 @@ import type { PropType } from "vue";
|
|||
import { ref } from "vue";
|
||||
import { VueDraggable } from "vue-draggable-plus";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import GridiconsLinkBreak from "~icons/gridicons/link-break";
|
||||
import { convertCategoryTreeToCategory, type CategoryTree } from "../utils";
|
||||
import CategoryEditingModal from "./CategoryEditingModal.vue";
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import CategoryEditingModal from "../CategoryEditingModal.vue";
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import messages from "@intlify/unplugin-vue-i18n/messages";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import CategoryEditingModal from "../CategoryEditingModal.vue";
|
||||
|
||||
describe("CategoryEditingModal", function () {
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import type { Category } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import type { Ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import type { CategoryTree } from "../utils";
|
||||
import { buildCategoriesTree } from "../utils";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
|
||||
interface usePostCategoryReturn {
|
||||
categories: Ref<Category[] | undefined>;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script lang="ts" setup>
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import {
|
||||
coreApiClient,
|
||||
type JsonPatchInner,
|
||||
type ListedPost,
|
||||
} from "@halo-dev/api-client";
|
||||
import { ref } from "vue";
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import { useMutation, useQueryClient } from "@tanstack/vue-query";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
type ArrayPatchOp = "add" | "replace" | "removeAll";
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
<script lang="ts" setup>
|
||||
import EntityFieldItems from "@/components/entity-fields/EntityFieldItems.vue";
|
||||
import StatusDotField from "@/components/entity-fields/StatusDotField.vue";
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useEntityFieldItemExtensionPoint } from "@console/composables/use-entity-extension-points";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
Toast,
|
||||
|
@ -6,26 +15,17 @@ import {
|
|||
VDropdownItem,
|
||||
VEntity,
|
||||
} from "@halo-dev/components";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import type { EntityFieldItem, OperationItem } from "@halo-dev/console-shared";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import type { Ref } from "vue";
|
||||
import { computed, inject, markRaw, ref, toRefs } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useEntityFieldItemExtensionPoint } from "@console/composables/use-entity-extension-points";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import type { EntityFieldItem, OperationItem } from "@halo-dev/console-shared";
|
||||
import TitleField from "./entity-fields/TitleField.vue";
|
||||
import EntityFieldItems from "@/components/entity-fields/EntityFieldItems.vue";
|
||||
import ContributorsField from "./entity-fields/ContributorsField.vue";
|
||||
import PublishStatusField from "./entity-fields/PublishStatusField.vue";
|
||||
import VisibleField from "./entity-fields/VisibleField.vue";
|
||||
import StatusDotField from "@/components/entity-fields/StatusDotField.vue";
|
||||
import PublishTimeField from "./entity-fields/PublishTimeField.vue";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import TitleField from "./entity-fields/TitleField.vue";
|
||||
import VisibleField from "./entity-fields/VisibleField.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
<script lang="ts" setup>
|
||||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { formatDatetime, toDatetimeLocal, toISOString } from "@/utils/date";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import useSlugify from "@console/composables/use-slugify";
|
||||
import { useThemeCustomTemplates } from "@console/modules/interface/themes/composables/use-theme";
|
||||
import { submitForm } from "@formkit/core";
|
||||
import type { Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconRefreshLine,
|
||||
Toast,
|
||||
|
@ -6,20 +16,10 @@ import {
|
|||
VModal,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { computed, nextTick, ref, watch } from "vue";
|
||||
import type { Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { useThemeCustomTemplates } from "@console/modules/interface/themes/composables/use-theme";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { randomUUID } from "@/utils/id";
|
||||
import { formatDatetime, toDatetimeLocal, toISOString } from "@/utils/date";
|
||||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import { submitForm } from "@formkit/core";
|
||||
import useSlugify from "@console/composables/use-slugify";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { usePostUpdateMutate } from "../composables/use-post-update-mutate";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script setup lang="ts">
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { computed, toRefs } from "vue";
|
||||
import { Toast, VLoading } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { computed, toRefs } from "vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import type { ListedSnapshotDto, Post } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast, VButton, VStatusDot, VTag } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { computed } from "vue";
|
||||
import { relativeTimeTo } from "@/utils/date";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import PostSettingModal from "../PostSettingModal.vue";
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { VueQueryPlugin } from "@tanstack/vue-query";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import messages from "@intlify/unplugin-vue-i18n/messages";
|
||||
import { VueQueryPlugin } from "@tanstack/vue-query";
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { createPinia, setActivePinia } from "pinia";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { createI18n } from "vue-i18n";
|
||||
import PostSettingModal from "../PostSettingModal.vue";
|
||||
|
||||
describe("PostSettingModal", () => {
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { VEntityField } from "@halo-dev/components";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import ContributorList from "@console/modules/contents/_components/ContributorList.vue";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { VEntityField } from "@halo-dev/components";
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { VEntityField, VStatusDot } from "@halo-dev/components";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { VEntityField, VStatusDot } from "@halo-dev/components";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script lang="ts" setup>
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { IconTimerLine, VEntityField } from "@halo-dev/components";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { IconTimerLine, VEntityField } from "@halo-dev/components";
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<script lang="ts" setup>
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconExternalLinkLine,
|
||||
VEntityField,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import PostTag from "../../tags/components/PostTag.vue";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { computed } from "vue";
|
||||
import PostTag from "../../tags/components/PostTag.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import type { ListedPost, Post } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { IconEye, IconEyeOff, Toast, VEntityField } from "@halo-dev/components";
|
||||
import { useMutation, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { useMutation } from "@tanstack/vue-query";
|
||||
import type { Post } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Toast } from "@halo-dev/components";
|
||||
import { useMutation } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
export function usePostUpdateMutate() {
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import BlankLayout from "@console/layouts/BlankLayout.vue";
|
||||
import { IconBookRead } from "@halo-dev/components";
|
||||
import PostList from "./PostList.vue";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import DeletedPostList from "./DeletedPostList.vue";
|
||||
import PostEditor from "./PostEditor.vue";
|
||||
import PostList from "./PostList.vue";
|
||||
import PostSnapshots from "./PostSnapshots.vue";
|
||||
import CategoryList from "./categories/CategoryList.vue";
|
||||
import TagList from "./tags/TagList.vue";
|
||||
import PostStatsWidget from "./widgets/PostStatsWidget.vue";
|
||||
import RecentPublishedWidget from "./widgets/RecentPublishedWidget.vue";
|
||||
import { markRaw } from "vue";
|
||||
import PostSnapshots from "./PostSnapshots.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
<script lang="ts" setup>
|
||||
import FilterCleanButton from "@/components/filter/FilterCleanButton.vue";
|
||||
import SearchInput from "@/components/input/SearchInput.vue";
|
||||
import HasPermission from "@/components/permission/HasPermission.vue";
|
||||
import type { Tag } from "@halo-dev/api-client";
|
||||
import { onMounted, ref, watch } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconAddCircle,
|
||||
IconBookRead,
|
||||
IconRefreshLine,
|
||||
VButton,
|
||||
VCard,
|
||||
VEmpty,
|
||||
VPageHeader,
|
||||
VSpace,
|
||||
VLoading,
|
||||
VPageHeader,
|
||||
VPagination,
|
||||
IconRefreshLine,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import HasPermission from "@/components/permission/HasPermission.vue";
|
||||
import TagEditingModal from "./components/TagEditingModal.vue";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { usePostTag } from "./composables/use-post-tag";
|
||||
import TagListItem from "./components/TagListItem.vue";
|
||||
import SearchInput from "@/components/input/SearchInput.vue";
|
||||
import FilterCleanButton from "@/components/filter/FilterCleanButton.vue";
|
||||
import { computed } from "vue";
|
||||
import { computed, onMounted, ref, watch } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import TagEditingModal from "./components/TagEditingModal.vue";
|
||||
import TagListItem from "./components/TagListItem.vue";
|
||||
import { usePostTag } from "./composables/use-post-tag";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { VTag } from "@halo-dev/components";
|
||||
import type { Tag } from "@halo-dev/api-client";
|
||||
import { VTag } from "@halo-dev/components";
|
||||
import Color from "colorjs.io";
|
||||
import { computed } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import Color from "colorjs.io";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
// core libs
|
||||
import { computed, nextTick, ref, watch } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { computed, nextTick, ref, watch } from "vue";
|
||||
|
||||
// components
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import {
|
||||
IconArrowLeft,
|
||||
IconArrowRight,
|
||||
|
@ -13,19 +14,18 @@ import {
|
|||
VModal,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
|
||||
// types
|
||||
import type { Tag } from "@halo-dev/api-client";
|
||||
|
||||
// libs
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import useSlugify from "@console/composables/use-slugify";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import { FormType } from "@/types/slug";
|
||||
import { onMounted } from "vue";
|
||||
import useSlugify from "@console/composables/use-slugify";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { onMounted } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -3,12 +3,12 @@ import HasPermission from "@/components/permission/HasPermission.vue";
|
|||
import { formatDatetime } from "@/utils/date";
|
||||
import type { Tag } from "@halo-dev/api-client";
|
||||
import {
|
||||
VStatusDot,
|
||||
IconExternalLinkLine,
|
||||
VDropdownItem,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VDropdownItem,
|
||||
IconExternalLinkLine,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import PostTag from "./PostTag.vue";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import type { Tag } from "@halo-dev/api-client";
|
||||
import { ref, watch, type Ref } from "vue";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast } from "@halo-dev/components";
|
||||
import { useQuery, type QueryObserverResult } from "@tanstack/vue-query";
|
||||
import { ref, watch, type Ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
interface usePostTagReturn {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { VCard, IconBookRead } from "@halo-dev/components";
|
||||
import { useDashboardStats } from "@console/composables/use-dashboard-stats";
|
||||
import { IconBookRead, VCard } from "@halo-dev/components";
|
||||
|
||||
const { data: stats } = useDashboardStats();
|
||||
</script>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
VCard,
|
||||
VSpace,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
IconExternalLinkLine,
|
||||
} from "@halo-dev/components";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import type { ListedPost } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { postLabels } from "@/constants/labels";
|
||||
import {
|
||||
IconExternalLinkLine,
|
||||
VCard,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
</VModal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import {
|
||||
IconAddCircle,
|
||||
IconCloseCircle,
|
||||
|
@ -122,11 +123,10 @@ import {
|
|||
VSpace,
|
||||
VTabbar,
|
||||
} from "@halo-dev/components";
|
||||
import { ref } from "vue";
|
||||
import { useStorage } from "@vueuse/core";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import Dashboard from "./Dashboard.vue";
|
||||
import { IconDashboard } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import Dashboard from "./Dashboard.vue";
|
||||
|
||||
import { markRaw } from "vue";
|
||||
import QuickLinkWidget from "./widgets/QuickLinkWidget.vue";
|
||||
import ViewsStatsWidget from "./widgets/ViewsStatsWidget.vue";
|
||||
import { markRaw } from "vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
IconArrowRight,
|
||||
IconBookRead,
|
||||
IconFolder,
|
||||
IconPages,
|
||||
IconPlug,
|
||||
IconUserSettings,
|
||||
IconPalette,
|
||||
IconWindowLine,
|
||||
IconSearch,
|
||||
IconDatabase2Line,
|
||||
VCard,
|
||||
IconAccountCircleLine,
|
||||
Dialog,
|
||||
Toast,
|
||||
} from "@halo-dev/components";
|
||||
import { markRaw, ref, type Component } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import ThemePreviewModal from "@console/modules/interface/themes/components/preview/ThemePreviewModal.vue";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import {
|
||||
Dialog,
|
||||
IconAccountCircleLine,
|
||||
IconArrowRight,
|
||||
IconBookRead,
|
||||
IconDatabase2Line,
|
||||
IconFolder,
|
||||
IconPages,
|
||||
IconPalette,
|
||||
IconPlug,
|
||||
IconSearch,
|
||||
IconUserSettings,
|
||||
IconWindowLine,
|
||||
Toast,
|
||||
VCard,
|
||||
} from "@halo-dev/components";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { markRaw, ref, type Component } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
interface Action {
|
||||
icon: Component;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { useDashboardStats } from "@console/composables/use-dashboard-stats";
|
||||
import { VCard, IconEye } from "@halo-dev/components";
|
||||
import { IconEye, VCard } from "@halo-dev/components";
|
||||
|
||||
const { data: stats } = useDashboardStats();
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Menu, MenuItem } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
@ -11,13 +13,14 @@ import {
|
|||
VPageHeader,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useDebounceFn } from "@vueuse/core";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { computed, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import MenuItemEditingModal from "./components/MenuItemEditingModal.vue";
|
||||
import MenuItemListItem from "./components/MenuItemListItem.vue";
|
||||
import MenuList from "./components/MenuList.vue";
|
||||
import { computed, ref } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import type { Menu, MenuItem } from "@halo-dev/api-client";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import type { MenuTreeItem } from "./utils";
|
||||
import {
|
||||
buildMenuItemsTree,
|
||||
|
@ -26,9 +29,6 @@ import {
|
|||
getChildrenNames,
|
||||
resetMenuItemsTreePriority,
|
||||
} from "./utils";
|
||||
import { useDebounceFn } from "@vueuse/core";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
|
||||
const { t } = useI18n();
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts" setup>
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import type { Menu } from "@halo-dev/api-client";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { Menu } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<script lang="ts" setup>
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import SubmitButton from "@/components/button/SubmitButton.vue";
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import type { Menu, MenuItem, Ref } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { setFocus } from "@/formkit/utils/focus";
|
||||
import AnnotationsForm from "@/components/form/AnnotationsForm.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { Toast, VButton, VModal, VSpace } from "@halo-dev/components";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { MenuTreeItem } from "@console/modules/interface/menus/utils";
|
||||
import {
|
||||
IconList,
|
||||
VDropdownItem,
|
||||
|
@ -7,11 +9,9 @@ import {
|
|||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import { VueDraggable } from "vue-draggable-plus";
|
||||
import type { MenuTreeItem } from "@console/modules/interface/menus/utils";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { PropType } from "vue";
|
||||
import { VueDraggable } from "vue-draggable-plus";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import type { Menu } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
Toast,
|
||||
|
@ -13,14 +16,11 @@ import {
|
|||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import MenuEditingModal from "./MenuEditingModal.vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import type { Menu } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import MenuEditingModal from "./MenuEditingModal.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import Menus from "./Menus.vue";
|
||||
import { IconListSettings } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import Menus from "./Menus.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {},
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { MenuItem } from "@halo-dev/api-client";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { MenuTreeItem } from "../index";
|
||||
import {
|
||||
|
@ -8,7 +9,6 @@ import {
|
|||
resetMenuItemsTreePriority,
|
||||
sortMenuItemsTree,
|
||||
} from "../index";
|
||||
import type { MenuItem } from "@halo-dev/api-client";
|
||||
|
||||
const rawMenuItems: MenuItem[] = [
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconMore,
|
||||
|
@ -12,7 +13,6 @@ import {
|
|||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import type { Ref } from "vue";
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<script lang="ts" setup>
|
||||
// core libs
|
||||
import { inject, ref, computed, toRaw } from "vue";
|
||||
import { computed, inject, ref, toRaw } from "vue";
|
||||
|
||||
// components
|
||||
import { Toast, VButton } from "@halo-dev/components";
|
||||
|
||||
// types
|
||||
import type { Ref } from "vue";
|
||||
import type { ConfigMap, Setting, Theme } from "@halo-dev/api-client";
|
||||
import type { Ref } from "vue";
|
||||
|
||||
// hooks
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import StickyBlock from "@/components/sticky-block/StickyBlock.vue";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
<script lang="ts" setup>
|
||||
import {
|
||||
VTag,
|
||||
VStatusDot,
|
||||
Toast,
|
||||
VDropdownItem,
|
||||
VDropdown,
|
||||
VDropdownDivider,
|
||||
VButton,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import { toRefs, ref, inject, type Ref } from "vue";
|
||||
import { useThemeLifeCycle } from "../composables/use-theme";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import { markRaw } from "vue";
|
||||
import UninstallOperationItem from "./operation/UninstallOperationItem.vue";
|
||||
import { computed } from "vue";
|
||||
import {
|
||||
Toast,
|
||||
VButton,
|
||||
VDropdown,
|
||||
VDropdownDivider,
|
||||
VDropdownItem,
|
||||
VSpace,
|
||||
VStatusDot,
|
||||
VTag,
|
||||
} from "@halo-dev/components";
|
||||
import type { OperationItem } from "@halo-dev/console-shared";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { computed, inject, markRaw, ref, toRefs, type Ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useThemeLifeCycle } from "../composables/use-theme";
|
||||
import MoreOperationItem from "./operation/MoreOperationItem.vue";
|
||||
import UninstallOperationItem from "./operation/UninstallOperationItem.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconAddCircle,
|
||||
VButton,
|
||||
|
@ -6,13 +9,10 @@ import {
|
|||
VLoading,
|
||||
VSpace,
|
||||
} from "@halo-dev/components";
|
||||
import ThemePreviewModal from "../preview/ThemePreviewModal.vue";
|
||||
import ThemeListItem from "../ThemeListItem.vue";
|
||||
import { inject, ref, type Ref } from "vue";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { inject, ref, type Ref } from "vue";
|
||||
import ThemeListItem from "../ThemeListItem.vue";
|
||||
import ThemePreviewModal from "../preview/ThemePreviewModal.vue";
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
<script lang="ts" setup>
|
||||
import AppDownloadAlert from "@/components/common/AppDownloadAlert.vue";
|
||||
import { Dialog, Toast } from "@halo-dev/components";
|
||||
import type { ErrorResponse } from "@uppy/core";
|
||||
import type { UppyFile } from "@uppy/core";
|
||||
import { THEME_ALREADY_EXISTS_TYPE } from "../../constants";
|
||||
import type { ThemeInstallationErrorResponse } from "../../types";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { inject } from "vue";
|
||||
import type { Ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import type { ErrorResponse, UppyFile } from "@uppy/core";
|
||||
import type { Ref } from "vue";
|
||||
import { inject, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { THEME_ALREADY_EXISTS_TYPE } from "../../constants";
|
||||
import type { ThemeInstallationErrorResponse } from "../../types";
|
||||
|
||||
const { t } = useI18n();
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { VButton, VEmpty, VSpace, VLoading } from "@halo-dev/components";
|
||||
import ThemeListItem from "../ThemeListItem.vue";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { VButton, VEmpty, VLoading, VSpace } from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import ThemeListItem from "../ThemeListItem.vue";
|
||||
|
||||
const {
|
||||
data: themes,
|
||||
|
|
|
@ -1,18 +1,15 @@
|
|||
<script lang="ts" setup>
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { submitForm } from "@formkit/core";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast, VButton } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import type { Ref } from "vue";
|
||||
import { inject } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { ThemeInstallationErrorResponse } from "../../types";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { THEME_ALREADY_EXISTS_TYPE } from "../../constants";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { onMounted } from "vue";
|
||||
import { nextTick } from "vue";
|
||||
import { submitForm } from "@formkit/core";
|
||||
import type { Ref } from "vue";
|
||||
import { inject, nextTick, onMounted, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { THEME_ALREADY_EXISTS_TYPE } from "../../constants";
|
||||
import type { ThemeInstallationErrorResponse } from "../../types";
|
||||
|
||||
const { t } = useI18n();
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { VButton, IconMore } from "@halo-dev/components";
|
||||
import { IconMore, VButton } from "@halo-dev/components";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { Dialog, Toast, VDropdown, VDropdownItem } from "@halo-dev/components";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast, VDropdown, VDropdownItem } from "@halo-dev/components";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const queryClient = useQueryClient();
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
import LazyImage from "@/components/image/LazyImage.vue";
|
||||
import type { Theme } from "@halo-dev/api-client";
|
||||
import {
|
||||
VDropdownItem,
|
||||
VEntity,
|
||||
VEntityField,
|
||||
VTag,
|
||||
VDropdownItem,
|
||||
} from "@halo-dev/components";
|
||||
import { toRefs } from "vue";
|
||||
import { useThemeLifeCycle } from "../../composables/use-theme";
|
||||
|
|
|
@ -1,35 +1,34 @@
|
|||
<script lang="ts" setup>
|
||||
import ThemePreviewListItem from "./ThemePreviewListItem.vue";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { axiosInstance, consoleApiClient } from "@halo-dev/api-client";
|
||||
import type {
|
||||
ConfigMap,
|
||||
Setting,
|
||||
SettingForm,
|
||||
Theme,
|
||||
} from "@halo-dev/api-client";
|
||||
import { axiosInstance, consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
VModal,
|
||||
IconArrowLeft,
|
||||
IconComputer,
|
||||
IconLink,
|
||||
IconPalette,
|
||||
IconSettings,
|
||||
IconArrowLeft,
|
||||
VTabbar,
|
||||
VButton,
|
||||
IconComputer,
|
||||
IconPhone,
|
||||
IconTablet,
|
||||
IconRefreshLine,
|
||||
IconSettings,
|
||||
IconTablet,
|
||||
Toast,
|
||||
VButton,
|
||||
VLoading,
|
||||
VModal,
|
||||
VTabbar,
|
||||
} from "@halo-dev/components";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, markRaw, ref, toRaw } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { onMounted } from "vue";
|
||||
import { OverlayScrollbarsComponent } from "overlayscrollbars-vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { computed, markRaw, onMounted, ref, toRaw } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ThemePreviewListItem from "./ThemePreviewListItem.vue";
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
|
|
|
@ -5,9 +5,9 @@ import {
|
|||
nextTick,
|
||||
onMounted,
|
||||
provide,
|
||||
type Ref,
|
||||
ref,
|
||||
watch,
|
||||
type Ref,
|
||||
} from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
|
@ -20,6 +20,10 @@ import { useThemeLifeCycle } from "../composables/use-theme";
|
|||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
|
||||
// components
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import type { Setting, SettingForm, Theme } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconExchange,
|
||||
|
@ -34,16 +38,12 @@ import {
|
|||
VSpace,
|
||||
VTabbar,
|
||||
} from "@halo-dev/components";
|
||||
import ThemeListModal from "../components/ThemeListModal.vue";
|
||||
import ThemePreviewModal from "../components/preview/ThemePreviewModal.vue";
|
||||
import type { Setting, SettingForm, Theme } from "@halo-dev/api-client";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useRouteQuery } from "@vueuse/router";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import ThemeListModal from "../components/ThemeListModal.vue";
|
||||
import ThemePreviewModal from "../components/preview/ThemePreviewModal.vue";
|
||||
|
||||
const { currentUserHasPermission } = usePermission();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { IconPalette } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import ThemeLayout from "./layouts/ThemeLayout.vue";
|
||||
import { markRaw } from "vue";
|
||||
import ThemeDetail from "./ThemeDetail.vue";
|
||||
import ThemeSetting from "./ThemeSetting.vue";
|
||||
import { IconPalette } from "@halo-dev/components";
|
||||
import { markRaw } from "vue";
|
||||
import ThemeLayout from "./layouts/ThemeLayout.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {},
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, ref, toRaw } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import type { AuthProvider, Setting } from "@halo-dev/api-client";
|
||||
import { useRoute } from "vue-router";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Toast,
|
||||
VAvatar,
|
||||
|
@ -14,8 +12,10 @@ import {
|
|||
VPageHeader,
|
||||
VTabbar,
|
||||
} from "@halo-dev/components";
|
||||
import { useSettingFormConvert } from "@console/composables/use-setting-form";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { computed, ref, toRaw } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<script lang="ts" setup>
|
||||
import type { AuthProvider, ListedAuthProvider } from "@halo-dev/api-client";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
VPageHeader,
|
||||
IconLockPasswordLine,
|
||||
VCard,
|
||||
VLoading,
|
||||
VPageHeader,
|
||||
} from "@halo-dev/components";
|
||||
import { useQuery } from "@tanstack/vue-query";
|
||||
import { consoleApiClient, coreApiClient } from "@halo-dev/api-client";
|
||||
import type { AuthProvider, ListedAuthProvider } from "@halo-dev/api-client";
|
||||
import AuthProviderListItem from "./components/AuthProviderListItem.vue";
|
||||
import { computed, ref } from "vue";
|
||||
import Fuse from "fuse.js";
|
||||
import { computed, ref } from "vue";
|
||||
import { VueDraggable } from "vue-draggable-plus";
|
||||
import AuthProviderListItem from "./components/AuthProviderListItem.vue";
|
||||
|
||||
const authProviders = ref<ListedAuthProvider[]>([]);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts" setup>
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import type { ListedAuthProvider } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconList,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import AuthProviders from "./AuthProviders.vue";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import AuthProviderDetail from "./AuthProviderDetail.vue";
|
||||
import AuthProviders from "./AuthProviders.vue";
|
||||
|
||||
export default definePlugin({
|
||||
routes: [
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import { formatDatetime, relativeTimeTo } from "@/utils/date";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import type { Backup } from "@halo-dev/api-client";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
Toast,
|
||||
|
@ -8,17 +13,11 @@ import {
|
|||
VSpace,
|
||||
VStatusDot,
|
||||
} from "@halo-dev/components";
|
||||
import type { Backup } from "@halo-dev/api-client";
|
||||
import { relativeTimeTo, formatDatetime } from "@/utils/date";
|
||||
import { computed, markRaw } from "vue";
|
||||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import type { OperationItem } from "@halo-dev/console-shared";
|
||||
import { useQueryClient } from "@tanstack/vue-query";
|
||||
import prettyBytes from "pretty-bytes";
|
||||
import { computed, markRaw, toRefs } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useOperationItemExtensionPoint } from "@console/composables/use-operation-extension-points";
|
||||
import EntityDropdownItems from "@/components/entity/EntityDropdownItems.vue";
|
||||
import { toRefs } from "vue";
|
||||
import type { OperationItem } from "@halo-dev/console-shared";
|
||||
|
||||
const queryClient = useQueryClient();
|
||||
const { t } = useI18n();
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { coreApiClient } from "@halo-dev/api-client";
|
||||
import { BackupStatusPhaseEnum, coreApiClient } from "@halo-dev/api-client";
|
||||
import { Dialog, Toast } from "@halo-dev/components";
|
||||
import { useQuery, useQueryClient } from "@tanstack/vue-query";
|
||||
import dayjs from "dayjs";
|
||||
import { BackupStatusPhaseEnum } from "@halo-dev/api-client";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
export function useBackupFetch() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import Backups from "./Backups.vue";
|
||||
import { IconServerLine } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import Backups from "./Backups.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Backup } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
|
@ -12,12 +13,10 @@ import {
|
|||
} from "@halo-dev/components";
|
||||
import { useMutation, useQuery } from "@tanstack/vue-query";
|
||||
import axios from "axios";
|
||||
import { computed } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useBackupFetch } from "../composables/use-backup";
|
||||
import BackupListItem from "../components/BackupListItem.vue";
|
||||
import type { Backup } from "@halo-dev/api-client";
|
||||
import { useBackupFetch } from "../composables/use-backup";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { data: backups } = useBackupFetch();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import type { GlobalInfo, Info, Startup } from "@/types";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { formatDatetime } from "@/utils/date";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { useThemeStore } from "@console/stores/theme";
|
||||
import type { Plugin } from "@halo-dev/api-client";
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import {
|
||||
IconClipboardLine,
|
||||
IconTerminalBoxLine,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { IconTerminalBoxLine } from "@halo-dev/components";
|
||||
import BasicLayout from "@console/layouts/BasicLayout.vue";
|
||||
import Overview from "./Overview.vue";
|
||||
import { IconTerminalBoxLine } from "@halo-dev/components";
|
||||
import { definePlugin } from "@halo-dev/console-shared";
|
||||
import { markRaw } from "vue";
|
||||
import Overview from "./Overview.vue";
|
||||
|
||||
export default definePlugin({
|
||||
components: {},
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<script lang="ts" setup>
|
||||
import { consoleApiClient } from "@halo-dev/api-client";
|
||||
import { usePermission } from "@/utils/permission";
|
||||
import { PluginStatusPhaseEnum, type Plugin } from "@halo-dev/api-client";
|
||||
import {
|
||||
PluginStatusPhaseEnum,
|
||||
consoleApiClient,
|
||||
type Plugin,
|
||||
} from "@halo-dev/api-client";
|
||||
import {
|
||||
Dialog,
|
||||
IconAddCircle,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { VButton, VModal } from "@halo-dev/components";
|
||||
import type { Plugin } from "@halo-dev/api-client";
|
||||
import { formatDatetime, relativeTimeTo } from "@/utils/date";
|
||||
import type { Plugin } from "@halo-dev/api-client";
|
||||
import { VButton, VModal } from "@halo-dev/components";
|
||||
import { ref } from "vue";
|
||||
|
||||
withDefaults(defineProps<{ plugin: Plugin }>(), {});
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue