From 7fd5f11898e1ef104a0fd8d595929cfc3742a349 Mon Sep 17 00:00:00 2001 From: "banaanihillo@protonmail.ch" Date: Sat, 20 Apr 2024 11:31:52 +0300 Subject: [PATCH] Tooltip show/hide work in progress --- src/components/SongItem.vue | 35 ++++++++++------ src/stores/player.js | 9 ++++- vite.config.mjs | 80 ++++++++++++++++++------------------- 3 files changed, 70 insertions(+), 54 deletions(-) diff --git a/src/components/SongItem.vue b/src/components/SongItem.vue index 5104888..30f3afe 100644 --- a/src/components/SongItem.vue +++ b/src/components/SongItem.vue @@ -132,30 +132,36 @@ const openSong = el => { - + @mouseleave="show = false" + @click.enter="show = player.toggle('tooltipIsOpen')" + > - + @@ -177,6 +183,9 @@ span.content { span.bi-three-dots-vertical { margin: 2rem; } +button.bi-three-dots-vertical { + border: none; +} .popup { line-height: auto; height: auto; diff --git a/src/stores/player.js b/src/stores/player.js index 64e61d8..c72cfbd 100644 --- a/src/stores/player.js +++ b/src/stores/player.js @@ -17,6 +17,7 @@ export const useData = defineStore('data', () => { lyrics: '', src: [], urls: [], + tooltipIsOpen: false, }), player = usePlayer(); @@ -148,10 +149,16 @@ export const usePlayer = defineStore('player', () => { info: false, add: false, vol: store.vol ? store.vol / 100 : 1, + tooltipIsOpen: false, }); function toggle(i) { - if (typeof state[i] == 'boolean') state[i] = !state[i]; + console.log(i) + console.log(state[i]) + if (typeof state[i] == 'boolean') { + console.log(state[i]) + return state[i] = !state[i] + } } function setTime(t) { diff --git a/vite.config.mjs b/vite.config.mjs index 3b845c5..79618fa 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -2,51 +2,51 @@ import { fileURLToPath, URL } from 'url'; import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; -import { VitePWA } from 'vite-plugin-pwa'; +// import { VitePWA } from 'vite-plugin-pwa'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), - VitePWA({ - registerType: 'autoUpdate', - workbox: { - globPatterns: [ - '**/*.{css,html,png,svg,woff,woff2}', - 'manifest.webmanifest', - '**/index*.js', - '**/shaka*.js', - '**/[A-Z]*.js', - ], - }, - manifest: { - name: 'Hyperpipe', - short_name: 'Hyperpipe', - start_url: '/', - display: 'standalone', - background_color: '#000', - theme_color: '#000', - description: 'Privacy respecting YouTube Music Frontend.', - icons: [ - { - src: '/android-chrome-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - src: '/android-chrome-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - { - src: '/android-maskable.png', - sizes: '1024x1024', - type: 'image/png', - purpose: 'maskable', - }, - ], - }, - }), + // VitePWA({ + // registerType: 'autoUpdate', + // workbox: { + // globPatterns: [ + // '**/*.{css,html,png,svg,woff,woff2}', + // 'manifest.webmanifest', + // '**/index*.js', + // '**/shaka*.js', + // '**/[A-Z]*.js', + // ], + // }, + // manifest: { + // name: 'Hyperpipe', + // short_name: 'Hyperpipe', + // start_url: '/', + // display: 'standalone', + // background_color: '#000', + // theme_color: '#000', + // description: 'Privacy respecting YouTube Music Frontend.', + // icons: [ + // { + // src: '/android-chrome-192x192.png', + // sizes: '192x192', + // type: 'image/png', + // }, + // { + // src: '/android-chrome-512x512.png', + // sizes: '512x512', + // type: 'image/png', + // }, + // { + // src: '/android-maskable.png', + // sizes: '1024x1024', + // type: 'image/png', + // purpose: 'maskable', + // }, + // ], + // }, + // }), ], resolve: { alias: {