From 05a5d941afe91abb8d7751efc9abae27afca71db Mon Sep 17 00:00:00 2001 From: Franck G Date: Sun, 19 Nov 2023 23:24:48 +0100 Subject: [PATCH 1/2] fix(MusicCardInfo): close #83 --- .../contexts_menu/MusicCardInfo.tsx | 61 +++++++++---------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/src/components/contexts_menu/MusicCardInfo.tsx b/src/components/contexts_menu/MusicCardInfo.tsx index f063a9a..049d56c 100644 --- a/src/components/contexts_menu/MusicCardInfo.tsx +++ b/src/components/contexts_menu/MusicCardInfo.tsx @@ -12,38 +12,35 @@ export function MusicCardInfo({ audio }: { audio: Audio }) {

Information

- -
- Album cover -
-

{audio.title}

-
- -

{audio.artist}

-
-
- -

- {format_duration(audio.duration)} -

-
-
- -

- {audio.path.substring(0, audio.path.lastIndexOf("/"))} -

-
+ + Album cover +
+

+ {audio.title} +

+
+ +

+ {audio.artist} +

+
+
+ +

+ {format_duration(audio.duration)} +

+
+
+ +

+ {audio.path.substring(0, audio.path.lastIndexOf("\\"))} +

From 5894ca003aabd5110e996c9b61bd88499f3751e9 Mon Sep 17 00:00:00 2001 From: Siirko Date: Sun, 19 Nov 2023 23:32:16 +0100 Subject: [PATCH 2/2] fix path for linux and windows --- src/components/contexts_menu/MusicCardInfo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/contexts_menu/MusicCardInfo.tsx b/src/components/contexts_menu/MusicCardInfo.tsx index 049d56c..ca571fa 100644 --- a/src/components/contexts_menu/MusicCardInfo.tsx +++ b/src/components/contexts_menu/MusicCardInfo.tsx @@ -39,7 +39,7 @@ export function MusicCardInfo({ audio }: { audio: Audio }) {

- {audio.path.substring(0, audio.path.lastIndexOf("\\"))} + {audio.path.replace(/[/\\][^/\\]*$/, "")}