@liujitcn/kratos-admin-system 0.0.28 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- package/dist/package/declarations/src/api/base/notification.d.ts +24 -0
- package/dist/package/declarations/src/api/system/base_audit_log.d.ts +55 -0
- package/dist/package/declarations/src/api/system/base_dashboard.d.ts +14 -0
- package/dist/package/declarations/src/api/system/base_file.d.ts +13 -0
- package/dist/package/declarations/src/api/system/base_i18n.d.ts +5 -5
- package/dist/package/declarations/src/api/system/base_login_policy.d.ts +10 -0
- package/dist/package/declarations/src/api/system/base_message.d.ts +24 -0
- package/dist/package/declarations/src/api/system/base_message_category.d.ts +21 -0
- package/dist/package/declarations/src/api/system/base_session.d.ts +11 -0
- package/dist/package/declarations/src/api/system/oauth_client.d.ts +24 -0
- package/dist/package/declarations/src/components/AuditLogTable.vue.d.ts +45 -0
- package/dist/package/declarations/src/components/DynamicI18nCell.vue.d.ts +16 -0
- package/dist/package/declarations/src/components/DynamicI18nEditor.vue.d.ts +20 -0
- package/dist/package/declarations/src/components/auditLog.d.ts +9 -0
- package/dist/package/declarations/src/components/dynamicI18n.d.ts +38 -0
- package/dist/package/declarations/src/locales/generated.d.ts +1364 -68
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +149 -0
- package/dist/package/declarations/src/rpc/base/v1/notification.d.ts +281 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +25 -0
- package/dist/package/declarations/src/rpc/base/v1/oauth_client.d.ts +23 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_audit_log.d.ts +640 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +3 -3
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dashboard.d.ts +60 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +4 -4
- package/dist/package/declarations/src/rpc/system/admin/v1/base_file.d.ts +73 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n.d.ts +27 -23
- package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +5 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_login_policy.d.ts +51 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +2 -2
- package/dist/package/declarations/src/rpc/system/admin/v1/base_message.d.ts +193 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_message_category.d.ts +125 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_session.d.ts +33 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +3 -3
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +1 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/oauth_client.d.ts +145 -0
- package/dist/package/declarations/src/views/base/api-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/dashboard/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/data-access-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/file/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/login-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/login-policy/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/message/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/message-category/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/oauth-client/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/operation-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/permission-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/policy-evaluation-log/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/message/inbox/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/profile/components/session.vue.d.ts +3 -0
- package/dist/package/src/api/base/notification.ts +69 -0
- package/dist/package/src/api/base/sse.ts +4 -4
- package/dist/package/src/api/system/auth.ts +1 -0
- package/dist/package/src/api/system/base_audit_log.ts +168 -0
- package/dist/package/src/api/system/base_dashboard.ts +55 -0
- package/dist/package/src/api/system/base_file.ts +43 -0
- package/dist/package/src/api/system/base_i18n.ts +12 -12
- package/dist/package/src/api/system/base_login_policy.ts +32 -0
- package/dist/package/src/api/system/base_message.ts +70 -0
- package/dist/package/src/api/system/base_message_category.ts +57 -0
- package/dist/package/src/api/system/base_session.ts +33 -0
- package/dist/package/src/api/system/oauth_client.ts +102 -0
- package/dist/package/src/components/AuditLogTable.vue +105 -0
- package/dist/package/src/components/{DynamicTranslationCell.vue → DynamicI18nCell.vue} +50 -50
- package/dist/package/src/components/{DynamicTranslationEditor.vue → DynamicI18nEditor.vue} +45 -45
- package/dist/package/src/components/Notification.vue +196 -0
- package/dist/package/src/components/auditLog.ts +46 -0
- package/dist/package/src/components/{dynamicTranslation.ts → dynamicI18n.ts} +15 -15
- package/dist/package/src/locales/README.md +5 -3
- package/dist/package/src/locales/en-US.json +345 -21
- package/dist/package/src/locales/ja-JP.json +347 -23
- package/dist/package/src/locales/zh-CN.json +343 -19
- package/dist/package/src/locales/zh-TW.json +346 -22
- package/dist/package/src/module.ts +5 -2
- package/dist/package/src/rpc/base/v1/login.ts +172 -0
- package/dist/package/src/rpc/base/v1/notification.ts +315 -0
- package/dist/package/src/rpc/base/v1/oauth.ts +25 -0
- package/dist/package/src/rpc/base/v1/oauth_client.ts +33 -0
- package/dist/package/src/rpc/system/admin/v1/base_audit_log.ts +737 -0
- package/dist/package/src/rpc/system/admin/v1/base_config.ts +3 -3
- package/dist/package/src/rpc/system/admin/v1/base_dashboard.ts +81 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +4 -4
- package/dist/package/src/rpc/system/admin/v1/base_file.ts +88 -0
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +27 -23
- package/dist/package/src/rpc/system/admin/v1/base_job.ts +5 -0
- package/dist/package/src/rpc/system/admin/v1/base_login_policy.ts +63 -0
- package/dist/package/src/rpc/system/admin/v1/base_menu.ts +2 -2
- package/dist/package/src/rpc/system/admin/v1/base_message.ts +236 -0
- package/dist/package/src/rpc/system/admin/v1/base_message_category.ts +149 -0
- package/dist/package/src/rpc/system/admin/v1/base_session.ts +44 -0
- package/dist/package/src/rpc/system/admin/v1/base_user.ts +3 -3
- package/dist/package/src/rpc/system/admin/v1/code_gen.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/oauth_client.ts +174 -0
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +2 -2
- package/dist/package/src/views/ai/chat/message.ts +7 -3
- package/dist/package/src/views/base/api-log/index.vue +83 -0
- package/dist/package/src/views/base/config/index.vue +41 -41
- package/dist/package/src/views/base/dashboard/index.vue +200 -0
- package/dist/package/src/views/base/data-access-log/index.vue +84 -0
- package/dist/package/src/views/base/dict/index.vue +23 -23
- package/dist/package/src/views/base/dict/item.vue +25 -25
- package/dist/package/src/views/base/file/index.vue +119 -0
- package/dist/package/src/views/base/job/index.vue +62 -7
- package/dist/package/src/views/base/language/index.vue +2 -1
- package/dist/package/src/views/base/login-log/index.vue +92 -0
- package/dist/package/src/views/base/login-policy/index.vue +219 -0
- package/dist/package/src/views/base/menu/index.vue +23 -23
- package/dist/package/src/views/base/message/index.vue +582 -0
- package/dist/package/src/views/base/message-category/index.vue +356 -0
- package/dist/package/src/views/base/oauth-client/index.vue +411 -0
- package/dist/package/src/views/base/operation-log/index.vue +82 -0
- package/dist/package/src/views/base/permission-log/index.vue +85 -0
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +82 -0
- package/dist/package/src/views/message/inbox/index.vue +249 -0
- package/dist/package/src/views/profile/components/base.vue +6 -5
- package/dist/package/src/views/profile/components/password.vue +2 -2
- package/dist/package/src/views/profile/components/security.vue +475 -62
- package/dist/package/src/views/profile/components/session.vue +153 -0
- package/dist/package/src/views/profile/index.vue +35 -22
- package/dist/package/src/views/tool/code-gen/code-preview/index.vue +9 -9
- package/dist/package/src/views/tool/code-gen/columns/index.vue +1 -1
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +8 -8
- package/dist/package/src/views/tool/code-gen/config.ts +1 -0
- package/dist/package/src/views/tool/code-gen/table/index.vue +7 -7
- package/dist/package/src/views/tool/ops-monitoring/index.vue +25 -21
- package/package.json +2 -2
- package/dist/package/declarations/src/api/system/base_log.d.ts +0 -9
- package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +0 -16
- package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +0 -20
- package/dist/package/declarations/src/components/dynamicTranslation.d.ts +0 -38
- package/dist/package/declarations/src/rpc/system/admin/v1/base_log.d.ts +0 -87
- package/dist/package/src/api/system/base_log.ts +0 -32
- package/dist/package/src/rpc/system/admin/v1/base_log.ts +0 -101
- package/dist/package/src/views/base/log/index.vue +0 -339
- /package/dist/package/declarations/src/{views/base/log/index.vue.d.ts → components/Notification.vue.d.ts} +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-box">
|
|
3
|
+
<ProTable ref="proTable" row-key="id" :columns="columns" :header-actions="headerActions" :request-api="requestTable" />
|
|
4
|
+
<el-dialog v-model="detailVisible" :title="detail?.title" width="720px" destroy-on-close>
|
|
5
|
+
<div v-if="detail" class="message-detail">
|
|
6
|
+
<div class="message-meta">
|
|
7
|
+
<span class="message-category" :style="{ color: detail.category_color || undefined }">
|
|
8
|
+
<component :is="resolveNotificationIcon(detail.category_icon)" />
|
|
9
|
+
{{ detail.category_name }}
|
|
10
|
+
</span>
|
|
11
|
+
<span>{{ detail.sender_name }}</span>
|
|
12
|
+
<span>{{ detail.received_at }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
<RichTextPreview
|
|
15
|
+
v-if="detail.content_format === MessageContentFormat.MESSAGE_CONTENT_FORMAT_RICH_TEXT"
|
|
16
|
+
class="message-content"
|
|
17
|
+
:model-value="detail.content"
|
|
18
|
+
/>
|
|
19
|
+
<pre v-else class="message-content">{{ detail.content }}</pre>
|
|
20
|
+
<el-button
|
|
21
|
+
v-if="detail.action_type === MessageActionType.MESSAGE_ACTION_TYPE_VIEW_KEY && actionRouteName"
|
|
22
|
+
class="message-action"
|
|
23
|
+
type="primary"
|
|
24
|
+
@click="openAction"
|
|
25
|
+
>
|
|
26
|
+
{{ t("common.action.view") }}
|
|
27
|
+
</el-button>
|
|
28
|
+
</div>
|
|
29
|
+
</el-dialog>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import { computed, h, ref } from "vue";
|
|
35
|
+
import { useRouter } from "vue-router";
|
|
36
|
+
import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
|
|
37
|
+
import type { ColumnProps, HeaderActionProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
38
|
+
import type { ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
|
|
39
|
+
import RichTextPreview from "@liujitcn/kratos-admin-core/components/RichTextPreview/index.vue";
|
|
40
|
+
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
41
|
+
import { t } from "@liujitcn/kratos-admin-core";
|
|
42
|
+
import { defNotificationService } from "@liujitcn/kratos-admin-system/api/base/notification";
|
|
43
|
+
import type { Notification, PageNotificationRequest } from "@liujitcn/kratos-admin-system/rpc/base/v1/notification";
|
|
44
|
+
import {
|
|
45
|
+
MessageActionType,
|
|
46
|
+
MessageContentFormat,
|
|
47
|
+
NotificationView
|
|
48
|
+
} from "@liujitcn/kratos-admin-system/rpc/base/v1/notification";
|
|
49
|
+
|
|
50
|
+
defineOptions({ name: "NotificationInbox", inheritAttrs: false });
|
|
51
|
+
|
|
52
|
+
const proTable = ref<ProTableInstance>();
|
|
53
|
+
const router = useRouter();
|
|
54
|
+
const detailVisible = ref(false);
|
|
55
|
+
const detail = ref<Notification>();
|
|
56
|
+
const actionRouteName = computed(() => {
|
|
57
|
+
const viewKey = detail.value?.action_target;
|
|
58
|
+
if (!viewKey) return "";
|
|
59
|
+
return ({ MESSAGE_INBOX: "NotificationInbox", PROFILE: "Profile", AI: "AiChat" } as Record<string, string>)[viewKey] ?? "";
|
|
60
|
+
});
|
|
61
|
+
const notificationIcons = {
|
|
62
|
+
Bell,
|
|
63
|
+
Calendar,
|
|
64
|
+
ChatDotRound,
|
|
65
|
+
CircleCheckFilled,
|
|
66
|
+
CollectionTag,
|
|
67
|
+
DataAnalysis,
|
|
68
|
+
InfoFilled,
|
|
69
|
+
List,
|
|
70
|
+
Lock,
|
|
71
|
+
Message,
|
|
72
|
+
Promotion,
|
|
73
|
+
Setting,
|
|
74
|
+
User,
|
|
75
|
+
WarningFilled
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const viewOptions = computed<ProFormOption[]>(() => [
|
|
79
|
+
{ label: t("system.notification.view.inbox"), value: NotificationView.NOTIFICATION_VIEW_INBOX },
|
|
80
|
+
{ label: t("system.notification.view.unread"), value: NotificationView.NOTIFICATION_VIEW_UNREAD },
|
|
81
|
+
{ label: t("system.notification.view.archived"), value: NotificationView.NOTIFICATION_VIEW_ARCHIVED }
|
|
82
|
+
]);
|
|
83
|
+
|
|
84
|
+
const columns = computed<ColumnProps[]>(() => [
|
|
85
|
+
{ prop: "title", label: t("system.base.message.field.title"), minWidth: 240 },
|
|
86
|
+
{
|
|
87
|
+
prop: "category_name",
|
|
88
|
+
label: t("system.base.message.field.category"),
|
|
89
|
+
minWidth: 150,
|
|
90
|
+
render: scope => {
|
|
91
|
+
const row = scope.row as Notification;
|
|
92
|
+
return h("span", { class: "message-category", style: { color: row.category_color || undefined } }, [
|
|
93
|
+
h(resolveNotificationIcon(row.category_icon)),
|
|
94
|
+
h("span", { class: "message-category__name" }, row.category_name)
|
|
95
|
+
]);
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
prop: "read_at",
|
|
100
|
+
label: t("system.notification.field.read_status"),
|
|
101
|
+
width: 110,
|
|
102
|
+
search: { el: "select", key: "view", enum: viewOptions.value },
|
|
103
|
+
render: scope =>
|
|
104
|
+
(scope.row as Notification).read_at ? t("system.notification.status.read") : t("system.notification.status.unread")
|
|
105
|
+
},
|
|
106
|
+
{ prop: "sender_name", label: t("system.notification.field.sender"), minWidth: 130 },
|
|
107
|
+
{ prop: "received_at", label: t("system.notification.field.received_at"), minWidth: 180 },
|
|
108
|
+
{
|
|
109
|
+
prop: "operation",
|
|
110
|
+
label: t("common.field.operation"),
|
|
111
|
+
width: 250,
|
|
112
|
+
fixed: "right",
|
|
113
|
+
cellType: "actions",
|
|
114
|
+
actions: [
|
|
115
|
+
{ label: t("common.action.view"), link: true, icon: View, onClick: scope => openDetail(scope.row as Notification) },
|
|
116
|
+
{
|
|
117
|
+
label: t("system.notification.action.mark_unread"),
|
|
118
|
+
link: true,
|
|
119
|
+
icon: RefreshLeft,
|
|
120
|
+
hidden: scope => !(scope.row as Notification).read_at,
|
|
121
|
+
onClick: scope => markUnread(scope.row as Notification)
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: t("system.notification.action.archive"),
|
|
125
|
+
link: true,
|
|
126
|
+
icon: Folder,
|
|
127
|
+
hidden: scope => Boolean((scope.row as Notification).archived_at) || !(scope.row as Notification).allow_archive,
|
|
128
|
+
onClick: scope => archive(scope.row as Notification)
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: t("system.notification.action.restore"),
|
|
132
|
+
link: true,
|
|
133
|
+
icon: RefreshLeft,
|
|
134
|
+
hidden: scope => !(scope.row as Notification).archived_at,
|
|
135
|
+
onClick: scope => restore(scope.row as Notification)
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
label: t("common.action.delete"),
|
|
139
|
+
type: "danger",
|
|
140
|
+
link: true,
|
|
141
|
+
icon: Delete,
|
|
142
|
+
hidden: scope => !(scope.row as Notification).allow_delete,
|
|
143
|
+
onClick: scope => remove(scope.row as Notification)
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
148
|
+
|
|
149
|
+
const headerActions = computed<HeaderActionProps[]>(() => [
|
|
150
|
+
{ label: t("system.notification.action.mark_all_read"), type: "primary", icon: Finished, onClick: () => markAllRead() }
|
|
151
|
+
]);
|
|
152
|
+
|
|
153
|
+
/** 请求当前用户收件箱。 */
|
|
154
|
+
async function requestTable(params: Record<string, unknown>) {
|
|
155
|
+
const request = buildPageRequest<PageNotificationRequest>(params as unknown as PageNotificationRequest);
|
|
156
|
+
request.view = Number(params.view ?? NotificationView.NOTIFICATION_VIEW_INBOX) as NotificationView;
|
|
157
|
+
const data = await defNotificationService.PageNotification(request);
|
|
158
|
+
return { data: { list: data.notifications ?? [], total: data.total } };
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** 打开消息详情并标记已读。 */
|
|
162
|
+
async function openDetail(row: Notification) {
|
|
163
|
+
detail.value = await defNotificationService.GetNotification({ id: row.id });
|
|
164
|
+
detailVisible.value = true;
|
|
165
|
+
if (!row.read_at) {
|
|
166
|
+
await defNotificationService.MarkNotificationRead({ ids: [row.id] });
|
|
167
|
+
proTable.value?.getTableList();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** 执行通知携带的稳定 viewKey 动作。 */
|
|
172
|
+
function openAction() {
|
|
173
|
+
if (!actionRouteName.value) return;
|
|
174
|
+
void router.push({ name: actionRouteName.value });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** 标记消息为未读。 */
|
|
178
|
+
async function markUnread(row: Notification) {
|
|
179
|
+
await defNotificationService.MarkNotificationUnread({ ids: [row.id] });
|
|
180
|
+
proTable.value?.getTableList();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** 标记全部消息为已读。 */
|
|
184
|
+
async function markAllRead() {
|
|
185
|
+
const summary = await defNotificationService.GetNotificationSummary({});
|
|
186
|
+
if (!summary.latest_delivery_id) return;
|
|
187
|
+
await defNotificationService.MarkAllNotificationRead({ before_delivery_id: summary.latest_delivery_id });
|
|
188
|
+
ElMessage.success(t("common.message.operation_success"));
|
|
189
|
+
proTable.value?.getTableList();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** 归档消息。 */
|
|
193
|
+
async function archive(row: Notification) {
|
|
194
|
+
await defNotificationService.ArchiveNotification({ id: row.id });
|
|
195
|
+
proTable.value?.getTableList();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** 恢复已归档消息。 */
|
|
199
|
+
async function restore(row: Notification) {
|
|
200
|
+
await defNotificationService.RestoreNotification({ id: row.id });
|
|
201
|
+
proTable.value?.getTableList();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** 从个人收件箱删除消息。 */
|
|
205
|
+
async function remove(row: Notification) {
|
|
206
|
+
await ElMessageBox.confirm(t("common.confirm.delete"), t("common.tips"), { type: "warning" });
|
|
207
|
+
await defNotificationService.DeleteNotification({ id: row.id });
|
|
208
|
+
proTable.value?.getTableList();
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** 解析收件箱分类图标,兼容历史数据中的未知图标名。 */
|
|
212
|
+
function resolveNotificationIcon(icon: string) {
|
|
213
|
+
return notificationIcons[icon as keyof typeof notificationIcons] ?? CollectionTag;
|
|
214
|
+
}
|
|
215
|
+
</script>
|
|
216
|
+
|
|
217
|
+
<style scoped lang="scss">
|
|
218
|
+
.message-meta {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-wrap: wrap;
|
|
221
|
+
gap: 16px;
|
|
222
|
+
margin-bottom: 18px;
|
|
223
|
+
color: var(--el-text-color-secondary);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.message-category {
|
|
227
|
+
display: inline-flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
gap: 6px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.message-category__name {
|
|
233
|
+
color: var(--el-text-color-primary);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.message-content {
|
|
237
|
+
min-height: 180px;
|
|
238
|
+
margin: 0;
|
|
239
|
+
white-space: pre-wrap;
|
|
240
|
+
overflow-wrap: anywhere;
|
|
241
|
+
color: var(--el-text-color-primary);
|
|
242
|
+
font-family: inherit;
|
|
243
|
+
line-height: 1.7;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.message-content.core-rich-text-preview {
|
|
247
|
+
white-space: normal;
|
|
248
|
+
}
|
|
249
|
+
</style>
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
<div class="avatar-panel">
|
|
15
15
|
<div class="avatar-shell">
|
|
16
16
|
<el-avatar :src="avatarSrc" :size="116" @error="handleAvatarError" />
|
|
17
|
-
<el-button class="avatar-trigger" circle type="primary"
|
|
17
|
+
<el-button class="avatar-trigger" circle type="primary" @click="triggerFileUpload">
|
|
18
|
+
<el-icon><Camera /></el-icon>
|
|
19
|
+
</el-button>
|
|
18
20
|
<input ref="fileInputRef" type="file" class="hidden-input" accept="image/*" @change="handleFileChange" />
|
|
19
21
|
</div>
|
|
20
22
|
<div class="avatar-copy">
|
|
@@ -84,7 +86,6 @@ import defaultAvatar from "@liujitcn/kratos-admin-core/assets/images/avatar.png"
|
|
|
84
86
|
import ProDialog from "@liujitcn/kratos-admin-core/components/Dialog/ProDialog.vue";
|
|
85
87
|
import ProForm from "@liujitcn/kratos-admin-core/components/ProForm/index.vue";
|
|
86
88
|
import type { ProFormField, ProFormInstance } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
|
|
87
|
-
import { Camera } from "@element-plus/icons-vue";
|
|
88
89
|
|
|
89
90
|
/** 个人中心基础资料组件属性。 */
|
|
90
91
|
interface ProfileBaseProps {
|
|
@@ -223,7 +224,7 @@ function handleDialogClosed() {
|
|
|
223
224
|
<style scoped lang="scss">
|
|
224
225
|
.base-card {
|
|
225
226
|
border: 1px solid #ebeef5;
|
|
226
|
-
border-radius:
|
|
227
|
+
border-radius: var(--admin-page-radius);
|
|
227
228
|
}
|
|
228
229
|
:deep(.base-card .el-card__header) {
|
|
229
230
|
padding: 18px 20px;
|
|
@@ -259,7 +260,7 @@ function handleDialogClosed() {
|
|
|
259
260
|
text-align: center;
|
|
260
261
|
background: #f8fafc;
|
|
261
262
|
border: 1px solid #eef2f6;
|
|
262
|
-
border-radius:
|
|
263
|
+
border-radius: var(--admin-page-radius);
|
|
263
264
|
}
|
|
264
265
|
.avatar-shell {
|
|
265
266
|
position: relative;
|
|
@@ -296,7 +297,7 @@ function handleDialogClosed() {
|
|
|
296
297
|
padding: 16px;
|
|
297
298
|
background: #ffffff;
|
|
298
299
|
border: 1px solid #f0f2f5;
|
|
299
|
-
border-radius:
|
|
300
|
+
border-radius: var(--admin-page-radius);
|
|
300
301
|
}
|
|
301
302
|
.detail-item--wide {
|
|
302
303
|
grid-column: 1 / -1;
|
|
@@ -192,7 +192,7 @@ function validatePasswordStrength(_rule: unknown, value: string, callback: (erro
|
|
|
192
192
|
<style scoped lang="scss">
|
|
193
193
|
.password-card {
|
|
194
194
|
border: 1px solid #ebeef5;
|
|
195
|
-
border-radius:
|
|
195
|
+
border-radius: var(--admin-page-radius);
|
|
196
196
|
}
|
|
197
197
|
:deep(.password-card .el-card__header) {
|
|
198
198
|
padding: 18px 20px;
|
|
@@ -227,7 +227,7 @@ function validatePasswordStrength(_rule: unknown, value: string, callback: (erro
|
|
|
227
227
|
padding: 18px;
|
|
228
228
|
background: #ffffff;
|
|
229
229
|
border: 1px solid #f0f2f5;
|
|
230
|
-
border-radius:
|
|
230
|
+
border-radius: var(--admin-page-radius);
|
|
231
231
|
}
|
|
232
232
|
.password-form-wrap__strength {
|
|
233
233
|
margin-top: 16px;
|