|
1 | 1 | <!-- App.svelte --> |
2 | 2 | <script> |
| 3 | +// @ts-nocheck |
| 4 | +
|
3 | 5 | import { onMount, onDestroy } from "svelte"; |
| 6 | + import { writable } from "svelte/store"; |
4 | 7 | import { initializeRouteService, pathName, navigateTo, component, componentParams } from "./lib/scripts/routeService.js"; |
5 | | - import PlayerBarComponent from "./lib/components/PlayerBarComponent.svelte"; |
| 8 | + import PlayerBar from "./lib/components/PlayerBar.svelte"; |
6 | 9 | import Modals from "./lib/components/Modals.svelte"; |
7 | 10 | import { initializePlaylistService } from "./lib/scripts/playlistService.js"; |
8 | 11 | import { initializePlaybackService } from "./lib/scripts/playbackService.js"; |
9 | 12 | import { initializeMediaSessionService } from "./lib/scripts/mediasessionService.js"; |
| 13 | + import { searchQuery } from "./lib/scripts/util.js"; |
| 14 | + import SearchBar from "./lib/components/SearchBar.svelte"; |
10 | 15 |
|
11 | 16 | $: $pathName; |
12 | 17 | $: $component; |
13 | 18 |
|
14 | 19 | // @ts-ignore |
15 | | - const version = __APP_VERSION__; |
| 20 | + export const version = __APP_VERSION__; |
16 | 21 |
|
17 | 22 | onMount(() => { |
18 | 23 | async function initializeServices() { |
|
34 | 39 | <div class="app-layout"> |
35 | 40 | <!-- Sticky Top Bar --> |
36 | 41 | <header class="top-bar"> |
37 | | - <div class="container-fluid h-100">{$pathName} <span style="font-size: 0.8rem;">(v{version})</span></div> |
| 42 | + <div class="top-bar-title text-center">MyMusicBox<span style="font-size: 0.8rem;">(v{version})</span></div> |
| 43 | + <div class="row"> |
| 44 | + <div class="col-12 mt-2"> |
| 45 | + <!-- Search Bar --> |
| 46 | + <SearchBar /> |
| 47 | + </div> |
| 48 | + </div> |
38 | 49 | </header> |
39 | 50 |
|
40 | 51 | <!-- Scrollable Content --> |
|
45 | 56 | </main> |
46 | 57 |
|
47 | 58 | <!-- Sticky Player Bar --> |
48 | | - <PlayerBarComponent /> |
| 59 | + <PlayerBar /> |
49 | 60 |
|
50 | 61 | <!-- Sticky Bottom Bar --> |
51 | 62 | <footer class="bottom-bar"> |
52 | | - <div class="row w-100 justify-content-center align-items-center"> |
53 | | - <div class="col-4 col-lg-4 col-md-4 col-sm-4"> |
54 | | - <button aria-label="empty storage" class="btn btn-dark w-100" on:click={refresh}><i class="fa-solid fa-arrows-rotate"></i></button> |
| 63 | + <div class="row w-100 justify-content-center"> |
| 64 | + <div class="col-3 col-lg-2 col-md-2 col-sm-2"> |
| 65 | + <button aria-label="empty storage" class="btn btn-dark w-100 text-center" on:click={refresh}><i class="fa-solid fa-arrows-rotate"></i></button> |
55 | 66 | </div> |
56 | | - <div class="col-4 col-lg-4 col-md-4 col-sm-4"> |
| 67 | + <div class="col-3 col-lg-2 col-md-2 col-sm-2"> |
57 | 68 | <button aria-label="home" class="btn btn-dark w-100" on:click={() => navigateTo("/Home")}><i class="fa-solid fa-house"></i></button> |
58 | 69 | </div> |
| 70 | + <div class="col-3 col-lg-2 col-md-2 col-sm-2"> |
| 71 | + <button aria-label="home" class="btn btn-dark w-100" on:click={() => navigateTo("/Settings")}><i class="fa-solid fa-gear"></i></button> |
| 72 | + </div> |
59 | 73 | </div> |
60 | 74 | </footer> |
61 | 75 | </div> |
|
70 | 84 | flex-direction: column; |
71 | 85 | height: 100vh; |
72 | 86 | width: 100vw; |
73 | | - background-color: #121212; |
| 87 | + background-color: #1e1e1e; |
74 | 88 | } |
75 | 89 |
|
76 | 90 | .bottom-bar button { |
77 | | - font-size: 1.2rem; |
| 91 | + font-size: 0.6rem; |
78 | 92 | max-height: 3rem; |
79 | 93 | border: none !important; |
80 | 94 | } |
81 | | -
|
82 | | - .top-bar { |
83 | | - flex: 0 0 auto; |
84 | | - padding: 1rem; |
85 | | - position: sticky; |
86 | | - height: 3.5rem; |
87 | | - top: 0; |
88 | | - z-index: 10; |
89 | | - text-align: center; |
90 | | - border-bottom: 0.2rem solid #1CC558; |
91 | | - border-bottom-left-radius: 1.5rem; |
92 | | - border-bottom-right-radius: 1.5rem; |
| 95 | + .top-bar-title { |
| 96 | + font-size: 1.3rem; |
| 97 | + font-weight: bold; |
| 98 | + color: #b3b3b3; |
93 | 99 | } |
94 | 100 |
|
95 | 101 | .scrollable-content { |
96 | 102 | flex: 1 1 auto; |
97 | 103 | overflow-y: auto; |
98 | 104 | -webkit-overflow-scrolling: touch; |
99 | 105 | padding: 1rem 1rem 3rem; /* 👈 Important: bottom padding to make space for bottom bar */ |
100 | | - background-color: #121212; |
101 | 106 | } |
102 | 107 |
|
103 | 108 | .bottom-bar { |
|
108 | 113 | z-index: 10; |
109 | 114 | display: flex; |
110 | 115 | justify-content: center; |
111 | | - border-top: 0.2rem solid #1CC558; |
112 | | - border-top-left-radius: 1.5rem; |
113 | | - border-top-right-radius: 1.5rem; |
114 | | - height: 3.8rem; /* Optional: define fixed height if needed for padding calc */ |
| 116 | + border-top: 0.1rem solid #867878; |
| 117 | + background-color: unset; |
| 118 | + height: 3.2rem; /* Optional: define fixed height if needed for padding calc */ |
115 | 119 | } |
116 | 120 |
|
117 | 121 | .bottom-bar button { |
118 | 122 | font-weight: bolder; |
119 | | - border: 0.1rem solid #1CC558 !important; |
120 | | - background-color: #343a40 !important; |
| 123 | + background-color: #2c2c2c !important; |
121 | 124 | } |
122 | 125 | </style> |
0 commit comments