Center ExpandedPlayer content and add loading spinner to HomeView
This commit is contained in:
1 parent
8f77e01578
commit
722d378303
2 files changed
+26
-5
No files matched your search
@@ -396,9 +396,16 @@
|
||||
|
||||
/* Main Content */
|
||||
.main-content {
|
||||
flex: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
max-width: 1400px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1;
|
||||
padding: 60px;
|
||||
gap: 60px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { Music, User } from 'lucide-svelte';
|
||||
import { Music, User, Loader2 } from 'lucide-svelte';
|
||||
import HorizontalScrollRow from '../HorizontalScrollRow.svelte';
|
||||
import AlbumCard from '../AlbumCard.svelte';
|
||||
import TrackRow from '../TrackRow.svelte';
|
||||
@@ -229,8 +229,8 @@
|
||||
<div class="home-view">
|
||||
{#if isLoading}
|
||||
<div class="home-state">
|
||||
<div class="state-icon">
|
||||
<Music size={36} />
|
||||
<div class="state-icon loading">
|
||||
<Loader2 size={36} class="spinner" />
|
||||
</div>
|
||||
<h1>Loading your home</h1>
|
||||
<p>Building recommendations from your listening history.</p>
|
||||
@@ -456,4 +456,18 @@
|
||||
justify-content: center;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.state-icon.loading {
|
||||
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary, #6366f1) 100%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.state-icon :global(.spinner) {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user