From af69efa48b3a465034e7b2b69ffa334c3fc16907 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Thu, 22 Feb 2024 13:32:23 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=8F=92=E4=BB=B6=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=8D=95=E7=8B=AC=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/cards/PluginCard.vue | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index db8f5cc0..ee5504a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moviepilot", - "version": "1.6.5", + "version": "1.6.5-1", "private": true, "bin": "dist/service.js", "scripts": { diff --git a/src/components/cards/PluginCard.vue b/src/components/cards/PluginCard.vue index 534262dd..eb643077 100644 --- a/src/components/cards/PluginCard.vue +++ b/src/components/cards/PluginCard.vue @@ -8,6 +8,7 @@ import PageRender from '@/components/render/PageRender.vue' import { isNullOrEmptyObject } from '@core/utils' import noImage from '@images/logos/plugin.png' import { getDominantColor } from '@/@core/utils/image' +import store from '@/store' // 输入参数 const props = defineProps({ @@ -225,6 +226,13 @@ function visitAuthorPage() { window.open(props.plugin?.author_url, '_blank') } +// 查看日志URL +function openLoggerWindow() { + const token = store.state.auth.token + const url = `${import.meta.env.VITE_API_BASE_URL}system/logging?token=${token}&length=-1&logfile=plugins/${props.plugin?.id?.toLowerCase()}.log` + window.open(url, '_blank') +} + // 弹出菜单 const dropdownItems = ref([ { @@ -265,9 +273,20 @@ const dropdownItems = ref([ click: uninstallPlugin, }, }, + { + title: '查看日志', + value: 5, + show: true, + props: { + prependIcon: 'mdi-file-document-outline', + click: () => { + openLoggerWindow() + }, + }, + }, { title: '作者主页', - value: 4, + value: 5, show: true, props: { prependIcon: 'mdi-home-circle-outline',