A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
119
}120
},121
template: `122
<div class="sticky top-[98px] z-30">122
<div class="sticky top-[98px] z-30 -mb-2">123
<div124
v-if="station"125
class="flex flex-col bg-black pb-6"
108
};109
const angle = Math.atan(diff.x / diff.y) * (180 / Math.PI);110
const index = state.tabs.indexOf(state.tab);111
if(Math.abs(diff.x) > window.innerWidth / 4) {111
if(Math.abs(diff.x) > window.innerWidth / 6) {112
if(diff.x > 0 && index > 0 && (angle <= -60 || angle >= 60)) {113
state.tab = state.tabs[index - 1];114
}
121
computed: {122
styles() {123
const index = state.tabs.indexOf(state.tab);124
const offset = window.innerWidth <= 640124
const offset = window.innerWidth < 1200125
? `${index * -100}vw`126
: `${index * -1200}px`;127
return {
137
>138
<v-menu :state="state"></v-menu>139
<v-player v-if="state.authenticated" :station="state.station"></v-player>140
<div class="flex flex-1 gap-[32px] sm:gap-[5rem] overflow-y-clip transition-transform" :style="styles">140
<div class="flex flex-1 gap-[32px] sm:gap-[5rem] overflow-y-clip transition-transform md:transition-none" :style="styles">141
<v-search v-if="state.authenticated" ref="search" :state="state"></v-search>142
<v-favorites v-if="state.authenticated" ref="favorites" :state="state"></v-favorites>143
<v-account v-if="state.authenticated" :state="state"></v-account>
31
},32
template: `33
<v-tab id="favorites" :tab="state.tab">34
<div class="pb-8 sm:pb-[100px]">34
<div class="pb-8 sm:pb-[100px] pt-2">35
<ul class="flex flex-col">36
<li37
:key="station.id"
85
},86
template: `87
<v-tab id="search" :tab="state.tab">88
<div class="flex flex-col flex-1 gap-[32px] pb-8 sm:pb-[100px]">88
<div class="flex flex-col flex-1 gap-[32px] pb-8 sm:pb-[100px] pt-2">89
<div class="flex flex-wrap rounded-md overflow-hidden bg-zinc-900">90
<div class="relative before:absolute before:w-full before:bottom-0 before:border-b md:before:border-none before:border-zinc-800 flex-1">91
<input