Compare commits

..

No commits in common. "13a624b5cfac0d324e18bcd65965f2eb8b466e03" and "94938a0fc3b2ea7760049c1d060d480036ec6c4a" have entirely different histories.

4 changed files with 3 additions and 48 deletions

View File

@ -1,14 +0,0 @@
name: nix-build-publish
on:
push:
branches:
- master
jobs:
check:
runs-on: nix-runner
steps:
- uses: actions/checkout@v4
- run: |
nix flake check --keep-going

View File

@ -40,8 +40,7 @@ onMounted(() => {
<div class="flex rounded-xl m-2 bg-ctp-base">
<div class="flex items-center justify-center">
<div class="h-20 sm:h-36 flex rounded-l-xl aspect-square items-center justify-center bg-ctp-peach/50">
<VinylIcon class="p-1"
:class="{ 'animate-spin-slow': player.station?.id === stationInfo.id && player.playing }" />
<VinylIcon class="p-1" />
</div>
</div>
<div class="w-full flex flex-col justify-center px-4 space-y-2">

View File

@ -6,12 +6,6 @@ import { api } from "@";
type TimerId = number;
const setAsyncTimeout = (ms: number) => {
return new Promise((resolve) => {
setTimeout(resolve, ms * 1000);
});
};
export const usePlayer = defineStore("player", () => {
const stations: Ref<api.StationInfo[]> = ref(null);
const station: Ref<api.StationInfo> = ref(null);
@ -39,24 +33,9 @@ export const usePlayer = defineStore("player", () => {
};
const update = async () => {
if (station.value.status !== api.StationStatus.Receive) {
songInfo.value = null;
return;
}
await refreshSongInfo();
clearTimeout(updateTimer.value);
if (songInfo.value.duration) {
updateTimer.value = await setAsyncTimeout(songInfo.value.duration - songInfo.value.elapsed);
} else {
updateTimer.value = await setAsyncTimeout(5);
}
if (playing.value) {
await update();
}
updateTimer.value = setTimeout(update, (songInfo.value.duration - songInfo.value.elapsed) * 1000);
};
const play = (_station: api.StationInfo | null = null) => {

View File

@ -13,20 +13,11 @@ export default {
"100%": {
"background-position": "200% 0",
}
},
"spin": {
"from": {
"transform": "rotate(0deg)",
},
"to": {
"transform": "rotate(360deg)",
}
}
},
animation: {
"border-spin": "border-spin 7s linear infinite",
"border-roll": "border-roll 5s linear infinite",
"spin-slow": "spin 2s linear infinite",
"border-roll": "border-roll 5s linear infinite"
}
},
},