A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
28
watch: {29
async title(value) {30
await this.$nextTick();31
const outer = this.$refs.songtitle;31
const outer = this.open ? this.$refs.songtitle : this.$refs.subsongtitle;32
const inner = outer.querySelector('span');33
this.tooLong = outer.clientWidth - 12 < inner.clientWidth;34
this.animationDuration = `${Math.max(Math.abs(outer.clientWidth - 12 - inner.clientWidth) * 70, 2500)}ms`;35
},36
async open(value) {37
await this.$nextTick();38
const outer = value ? this.$refs.songtitle : this.$refs.subsongtitle;39
const inner = outer.querySelector('span');40
this.tooLong = outer.clientWidth - 12 < inner.clientWidth;41
this.animationDuration = `${Math.max(Math.abs(outer.clientWidth - 12 - inner.clientWidth) * 70, 2500)}ms`;
223
></v-button>224
</div>225
<div class="flex gap-8 items-center flex-col">219
<v-image220
:station="station"226
<div227
ref="button"222
class="h-[75vw] max-h-[400px] aspect-square rounded-lg z-10 fixed right-[50%] translate-x-[50%] translate-y-[100%] bottom-[calc(100vh-98px-32px)] transition-modal"223
:class="{ 'slide-active': !open, 'slide-hidden': !station }"228
class="h-[75vw] max-h-[400px] aspect-square rounded-lg z-10 fixed right-[50%] translate-x-[50%] translate-y-[100%] bottom-[calc(100vh-98px-32px)] transition-modal flex"229
:class="{ 'slide-active bg-zinc-900 items-center gap-4': !open, 'slide-hidden': !station }"230
@click="open = true"231
>226
</v-image>232
<v-image233
:station="station"234
class="h-full"235
>236
</v-image>237
<div238
v-if="station"239
class="hidden md:flex flex-col flex-1 min-w-0 w-[400px] max-w-[400px] mr-4 transition-modal"240
:class="{ 'max-w-0 mr-0 opacity-0': open }"241
>242
<p243
class="text-xl font-semibold text-white pb-1 overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"244
@click="showDetail(station)"245
>246
{{station.name}}247
</p>248
<p249
ref="subsongtitle"250
class="subsongtitle text-md text-gray-400 overflow-hidden whitespace-nowrap relative px-2 -ml-2 before:bg-gradient-to-r before:from-zinc-900 before:to-transparent after:bg-gradient-to-l after:from-zinc-900 after:to-transparent"251
:class="{'text-animate': tooLong}"252
>253
<span class="inline-block" :style="{'animation-duration': animationDuration}">{{title ?? $lang('player.no-song-title')}}</span>254
</p>255
</div>256
</div>257
<div class="h-[75vw] max-h-[400px] mt-[32px]"></div>258
<div259
v-if="station"