Skip to content

Commit

Permalink
[feat] #62 init upload screens
Browse files Browse the repository at this point in the history
  • Loading branch information
lsakee committed Jul 10, 2024
1 parent 0336ac2 commit 4999452
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum class MainNavTab(
UPLOAD(
iconId = R.drawable.ic_launcher_background,
titleId = R.string.app_name,
route = UploadRoute.route,
route = UploadRoute.ROUTE,
),
VIDEO(
iconId = R.drawable.ic_launcher_background,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package com.record.upload

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import com.record.designsystem.component.button.RecordyButton
import com.record.designsystem.component.navbar.TopNavigationBar
import com.record.designsystem.theme.Background
import com.record.designsystem.theme.Gray03
import com.record.designsystem.theme.RecordyTheme
@Composable
fun CompletedUploadRoute(
paddingValues: PaddingValues,
){
CompletedUploadScreen()
}
@Composable
fun CompletedUploadScreen() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Background),
) {
Column(
modifier = Modifier
.align(Alignment.TopCenter),
) {
TopNavigationBar(title = "영상 선택", enableGradation = true)
Text(
text = "ⓘ 최대 1분의 1080p 영상을 올려주세요.4",
color = Gray03,
style = RecordyTheme.typography.caption2,
maxLines = 1,
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
)
}
RecordyButton(
modifier = Modifier.align(Alignment.BottomCenter),
text = "다음",
enabled = true,
onClick = { /*TODO*/ },
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.record.upload

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import com.record.designsystem.component.button.RecordyButton
import com.record.designsystem.component.navbar.TopNavigationBar
import com.record.designsystem.theme.Background
import com.record.designsystem.theme.Gray03
import com.record.designsystem.theme.RecordyTheme
@Composable
fun DefinedContentRoute(
paddingValues: PaddingValues,
navigateCompletedUpload: () -> Unit,
){
DefinedContentScreen()
}
@Composable
fun DefinedContentScreen() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Background),
) {
Column(
modifier = Modifier
.align(Alignment.TopCenter),
) {
TopNavigationBar(title = "영상 선택", enableGradation = true)
Text(
text = "ⓘ 최대 1분의 1080p 영상을 올려주세요.2",
color = Gray03,
style = RecordyTheme.typography.caption2,
maxLines = 1,
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
)
}
RecordyButton(
modifier = Modifier.align(Alignment.BottomCenter),
text = "다음",
enabled = true,
onClick = { /*TODO*/ },
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package com.record.upload

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextAlign
import com.record.designsystem.component.button.RecordyButton
import com.record.designsystem.component.navbar.TopNavigationBar
import com.record.designsystem.theme.Background
import com.record.designsystem.theme.Gray03
import com.record.designsystem.theme.RecordyTheme
@Composable
fun SelectedKeywordRoute(
paddingValues: PaddingValues,
navigateDefinedContent: () -> Unit,
){
SelectedKeywordScreen()
}
@Composable
fun SelectedKeywordScreen() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Background),
) {
Column(
modifier = Modifier
.align(Alignment.TopCenter),
) {
TopNavigationBar(title = "영상 선택", enableGradation = true)
Text(
text = "ⓘ 최대 1분의 1080p 영상을 올려주세요.1",
color = Gray03,
style = RecordyTheme.typography.caption2,
maxLines = 1,
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
)
}
RecordyButton(
modifier = Modifier.align(Alignment.BottomCenter),
text = "다음",
enabled = true,
onClick = { /*TODO*/ },
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.record.upload
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.Text
Expand All @@ -16,6 +17,13 @@ import com.record.designsystem.theme.Background
import com.record.designsystem.theme.Gray03
import com.record.designsystem.theme.RecordyTheme

@Composable
fun VideoPickerRoute(
paddingValues: PaddingValues,
navigateSelectedKeyword: () -> Unit,
){
VideoPickerScreen()
}
@Composable
fun VideoPickerScreen() {
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,50 @@ import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.record.upload.VideoPickerScreen
import com.record.upload.CompletedUploadRoute
import com.record.upload.DefinedContentRoute
import com.record.upload.SelectedKeywordRoute
import com.record.upload.VideoPickerRoute

fun NavController.navigateUpload(navOptions: NavOptions) {
navigate(UploadRoute.route, navOptions)
navigate(UploadRoute.ROUTE, navOptions)
}

fun NavGraphBuilder.uploadNavGraph(
padding: PaddingValues,
modifier: Modifier = Modifier,
navigateSelectedKeyword: () -> Unit,
navigateDefinedContent: () -> Unit,
navigateCompletedUpload: () -> Unit,
) {
composable(route = UploadRoute.route) {
VideoPickerScreen()
composable(route = UploadRoute.ROUTE) {
VideoPickerRoute(
paddingValues = padding,
navigateSelectedKeyword = navigateSelectedKeyword
)
}
composable(route = UploadRoute.SELECTED_KEYWORD) {
SelectedKeywordRoute(
paddingValues = padding,
navigateDefinedContent = navigateDefinedContent
)
}
composable(route = UploadRoute.DEFINED_CONTENT) {
DefinedContentRoute(
paddingValues = padding,
navigateCompletedUpload=navigateCompletedUpload
)
}
composable(route = UploadRoute.COMPLETED_UPLOAD) {
CompletedUploadRoute(
paddingValues = padding
)
}
}

object UploadRoute {
const val route = "upload"
const val ROUTE = "upload"
const val SELECTED_KEYWORD = "selected-keyword"
const val DEFINED_CONTENT = "defined-content"
const val COMPLETED_UPLOAD = "completed-upload"
}

0 comments on commit 4999452

Please sign in to comment.