Clarify Feishu upstream names and simplify sync copy
This commit is contained in:
1 parent
9e8f86a345
commit
7f80f0f7ce
3 files changed
+5
-4
No files matched your search
@@ -794,7 +794,7 @@
|
||||
"commonSetupTitle": "First-time shared network setup", "commonSetupHint": "Check permissions, default route and IPv4 forwarding. Enable shared forwarding only when needed; install protocol-specific dependencies separately in Create Tunnel.", "hostRoot": "Privileges", "hostRoute": "Default route", "hostForward": "IPv4 forwarding", "enableForwarding": "Enable IPv4 forwarding", "forwardingEnabled": "IPv4 forwarding enabled"
|
||||
},
|
||||
"feishuSync": {
|
||||
"title": "Feishu directory", "publishAll": "Publish the app in Feishu and set its availability to All Employees. Also grant directory visibility for the departments to import.", "hint": "Import manually or every 30 minutes when enabled. Imported members do not receive VPN access or tunnel grants. Names are shown exactly as returned by Feishu.", "permissions": "Grant app identity access to department and user lists, publish the app, and set its directory visibility to the intended departments and members.", "liveCheck": "Live permission check", "recheck": "Check again", "checking": "Checking Feishu access and visibility…", "checkFailed": "Could not check Feishu permissions", "liveVisibility": "App API visibility: {departments} department roots, {users} individual users (not the enterprise total).", "scopeMissing": "No visible departments. Include departments in the app directory visibility and publish. Department and user-list permissions cannot yet be verified.", "permissionMissing": "Department endpoint: {department}; user list endpoint: {users}. Grant the required app identity scopes and publish.", "apiReady": "Department and user-list endpoints work. Verify All Employees and publication in the Feishu console.", "ok": "Available", "auto": "Auto sync (30 min)", "run": "Sync now", "lastSuccess": "Last success", "counts": "Departments {departments} · members {members}", "visibility": "Last sync scope: {departments} department roots · {users} individual users", "noDepartments": "Only individually visible members were returned. Grant department read access and expand the app's directory visibility in Feishu, publish, then sync again.", "name": "Name", "departments": "Department IDs", "firstMembers": "Showing the first 500 members", "saved": "Sync settings saved", "started": "Sync started; watch progress below", "done": "Directory sync complete", "failed": "Directory sync failed"
|
||||
"title": "Feishu directory", "publishAll": "Publish the Feishu app, set availability to All Employees, and include departments in directory visibility.", "hint": "Sync manually or every 30 minutes; imports do not grant VPN access.", "permissions": "Grant department and user-list access; Feishu error codes show missing permissions.", "liveCheck": "Access check", "recheck": "Check again", "checking": "Checking…", "checkFailed": "Access check failed", "liveVisibility": "App visibility: {departments} departments · {users} individual users (not the enterprise total)", "scopeMissing": "Departments are not visible. Check department access and directory scope, then publish.", "permissionMissing": "Departments: {department}; users: {users}. Grant scopes indicated by the error codes.", "apiReady": "Endpoints work. Confirm publication and All Employees in Feishu.", "ok": "Available", "auto": "Auto sync (30 min)", "run": "Sync now", "lastSuccess": "Last success", "counts": "Departments {departments} · members {members}", "visibility": "Last scope: {departments} departments · {users} individual users", "noDepartments": "Departments are not visible yet. Check the app's access and directory scope.", "numberName": "Feishu still returns a 'User + number' name. Sync saved that value; if you just renamed them, check app visibility and retry later.", "name": "Name", "departments": "Department IDs", "firstMembers": "Showing the first 500 members", "saved": "Sync settings saved", "started": "Sync started", "done": "Directory sync complete", "failed": "Directory sync failed"
|
||||
},
|
||||
"feishuDirectory": {
|
||||
"title": "Feishu directory lookup",
|
||||
|
||||
@@ -794,7 +794,7 @@
|
||||
"commonSetupTitle": "首次引导 · 通用网络环境", "commonSetupHint": "检查服务权限、默认出口和 IPv4 转发。仅按需开启通用转发;各专线协议的依赖在“创建专线”中分别安装。", "hostRoot": "运行权限", "hostRoute": "默认出口", "hostForward": "IPv4 转发", "enableForwarding": "开启 IPv4 转发", "forwardingEnabled": "IPv4 转发已开启"
|
||||
},
|
||||
"feishuSync": {
|
||||
"title": "飞书组织与成员", "publishAll": "必须在飞书开放平台发布应用,并将应用可用范围改为“全体员工”;同时确保通讯录权限和可见范围覆盖需要同步的部门。", "hint": "手动导入,或开启后每 30 分钟同步一次。导入不会自动开通 VPN 或授予专线权限;仅显示飞书返回的姓名。", "permissions": "需应用身份读取部门及直属成员(如 contact:department.base:readonly、contact:user.department:readonly);发布应用,并设置通讯录可见范围。具体权限以飞书接口报错为准。", "liveCheck": "实时权限检查", "recheck": "重新检测", "checking": "正在检查飞书权限与可见范围…", "checkFailed": "飞书权限检查失败", "liveVisibility": "应用 API 可见:部门入口 {departments} 个,单独成员 {users} 位(不是企业总人数)。", "scopeMissing": "没有可见部门;请在飞书应用的通讯录权限管理中开放部门范围并发布。此时无法确认部门及直属成员接口是否有权限。", "permissionMissing": "部门接口:{department};成员列表接口:{users}。请按错误码补充应用身份权限并发布。", "apiReady": "部门与成员列表接口可用;“全体员工”和发布状态仍需在飞书开放平台核对。", "ok": "可用", "auto": "自动同步(30 分钟)", "run": "立即同步", "lastSuccess": "上次成功", "counts": "部门 {departments} · 成员 {members}", "visibility": "上次同步可见范围:部门入口 {departments} · 单独成员 {users}", "noDepartments": "当前只读到单独授权的成员,没有可见部门。请在飞书配置应用的部门读取权限和通讯录可见范围,发布后重新同步。", "name": "姓名", "departments": "部门 ID", "firstMembers": "仅显示前 500 位成员", "saved": "同步设置已保存", "started": "已开始同步,可查看下方进度", "done": "通讯录同步完成", "failed": "通讯录同步失败"
|
||||
"title": "飞书组织与成员", "publishAll": "请发布飞书应用,将可用范围设为“全体员工”,并开放通讯录部门范围。", "hint": "手动或每 30 分钟同步;导入不自动授予 VPN 权限。", "permissions": "需部门和成员列表读取权限;不足时显示飞书错误码。", "liveCheck": "权限检查", "recheck": "重新检测", "checking": "检测中…", "checkFailed": "权限检查失败", "liveVisibility": "应用可见:部门 {departments} · 单独成员 {users}(非企业总人数)", "scopeMissing": "部门不可见:检查部门读取权限及通讯录范围,发布后重试。", "permissionMissing": "部门:{department};成员:{users}。请按错误码补全权限。", "apiReady": "接口可用;请在飞书确认已发布和“全体员工”。", "ok": "可用", "auto": "自动同步(30 分钟)", "run": "立即同步", "lastSuccess": "上次成功", "counts": "部门 {departments} · 成员 {members}", "visibility": "上次可见:部门 {departments} · 单独成员 {users}", "noDepartments": "部门尚不可见;请核对飞书应用权限和通讯录范围。", "numberName": "飞书接口仍返回“用户+编号”。同步已保存该值;若刚改名,请核对应用可见范围并稍后重试。", "name": "姓名", "departments": "部门 ID", "firstMembers": "仅显示前 500 位成员", "saved": "同步设置已保存", "started": "已开始同步", "done": "通讯录同步完成", "failed": "通讯录同步失败"
|
||||
},
|
||||
"feishuDirectory": {
|
||||
"title": "飞书姓名查询",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<div class="identity-guide">
|
||||
<b>{{ $t('identity.guideTitle') }}</b>
|
||||
<p>{{ $t('identity.guideApp') }}</p>
|
||||
<p>{{ $t('identity.guidePublish') }}</p>
|
||||
<p>{{ $t('identity.guideCallback') }} <code v-if="identityStatus?.feishu_callback">{{ identityStatus.feishu_callback }}</code><span v-else>{{ $t('identity.guideCallbackPending') }}</span></p>
|
||||
</div>
|
||||
<el-alert type="error" :closable="false" :title="$t('feishuSync.publishAll')" show-icon style="margin-bottom:16px" />
|
||||
@@ -82,7 +81,8 @@
|
||||
</div>
|
||||
<p class="tls-hint">{{ $t('feishuSync.lastSuccess') }}:{{ syncStatus.last_success ? new Date(syncStatus.last_success).toLocaleString() : '—' }} · {{ $t('feishuSync.counts', { departments: syncStatus.departments || 0, members: syncStatus.members || 0 }) }}</p>
|
||||
<p v-if="syncStatus.last_success" class="tls-hint">{{ $t('feishuSync.visibility', { departments: syncStatus.visible_departments || 0, users: syncStatus.visible_users || 0 }) }}</p>
|
||||
<el-alert v-if="syncStatus.last_success && !syncStatus.departments" type="warning" :closable="false" :title="$t('feishuSync.noDepartments')" style="margin-bottom:12px" />
|
||||
<el-alert v-if="syncStatus.last_success && !syncStatus.departments && !scopeResult && !scopeChecking" type="warning" :closable="false" :title="$t('feishuSync.noDepartments')" style="margin-bottom:12px" />
|
||||
<el-alert v-if="hasUpstreamNumberName" type="warning" :closable="false" :title="$t('feishuSync.numberName')" style="margin-bottom:12px" />
|
||||
<el-alert v-if="syncStatus.last_error || syncError" type="warning" :closable="false" :title="syncError || syncStatus.last_error" style="margin-bottom:12px" />
|
||||
<el-tree v-if="syncDepartments.length" :data="syncDepartmentTree" node-key="id" :props="{ label: 'name', children: 'children' }" style="margin:12px 0;max-height:260px;overflow:auto" />
|
||||
<el-table :data="syncMembers" size="small" max-height="340" v-loading="syncLoading">
|
||||
@@ -128,6 +128,7 @@ const directoryResult = ref('')
|
||||
const directoryAvailable = ref(false)
|
||||
const syncStatus = ref({})
|
||||
const syncMembers = ref([])
|
||||
const hasUpstreamNumberName = computed(() => syncMembers.value.some(member => /^用户\d+$/.test(member.name?.trim() || '')))
|
||||
const syncDepartments = ref([])
|
||||
const syncDepartmentTree = computed(() => {
|
||||
const nodes = new Map(syncDepartments.value.map(d => [d.id, { ...d, children: [] }]))
|
||||
|
||||
Reference in new issue
Block a user