Skip to content

Commit

Permalink
feat: add powered by information in page footer (#5153)
Browse files Browse the repository at this point in the history
#### 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 信息。
```
  • Loading branch information
ruibaby authored Jan 8, 2024
1 parent 694ad26 commit 0b30c0d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions console/console-src/layouts/BasicLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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-->
Expand Down
1 change: 1 addition & 0 deletions console/console-src/modules/contents/pages/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export default definePlugin({
meta: {
title: "core.page_editor.title",
searchable: true,
hideFooter: true,
permissions: ["system:singlepages:manage"],
},
},
Expand Down
1 change: 1 addition & 0 deletions console/console-src/modules/contents/posts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default definePlugin({
meta: {
title: "core.post_editor.title",
searchable: true,
hideFooter: true,
permissions: ["system:posts:manage"],
},
},
Expand Down
1 change: 1 addition & 0 deletions console/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ declare module "vue-router" {
searchable?: boolean;
permissions?: string[];
core?: boolean;
hideFooter?: boolean;
menu?: {
name: string;
group?: CoreMenuGroupId;
Expand Down
6 changes: 6 additions & 0 deletions console/src/components/base-app/BaseApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ body {
background: #eff4f9;
}
html,
body,
#app {
height: 100%;
}
*,
*::before,
*::after {
Expand Down
13 changes: 13 additions & 0 deletions console/uc-src/layouts/BasicLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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-->
Expand Down
1 change: 1 addition & 0 deletions console/uc-src/modules/contents/posts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default definePlugin({
meta: {
title: "core.post_editor.title",
searchable: true,
hideFooter: true,
permissions: ["uc:posts:manage"],
},
},
Expand Down

0 comments on commit 0b30c0d

Please sign in to comment.