fix: 管理员配置OSS后不再跳转到文件列表,隐藏管理员的存储模式切换选项
- 管理员保存OSS配置后留在管理面板,不跳转到文件列表 - 管理员页面隐藏存储模式切换UI(管理员只负责配置,不存储文件) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2473,8 +2473,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 存储模式切换 -->
|
<!-- 存储模式切换(管理员不需要此功能) -->
|
||||||
<div v-if="user" style="margin-top: 20px; padding: 15px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--glass-border);">
|
<div v-if="user && !user.is_admin" style="margin-top: 20px; padding: 15px; background: var(--bg-card); border-radius: 12px; border: 1px solid var(--glass-border);">
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||||
<div>
|
<div>
|
||||||
<div style="font-weight: 600; color: var(--text-primary); margin-bottom: 5px;">
|
<div style="font-weight: 600; color: var(--text-primary); margin-bottom: 5px;">
|
||||||
|
|||||||
@@ -679,14 +679,16 @@ handleDragLeave(e) {
|
|||||||
else {
|
else {
|
||||||
// 如果用户可以使用本地存储,直接进入文件页面
|
// 如果用户可以使用本地存储,直接进入文件页面
|
||||||
if (this.storagePermission === 'local_only' || this.storagePermission === 'user_choice') {
|
if (this.storagePermission === 'local_only' || this.storagePermission === 'user_choice') {
|
||||||
this.currentView = 'files';
|
if (!this.user.is_admin) {
|
||||||
this.loadFiles('/');
|
this.currentView = 'files';
|
||||||
|
this.loadFiles('/'); }
|
||||||
}
|
}
|
||||||
// 如果仅OSS模式,需要检查是否配置了OSS(包括系统级统一配置)
|
// 如果仅OSS模式,需要检查是否配置了OSS(包括系统级统一配置)
|
||||||
else if (this.storagePermission === 'oss_only') {
|
else if (this.storagePermission === 'oss_only') {
|
||||||
if (this.user?.oss_config_source !== 'none') {
|
if (this.user?.oss_config_source !== 'none') {
|
||||||
this.currentView = 'files';
|
if (!this.user.is_admin) {
|
||||||
this.loadFiles('/');
|
this.currentView = 'files';
|
||||||
|
this.loadFiles('/'); }
|
||||||
} else {
|
} else {
|
||||||
this.currentView = 'settings';
|
this.currentView = 'settings';
|
||||||
this.showToast('info', '欢迎', '请先配置您的OSS服务');
|
this.showToast('info', '欢迎', '请先配置您的OSS服务');
|
||||||
@@ -694,8 +696,9 @@ handleDragLeave(e) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 默认行为:跳转到文件页面
|
// 默认行为:跳转到文件页面
|
||||||
this.currentView = 'files';
|
if (!this.user.is_admin) {
|
||||||
this.loadFiles('/');
|
this.currentView = 'files';
|
||||||
|
this.loadFiles('/'); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -912,9 +915,7 @@ handleDragLeave(e) {
|
|||||||
// 关闭配置弹窗
|
// 关闭配置弹窗
|
||||||
this.showOssConfigModal = false;
|
this.showOssConfigModal = false;
|
||||||
|
|
||||||
// 刷新到文件页面
|
// 管理员配置OSS后留在当前页面,不跳转到文件列表
|
||||||
this.currentView = 'files';
|
|
||||||
this.loadFiles('/');
|
|
||||||
|
|
||||||
// 显示成功提示
|
// 显示成功提示
|
||||||
this.showToast('success', '配置成功', 'OSS存储配置已保存!');
|
this.showToast('success', '配置成功', 'OSS存储配置已保存!');
|
||||||
|
|||||||
Reference in New Issue
Block a user