mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
feat 插件支持在线图标
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "moviepilot",
|
"name": "moviepilot",
|
||||||
"version": "1.3.9-2",
|
"version": "1.3.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": "dist/service.js",
|
"bin": "dist/service.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ async function installPlugin() {
|
|||||||
try {
|
try {
|
||||||
// 显示等待提示框
|
// 显示等待提示框
|
||||||
progressDialog.value = true
|
progressDialog.value = true
|
||||||
progressText.value = `正在安装 ${props.plugin?.plugin_name} 插件...`
|
progressText.value = `正在安装 ${props.plugin?.plugin_name} ${props?.plugin?.plugin_version} 插件...`
|
||||||
|
|
||||||
const result: { [key: string]: any } = await api.get(
|
const result: { [key: string]: any } = await api.get(
|
||||||
`plugin/install/${props.plugin?.id}`,
|
`plugin/install/${props.plugin?.id}`,
|
||||||
@@ -59,6 +59,13 @@ async function installPlugin() {
|
|||||||
console.error(error)
|
console.error(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 计算图标路径
|
||||||
|
const iconPath = computed(() => {
|
||||||
|
return props.plugin?.plugin_icon?.startsWith('http')
|
||||||
|
? props.plugin?.plugin_icon
|
||||||
|
: `/plugin_icon/${props.plugin?.plugin_icon}`
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -85,7 +92,7 @@ async function installPlugin() {
|
|||||||
:class="{ shadow: isImageLoaded }"
|
:class="{ shadow: isImageLoaded }"
|
||||||
>
|
>
|
||||||
<VImg
|
<VImg
|
||||||
:src="`/plugin_icon/${props.plugin?.plugin_icon}`"
|
:src="iconPath"
|
||||||
aspect-ratio="4/3"
|
aspect-ratio="4/3"
|
||||||
cover
|
cover
|
||||||
@load="isImageLoaded = true"
|
@load="isImageLoaded = true"
|
||||||
|
|||||||
@@ -136,6 +136,13 @@ async function showPluginConfig() {
|
|||||||
pluginConfigDialog.value = true
|
pluginConfigDialog.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 计算图标路径
|
||||||
|
const iconPath = computed(() => {
|
||||||
|
return props.plugin?.plugin_icon?.startsWith('http')
|
||||||
|
? props.plugin?.plugin_icon
|
||||||
|
: `/plugin_icon/${props.plugin?.plugin_icon}`
|
||||||
|
})
|
||||||
|
|
||||||
// 弹出菜单
|
// 弹出菜单
|
||||||
const dropdownItems = ref([
|
const dropdownItems = ref([
|
||||||
{
|
{
|
||||||
@@ -216,7 +223,7 @@ const dropdownItems = ref([
|
|||||||
:class="{ shadow: isImageLoaded }"
|
:class="{ shadow: isImageLoaded }"
|
||||||
>
|
>
|
||||||
<VImg
|
<VImg
|
||||||
:src="`/plugin_icon/${props.plugin?.plugin_icon}`"
|
:src="iconPath"
|
||||||
aspect-ratio="4/3"
|
aspect-ratio="4/3"
|
||||||
cover
|
cover
|
||||||
:class="{ shadow: isImageLoaded }"
|
:class="{ shadow: isImageLoaded }"
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ const getInstalledPluginList = computed(() => {
|
|||||||
return dataList.value.filter(item => item.installed)
|
return dataList.value.filter(item => item.installed)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取未安装的插件列表
|
// 获取未安装或者有更新的插件列表
|
||||||
const getUninstalledPluginList = computed(() => {
|
const getUninstalledPluginList = computed(() => {
|
||||||
return dataList.value.filter(item => !item.installed)
|
return dataList.value.filter(item => !item.installed || item.has_update)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 关闭插件市场窗口
|
// 关闭插件市场窗口
|
||||||
|
|||||||
Reference in New Issue
Block a user