mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-09-20 15:45:57 +08:00
feat: 修改 logo
This commit is contained in:
parent
e3976aa359
commit
819ce10db0
BIN
frontend/src/assets/images/1panel-logo-dark.png
Normal file
BIN
frontend/src/assets/images/1panel-logo-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
frontend/src/assets/images/1panel-menu-dark.png
Normal file
BIN
frontend/src/assets/images/1panel-menu-dark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
@ -1,12 +1,24 @@
|
|||
<template>
|
||||
<div class="logo flx-center">
|
||||
<img v-show="!isCollapse" src="@/assets/images/1panel-menu.png" />
|
||||
<img v-show="isCollapse" src="@/assets/images/1panel-small.png" />
|
||||
<img v-show="!isCollapse" :src="getLogoUrl(isCollapse)" alt="" />
|
||||
<img v-show="isCollapse" :src="getLogoUrl(isCollapse)" alt="" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GlobalStore } from '@/store';
|
||||
|
||||
defineProps<{ isCollapse: boolean }>();
|
||||
const globalStore = GlobalStore();
|
||||
|
||||
const getLogoUrl = (isCollapse: boolean) => {
|
||||
const theme = globalStore.$state.themeConfig.theme || 'light';
|
||||
if (isCollapse) {
|
||||
return new URL(`../../../../assets/images/1panel-logo-${theme}.png`, import.meta.url).href;
|
||||
} else {
|
||||
return new URL(`../../../../assets/images/1panel-menu-${theme}.png`, import.meta.url).href;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
@use './element.scss';
|
||||
@use './element-dark.scss';
|
||||
@use './reset.scss';
|
||||
|
||||
|
||||
@use './var.scss';
|
||||
|
|
Loading…
Reference in a new issue