mirror of
https://gitee.com/czh-dev/upload-hub
synced 2026-09-07 00:17:04 +08:00
fix:优化共享文件页面
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="share-file-page">
|
<div class="share-file-page">
|
||||||
<!-- 顶部信息 -->
|
<!-- 顶部信息 -->
|
||||||
<div class="top-info">
|
<div class="top-info" :class="{ 'sharing-active': enableShare }">
|
||||||
<div class="info-content">
|
<div class="info-content">
|
||||||
<!-- 状态徽章 -->
|
<!-- 状态徽章 -->
|
||||||
<div class="status-badge">
|
<div class="status-badge">
|
||||||
<i class="el-icon-share"></i>
|
<i class="el-icon-share"></i>
|
||||||
<span>实时分享中</span>
|
<span>{{ enableShare ? '实时分享中' : '未开启分享' }}</span>
|
||||||
<div class="glow"></div>
|
<div class="glow"></div>
|
||||||
<!-- 信息组 -->
|
<!-- 信息组 -->
|
||||||
<div class="info-group">
|
<div class="info-group">
|
||||||
@@ -84,6 +84,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.updateShareStatusAttribute();
|
||||||
this.fetchFiles();
|
this.fetchFiles();
|
||||||
this.getShareStatus();
|
this.getShareStatus();
|
||||||
this.getShareAddress();
|
this.getShareAddress();
|
||||||
@@ -104,8 +105,15 @@ export default {
|
|||||||
sseManager.unsubscribe('sharedFileUpdate');
|
sseManager.unsubscribe('sharedFileUpdate');
|
||||||
sseManager.unsubscribe('enableShare');
|
sseManager.unsubscribe('enableShare');
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
enableShare() {
|
||||||
|
this.updateShareStatusAttribute();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
updateShareStatusAttribute() {
|
||||||
|
this.$el.setAttribute('data-enable-share', this.enableShare);
|
||||||
|
},
|
||||||
getAuth() {
|
getAuth() {
|
||||||
const isAdmin = localStorage.getItem('main')
|
const isAdmin = localStorage.getItem('main')
|
||||||
this.isAdmin = isAdmin === 'true'
|
this.isAdmin = isAdmin === 'true'
|
||||||
@@ -286,6 +294,9 @@ export default {
|
|||||||
transparent,
|
transparent,
|
||||||
rgba(64, 158, 255, 0.1),
|
rgba(64, 158, 255, 0.1),
|
||||||
transparent);
|
transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-file-page[data-enable-share="true"] :deep(.glow) {
|
||||||
animation: glow-animation 2s infinite;
|
animation: glow-animation 2s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user