A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
5
import VImage from '../element/image.js';7
export default {8
props: ['station'],8
props: ['station', 'type'],9
components: {10
VButton,11
VIcon,
22
}23
},24
template: `25
<div class="w-full gap-4 group flex items-center">26
<v-image27
:station="station"28
@click="() => setStation(station)"29
class="w-[54px] h-[54px] min-w-[54px] cursor-pointer"30
></v-image>31
<div32
class="flex flex-col flex-1 min-w-0 cursor-pointer"33
@click="() => openDetail(station)"34
>25
<div>26
<div v-if="type === undefined || type === 'list'" class="w-full gap-4 group flex items-center">27
<v-image28
:station="station"29
@click="() => setStation(station)"30
class="w-[54px] h-[54px] min-w-[54px] cursor-pointer"31
></v-image>32
<div33
class="flex flex-col flex-1 min-w-0 cursor-pointer"34
@click="() => openDetail(station)"35
>36
<p37
:title="station.name"38
class="text-lg font-medium text-gray-100 pb-0 overflow-hidden text-ellipsis whitespace-nowrap"39
>40
{{station.name}}41
</p>42
<span class="text-md text-gray-400 overflow-hidden flex gap-2 sm:gap-3">43
<span44
v-if="station.country"45
class="text-gray-400 inline-flex items-center gap-[5px]"46
:title="$lang('global.country')"47
>48
<v-icon49
id="map-pin"50
class="w-[18px] h-[18px] !min-w-[18px] inline-flex text-gray-400"51
size="100%"52
></v-icon>53
<p>{{station.state ? station.state + ', ' : ''}}{{station.country}}</p>54
</span>55
</span>56
</div>57
</div>58
<div v-if="type === 'grid'" class="flex flex-col gap-3 group w-[160px] min-w-[160px]">59
<v-image60
:station="station"61
@click="() => openDetail(station)"62
class="w-full aspect-square min-w-full cursor-pointer"63
></v-image>64
<p65
:title="station.name"37
class="text-lg font-medium text-gray-100 pb-0 overflow-hidden text-ellipsis whitespace-nowrap"66
class="text-md font-medium text-gray-100 pb-0 w-full"67
>68
{{station.name}}69
</p>41
<span class="text-md text-gray-400 overflow-hidden flex gap-2 sm:gap-3">42
<span43
v-if="station.country"44
class="text-gray-400 inline-flex items-center gap-[5px]"45
:title="$lang('global.country')"46
>47
<v-icon48
id="map-pin"49
class="w-[18px] h-[18px] !min-w-[18px] inline-flex text-gray-400"50
size="100%"51
></v-icon>52
<p>{{station.state ? station.state + ', ' : ''}}{{station.country}}</p>53
</span>54
</span>70
</div>71
</div>72
`
48
<div class="flex flex-col flex-1 gap-[32px] pb-8 sm:pb-[100px] pt-2">49
<div>50
<h3 class="text-white text-[24px] font-bold pb-6 pt-4 sm:pt-0">{{$lang('account.settings')}}</h3>51
<div class="flex flex-col gap-8">52
<div class="flex flex-col gap-2">51
<div class="flex flex-col md:flex-row gap-8">52
<div class="flex flex-col gap-2 w-full">53
<label for="username" class="text-white text-lg">{{$lang('account.username')}}</label>54
<span class="text-gray-400 text-sm">{{$lang('account.username.info')}}</span>54
<span class="flex-1 text-gray-400 text-sm">{{$lang('account.username.info')}}</span>55
<input56
v-model="name"57
id="username"
63
class="rounded-md w-full h-[52px] px-4 mt-2 text-md bg-zinc-900 text-white placeholder:text-gray-500 focus:placeholder:text-gray-600 outline-none"64
>65
</div>66
<div class="flex flex-col gap-2">66
<div class="flex flex-col gap-2 w-full">67
<label for="language" class="text-white text-lg">{{$lang('account.language')}}</label>68
<span class="text-gray-400 text-sm">{{$lang('account.language.info')}}</span>68
<span class="flex-1 text-gray-400 text-sm">{{$lang('account.language.info')}}</span>69
<v-select70
id="language"71
v-model="language"
86
},87
template: `88
<v-tab id="search" :tab="state.tab">89
<div class="flex flex-col flex-1 gap-[32px] pb-8 sm:pb-[100px] pt-2">89
<div class="flex flex-col flex-1 gap-6 md:gap-16 pb-8 sm:pb-[100px] pt-2">90
<div class="flex flex-wrap rounded-md overflow-hidden bg-zinc-900">91
<div class="relative before:absolute before:w-full before:bottom-0 before:border-b md:before:border-none before:border-zinc-800 flex-1">92
<input
145
</ul>146
<div v-else>147
<h3 class="text-white text-[24px] font-bold pb-6 pt-4 sm:pt-0">{{$lang('search.latest')}}</h3>148
<ul class="flex flex-col">149
<li150
:key="station.id"151
v-for="station in latest"152
class="border-t sm:border-t-2 first:border-none border-zinc-900 py-4 first:pt-0"153
>154
<v-station :station="station"></v-station>155
</li>156
</ul>157
<h3 class="mt-[32px] text-white text-[24px] font-bold pb-6 pt-4 sm:pt-0">{{$lang('search.playtime')}}</h3>158
<ul class="flex flex-col">159
<li160
:key="station.id"161
v-for="station in playtime"162
class="border-t sm:border-t-2 first:border-none border-zinc-900 py-4 first:pt-0"163
>164
<v-station :station="station"></v-station>165
</li>166
</ul>148
<div class="relative">149
<ul class="flex overflow-y-auto max-w-full snap-x snap-mandatory gap-4 pr-3 scroll-hidden">150
<li151
:key="station.id"152
v-for="station in latest"153
class="snap-start"154
>155
<v-station :station="station" type="grid"></v-station>156
</li>157
</ul>158
<div class="absolute right-0 top-0 h-full w-3 bg-gradient-to-l from-black to-transparent"></div>159
</div>160
<h3 class="mt-6 md:mt-16 text-white text-[24px] font-bold pb-6 pt-4 sm:pt-0">{{$lang('search.playtime')}}</h3>161
<div class="relative">162
<ul class="flex overflow-y-auto max-w-full snap-x snap-mandatory gap-4 pr-3 scroll-hidden">163
<li164
:key="station.id"165
v-for="station in playtime"166
class="snap-start"167
>168
<v-station :station="station" type="grid"></v-station>169
</li>170
</ul>171
<div class="absolute right-0 top-0 h-full w-3 bg-gradient-to-l from-black to-transparent"></div>172
</div>173
</div>174
<div175
v-show="loading"
374
AND station_stats.account_id = {account_id}375
WHERE station_status.is_hidden IS NOT true376
{category}377
LIMIT 5377
LIMIT 8378
"#,379
account_id = account.id,380
category = unwrap_result_or_throw!(category.to_sql(), "cannot parse sql statement!"),
30
animation-timing-function: linear;31
}33
.scroll-hidden::-webkit-scrollbar {34
width: 0px;35
height: 0px;36
}38
@keyframes progress {39
0% { width: 100% }40
100% { width: 0% }