fix: 优化个人中心页面布局
This commit is contained in:
1 parent
7aca1d61f2
commit
b325c1a520
6 files changed
+194
-73
No files matched your search
@@ -0,0 +1,38 @@
|
||||
版本:V26.9.1
|
||||
更新周期:2026-08-22 ~ 2026-09-18
|
||||
|
||||
————————————————————
|
||||
【面向用户】
|
||||
————————————————————
|
||||
|
||||
本次更新亮点:
|
||||
|
||||
1. 货代发货 Agent:帮助业务人员把客户发来的发货指令(邮件、微信文字、PDF、Word 等)转成可执行的发货动作,解析与复核发货通知并载入库存。
|
||||
|
||||
2. 精益 / 员工培训:新增精益培训视频与周任务管理,支持企微定向推送与卡片深链直达培训页;出国规则培训完成可推送企微通知;培训配置与考试交互持续完善。
|
||||
|
||||
3. 采购合同付款预警 Agent:新增付款预警能力,可按申请人等条件关注合同付款计划风险。
|
||||
|
||||
5. 在途仓自动调拨 Agent:上线在途仓自动调拨一期能力,覆盖调拨相关作业闭环。
|
||||
|
||||
6. 其它优化:修复若干已知问题。
|
||||
|
||||
————————————————————
|
||||
【面向开发者】
|
||||
————————————————————
|
||||
|
||||
本次更新亮点:
|
||||
|
||||
1. 货代发货履约:收敛订单处理状态与履约门禁;统一复核/库存准备事实来源与项次模型;完善 XFA 模板映射、客户三层识别、邮件分配表解析与 STP 草稿锁定;批次中心常驻与会话标题按附件派生;进度信号统一为 15 个 stage 契约码并透传阻断原因;我的待办表格+抽屉与已完成明细报表
|
||||
|
||||
2. 库存与 RPA:完善库存源聚合、RPA 调度与按需 trigger;导出取数回源 OT 冻结候选;Worker 本机磁盘清理与 Crane 报表超时调整;Excel 连接级自动上传全链路;滚动履约与通用解析性能优化
|
||||
|
||||
3. 培训与企微深链:精益周任务视频推送与游标滚动防重复;企微卡片深链登录回跳(redirect 安全校验);出国规则培训完成通知与跳转通用入口修复;培训模块/配置改造与状态丢失修复
|
||||
|
||||
4. 立账凭证与合同付款:invoice-check 对话页迁移、收件人配置、ERP/TGHX PO 反查与生成;contract-payment 付款预警上线并迁至 Agent 页,补充申请人过滤与迁移健壮性
|
||||
|
||||
5. 在途调拨与集成:in-transit-transfer Agent 一期完整功能;集成连接器管理后台(关键字段拆列配置)
|
||||
|
||||
6. 平台与体验:附件预览与订单提取交互;知识库下载命名;改密同密码不退出登录;个人中心查看修复;HTTP 内网 crypto.randomUUID 兼容;Vite 部署 chunk 缓存问题修复
|
||||
|
||||
7. 工程与基建:scripts/rpa 目录与命名重构;货代前端投影与事实边界收口;排程/发货相关 bugfix 与测试更新;迁移错误修复与 funclist 冲突清理
|
||||
@@ -1,16 +1,57 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* features/user/views/UserProfilePage.vue
|
||||
* 閻劑鈧棑绱扮仦鏇犮仛閸滃瞼绱潏鎴濈秼閸撳秶鏁ら幋鐤カ閺傛瑣鈧浇顕㈢懛鈧?娑撳顣介崑蹇撱偨閿涘苯鑻熼幓鎰返娣囶喗鏁肩€靛棛鐖滈崗銉ュ經閵? * 娓氭繆绂嗛敍姝秙er-profile.context閵嗕勾ucide 閸ョ偓鐖i妴涔倁e i18n閵? * 闁槒绶敍姘矝閻?/workspace/profile 鐠侯垳鏁遍幍鑳祰閿涘奔绲炬い鐢告桨閸滃奔绗熼崝鈥崇秺鐏?user feature閵? */
|
||||
import { inject } from 'vue';
|
||||
* 用途:工作台个人中心,展示与编辑当前用户资料、语言/主题偏好,并提供修改密码入口。
|
||||
* 依赖:workspace.context(WORKSPACE_KEY)、lucide 图标、vue-i18n。
|
||||
* 逻辑:路由 /workspace/profile 懒加载本页;资料状态由 useWorkspaceProfile 经工作台注入,避免与工作台分叉。
|
||||
*/
|
||||
import { computed, inject } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import {
|
||||
User, Mail, Building, CreditCard, Globe, Save, Palette,
|
||||
} from 'lucide-vue-next';
|
||||
import { WORKSPACE_KEY } from '@/features/workspace/composables/workspace.context';
|
||||
|
||||
// 个人资料与改密状态由工作台 useWorkspaceProfile 编排,经 WORKSPACE_KEY 注入。
|
||||
// 这里复用同一份 ws 上下文(含 profileUser/主题/移动端/登出能力),避免与工作台状态分叉。
|
||||
const { t } = useI18n();
|
||||
const userProfile = inject(WORKSPACE_KEY)!;
|
||||
|
||||
/** 只读字段值:与 input-field 同高,正文统一 14px。 */
|
||||
const fieldValueClass = 'flex min-h-11 items-center rounded-xl border border-default bg-surface-soft px-4 text-sm font-medium text-secondary';
|
||||
/** 表单标签:与分区标题区分层级,全页统一 14px。 */
|
||||
const fieldLabelClass = 'mb-1.5 flex items-center gap-1.5 text-sm font-medium text-muted';
|
||||
|
||||
/**
|
||||
* 头像字母:取姓名或用户名首字,供身份卡展示。
|
||||
*/
|
||||
const avatarLetter = computed(() => {
|
||||
const source = userProfile.profileUser.real_name || userProfile.profileUser.username || 'U';
|
||||
return source.charAt(0).toUpperCase();
|
||||
});
|
||||
|
||||
/**
|
||||
* 身份主标题:优先真实姓名,缺失时回退用户名。
|
||||
*/
|
||||
const displayName = computed(() => {
|
||||
return userProfile.profileUser.real_name || userProfile.profileUser.username || '-';
|
||||
});
|
||||
|
||||
/**
|
||||
* 角色展示文案。
|
||||
*/
|
||||
const roleLabel = computed(() => {
|
||||
return userProfile.profileUser.role === 'admin' ? t('profile.roleAdmin') : t('profile.roleUser');
|
||||
});
|
||||
|
||||
/**
|
||||
* 身份副标题:用户名(与主标题不同时)、部门、角色用间隔点拼接,空项省略。
|
||||
*/
|
||||
const identityMeta = computed(() => {
|
||||
const username = userProfile.profileUser.username;
|
||||
const showUsername = Boolean(username && username !== displayName.value);
|
||||
return [showUsername ? username : '', userProfile.profileUser.department, roleLabel.value]
|
||||
.filter(Boolean)
|
||||
.join(' · ');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -19,151 +60,186 @@ const userProfile = inject(WORKSPACE_KEY)!;
|
||||
</div>
|
||||
|
||||
<div v-else class="space-y-6">
|
||||
<div class="rounded-3xl border border-default bg-surface px-6 py-6 shadow-sm md:px-8">
|
||||
<div class="flex flex-col gap-6 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div class="flex flex-1 flex-col gap-6 sm:flex-row sm:items-center sm:justify-start">
|
||||
<div class="flex h-24 w-24 shrink-0 items-center justify-center rounded-full bg-brand-100 text-4xl font-bold text-brand-600" :class="userProfile.isMobile ? 'h-14 w-14 text-2xl' : ''">
|
||||
{{ (userProfile.profileUser.real_name || userProfile.profileUser.username || 'U').charAt(0).toUpperCase() }}
|
||||
<div class="rounded-2xl border border-default bg-surface px-5 py-5 shadow-sm md:px-6">
|
||||
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="flex min-w-0 items-center gap-4">
|
||||
<div
|
||||
class="flex h-14 w-14 shrink-0 items-center justify-center rounded-full bg-brand-100 text-xl font-semibold text-brand-600 md:h-16 md:w-16 md:text-2xl"
|
||||
>
|
||||
{{ avatarLetter }}
|
||||
</div>
|
||||
<div class="grid flex-1 text-left" :class="userProfile.isMobile ? 'grid-cols-2 gap-x-4 gap-y-1' : 'grid-cols-1 gap-x-12 gap-y-3 sm:grid-cols-2'">
|
||||
<div :class="userProfile.isMobile ? '' : ''">
|
||||
<div :class="userProfile.isMobile ? 'text-xs text-muted' : 'text-lg font-semibold text-primary'">{{ userProfile.isMobile ? $t('profile.realName') : (userProfile.profileUser.username || '-') }}</div>
|
||||
<div v-if="userProfile.isMobile" class="text-sm font-medium text-primary truncate">{{ userProfile.profileUser.real_name || userProfile.profileUser.username || '-' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div :class="userProfile.isMobile ? 'text-xs text-muted' : 'text-lg font-semibold text-primary'">{{ userProfile.isMobile ? $t('profile.employeeId') : (userProfile.profileUser.employee_id || '-') }}</div>
|
||||
<div v-if="userProfile.isMobile" class="text-sm font-medium text-primary truncate">{{ userProfile.profileUser.employee_id || '-' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div :class="userProfile.isMobile ? 'text-xs text-muted' : 'text-lg font-semibold text-primary'">{{ userProfile.isMobile ? $t('profile.department') : (userProfile.profileUser.department || '-') }}</div>
|
||||
<div v-if="userProfile.isMobile" class="text-sm font-medium text-primary truncate">{{ userProfile.profileUser.department || '-' }}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div :class="userProfile.isMobile ? 'text-xs text-muted' : 'text-lg font-semibold text-primary'">{{ userProfile.isMobile ? $t('profile.role') : (userProfile.profileUser.role === 'admin' ? ($t('profile.roleAdmin') || 'Administrator') : ($t('profile.roleUser') || 'User')) }}</div>
|
||||
<div v-if="userProfile.isMobile" class="text-sm font-medium text-primary truncate">{{ userProfile.profileUser.role === 'admin' ? ($t('profile.roleAdmin') || 'Administrator') : ($t('profile.roleUser') || 'User') }}</div>
|
||||
</div>
|
||||
<div :class="userProfile.isMobile ? 'col-span-2' : 'sm:col-span-2'">
|
||||
<div :class="userProfile.isMobile ? 'text-xs text-muted' : 'break-all text-lg font-semibold text-primary'">{{ userProfile.isMobile ? $t('profile.email') : (userProfile.profileUser.email || '-') }}</div>
|
||||
<div v-if="userProfile.isMobile" class="text-sm font-medium text-primary truncate">{{ userProfile.profileUser.email || '-' }}</div>
|
||||
<div class="min-w-0 space-y-0.5">
|
||||
<div class="truncate text-lg font-semibold text-primary">{{ displayName }}</div>
|
||||
<div v-if="identityMeta" class="truncate text-sm text-muted">{{ identityMeta }}</div>
|
||||
<div v-if="userProfile.profileUser.email" class="break-all text-sm text-muted">
|
||||
{{ userProfile.profileUser.email }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!userProfile.isMobile" class="flex shrink-0 items-center gap-2 self-start lg:ml-6">
|
||||
<button @click="userProfile.handleChangePasswordClick" class="btn-primary px-6 py-3 text-base">
|
||||
<div v-if="!userProfile.isMobile" class="shrink-0">
|
||||
<button type="button" class="btn-primary btn-sm" @click="userProfile.handleChangePasswordClick">
|
||||
{{ $t('profile.changePassword') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="userProfile.isMobile" class="mt-4 flex items-center justify-center gap-4">
|
||||
<button @click="userProfile.handleChangePasswordClick" class="btn-primary flex-1 py-2.5 text-sm text-center">
|
||||
<div v-if="userProfile.isMobile" class="mt-4 flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
class="btn-primary btn-sm flex-1"
|
||||
@click="userProfile.handleChangePasswordClick"
|
||||
>
|
||||
{{ $t('profile.changePassword') }}
|
||||
</button>
|
||||
<button @click="userProfile.handleLogout" class="btn-secondary flex-1 py-2.5 text-sm text-center text-red-600 hover:bg-red-50">
|
||||
<button
|
||||
type="button"
|
||||
class="btn-secondary btn-sm flex-1 text-red-600 hover:bg-red-50"
|
||||
@click="userProfile.handleLogout"
|
||||
>
|
||||
{{ $t('workspace.nav.logout') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="space-y-6">
|
||||
<div class="rounded-3xl border border-default bg-surface p-8 shadow-sm" :class="userProfile.isMobile ? 'p-4' : ''">
|
||||
<div class="mb-8 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" :class="userProfile.isMobile ? 'mb-4 gap-2' : ''">
|
||||
<div class="flex items-center" :class="userProfile.isMobile ? 'w-full justify-center gap-2' : ''">
|
||||
<h3 class="flex items-center gap-3 text-3xl font-bold text-primary" :class="userProfile.isMobile ? 'text-lg gap-2' : ''">
|
||||
<User class="h-6 w-6 text-brand-500" :class="userProfile.isMobile ? 'h-4 w-4' : ''" />
|
||||
<div class="rounded-2xl border border-default bg-surface p-5 shadow-sm md:p-6">
|
||||
<div class="mb-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="flex items-center gap-2" :class="userProfile.isMobile ? 'w-full justify-between' : ''">
|
||||
<h3 class="section-title flex items-center gap-2">
|
||||
<User class="h-5 w-5 text-brand-500" />
|
||||
{{ $t('profile.basicInfo') }}
|
||||
</h3>
|
||||
<button v-if="userProfile.isMobile && !userProfile.isProfileEditing" @click="userProfile.startProfileEditing" class="btn-secondary px-3 py-1 text-xs">
|
||||
<button
|
||||
v-if="userProfile.isMobile && !userProfile.isProfileEditing"
|
||||
type="button"
|
||||
class="btn-secondary btn-sm"
|
||||
@click="userProfile.startProfileEditing"
|
||||
>
|
||||
{{ $t('profile.edit') }}
|
||||
</button>
|
||||
</div>
|
||||
<p v-if="!userProfile.isMobile" class="mt-2 text-sm text-muted">
|
||||
<p v-if="!userProfile.isMobile" class="section-desc">
|
||||
{{ userProfile.isProfileEditing ? $t('profile.directEditHint') : $t('profile.switchEditHint') }}
|
||||
</p>
|
||||
<div v-if="!userProfile.isMobile" class="flex items-center gap-2">
|
||||
<button v-if="!userProfile.isProfileEditing" @click="userProfile.startProfileEditing" class="btn-secondary px-5 py-2.5 text-sm">
|
||||
<button
|
||||
v-if="!userProfile.isProfileEditing"
|
||||
type="button"
|
||||
class="btn-secondary btn-sm"
|
||||
@click="userProfile.startProfileEditing"
|
||||
>
|
||||
{{ $t('profile.edit') }}
|
||||
</button>
|
||||
<template v-else>
|
||||
<button @click="userProfile.cancelProfileEditing" class="btn-secondary px-5 py-2.5 text-sm">
|
||||
{{ $t('profile.cancel') || 'Cancel' }}
|
||||
<button type="button" class="btn-secondary btn-sm" @click="userProfile.cancelProfileEditing">
|
||||
{{ $t('profile.cancel') }}
|
||||
</button>
|
||||
<button
|
||||
@click="userProfile.saveProfile"
|
||||
type="button"
|
||||
class="btn-primary btn-sm disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:disabled="userProfile.isProfileSaving || !userProfile.hasProfileUnsavedChanges"
|
||||
class="btn-primary px-5 py-2.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
@click="userProfile.saveProfile"
|
||||
>
|
||||
<Save class="w-4 h-4" />
|
||||
<Save class="h-4 w-4" />
|
||||
<span>{{ userProfile.isProfileSaving ? $t('profile.saving') : $t('workspace.save') }}</span>
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2" :class="userProfile.isMobile ? 'gap-3' : ''">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<User class="h-4 w-4" /> {{ $t('profile.username') }}
|
||||
</label>
|
||||
<div class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<div :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.username || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<CreditCard class="h-4 w-4" /> {{ $t('profile.employeeId') }}
|
||||
</label>
|
||||
<input v-if="userProfile.isProfileEditing" v-model="userProfile.profileUser.employee_id" type="text" class="input-field" :class="userProfile.isMobile ? 'h-10 text-sm' : 'h-[58px]'" />
|
||||
<div v-else class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<input
|
||||
v-if="userProfile.isProfileEditing"
|
||||
v-model="userProfile.profileUser.employee_id"
|
||||
type="text"
|
||||
class="input-field text-sm"
|
||||
>
|
||||
<div v-else :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.employee_id || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<User class="h-4 w-4" /> {{ $t('profile.realName') }}
|
||||
</label>
|
||||
<input v-if="userProfile.isProfileEditing" v-model="userProfile.profileUser.real_name" type="text" class="input-field" :class="userProfile.isMobile ? 'h-10 text-sm' : 'h-[58px]'" />
|
||||
<div v-else class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<input
|
||||
v-if="userProfile.isProfileEditing"
|
||||
v-model="userProfile.profileUser.real_name"
|
||||
type="text"
|
||||
class="input-field text-sm"
|
||||
>
|
||||
<div v-else :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.real_name || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<Building class="h-4 w-4" /> {{ $t('profile.department') }}
|
||||
</label>
|
||||
<input v-if="userProfile.isProfileEditing" v-model="userProfile.profileUser.department" type="text" class="input-field" :class="userProfile.isMobile ? 'h-10 text-sm' : 'h-[58px]'" />
|
||||
<div v-else class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<input
|
||||
v-if="userProfile.isProfileEditing"
|
||||
v-model="userProfile.profileUser.department"
|
||||
type="text"
|
||||
class="input-field text-sm"
|
||||
>
|
||||
<div v-else :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.department || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<Mail class="h-4 w-4" /> {{ $t('profile.email') }}
|
||||
</label>
|
||||
<input v-if="userProfile.isProfileEditing" v-model="userProfile.profileUser.email" type="email" class="input-field" :class="userProfile.isMobile ? 'h-10 text-sm' : 'h-[58px]'" />
|
||||
<div v-else class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<input
|
||||
v-if="userProfile.isProfileEditing"
|
||||
v-model="userProfile.profileUser.email"
|
||||
type="email"
|
||||
class="input-field text-sm"
|
||||
>
|
||||
<div v-else :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.email || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 flex items-center gap-2 text-sm font-medium text-muted" :class="userProfile.isMobile ? 'text-xs mb-1' : ''">
|
||||
<label :class="fieldLabelClass">
|
||||
<Globe class="h-4 w-4" /> {{ $t('profile.phoneNumber') }}
|
||||
</label>
|
||||
<input v-if="userProfile.isProfileEditing" v-model="userProfile.profileUser.phone_number" type="text" class="input-field" :class="userProfile.isMobile ? 'h-10 text-sm' : 'h-[58px]'" />
|
||||
<div v-else class="rounded-2xl border border-default bg-surface-soft px-4 py-4 text-lg font-medium text-secondary" :class="userProfile.isMobile ? 'px-3 py-2 text-sm rounded-xl' : ''">
|
||||
<input
|
||||
v-if="userProfile.isProfileEditing"
|
||||
v-model="userProfile.profileUser.phone_number"
|
||||
type="text"
|
||||
class="input-field text-sm"
|
||||
>
|
||||
<div v-else :class="fieldValueClass">
|
||||
{{ userProfile.profileUser.phone_number || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rounded-3xl border border-default bg-surface p-8 shadow-sm">
|
||||
<h3 class="mb-6 flex items-center gap-3 text-2xl font-bold text-primary">
|
||||
<div class="rounded-2xl border border-default bg-surface p-5 shadow-sm md:p-6">
|
||||
<h3 class="section-title mb-5 flex items-center gap-2">
|
||||
<Palette class="h-5 w-5 text-brand-500" />
|
||||
{{ $t('profile.preferences') }}
|
||||
</h3>
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-muted">{{ $t('workspace.languageLabel') }}</label>
|
||||
<select v-model="userProfile.profileUser.language" :disabled="!userProfile.isProfileEditing" class="input-field h-[58px]">
|
||||
<label class="mb-1.5 block text-sm font-medium text-muted">{{ $t('workspace.languageLabel') }}</label>
|
||||
<select
|
||||
v-model="userProfile.profileUser.language"
|
||||
class="select-field text-sm"
|
||||
:disabled="!userProfile.isProfileEditing"
|
||||
>
|
||||
<option value="en">English</option>
|
||||
<option value="zh-CN">{{ $t('workspace.lang.zhCN') }}</option>
|
||||
<option value="zh-TW">{{ $t('workspace.lang.zhTW') }}</option>
|
||||
@@ -171,7 +247,7 @@ const userProfile = inject(WORKSPACE_KEY)!;
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-muted">{{ $t('profile.theme') }}</label>
|
||||
<label class="mb-1.5 block text-sm font-medium text-muted">{{ $t('profile.theme') }}</label>
|
||||
<div
|
||||
class="segment-control segment-control--cols-3 segment-control--md"
|
||||
role="radiogroup"
|
||||
@@ -182,9 +258,9 @@ const userProfile = inject(WORKSPACE_KEY)!;
|
||||
:key="item.value"
|
||||
type="button"
|
||||
role="radio"
|
||||
class="segment-item"
|
||||
:aria-checked="userProfile.profileUser.theme_preference === item.value"
|
||||
:disabled="!userProfile.isProfileEditing"
|
||||
class="segment-item"
|
||||
:class="userProfile.profileUser.theme_preference === item.value ? 'segment-item--active' : ''"
|
||||
@click="userProfile.profileUser.theme_preference = item.value"
|
||||
>
|
||||
@@ -194,7 +270,6 @@ const userProfile = inject(WORKSPACE_KEY)!;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -10,8 +10,10 @@
|
||||
"email": "Email",
|
||||
"phoneNumber": "Phone Number",
|
||||
"theme": "Theme",
|
||||
"role": "Role",
|
||||
"roleAdmin": "Administrator",
|
||||
"roleUser": "User",
|
||||
"saving": "Saving...",
|
||||
"unsavedChanges": "You have unsaved changes",
|
||||
"editHint": "Switch to edit mode to update profile details",
|
||||
"switchEditHint": "Switch to edit mode to update profile details",
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
"email": "อีเมล",
|
||||
"phoneNumber": "เบอร์โทรศัพท์",
|
||||
"theme": "ธีม",
|
||||
"role": "บทบาท",
|
||||
"roleAdmin": "ผู้ดูแลระบบ",
|
||||
"roleUser": "ผู้ใช้",
|
||||
"saving": "กำลังบันทึก...",
|
||||
"unsavedChanges": "คุณมีการเปลี่ยนแปลงที่ยังไม่ได้บันทึก",
|
||||
"editHint": "สลับไปที่โหมดแก้ไขเพื่ออัปเดตรายละเอียดโปรไฟล์",
|
||||
"switchEditHint": "สลับไปที่โหมดแก้ไขเพื่ออัปเดตรายละเอียดโปรไฟล์",
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
"email": "邮箱",
|
||||
"phoneNumber": "手机号",
|
||||
"theme": "主题",
|
||||
"role": "角色",
|
||||
"roleAdmin": "管理员",
|
||||
"roleUser": "普通用户",
|
||||
"saving": "保存中...",
|
||||
"unsavedChanges": "您有未保存的更改",
|
||||
"editHint": "切换到编辑模式以更新个人资料",
|
||||
"switchEditHint": "切换到编辑模式以更新个人资料",
|
||||
|
||||
@@ -10,8 +10,10 @@
|
||||
"email": "郵箱",
|
||||
"phoneNumber": "手機號",
|
||||
"theme": "主題",
|
||||
"role": "角色",
|
||||
"roleAdmin": "管理員",
|
||||
"roleUser": "用戶",
|
||||
"saving": "儲存中...",
|
||||
"unsavedChanges": "您有尚未保存的變更",
|
||||
"editHint": "切換到編輯模式以更新個人資料",
|
||||
"switchEditHint": "切換到編輯模式以更新個人資料",
|
||||
|
||||
Reference in new issue
Block a user