Skip to content

Commit ffa6e91

Browse files
author
NellowTCS
committed
Movement
1 parent 88690dd commit ffa6e91

File tree

112 files changed

+312
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+312
-140
lines changed

Build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<link href="./src/global.css" rel="stylesheet" />
4747
<!-- Default theme loaded first for instant styling and first load -->
4848
<link
49-
href="./src/themes/Themes/Blue/Blue.theme.css"
49+
href="./src/ui/resources/themes/Palettes/Blue/Blue.theme.css"
5050
rel="stylesheet"
5151
id="theme-link"
5252
/>

Build/src/components/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React, {
77
memo,
88
} from "react";
99
import { useTranslation } from "react-i18next";
10-
import { useIconRegistry } from "../helpers/iconLoader";
10+
import { useIconRegistry } from "../ui/iconLoader";
1111
import type { IconLookupOptions, ResolvedIcon } from "../types/icons";
1212

1313
interface IconFallbackState {

Build/src/components/Miniplayer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { createRoot } from "react-dom/client";
22
import { useTranslation } from "react-i18next";
33
import { Button } from "./Button";
44
import { Icon } from "./Icon";
5-
import { getCurrentThemeCSS } from "../helpers/themeMode";
5+
import { getCurrentThemeCSS } from "../ui/themeMode";
66
import styles from "./Miniplayer.module.css";
77
import { useAudioStore } from "../contexts/audioStore";
8-
import { IconRegistryProvider } from "../helpers/iconLoader";
8+
import { IconRegistryProvider } from "../ui/iconLoader";
99

1010
interface MiniplayerControls {
1111
togglePlayPause: () => void;

Build/src/components/Settings.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import {
2020
import { ThemeModeSwitch } from "./ThemeModeSwitch";
2121
import { ShortcutConfig } from "./ShortcutConfig";
2222
import styles from "./Settings.module.css";
23-
import { useThemeLoader } from "../helpers/themeLoader";
24-
import { useIconRegistry } from "../helpers/iconLoader";
25-
import { useWallpaperLoader } from "../helpers/wallpaperLoader";
23+
import { useThemeLoader } from "../ui/themeLoader";
24+
import { useIconRegistry } from "../ui/iconLoader";
25+
import { useWallpaperLoader } from "../ui/wallpaperLoader";
2626
import { toast } from "sonner";
2727
import { useRef, useState, useEffect, JSX } from "react";
2828
import { useTranslation } from "react-i18next";

Build/src/components/ThemeModeSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
switchToDarkMode,
1313
switchToLightMode,
1414
switchToAutoMode,
15-
} from "../helpers/themeMode";
15+
} from "../ui/themeMode";
1616
import styles from "./ThemeModeSwitch.module.css";
1717

1818
export interface ThemeModeSwitchProps {

Build/src/components/Wallpaper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Suspense, useEffect, useRef } from "react";
2-
import { useWallpaperLoader } from "../helpers/wallpaperLoader";
2+
import { useWallpaperLoader } from "../ui/wallpaperLoader";
33

44
// WallpaperRenderer Component
55
interface WallpaperRendererProps {

Build/src/core/engine/engine.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,15 @@ export class KomorebiEngine {
130130

131131
this.stateMachine.transition("loading");
132132
this.currentError = null;
133+
this.events.emit("loading", { track });
133134

134135
this.backend
135136
.load(track.url)
136137
.then(() => {
137138
this.duration = this.backend?.getDuration() ?? track.duration;
138139
this.stateMachine.transition("ready");
140+
this.events.emit("durationchange", { duration: this.duration });
141+
this.events.emit("ready", { track });
139142
this.emitStateChange();
140143
})
141144
.catch((error) => {

Build/src/core/engine/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,26 @@ export type EngineEvent =
127127
| "statechange"
128128
| "trackchange"
129129
| "timeupdate"
130+
| "durationchange"
130131
| "volumechange"
131132
| "queuechange"
132133
| "settingschange"
133134
| "ended"
135+
| "loading"
136+
| "ready"
134137
| "error";
135138

136139
export interface EngineEventMap {
137140
statechange: { oldState: PlayerState; newState: PlayerState };
138141
trackchange: { from: Track | null; to: Track | null };
139142
timeupdate: { currentTime: number; duration: number };
143+
durationchange: { duration: number };
140144
volumechange: { volume: number };
141145
queuechange: { queue: QueueState };
142146
settingschange: { settings: Partial<EngineSettings> };
143147
ended: { track: Track };
148+
loading: { track: Track };
149+
ready: { track: Track };
144150
error: { error: EngineError };
145151
}
146152

Build/src/helpers/audioProcessor.ts

Lines changed: 0 additions & 102 deletions
This file was deleted.

Build/src/helpers/filePickerHelper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import ReactDOM from "react-dom/client";
1515
import { useTranslation } from "react-i18next";
1616
import i18n from "i18next";
17-
import { IconRegistryProvider } from "./iconLoader";
17+
import { IconRegistryProvider } from "../ui/iconLoader";
1818
import { importAudioFiles } from "./importAudioFiles";
1919

2020
// Extend Window interface for File Handling API

0 commit comments

Comments
 (0)