feat: 限制历史操作为管理员可见

This commit is contained in:
shenlei
2026-07-20 17:18:00 +09:00
parent 13366ab3b4
commit 624f534b0f
2 changed files with 25 additions and 11 deletions
+4 -3
View File
@@ -31,7 +31,7 @@
<th>Scheme</th>
<th>状态</th>
<th>下载地址</th>
<th>操作</th>
<th v-if="isAdmin">操作</th>
</tr>
</thead>
<tbody>
@@ -59,7 +59,7 @@
</template>
<span v-else class="text-muted">-</span>
</td>
<td class="action-btns">
<td v-if="isAdmin" class="action-btns">
<button v-if="task.has_log" class="action-btn" @click="viewLogs(task.id)">日志</button>
<button v-if="task.status === 'completed' && task.dsym_path" class="action-btn" @click="downloadDsym(task.id)">dSYM</button>
<button v-if="task.obfuscation_maps_path" class="action-btn" @click="downloadObfMaps(task.id)">混淆映射</button>
@@ -67,7 +67,7 @@
</td>
</tr>
<tr v-if="!filteredTasks.length">
<td colspan="7" style="text-align: center; color: #999; padding: 40px;">暂无打包记录</td>
<td :colspan="isAdmin ? 7 : 6" style="text-align: center; color: #999; padding: 40px;">暂无打包记录</td>
</tr>
</tbody>
</table>
@@ -161,6 +161,7 @@
import { ref, computed, onMounted, nextTick, onUnmounted, inject } from 'vue'
const getToken = inject('getToken', () => '')
const isAdmin = inject('isAdmin', ref(false))
const tasks = ref([])
const authFetch = (url, options = {}) => {