refactor: rename admin to console (#634)

#### What type of PR is this?

/kind improvement
/milestone 2.0

#### What this PR does / why we need it:

Ref https://github.com/halo-dev/halo/pull/2521 我们已经将 halo-admin 的命名改为了 console,所以相关命名需要同步修改。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2519

#### Special notes for your reviewer:

/cc @halo-dev/sig-halo-console 

测试方式:

1. 需要 `pnpm install && pnpm build:packages`
2. 测试后台功能是否正常。

PS:将在此 PR 合并之后发布 `@halo-dev/console-shared` 包到 npm。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/636/head
Ryan Wang 2022-10-09 14:56:33 +08:00 committed by GitHub
parent d246cc1e92
commit e1155c35fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 62 additions and 46 deletions

View File

@ -3,7 +3,7 @@
"tag": "alpha", "tag": "alpha",
"initialVersions": { "initialVersions": {
"@halo-dev/components": "0.0.0-alpha.0", "@halo-dev/components": "0.0.0-alpha.0",
"@halo-dev/admin-shared": "0.0.0-alpha.0" "@halo-dev/console-shared": "0.0.0-alpha.0"
}, },
"changesets": [] "changesets": []
} }

View File

@ -48,7 +48,7 @@
<body> <body>
<noscript> <noscript>
<strong> <strong>
We're sorry but halo admin client doesn't work properly without We're sorry but halo console client doesn't work properly without
JavaScript enabled. Please enable it to continue. JavaScript enabled. Please enable it to continue.
</strong> </strong>
</noscript> </noscript>

View File

@ -1,5 +1,5 @@
{ {
"name": "@halo-dev/admin-next", "name": "@halo-dev/console",
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"prepare": "husky install", "prepare": "husky install",
@ -33,7 +33,7 @@
"@formkit/inputs": "^1.0.0-beta.11", "@formkit/inputs": "^1.0.0-beta.11",
"@formkit/themes": "^1.0.0-beta.11", "@formkit/themes": "^1.0.0-beta.11",
"@formkit/vue": "^1.0.0-beta.11", "@formkit/vue": "^1.0.0-beta.11",
"@halo-dev/admin-shared": "workspace:*", "@halo-dev/console-shared": "workspace:*",
"@halo-dev/api-client": "^0.0.35", "@halo-dev/api-client": "^0.0.35",
"@halo-dev/components": "workspace:*", "@halo-dev/components": "workspace:*",
"@halo-dev/richtext-editor": "^0.0.0-alpha.7", "@halo-dev/richtext-editor": "^0.0.0-alpha.7",

View File

@ -35,13 +35,13 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/halo-dev/halo-admin.git", "url": "https://github.com/halo-dev/console.git",
"directory": "packages/components" "directory": "packages/components"
}, },
"bugs": { "bugs": {
"url": "https://github.com/halo-dev/halo/issues" "url": "https://github.com/halo-dev/halo/issues"
}, },
"homepage": "https://github.com/halo-dev/halo-admin/tree/next/packages/components#readme", "homepage": "https://github.com/halo-dev/console/tree/main/packages/components#readme",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@histoire/plugin-vue": "^0.10.7", "@histoire/plugin-vue": "^0.10.7",

View File

@ -1,5 +1,5 @@
{ {
"name": "@halo-dev/admin-shared", "name": "@halo-dev/console-shared",
"version": "0.0.0-alpha.5", "version": "0.0.0-alpha.5",
"description": "", "description": "",
"files": [ "files": [
@ -17,25 +17,25 @@
"name": "@halo-dev", "name": "@halo-dev",
"url": "https://github.com/halo-dev" "url": "https://github.com/halo-dev"
}, },
"main": "./dist/halo-admin-shared.iife.js", "main": "./dist/halo-console-shared.iife.js",
"module": "./dist/halo-admin-shared.es.js", "module": "./dist/halo-console-shared.es.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"import": "./dist/halo-admin-shared.es.js" "import": "./dist/halo-console-shared.es.js"
}, },
"./dist/style.css": "./dist/style.css" "./dist/style.css": "./dist/style.css"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/halo-dev/halo-admin.git", "url": "https://github.com/halo-dev/console.git",
"directory": "packages/shared" "directory": "packages/shared"
}, },
"bugs": { "bugs": {
"url": "https://github.com/halo-dev/halo/issues" "url": "https://github.com/halo-dev/halo/issues"
}, },
"homepage": "https://github.com/halo-dev/halo-admin/tree/next/shared/components#readme", "homepage": "https://github.com/halo-dev/console/tree/main/packages/shared#readme",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@halo-dev/components": "workspace:*" "@halo-dev/components": "workspace:*"

View File

@ -25,9 +25,9 @@ export default defineConfig({
outDir: path.resolve(__dirname, "dist"), outDir: path.resolve(__dirname, "dist"),
lib: { lib: {
entry: path.resolve(__dirname, "src/index.ts"), entry: path.resolve(__dirname, "src/index.ts"),
name: "HaloAdminShared", name: "HaloConsoleShared",
formats: ["es", "iife"], formats: ["es", "iife"],
fileName: (format) => `halo-admin-shared.${format}.js`, fileName: (format) => `halo-console-shared.${format}.js`,
}, },
rollupOptions: { rollupOptions: {
external: ["vue", "vue-router", "@halo-dev/components"], external: ["vue", "vue-router", "@halo-dev/components"],

View File

@ -13,9 +13,9 @@ importers:
'@formkit/inputs': ^1.0.0-beta.11 '@formkit/inputs': ^1.0.0-beta.11
'@formkit/themes': ^1.0.0-beta.11 '@formkit/themes': ^1.0.0-beta.11
'@formkit/vue': ^1.0.0-beta.11 '@formkit/vue': ^1.0.0-beta.11
'@halo-dev/admin-shared': workspace:*
'@halo-dev/api-client': ^0.0.35 '@halo-dev/api-client': ^0.0.35
'@halo-dev/components': workspace:* '@halo-dev/components': workspace:*
'@halo-dev/console-shared': workspace:*
'@halo-dev/richtext-editor': ^0.0.0-alpha.7 '@halo-dev/richtext-editor': ^0.0.0-alpha.7
'@iconify-json/mdi': ^1.1.33 '@iconify-json/mdi': ^1.1.33
'@iconify-json/vscode-icons': ^1.1.14 '@iconify-json/vscode-icons': ^1.1.14
@ -100,9 +100,9 @@ importers:
'@formkit/inputs': 1.0.0-beta.11 '@formkit/inputs': 1.0.0-beta.11
'@formkit/themes': 1.0.0-beta.11_tailwindcss@3.1.8 '@formkit/themes': 1.0.0-beta.11_tailwindcss@3.1.8
'@formkit/vue': 1.0.0-beta.11_k5hp3txgeyj6le63abiyc7wx3u '@formkit/vue': 1.0.0-beta.11_k5hp3txgeyj6le63abiyc7wx3u
'@halo-dev/admin-shared': link:packages/shared
'@halo-dev/api-client': 0.0.35 '@halo-dev/api-client': 0.0.35
'@halo-dev/components': link:packages/components '@halo-dev/components': link:packages/components
'@halo-dev/console-shared': link:packages/shared
'@halo-dev/richtext-editor': 0.0.0-alpha.7_vue@3.2.40 '@halo-dev/richtext-editor': 0.0.0-alpha.7_vue@3.2.40
'@tiptap/extension-character-count': 2.0.0-beta.199 '@tiptap/extension-character-count': 2.0.0-beta.199
'@vueuse/components': 8.9.4_vue@3.2.40 '@vueuse/components': 8.9.4_vue@3.2.40

View File

@ -63,9 +63,9 @@ export const setupLibraryExternal = (
rename: `halo-components.iife.${staticSuffix}.js`, rename: `halo-components.iife.${staticSuffix}.js`,
}, },
{ {
src: "./node_modules/@halo-dev/admin-shared/dist/halo-admin-shared.iife.js", src: "./node_modules/@halo-dev/console-shared/dist/halo-console-shared.iife.js",
dest: "assets/admin-shared", dest: "assets/console-shared",
rename: `halo-admin-shared.iife.${staticSuffix}.js`, rename: `halo-console-shared.iife.${staticSuffix}.js`,
}, },
]; ];
@ -73,7 +73,7 @@ export const setupLibraryExternal = (
ViteExternals({ ViteExternals({
vue: "Vue", vue: "Vue",
"vue-router": "VueRouter", "vue-router": "VueRouter",
"@halo-dev/shared": "HaloAdminShared", "@halo-dev/shared": "HaloConsoleShared",
"@halo-dev/components": "HaloComponents", "@halo-dev/components": "HaloComponents",
"@vueuse/core": "VueUse", "@vueuse/core": "VueUse",
"@vueuse/components": "VueUse", "@vueuse/components": "VueUse",

View File

@ -2,7 +2,7 @@ import { usePluginStore } from "@/stores/plugin";
import type { import type {
ExtensionPointName, ExtensionPointName,
ExtensionPointState, ExtensionPointState,
} from "@halo-dev/admin-shared"; } from "@halo-dev/console-shared";
import type { Plugin } from "@halo-dev/api-client"; import type { Plugin } from "@halo-dev/api-client";
import type { Ref } from "vue"; import type { Ref } from "vue";

View File

@ -7,7 +7,7 @@ import type {
MenuGroupType, MenuGroupType,
MenuItemType, MenuItemType,
Plugin, Plugin,
} from "@halo-dev/admin-shared"; } from "@halo-dev/console-shared";
import { apiClient } from "@/utils/api-client"; import { apiClient } from "@/utils/api-client";
import { menus, minimenus, registerMenu } from "./router/menus.config"; import { menus, minimenus, registerMenu } from "./router/menus.config";
// setup // setup

View File

@ -6,7 +6,7 @@ import UploadSelectorProvider from "./selector-providers/UploadSelectorProvider.
import type { import type {
AttachmentLike, AttachmentLike,
AttachmentSelectorPublicState, AttachmentSelectorPublicState,
} from "@halo-dev/admin-shared"; } from "@halo-dev/console-shared";
import { useExtensionPointsState } from "@/composables/usePlugins"; import { useExtensionPointsState } from "@/composables/usePlugins";
withDefaults( withDefaults(

View File

@ -16,7 +16,7 @@ import { watchEffect, ref } from "vue";
import { isImage } from "@/utils/image"; import { isImage } from "@/utils/image";
import { useAttachmentControl } from "../../composables/use-attachment"; import { useAttachmentControl } from "../../composables/use-attachment";
import LazyImage from "@/components/image/LazyImage.vue"; import LazyImage from "@/components/image/LazyImage.vue";
import type { AttachmentLike } from "@halo-dev/admin-shared"; import type { AttachmentLike } from "@halo-dev/console-shared";
import type { Attachment, Group } from "@halo-dev/api-client"; import type { Attachment, Group } from "@halo-dev/api-client";
import AttachmentUploadModal from "../AttachmentUploadModal.vue"; import AttachmentUploadModal from "../AttachmentUploadModal.vue";
import AttachmentFileTypeIcon from "../AttachmentFileTypeIcon.vue"; import AttachmentFileTypeIcon from "../AttachmentFileTypeIcon.vue";

View File

@ -7,7 +7,7 @@ import {
useDialog, useDialog,
} from "@halo-dev/components"; } from "@halo-dev/components";
import type { AttachmentLike } from "@halo-dev/admin-shared"; import type { AttachmentLike } from "@halo-dev/console-shared";
import { apiClient } from "@/utils/api-client"; import { apiClient } from "@/utils/api-client";
import LazyImage from "@/components/image/LazyImage.vue"; import LazyImage from "@/components/image/LazyImage.vue";
import type { Attachment } from "@halo-dev/api-client"; import type { Attachment } from "@halo-dev/api-client";

View File

@ -7,7 +7,7 @@ import type {
} from "@halo-dev/api-client"; } from "@halo-dev/api-client";
import type { Ref } from "vue"; import type { Ref } from "vue";
import { ref, watch } from "vue"; import { ref, watch } from "vue";
import type { AttachmentLike } from "@halo-dev/admin-shared"; import type { AttachmentLike } from "@halo-dev/console-shared";
import { apiClient } from "@/utils/api-client"; import { apiClient } from "@/utils/api-client";
import { useDialog } from "@halo-dev/components"; import { useDialog } from "@halo-dev/components";
import type { Content, Editor } from "@halo-dev/richtext-editor"; import type { Content, Editor } from "@halo-dev/richtext-editor";

View File

@ -1,4 +1,4 @@
import { BasicLayout, definePlugin } from "@halo-dev/admin-shared"; import { BasicLayout, definePlugin } from "@halo-dev/console-shared";
import AttachmentList from "./AttachmentList.vue"; import AttachmentList from "./AttachmentList.vue";
import AttachmentSelectorModal from "./components/AttachmentSelectorModal.vue"; import AttachmentSelectorModal from "./components/AttachmentSelectorModal.vue";
import { IconFolder } from "@halo-dev/components"; import { IconFolder } from "@halo-dev/components";

View File

@ -1,4 +1,4 @@
import { BasicLayout, definePlugin } from "@halo-dev/admin-shared"; import { BasicLayout, definePlugin } from "@halo-dev/console-shared";
import { IconMessage } from "@halo-dev/components"; import { IconMessage } from "@halo-dev/components";
import CommentList from "./CommentList.vue"; import CommentList from "./CommentList.vue";

View File

@ -8,7 +8,7 @@ import {
VEntity, VEntity,
VEntityField, VEntityField,
} from "@halo-dev/components"; } from "@halo-dev/components";
import type { PagesPublicState } from "@halo-dev/admin-shared"; import type { PagesPublicState } from "@halo-dev/console-shared";
import { useExtensionPointsState } from "@/composables/usePlugins"; import { useExtensionPointsState } from "@/composables/usePlugins";
const pagesPublicState = ref<PagesPublicState>({ const pagesPublicState = ref<PagesPublicState>({

View File

@ -8,7 +8,7 @@ import {
IconPages, IconPages,
VButton, VButton,
} from "@halo-dev/components"; } from "@halo-dev/components";
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
const route = useRoute(); const route = useRoute();

View File

@ -1,4 +1,8 @@
import { BasicLayout, BlankLayout, definePlugin } from "@halo-dev/admin-shared"; import {
BasicLayout,
BlankLayout,
definePlugin,
} from "@halo-dev/console-shared";
import PageLayout from "./layouts/PageLayout.vue"; import PageLayout from "./layouts/PageLayout.vue";
import FunctionalPageList from "./FunctionalPageList.vue"; import FunctionalPageList from "./FunctionalPageList.vue";
import SinglePageList from "./SinglePageList.vue"; import SinglePageList from "./SinglePageList.vue";

View File

@ -1,4 +1,8 @@
import { BasicLayout, BlankLayout, definePlugin } from "@halo-dev/admin-shared"; import {
BasicLayout,
BlankLayout,
definePlugin,
} from "@halo-dev/console-shared";
import { IconBookRead } from "@halo-dev/components"; import { IconBookRead } from "@halo-dev/components";
import PostList from "./PostList.vue"; import PostList from "./PostList.vue";
import PostEditor from "./PostEditor.vue"; import PostEditor from "./PostEditor.vue";

View File

@ -1,4 +1,4 @@
import { BasicLayout, definePlugin } from "@halo-dev/admin-shared"; import { BasicLayout, definePlugin } from "@halo-dev/console-shared";
import Dashboard from "./Dashboard.vue"; import Dashboard from "./Dashboard.vue";
import { IconDashboard } from "@halo-dev/components"; import { IconDashboard } from "@halo-dev/components";

View File

@ -1,4 +1,4 @@
import { BasicLayout, definePlugin } from "@halo-dev/admin-shared"; import { BasicLayout, definePlugin } from "@halo-dev/console-shared";
import Menus from "./Menus.vue"; import Menus from "./Menus.vue";
import { IconListSettings } from "@halo-dev/components"; import { IconListSettings } from "@halo-dev/components";

View File

@ -10,7 +10,7 @@ import cloneDeep from "lodash.clonedeep";
// hooks // hooks
import { useThemeLifeCycle } from "../composables/use-theme"; import { useThemeLifeCycle } from "../composables/use-theme";
// types // types
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
import { useSettingForm } from "@/composables/use-setting-form"; import { useSettingForm } from "@/composables/use-setting-form";
// components // components

View File

@ -1,4 +1,4 @@
import { BlankLayout, definePlugin } from "@halo-dev/admin-shared"; import { BlankLayout, definePlugin } from "@halo-dev/console-shared";
import ThemeLayout from "./layouts/ThemeLayout.vue"; import ThemeLayout from "./layouts/ThemeLayout.vue";
import ThemeDetail from "./ThemeDetail.vue"; import ThemeDetail from "./ThemeDetail.vue";
import ThemeSetting from "./ThemeSetting.vue"; import ThemeSetting from "./ThemeSetting.vue";

View File

@ -12,7 +12,7 @@ import { useSettingForm } from "@/composables/use-setting-form";
// components // components
import { VButton, VCard, VPageHeader, VTabbar } from "@halo-dev/components"; import { VButton, VCard, VPageHeader, VTabbar } from "@halo-dev/components";
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
// types // types
import type { Ref } from "vue"; import type { Ref } from "vue";

View File

@ -1,4 +1,8 @@
import { BasicLayout, BlankLayout, definePlugin } from "@halo-dev/admin-shared"; import {
BasicLayout,
BlankLayout,
definePlugin,
} from "@halo-dev/console-shared";
import PluginLayout from "./layouts/PluginLayout.vue"; import PluginLayout from "./layouts/PluginLayout.vue";
import PluginList from "./PluginList.vue"; import PluginList from "./PluginList.vue";
import PluginSetting from "./PluginSetting.vue"; import PluginSetting from "./PluginSetting.vue";

View File

@ -1,4 +1,4 @@
import { BasicLayout, definePlugin } from "@halo-dev/admin-shared"; import { BasicLayout, definePlugin } from "@halo-dev/console-shared";
import RoleList from "./RoleList.vue"; import RoleList from "./RoleList.vue";
import RoleDetail from "./RoleDetail.vue"; import RoleDetail from "./RoleDetail.vue";

View File

@ -5,7 +5,7 @@ import { ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
// types // types
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
import { useSettingForm } from "@/composables/use-setting-form"; import { useSettingForm } from "@/composables/use-setting-form";
// components // components

View File

@ -1,4 +1,4 @@
import { definePlugin } from "@halo-dev/admin-shared"; import { definePlugin } from "@halo-dev/console-shared";
import SystemSettingsLayout from "./layouts/SystemSettingsLayout.vue"; import SystemSettingsLayout from "./layouts/SystemSettingsLayout.vue";
import SystemSetting from "./SystemSetting.vue"; import SystemSetting from "./SystemSetting.vue";
import { IconSettings } from "@halo-dev/components"; import { IconSettings } from "@halo-dev/components";

View File

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
import { apiClient } from "@/utils/api-client"; import { apiClient } from "@/utils/api-client";
import { import {
IconUpload, IconUpload,

View File

@ -1,4 +1,8 @@
import { BasicLayout, BlankLayout, definePlugin } from "@halo-dev/admin-shared"; import {
BasicLayout,
BlankLayout,
definePlugin,
} from "@halo-dev/console-shared";
import UserProfileLayout from "./layouts/UserProfileLayout.vue"; import UserProfileLayout from "./layouts/UserProfileLayout.vue";
import UserList from "./UserList.vue"; import UserList from "./UserList.vue";
import UserDetail from "./UserDetail.vue"; import UserDetail from "./UserDetail.vue";

View File

@ -6,7 +6,7 @@ import {
IconUserSettings, IconUserSettings,
} from "@halo-dev/components"; } from "@halo-dev/components";
import type { MenuGroupType, MenuItemType } from "@halo-dev/admin-shared"; import type { MenuGroupType, MenuItemType } from "@halo-dev/console-shared";
export const menus: MenuGroupType[] = [ export const menus: MenuGroupType[] = [
{ {

View File

@ -1,7 +1,7 @@
import type { RouteRecordRaw } from "vue-router"; import type { RouteRecordRaw } from "vue-router";
import NotFound from "@/views/exceptions/NotFound.vue"; import NotFound from "@/views/exceptions/NotFound.vue";
import Forbidden from "@/views/exceptions/Forbidden.vue"; import Forbidden from "@/views/exceptions/Forbidden.vue";
import { BasicLayout } from "@halo-dev/admin-shared"; import { BasicLayout } from "@halo-dev/console-shared";
import Setup from "@/views/system/Setup.vue"; import Setup from "@/views/system/Setup.vue";
export const routes: Array<RouteRecordRaw> = [ export const routes: Array<RouteRecordRaw> = [

View File

@ -1,4 +1,4 @@
import "@halo-dev/richtext-editor/dist/style.css"; import "@halo-dev/richtext-editor/dist/style.css";
import "@halo-dev/components/dist/style.css"; import "@halo-dev/components/dist/style.css";
import "@/styles/tailwind.css"; import "@/styles/tailwind.css";
import "@halo-dev/admin-shared/dist/style.css"; import "@halo-dev/console-shared/dist/style.css";