Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/src/api/admin/auth/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface CurrentUserInfo {

export interface LoginRequest {
username: string
password: string
password?: string
captcha?: string
encryptedData?: string
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/assets/iconfont.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/src/components/global/mk-view-layout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const LayoutContent: FunctionalComponent = () => {
</template>
</LayoutAside>

<main class="mb-6 flex min-w-0 flex-1 flex-col px-6">
<main class="mb-6 flex min-w-0 flex-1 flex-col px-6 min-h-0">
<LayoutContent />
</main>
</div>
Expand Down
3 changes: 1 addition & 2 deletions ui/src/layout/LayoutHeader.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import AvatarDropdown from './avatar-dropdown/index.vue'
import WorkspaceDropdown from './workspace-dropdown/index.vue'
import { Setting } from '@element-plus/icons-vue'
import { isWorkspace, isSystem } from '@/router/admin/utils'
import type { LayoutMode } from './types'
const router = useRouter()
Expand Down Expand Up @@ -41,7 +40,7 @@ function switchMode() {
</el-button>
<el-divider direction="vertical" />
<el-button v-if="isWorkspace(mode)" class="-mx-1" text @click="switchMode">
<MkIcon :icon="Setting" />
<MkIcon name="icon_admin_outlined" />
<span>系统管理</span>
</el-button>
<!-- TODO 只有系统管理员权限没有返回工作空间 -->
Expand Down
2 changes: 1 addition & 1 deletion ui/src/layout/sidebar/SystemSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ const systemMenuItems = getChildRouteList('system')
}

.el-popper.mk-system-sidebar-menu-popper {
background-color: var(--mk-layout);
background-color: var(--mk-N200);
background-image: var(--mk-layout-gradient);
border-radius: var(--el-border-radius-base);
.el-menu {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/router/admin/system/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const systemRoutes: RouteRecordRaw = {
component: () => import('@/views/system/SystemView.vue'),
meta: {
title: '首页',
activeIcon: 'icon_home_filled',
icon: 'icon_home_outlined',
activeIcon: 'icon_screen_outlined',
icon: 'icon_screen_outlined',
order: 0,
},
},
Expand Down Expand Up @@ -125,7 +125,7 @@ export const systemRoutes: RouteRecordRaw = {
path: 'chat',
name: 'system-chat',
redirect: { name: 'system-chat-users' },
meta: { title: '对话端管理', icon: 'icon-setting', order: 40 },
meta: { title: '对话端管理', icon: 'icon_contacts_outlined', order: 40 },
children: [
{
path: 'users',
Expand Down
13 changes: 12 additions & 1 deletion ui/src/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body,
}

body {
background: var(--mk-layout);
background: var(--mk-N200);
color: var(--el-text-color-primary);
font-family: 'PingFang SC', AlibabaPuHuiTi !important;
font-size: var(--mk-font-size-base);
Expand Down Expand Up @@ -77,3 +77,14 @@ h6 {
background: var(--el-color-primary);
}
}

/*
必填文字的星号
*/
.mk-required {
&:after {
content: '*';
color: var(--el-color-danger);
margin-left: 4px;
}
}
23 changes: 18 additions & 5 deletions ui/src/styles/element-plus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
--el-text-color-primary: var(--mk-N900);
--el-text-color-regular: var(--mk-N600);
--el-text-color-disabled: var(--mk-N400);
--el-disabled-text-color: var(--mk-N400);
}

/* button */
Expand Down Expand Up @@ -75,7 +76,7 @@
&.is-circle {
height: var(--el-button-size);
&:hover {
box-shadow: 0px 2px 4px 0px rgb(var(--el-text-color-primary-rgb) / 12%);
box-shadow: 0px 2px 4px 0px rgb(var(--mk-N900-rgb) / 12%);
color: var(--el-text-color-primary);
background: none;
border-color: var(--el-border-color);
Expand Down Expand Up @@ -136,12 +137,15 @@
&.is-always-shadow {
border: none;
}
&.is-never-shadow {
border: none;
}
}

.el-card.is-always-shadow,
.el-card.is-hover-shadow:hover,
.el-card.is-hover-shadow:focus {
box-shadow: 0px 6px 24px 0px rgb(var(--el-text-color-primary-rgb) / 8%);
box-shadow: 0px 6px 24px 0px rgb(var(--mk-N900-rgb) / 8%);
}

/* cascader */
Expand Down Expand Up @@ -336,7 +340,7 @@
font-size: 16px;
}
&__wrapper {
padding: 1px 11px !important;
padding: 1px 11px;
}
&__prefix {
}
Expand All @@ -345,7 +349,16 @@
--el-input-hover-border-color: var(--el-input-border-color);
}
}

/* input-number */
.el-input-number {
&__increase,
&__decrease {
background: white;
&.is-disabled {
background-color: var(--mk-N200);
}
}
}
/* message-box */
.el-message-box {
--el-messagebox-padding-primary: 24px;
Expand Down Expand Up @@ -557,7 +570,7 @@
.el-switch__core {
min-width: 28px;
.el-switch__action {
box-shadow: 0px 2px 4px 0px rgb(var(--el-text-color-primary-rgb) / 12%);
box-shadow: 0px 2px 4px 0px rgb(var(--mk-N900-rgb) / 12%);
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion ui/src/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
--mk-success-rgb: 52 199 36;
--mk-warning: #ff8800;
--mk-warning-rgb: 255 136 0;
--mk-layout: #eff0f1;
--mk-layout-gradient: linear-gradient(
187.61deg,
rgba(235, 241, 255, 0.35) 39.6%,
Expand All @@ -22,6 +21,9 @@
// 用于表头背景。
--mk-N100: #f5f6f7;
--mk-N100-rgb: 245 246 247;
// 通常用于禁用
--mk-N200: #eff0f1;
--mk-N200-rgb: 239 240 241;
// 通常用于card边框。
--mk-N300: #dee0e3;
--mk-N300-rgb: 222 224 227;
Expand Down
2 changes: 0 additions & 2 deletions ui/src/views/login/modes/AccountLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const handleLogin = async () => {
auth
.asyncLogin({
encryptedData,
password: '',
username: accountLoginForm.username,
})
.then(() => {
Expand All @@ -98,7 +97,6 @@ const handleLogin = async () => {

const refreshCaptcha = () => {
if (loginMethod.value === 'LDAP') return
identifyCode.value = ''
LoginApi.getCaptcha(accountLoginForm.username).then((res) => {
identifyCode.value = res.captcha
})
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/system/operate-logs/OperateLogListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ onMounted(() => {
</script>

<template>
<MkPageLayout title="操作日志">
<MkViewLayout>
<template #actions>
<div class="flex gap-3">
<el-button @click="handleExport">导出</el-button>
Expand Down Expand Up @@ -293,5 +293,5 @@ onMounted(() => {
<el-button type="primary" @click="saveCleanPolicy">保存</el-button>
</template>
</el-dialog>
</MkPageLayout>
</MkViewLayout>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ const authenticationTabs: AuthenticationTab[] = [

<template>
<MkViewLayout class="system-settings-authentication">
<el-tabs v-model="activeName" class="authentication-tabs h-full">
<el-tabs v-model="activeName" class="authentication-tabs min-h-0 flex-1 flex-col">
<template v-for="authenticationTab in authenticationTabs" :key="authenticationTab.name">
<el-tab-pane :label="authenticationTab.label" :name="authenticationTab.name" lazy>
<el-scrollbar class="min-h-0 flex-1">
<el-tab-pane
class="h-full"
:label="authenticationTab.label"
:name="authenticationTab.name"
lazy
>
<el-scrollbar>
<div class="py-4">
<component :is="authenticationTab.component" />
</div>
Expand All @@ -42,4 +47,15 @@ const authenticationTabs: AuthenticationTab[] = [
</MkViewLayout>
</template>

<style scoped lang="scss"></style>
<style scoped lang="scss">
.authentication-tabs {
:deep(.el-tabs__header) {
flex-shrink: 0;
}

:deep(.el-tabs__content) {
min-height: 0;
flex: 1;
}
}
</style>
Loading
Loading