From ecd2051ff402dc000cbd6eb2b21b569f632a7206 Mon Sep 17 00:00:00 2001 From: CXwudi Date: Tue, 28 Nov 2023 13:53:32 -0500 Subject: [PATCH] :art: Added RealResultPanel in MainScreen for testing This commit introduces a RealResultPanel component in the MainScreen.kt file. The purpose is to visually test the overall layout and data rendering of the application using mock data. This change is particularly helpful for front-end software developers who need to adjust CSS/SCSS or graphics files based on actual visual output. --- .../cx/songfinder/ui/component/MainScreen.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/songfinder-app/src/main/kotlin/mikufan/cx/songfinder/ui/component/MainScreen.kt b/songfinder-app/src/main/kotlin/mikufan/cx/songfinder/ui/component/MainScreen.kt index 2e61935..0548506 100644 --- a/songfinder-app/src/main/kotlin/mikufan/cx/songfinder/ui/component/MainScreen.kt +++ b/songfinder-app/src/main/kotlin/mikufan/cx/songfinder/ui/component/MainScreen.kt @@ -6,11 +6,17 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.compose.runtime.mutableStateOf import mikufan.cx.songfinder.backend.controller.MainScreenController +import mikufan.cx.songfinder.backend.db.entity.PvService +import mikufan.cx.songfinder.backend.db.entity.PvType +import mikufan.cx.songfinder.backend.db.entity.SongType +import mikufan.cx.songfinder.backend.model.PVInfo +import mikufan.cx.songfinder.backend.model.SongSearchResult import mikufan.cx.songfinder.backend.statemodel.SearchStatus import mikufan.cx.songfinder.getSpringBean import mikufan.cx.songfinder.ui.common.ColumnCentralizedWithSpacing import mikufan.cx.songfinder.ui.component.mainpage.* import mikufan.cx.songfinder.ui.theme.MyAppThemeWithSurface +import java.time.LocalDateTime @Composable fun MainScreen() { @@ -49,6 +55,25 @@ fun PreviewMainScreen() { {}, ) ) + RealResultPanel( + listOf( + SongSearchResult( + id = 123L, + title = "title", + type = SongType.Original, + vocals = listOf("vocal1", "vocal2"), + producers = listOf("producer1", "producer2"), + publishDate = LocalDateTime.now(), + pvs = listOf( + PVInfo( + id = "sm123", + pvService = PvService.NicoNicoDouga, + pvType = PvType.Original, + ) + ) + ) + ) + ) } } } \ No newline at end of file