feat: add powered by information in page footer (#5153)

#### What type of PR is this?

/area console
/kind improvement
/milestone 2.12.x

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

在 Console 和 UC 的页面底部添加 Powered by 信息。

<img width="1920" alt="图片" src="https://github.com/halo-dev/halo/assets/21301288/3ce1304f-01dc-4e3f-a22a-a1cbd59fced8">

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

```release-note
在 Console 和 UC 的页面底部添加 Powered by 信息。
```
pull/5160/head
Ryan Wang 2024-01-08 23:06:41 +08:00 committed by GitHub
parent 694ad26c3f
commit 0b30c0d98e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 0 deletions

View File

@ -204,6 +204,15 @@ onMounted(() => {
<main class="content w-full pb-12 mb-safe md:w-[calc(100%-16rem)] md:pb-0">
<slot v-if="$slots.default" />
<RouterView v-else />
<footer
v-if="!route.meta.hideFooter"
class="mt-auto p-4 text-center text-sm"
>
<span class="text-gray-600">Powered by </span>
<RouterLink to="/actuator" class="hover:text-gray-600">
Halo
</RouterLink>
</footer>
</main>
<!--bottom nav bar-->

View File

@ -49,6 +49,7 @@ export default definePlugin({
meta: {
title: "core.page_editor.title",
searchable: true,
hideFooter: true,
permissions: ["system:singlepages:manage"],
},
},

View File

@ -55,6 +55,7 @@ export default definePlugin({
meta: {
title: "core.post_editor.title",
searchable: true,
hideFooter: true,
permissions: ["system:posts:manage"],
},
},

1
console/env.d.ts vendored
View File

@ -23,6 +23,7 @@ declare module "vue-router" {
searchable?: boolean;
permissions?: string[];
core?: boolean;
hideFooter?: boolean;
menu?: {
name: string;
group?: CoreMenuGroupId;

View File

@ -97,6 +97,12 @@ body {
background: #eff4f9;
}
html,
body,
#app {
height: 100%;
}
*,
*::before,
*::after {

View File

@ -181,6 +181,19 @@ const disallowAccessConsole = computed(() => {
<main class="content w-full pb-12 mb-safe md:w-[calc(100%-16rem)] md:pb-0">
<slot v-if="$slots.default" />
<RouterView v-else />
<footer
v-if="!route.meta.hideFooter"
class="mt-auto p-4 text-center text-sm"
>
<span class="text-gray-600">Powered by </span>
<a
href="https://www.halo.run"
target="_blank"
class="hover:text-gray-600"
>
Halo
</a>
</footer>
</main>
<!--bottom nav bar-->

View File

@ -35,6 +35,7 @@ export default definePlugin({
meta: {
title: "core.post_editor.title",
searchable: true,
hideFooter: true,
permissions: ["uc:posts:manage"],
},
},