Compare commits

..

15 Commits

Author SHA1 Message Date
jxxghp
69989893d9 v1.3.6 2023-10-21 14:22:49 +08:00
jxxghp
ffc61f4a31 Merge pull request #54 from thsrite/main 2023-10-20 14:33:15 +08:00
thsrite
dd051f28d2 feat 站点自动登录插件 2023-10-20 12:54:12 +08:00
jxxghp
a3d2def72b fix ui bug 2023-10-20 12:42:54 +08:00
jxxghp
e8552b4385 v1.3.5-1 2023-10-20 07:37:44 +08:00
jxxghp
d73e4853a8 fix ui 2023-10-19 17:06:46 +08:00
jxxghp
7f991da183 fix ui 2023-10-18 21:07:26 +08:00
jxxghp
046d96a012 Merge pull request #52 from thsrite/main 2023-10-17 17:04:33 +08:00
thsrite
9ee6ca43e3 feat MoviePilot更新推送插件 2023-10-17 16:17:05 +08:00
jxxghp
43b1f7e620 v1.3.4-2 2023-10-17 14:04:29 +08:00
jxxghp
ba76f79d85 fix ui 2023-10-17 14:02:54 +08:00
jxxghp
ce47afa698 fix ui 2023-10-16 19:56:49 +08:00
jxxghp
6da110948c v1.3.4 2023-10-16 17:35:23 +08:00
jxxghp
533c564db5 feat 普通用户下载中只显示自己添加的下载 2023-10-16 08:32:02 +08:00
jxxghp
4a65056909 fix 普通用户订阅权限 2023-10-16 08:23:38 +08:00
13 changed files with 61 additions and 40 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "moviepilot",
"version": "1.3.3-2",
"version": "1.3.6",
"private": true,
"bin": "dist/service.js",
"scripts": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -478,6 +478,9 @@ export interface DownloadingInfo {
// 媒体信息
media: { [key: string]: any }
// 下载用户
userid?: string
}
// 缺失剧集信息

View File

@@ -44,7 +44,7 @@ const subscribeSeasonDialog = ref(false)
const subscribeEditDialog = ref(false)
// 订阅ID
const subscribeId = ref(0)
const subscribeId = ref<number>()
// 季详情
const seasonInfos = ref<TmdbSeason[]>([])

View File

@@ -59,10 +59,8 @@ const transferForm = reactive({
})
watchEffect(() => {
if (props.path)
transferForm.path = props.path
if (props.target)
transferForm.target = props.target
transferForm.path = props.path ?? ''
transferForm.target = props.target ?? ''
})
// 使用SSE监听加载进度

View File

@@ -47,7 +47,6 @@ const $toast = useToast()
// 调用API修改订阅
async function updateSubscribeInfo() {
try {
subscribeForm.value.best_version = subscribeForm.value.best_version ? 1 : 0
const result: { [key: string]: any } = await api.put('subscribe/', subscribeForm.value)
// 提示
if (result.success) {
@@ -122,11 +121,6 @@ async function removeSubscribe() {
}
}
watchEffect(() => {
if (props.subid)
getSubscribeInfo()
})
// 质量选择框数据
const qualityOptions = ref([
{
@@ -211,10 +205,11 @@ const effectOptions = ref([
},
])
// 初始化
onMounted(async () => {
// 加载订阅站点列表
getSiteList()
watchEffect(() => {
if (props.subid) {
getSiteList()
getSubscribeInfo()
}
})
</script>

View File

@@ -91,7 +91,6 @@ const superUser = store.state.auth.superUser
}"
/>
<VerticalNavLink
v-if="superUser"
:item="{
title: '电影',
icon: 'mdi-movie-check-outline',
@@ -99,7 +98,6 @@ const superUser = store.state.auth.superUser
}"
/>
<VerticalNavLink
v-if="superUser"
:item="{
title: '电视剧',
icon: 'mdi-television-classic',

View File

@@ -124,6 +124,25 @@ const avatar = store.state.auth.avatar
<VListItemTitle>设定</VListItemTitle>
</VListItem>
<!-- Divider -->
<VDivider class="my-2" />
<!-- 👉 restart -->
<VListItem
v-if="superUser"
@click="restart"
>
<template #prepend>
<VIcon
class="me-2"
icon="mdi-restart"
size="22"
/>
</template>
<VListItemTitle>重启</VListItemTitle>
</VListItem>
<!-- 👉 FAQ -->
<VListItem
href="https://github.com/jxxghp/MoviePilot/blob/main/README.md"
@@ -140,22 +159,6 @@ const avatar = store.state.auth.avatar
<VListItemTitle>帮助</VListItemTitle>
</VListItem>
<!-- Divider -->
<VDivider class="my-2" />
<!-- 👉 restart -->
<VListItem @click="restart">
<template #prepend>
<VIcon
class="me-2"
icon="mdi-restart"
size="22"
/>
</template>
<VListItemTitle>重启</VListItemTitle>
</VListItem>
<!-- 👉 Logout -->
<VListItem @click="logout">
<template #prepend>

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import NoDataFound from '@/components/NoDataFound.vue'
import api from '@/api'
import type { Context } from '@/api/types'
import store from '@/store'
@@ -129,12 +130,14 @@ onMounted(() => {
<span v-if="dataList.length > 0" class="fixed right-5 bottom-5">
<VBtn
v-if="viewType === 'list'"
size="x-large"
icon="mdi-view-grid"
color="primary"
@click="setViewType('card')"
/>
<VBtn
v-else
size="x-large"
icon="mdi-view-list"
color="primary"
@click="setViewType('list')"

View File

@@ -44,7 +44,7 @@ const seasonsNotExisted = ref<{ [key: number]: number }>({})
const seasonsSubscribed = ref<{ [key: number]: boolean }>({})
// 订阅编号
const subscribeId = ref(0)
const subscribeId = ref<number>()
// 调用API查询详情
async function getMediaDetail() {

View File

@@ -4,6 +4,11 @@ import api from '@/api'
import type { DownloadingInfo } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue'
import DownloadingCard from '@/components/cards/DownloadingCard.vue'
import store from '@/store'
// 从Vuex Store中获取用户信息
const superUser = store.state.auth.superUser
const userName = store.state.auth.userName
// 定时器
let refreshTimer: NodeJS.Timer | null = null
@@ -35,6 +40,14 @@ function onRefresh() {
loading.value = false
}
// 过滤数据,管理员用户显示全部,非管理员只显示自己的订阅
const filteredDataList = computed(() => {
if (superUser)
return dataList.value
else
return dataList.value.filter(data => data.userid === userName)
})
// 加载时获取数据
onBeforeMount(() => {
fetchData()
@@ -71,17 +84,17 @@ onUnmounted(() => {
@refresh="onRefresh"
>
<div
v-if="dataList.length > 0"
v-if="filteredDataList.length > 0"
class="grid gap-3 grid-downloading-card"
>
<DownloadingCard
v-for="data in dataList"
v-for="data in filteredDataList"
:key="data.hash"
:info="data"
/>
</div>
<NoDataFound
v-if="dataList.length === 0 && isRefreshed"
v-if="filteredDataList.length === 0 && isRefreshed"
error-code="404"
error-title="没有任务"
error-description="正在下载的任务将会显示在这里"

View File

@@ -4,12 +4,17 @@ import api from '@/api'
import type { Subscribe } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue'
import SubscribeCard from '@/components/cards/SubscribeCard.vue'
import store from '@/store'
// 输入参数
const props = defineProps({
type: String,
})
// 从Vuex Store中获取用户信息
const superUser = store.state.auth.superUser
const userName = store.state.auth.userName
// 是否刷新过
const isRefreshed = ref(false)
@@ -40,9 +45,12 @@ function onRefresh() {
loading.value = false
}
// 过滤数据
// 过滤数据,管理员用户显示全部,非管理员只显示自己的订阅
const filteredDataList = computed(() => {
return dataList.value.filter(data => data.type === props.type)
if (superUser)
return dataList.value.filter(data => data.type === props.type)
else
return dataList.value.filter(data => data.type === props.type && data.username === userName)
})
</script>