mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
Merge branch 'client_sync' into v2
# Conflicts: # packages/ui/certd-client/.env # packages/ui/certd-client/CHANGELOG.md # packages/ui/certd-client/index.html # packages/ui/certd-client/package.json # packages/ui/certd-client/public/images/logo/rect-black.svg # packages/ui/certd-client/public/images/logo/square.svg # packages/ui/certd-client/src/layout/components/theme/index.vue # packages/ui/certd-client/src/layout/layout-framework.vue # packages/ui/certd-client/src/layout/layout-outside.vue # packages/ui/certd-client/src/main.ts # packages/ui/certd-client/src/plugin/fast-crud/index.tsx # packages/ui/certd-client/src/router/source/header.ts # packages/ui/certd-client/src/store/modules/settings.ts # packages/ui/certd-client/src/style/common.less # packages/ui/certd-client/src/views/crud/form/independent/index.vue # packages/ui/certd-client/src/views/framework/login/index.vue # packages/ui/certd-client/src/views/framework/register/index.vue # packages/ui/certd-client/vite.config.ts
This commit is contained in:
@@ -22,7 +22,7 @@ export default defineComponent({
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
const middle = "/fast-crud/fs-admin-antdv/blob/main/src/views";
|
||||
const middle = "/fast-crud/fs-admin-antdv4/blob/main/src/views";
|
||||
function goSource(prefix: any) {
|
||||
const path = router.currentRoute.value.fullPath;
|
||||
window.open(prefix + middle + path + "/index.vue");
|
||||
|
||||
@@ -54,6 +54,7 @@ export default defineComponent({
|
||||
name: "FsThemeColorPicker",
|
||||
props: {
|
||||
primaryColor: {
|
||||
type: String,
|
||||
default: "#1890ff"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="fs-theme" @click="show()">
|
||||
<fs-iconify icon="ion:sparkles-outline" />
|
||||
<a-drawer v-model:open="visible" title="主题设置" placement="right" width="350px" :closable="false" @after-open-change="afterVisibleChange">
|
||||
<fs-theme-color-picker :primary-color="setting.getTheme.primaryColor" @change="setting.setPrimaryColor"></fs-theme-color-picker>
|
||||
<fs-theme-color-picker :primary-color="setting.themeConfig?.colorPrimary" @change="setting.setPrimaryColor"></fs-theme-color-picker>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div class="fs-theme-mode">
|
||||
<a-switch :checked="setting.themeConfig.mode === 'dark'" @update:checked="onChange">
|
||||
<template #checkedChildren>
|
||||
<fs-iconify icon="ion:moon" />
|
||||
</template>
|
||||
<template #unCheckedChildren>
|
||||
<fs-iconify icon="ion:sunny" />
|
||||
</template>
|
||||
</a-switch>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, defineComponent } from "vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
|
||||
export default defineComponent({
|
||||
name: "FsThemeModeSet",
|
||||
components: {},
|
||||
setup() {
|
||||
const setting = useSettingStore();
|
||||
const onChange = (checked: boolean) => {
|
||||
if (checked) {
|
||||
setting.setDarkMode("dark");
|
||||
} else {
|
||||
setting.setDarkMode("light");
|
||||
}
|
||||
};
|
||||
return {
|
||||
setting,
|
||||
onChange
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.fs-theme-mode {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -31,9 +31,18 @@
|
||||
<!-- Button-->
|
||||
<!-- </button>-->
|
||||
<fs-menu class="header-menu" mode="horizontal" :expand-selected="false" :selectable="false" :menus="headerMenus" />
|
||||
<fs-locale class="btn" />
|
||||
<!-- <fs-theme-set class="btn" />-->
|
||||
<fs-user-info class="btn" />
|
||||
<div class="header-btn">
|
||||
<fs-locale />
|
||||
</div>
|
||||
<!-- <div class="header-btn">-->
|
||||
<!-- <fs-theme-mode-set />-->
|
||||
<!-- </div>-->
|
||||
<div class="header-btn">
|
||||
<fs-theme-set />
|
||||
</div>
|
||||
<div class="header-btn">
|
||||
<fs-user-info />
|
||||
</div>
|
||||
</div>
|
||||
</a-layout-header>
|
||||
<fs-tabs></fs-tabs>
|
||||
@@ -69,11 +78,12 @@ import { useResourceStore } from "../store/modules/resource";
|
||||
import { usePageStore } from "/@/store/modules/page";
|
||||
import { MenuFoldOutlined, MenuUnfoldOutlined } from "@ant-design/icons-vue";
|
||||
import FsThemeSet from "/@/layout/components/theme/index.vue";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { env } from "../utils/util.env";
|
||||
import FsThemeModeSet from "./components/theme/mode-set.vue";
|
||||
export default {
|
||||
name: "LayoutFramework",
|
||||
// eslint-disable-next-line vue/no-unused-components
|
||||
components: { FsThemeSet, MenuFoldOutlined, MenuUnfoldOutlined, FsMenu, FsLocale, FsSourceLink, FsUserInfo, FsTabs },
|
||||
components: { FsThemeSet, MenuFoldOutlined, MenuUnfoldOutlined, FsMenu, FsLocale, FsSourceLink, FsUserInfo, FsTabs, FsThemeModeSet },
|
||||
setup() {
|
||||
const resourceStore = useResourceStore();
|
||||
const frameworkMenus = computed(() => {
|
||||
@@ -100,6 +110,8 @@ export default {
|
||||
return false;
|
||||
});
|
||||
const version = ref(import.meta.env.VITE_APP_VERSION);
|
||||
|
||||
const envRef = ref(env);
|
||||
return {
|
||||
version,
|
||||
frameworkMenus,
|
||||
@@ -107,7 +119,8 @@ export default {
|
||||
asideMenus,
|
||||
keepAlive,
|
||||
asideCollapsed,
|
||||
asideCollapsedToggle
|
||||
asideCollapsedToggle,
|
||||
envRef
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -165,11 +178,16 @@ export default {
|
||||
cursor: pointer;
|
||||
padding: 0 10px;
|
||||
}
|
||||
height: 100%;
|
||||
|
||||
& > .btn {
|
||||
& > .header-btn {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
//border-bottom: 1px solid rgba(255, 255, 255, 0);
|
||||
&:hover {
|
||||
background-color: #fff;
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,15 +19,24 @@
|
||||
<a href="_self">隐私</a>
|
||||
<a href="_self">条款</a>
|
||||
</div>
|
||||
<div class="copyright">Copyright © 2021 Greper</div>
|
||||
<div class="copyright">{{ envRef.COPYRIGHT }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { env } from "/@/utils/util.env";
|
||||
import { ref } from "vue";
|
||||
|
||||
export default {
|
||||
name: "LayoutOutside"
|
||||
name: "LayoutOutside",
|
||||
setup() {
|
||||
const envRef = ref(env);
|
||||
return {
|
||||
envRef
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<template>
|
||||
<router-view />
|
||||
<router-view> </router-view>
|
||||
</template>
|
||||
|
||||
<!--<script lang="ts" setup>-->
|
||||
<!--import { usePageStore } from "/@/store/modules/page";-->
|
||||
|
||||
<!--const pageStore = usePageStore();-->
|
||||
<!--const keepAlive = pageStore.keepAlive;-->
|
||||
<!--</script>-->
|
||||
|
||||
Reference in New Issue
Block a user