Tooltip show/hide work in progress

This commit is contained in:
banaanihillo@protonmail.ch 2024-04-20 11:31:52 +03:00
parent 2aca90d993
commit 7fd5f11898
3 changed files with 70 additions and 54 deletions

View file

@ -132,30 +132,36 @@ const openSong = el => {
</a> </a>
</span> </span>
<span <button
class="bi bi-three-dots-vertical popup-wrap ign" class="bi bi-three-dots-vertical popup-wrap ign"
@mouseenter="show = true" @mouseenter="show = true"
@mouseleave="show = false"> @mouseleave="show = false"
@click.enter="show = player.toggle('tooltipIsOpen')"
>
<Transition name="fade"> <Transition name="fade">
<div v-if="show" class="popup ign"> <div v-if="show" class="popup ign">
<span <button
v-if="playlistId || offlineUri" v-if="playlistId || offlineUri"
class="bi bi-dash-lg clickable ign" class="bi bi-dash-lg clickable ign"
@click="Remove"></span> @click="Remove">
<span </button>
<button
class="bi bi-chevron-bar-right clickable ign" class="bi bi-chevron-bar-right clickable ign"
@click="appendSong"></span> @click="appendSong">
<span </button>
<button
class="bi bi-collection clickable ign" class="bi bi-collection clickable ign"
@click="showPl = true"></span> @click="showPl = true">
<span </button>
<button
class="bi bi-broadcast clickable ign" class="bi bi-broadcast clickable ign"
@click="$emit('nxt-song')"></span> @click="$emit('nxt-song')">
<span class="bi bi-plus-lg clickable ign" @click="addSong"></span> </button>
<span class="bi bi-share clickable ign" @click="Share"></span> <button class="bi bi-plus-lg clickable ign" @click="addSong"></button>
<button class="bi bi-share clickable ign" @click="Share"></button>
</div> </div>
</Transition> </Transition>
</span> </button>
</div> </div>
</template> </template>
@ -177,6 +183,9 @@ span.content {
span.bi-three-dots-vertical { span.bi-three-dots-vertical {
margin: 2rem; margin: 2rem;
} }
button.bi-three-dots-vertical {
border: none;
}
.popup { .popup {
line-height: auto; line-height: auto;
height: auto; height: auto;

View file

@ -17,6 +17,7 @@ export const useData = defineStore('data', () => {
lyrics: '', lyrics: '',
src: [], src: [],
urls: [], urls: [],
tooltipIsOpen: false,
}), }),
player = usePlayer(); player = usePlayer();
@ -148,10 +149,16 @@ export const usePlayer = defineStore('player', () => {
info: false, info: false,
add: false, add: false,
vol: store.vol ? store.vol / 100 : 1, vol: store.vol ? store.vol / 100 : 1,
tooltipIsOpen: false,
}); });
function toggle(i) { 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) { function setTime(t) {

View file

@ -2,51 +2,51 @@ import { fileURLToPath, URL } from 'url';
import { defineConfig } from 'vite'; import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
import { VitePWA } from 'vite-plugin-pwa'; // import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
vue(), vue(),
VitePWA({ // VitePWA({
registerType: 'autoUpdate', // registerType: 'autoUpdate',
workbox: { // workbox: {
globPatterns: [ // globPatterns: [
'**/*.{css,html,png,svg,woff,woff2}', // '**/*.{css,html,png,svg,woff,woff2}',
'manifest.webmanifest', // 'manifest.webmanifest',
'**/index*.js', // '**/index*.js',
'**/shaka*.js', // '**/shaka*.js',
'**/[A-Z]*.js', // '**/[A-Z]*.js',
], // ],
}, // },
manifest: { // manifest: {
name: 'Hyperpipe', // name: 'Hyperpipe',
short_name: 'Hyperpipe', // short_name: 'Hyperpipe',
start_url: '/', // start_url: '/',
display: 'standalone', // display: 'standalone',
background_color: '#000', // background_color: '#000',
theme_color: '#000', // theme_color: '#000',
description: 'Privacy respecting YouTube Music Frontend.', // description: 'Privacy respecting YouTube Music Frontend.',
icons: [ // icons: [
{ // {
src: '/android-chrome-192x192.png', // src: '/android-chrome-192x192.png',
sizes: '192x192', // sizes: '192x192',
type: 'image/png', // type: 'image/png',
}, // },
{ // {
src: '/android-chrome-512x512.png', // src: '/android-chrome-512x512.png',
sizes: '512x512', // sizes: '512x512',
type: 'image/png', // type: 'image/png',
}, // },
{ // {
src: '/android-maskable.png', // src: '/android-maskable.png',
sizes: '1024x1024', // sizes: '1024x1024',
type: 'image/png', // type: 'image/png',
purpose: 'maskable', // purpose: 'maskable',
}, // },
], // ],
}, // },
}), // }),
], ],
resolve: { resolve: {
alias: { alias: {