Added show/hide form button.
This commit is contained in:
parent
971cdd0e29
commit
fe1e88243b
4 changed files with 14 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<PageHeader :config="config" />
|
<PageHeader :config="config" @toggleForm="addForm = !addForm" />
|
||||||
<formAdd :config="config" @addItem="addItem" />
|
<formAdd v-if="addForm" :config="config" @addItem="addItem" />
|
||||||
<DownloadingList :config="config" :queue="downloading" @deleteItem="deleteItem" />
|
<DownloadingList :config="config" :queue="downloading" @deleteItem="deleteItem" />
|
||||||
<PageCompleted :config="config" :completed="completed" @deleteItem="deleteItem" @addItem="addItem"
|
<PageCompleted :config="config" :completed="completed" @deleteItem="deleteItem" @addItem="addItem"
|
||||||
@playItem="playItem" />
|
@playItem="playItem" />
|
||||||
|
|
@ -26,7 +26,7 @@ import PageFooter from './components/Page-Footer'
|
||||||
import VideoPlayer from './components/Video-Player'
|
import VideoPlayer from './components/Video-Player'
|
||||||
import { io } from "socket.io-client";
|
import { io } from "socket.io-client";
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { useEventBus } from '@vueuse/core'
|
import { useStorage, useEventBus } from '@vueuse/core'
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const bus = useEventBus('item_added');
|
const bus = useEventBus('item_added');
|
||||||
|
|
@ -39,6 +39,7 @@ const config = reactive({
|
||||||
const downloading = reactive({});
|
const downloading = reactive({});
|
||||||
const completed = reactive({});
|
const completed = reactive({});
|
||||||
const video_link = ref('');
|
const video_link = ref('');
|
||||||
|
const addForm = useStorage('addForm', true)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const socket = io(process.env.VUE_APP_BASE_URL, {
|
const socket = io(process.env.VUE_APP_BASE_URL, {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<h1 class="is-size-3 is-clickable is-unselectable" @click="showCompleted = !showCompleted">
|
<h1 class="mt-3 is-size-3 is-clickable is-unselectable" @click="showCompleted = !showCompleted">
|
||||||
<span class="icon-text">
|
<span class="icon-text">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<font-awesome-icon :icon="showCompleted ? 'fa-solid fa-arrow-up' : 'fa-solid fa-arrow-down'" />
|
<font-awesome-icon :icon="showCompleted ? 'fa-solid fa-arrow-up' : 'fa-solid fa-arrow-down'" />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<h1 class="is-size-3 is-clickable is-unselectable" @click="showQueue = !showQueue">
|
<h1 class="mt-3 is-size-3 is-clickable is-unselectable" @click="showQueue = !showQueue">
|
||||||
<icon class="icon-text">
|
<icon class="icon-text">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<font-awesome-icon :icon="showQueue ? 'fa-solid fa-arrow-up' : 'fa-solid fa-arrow-down'" />
|
<font-awesome-icon :icon="showQueue ? 'fa-solid fa-arrow-up' : 'fa-solid fa-arrow-down'" />
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="navbar-item">
|
||||||
|
<button data-tooltip="Show/Hide Add Form" class="button is-dark has-tooltip-bottom" @click="$emit('toggleForm')">
|
||||||
|
<font-awesome-icon icon="fa-solid fa-plus" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="navbar-item">
|
<div class="navbar-item">
|
||||||
<button data-tooltip="Switch to Light theme" class="button is-dark has-tooltip-bottom"
|
<button data-tooltip="Switch to Light theme" class="button is-dark has-tooltip-bottom"
|
||||||
@click="selectedTheme = 'light'" v-if="selectedTheme == 'dark'">🌞</button>
|
@click="selectedTheme = 'light'" v-if="selectedTheme == 'dark'">🌞</button>
|
||||||
|
|
@ -28,11 +33,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps, watch, onMounted } from 'vue'
|
import { defineProps, defineEmits, watch, onMounted } from 'vue'
|
||||||
import { useStorage } from '@vueuse/core'
|
import { useStorage } from '@vueuse/core'
|
||||||
|
|
||||||
const selectedTheme = useStorage('theme', (() => window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')());
|
const selectedTheme = useStorage('theme', (() => window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light')());
|
||||||
|
|
||||||
|
defineEmits(['toggleForm'])
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
config: {
|
config: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue