Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions core/design-system/src/main/res/drawable/join_waiting.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="60dp"
android:height="60dp"
android:viewportWidth="60"
android:viewportHeight="60">
android:width="26dp"
android:height="24dp"
android:viewportWidth="26"
android:viewportHeight="24">
<path
android:pathData="M30,30m-30,0a30,30 0,1 1,60 0a30,30 0,1 1,-60 0"
android:fillColor="#FFA927"/>
<path
android:pathData="M33.5,38.316C34.495,38.605 35.526,38.751 36.563,38.75C38.229,38.752 39.874,38.372 41.37,37.639C41.415,36.594 41.117,35.562 40.522,34.701C39.927,33.84 39.068,33.196 38.074,32.867C37.081,32.538 36.007,32.542 35.016,32.879C34.025,33.215 33.17,33.865 32.582,34.731M33.5,38.316V38.313C33.5,37.014 33.166,35.792 32.582,34.731M33.5,38.316V38.44C31.255,39.792 28.682,40.504 26.061,40.5C23.342,40.5 20.797,39.748 18.625,38.44L18.624,38.313C18.623,36.661 19.172,35.056 20.184,33.751C21.196,32.446 22.613,31.515 24.213,31.104C25.812,30.694 27.503,30.827 29.018,31.484C30.534,32.141 31.787,33.283 32.582,34.731M30,23.438C30,24.482 29.585,25.483 28.847,26.222C28.108,26.96 27.107,27.375 26.063,27.375C25.018,27.375 24.017,26.96 23.278,26.222C22.54,25.483 22.125,24.482 22.125,23.438C22.125,22.393 22.54,21.392 23.278,20.653C24.017,19.915 25.018,19.5 26.063,19.5C27.107,19.5 28.108,19.915 28.847,20.653C29.585,21.392 30,22.393 30,23.438ZM39.625,26.063C39.625,26.875 39.302,27.654 38.728,28.228C38.154,28.802 37.375,29.125 36.563,29.125C35.75,29.125 34.971,28.802 34.397,28.228C33.823,27.654 33.5,26.875 33.5,26.063C33.5,25.25 33.823,24.471 34.397,23.897C34.971,23.323 35.75,23 36.563,23C37.375,23 38.154,23.323 38.728,23.897C39.302,24.471 39.625,25.25 39.625,26.063Z"
android:pathData="M16.5,20.316C17.495,20.605 18.526,20.751 19.563,20.75C21.229,20.752 22.874,20.372 24.37,19.639C24.415,18.594 24.117,17.562 23.522,16.701C22.927,15.84 22.068,15.196 21.074,14.867C20.08,14.538 19.007,14.542 18.016,14.879C17.025,15.215 16.17,15.865 15.582,16.731M16.5,20.316V20.313C16.5,19.014 16.166,17.792 15.582,16.731M16.5,20.316V20.44C14.255,21.792 11.682,22.504 9.061,22.5C6.342,22.5 3.797,21.747 1.625,20.44L1.624,20.313C1.623,18.661 2.172,17.056 3.184,15.751C4.196,14.446 5.613,13.515 7.213,13.104C8.812,12.694 10.503,12.828 12.018,13.484C13.534,14.141 14.787,15.283 15.582,16.731M13,5.438C13,6.482 12.585,7.483 11.847,8.222C11.108,8.96 10.107,9.375 9.063,9.375C8.018,9.375 7.017,8.96 6.278,8.222C5.54,7.483 5.125,6.482 5.125,5.438C5.125,4.393 5.54,3.392 6.278,2.653C7.017,1.915 8.018,1.5 9.063,1.5C10.107,1.5 11.108,1.915 11.847,2.653C12.585,3.392 13,4.393 13,5.438ZM22.625,8.063C22.625,8.875 22.302,9.654 21.728,10.228C21.154,10.802 20.375,11.125 19.563,11.125C18.75,11.125 17.971,10.802 17.397,10.228C16.823,9.654 16.5,8.875 16.5,8.063C16.5,7.25 16.823,6.471 17.397,5.897C17.971,5.323 18.75,5 19.563,5C20.375,5 21.154,5.323 21.728,5.897C22.302,6.471 22.625,7.25 22.625,8.063Z"
android:strokeLineJoin="round"
android:strokeWidth="1.5"
android:fillColor="#00000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,15 @@ private fun MainPageScreen(
}
}
Box(modifier = Modifier.align(alignment = Alignment.BottomEnd)) {
JoinWaitingButton(
modifier = modifier.padding(bottom = 96.dp, end = 8.dp),
onClick = { openDialog = true }
)
when (role) {
Authority.ROLE_STUDENT -> {}
Authority.ROLE_TEACHER -> {
JoinWaitingButton(
modifier = modifier.padding(bottom = 96.dp, end = 16.dp),
onClick = { openDialog = true },
)
}
}
}
Box(
modifier = Modifier.align(alignment = Alignment.BottomCenter),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
package com.stackknowledge.main.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.stackknowledge.design_system.R
import com.stackknowledge.design_system.theme.StackKnowledgeAndroidTheme

@Composable
fun JoinWaitingButton(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Image(
painter = painterResource(R.drawable.join_waiting),
contentDescription = "Join Waiting Button",
modifier = modifier
.width(60.dp)
.height(60.dp)
.clickable(onClick = onClick)
)

StackKnowledgeAndroidTheme { colors, _ ->
FloatingActionButton(
modifier = modifier,
onClick = onClick,
shape = CircleShape,
containerColor = colors.P1,
) {
Icon(
painter = painterResource(id = R.drawable.join_waiting),
contentDescription = "Join Waiting Button",
tint = Color.Unspecified
)
}
}
}

@Preview
Expand Down