A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
1
import {state, SWIPE_THRESHOLD} from '../main.js';1
import {state} from '../main.js';2
import {http, $lang, $route, duration} from '../utils.js';3
import VButton from '../element/button.js';4
import VTab from '../component/tab.js';
26
VImage27
},28
watch: {29
async title(value) {29
async title() {30
await this.$nextTick();31
const outer = this.open ? this.$refs.songtitle : this.$refs.subsongtitle;32
const inner = outer.querySelector('span');
134
}, 10000);135
},136
async showDetail(station) {137
$route('/station/' + this.station.id);137
$route('/station/' + station.id);138
this.open = false;139
},140
onTouchStart(event) {
148
y: touch.pageY - this.touch.pageY149
};150
const angle = Math.atan(diff.x / diff.y) * (180 / Math.PI);151
const index = state.tabs.indexOf(state.tab);151
if(this.open) {152
if(Math.abs(diff.y) >= SWIPE_THRESHOLD) {153
if(diff.y > 0 && angle >= -30 && angle <= 30) {
238
class="hidden md:flex flex-col flex-1 min-w-0 w-[400px] max-w-[400px] mr-4 transition-modal"239
:class="{ 'max-w-0 mr-0 opacity-0': open }"240
>242
<p243
class="text-xl font-semibold text-white pb-1 overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer"244
@click="showDetail(station)"245
>241
<p class="text-xl font-semibold text-white pb-1 overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer">242
{{station.name}}243
</p>244
<p
6
VIcon,7
},8
methods: {9
onChange(event) {9
onChange() {10
this.$emit('input', this.value);11
this.$emit('change', this.value);12
}
1
import {state} from '../main.js';2
import {$lang, $route, http} from '../utils.js';2
import {$lang, $route} from '../utils.js';3
import VButton from '../element/button.js';4
import VIcon from '../element/icon.js';5
import VImage from '../element/image.js';
1
import {state} from '../main.js';1
import {$lang, $route} from '../utils.js';2
import VButton from '../element/button.js';3
import VTab from '../component/tab.js';