Skip to content

Commit

Permalink
Merge pull request #5 from xubeiyan/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
xubeiyan authored Nov 6, 2023
2 parents a85a699 + 842bfa6 commit 967988a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "zlmediakit-frontend",
"private": true,
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"homepage": "https://github.com/xubeiyan/ZLMediaKit-Manager",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
8 changes: 7 additions & 1 deletion src/components/CloseStreamProxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ const closeMutation = useMutation({
snackbar.open = true;
}
});
// 已选择视频数
const selecedVideoLength = computed(() => {
const filtered = dialog.streamList.filter(one => one.selected);
return filtered.length;
})
</script>

<template>
Expand All @@ -123,7 +129,7 @@ const closeMutation = useMutation({
</v-card-text>
<v-card-actions class="justify-end">
<v-btn variant="tonal" @click="dialog.open = false">取消</v-btn>
<v-btn variant="tonal" color="primary" @click="closeMutation.mutate()">确认</v-btn>
<v-btn variant="tonal" color="primary" :disabled="selecedVideoLength == 0" @click="closeMutation.mutate()">确认</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
Expand Down
4 changes: 2 additions & 2 deletions src/components/StreamOnServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const store = useGlobalStore();
const mediaList = ref(null);
// 获取媒体列表
const { error, mutate } = useMutation({
const { isError, error, mutate } = useMutation({
mutationFn: async () => {
const backEndpoint = computed(() => store.storage.backEndpoint).value;
const apiPrefix = computed(() => store.storage.apiPrefix).value;
Expand Down Expand Up @@ -92,7 +92,7 @@ onUnmounted(() => {
</script>

<template>
<v-alert v-if="error" type="error">{{ error }}</v-alert>
<v-alert v-if="isError" type="error">{{ error.message }}:请检查右上角配置填写是否正确</v-alert>
<v-alert v-if="mediaList?.length == 0" border="start" border-color="warning">当前没有视频流</v-alert>
<div class="video-container">
<VideoCard v-for="one in mediaList" :origin-url="one.originUrl" :origin-type="one.originType"
Expand Down
6 changes: 3 additions & 3 deletions src/views/About.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { version, homepage } from '../../package.json';
</script>

<template>
Expand All @@ -8,9 +8,9 @@
<v-card-title>关于此工具</v-card-title>
<v-card-subtitle>基于 MIT 协议开源的 <a href="https://github.com/ZLMediaKit/ZLMediaKit" target="_blank">ZLMediaKit</a>
前端框架</v-card-subtitle>
<v-card-text>当前版本:ver 0.1.2</v-card-text>
<v-card-text>当前版本:ver {{ version }}</v-card-text>
<v-card-actions>
<a href="https://github.com/xubeiyan/ZLMediaKit-Manager" target="_blank">
<a :href="homepage" target="_blank">
<v-btn icon="mdi-github" class="text-black"></v-btn>
<v-tooltip activator="parent" location="bottom">GitHub</v-tooltip>
</a>
Expand Down

0 comments on commit 967988a

Please sign in to comment.