Skip to content

Commit

Permalink
app icon and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
prapooskur committed Jan 21, 2024
1 parent 31c5ec4 commit 9ff990d
Show file tree
Hide file tree
Showing 18 changed files with 578 additions and 37 deletions.
Binary file added android/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions android/app/src/main/java/com/pras/slugcourses/ChatScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private const val TAG = "ChatScreen"
fun ChatScreen() {
Log.d(TAG, "ChatScreen")
//todo pls fix
val message = remember { mutableStateOf("What classes should i take if i want to learn about machine learning?") }
val message = remember { mutableStateOf("") }
val sendMessage = remember { mutableStateOf(false) }
val response = remember { mutableStateOf("") }
// user-facing chat list: contains user input and system responses
Expand Down Expand Up @@ -218,7 +218,8 @@ fun ChatMessageBar(input: MutableState<String>, sendMessage: MutableState<Boolea
onValueChange = { input.value = it },
singleLine = false,
maxLines = 3,
shape = RoundedCornerShape(16.dp)
shape = RoundedCornerShape(16.dp),
placeholder = { Text("Type a message...") },
)
Button(
modifier = Modifier
Expand Down
23 changes: 23 additions & 0 deletions android/app/src/main/java/com/pras/slugcourses/HomeScreen.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.pras.slugcourses

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SearchBar
import androidx.compose.material3.Text
Expand Down Expand Up @@ -87,6 +91,25 @@ fun HomeScreen(navController: NavController = rememberNavController()) {
onQueryChange = { searchText = it },
active = false,
onActiveChange = { searchActive = it },
placeholder = { Text("Search for classes...") },
trailingIcon = { Icon(Icons.Default.Search, contentDescription = "Search icon", modifier = Modifier.clickable {
if(searchText.isEmpty()) {
searchText = " "
}

//val snapshotListSerializer = SnapshotListSerializer(String.serializer())
val status = Json.encodeToString(Status.ALL)
val classType: List<Type> = selectedTimeList.map { Type.valueOf(it.replace(" ","_").uppercase()) }
val encodedType = Json.encodeToString(classType)
val geList = Json.encodeToString(selectedGenEdList.toList())
val searchType = when (selectedStatusIndex) {
0 -> "Open"
else -> "All"
}
navController.navigate(
"results/${termMap[termChosen.value]}/${searchText}/${status}/${encodedType}/${geList}/${searchType}"
)
}) },
onSearch = {
if(searchText.isEmpty()) {
searchText = " "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ suspend fun supabaseQuery(
eq("status", "Open")
}
if(department.isNotBlank()) {
eq("department", department.uppercase())
eq("department", department.lowercase().uppercase())
}
if(courseNumber.isNotBlank()) {
eq("course_number", courseNumber.uppercase())
eq("course_number", courseNumber.lowercase().uppercase())
}
if(query.isNotBlank()) {
textSearch(
Expand Down
569 changes: 542 additions & 27 deletions android/app/src/main/res/drawable/ic_launcher_foreground.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#4F8490</color>
</resources>

0 comments on commit 9ff990d

Please sign in to comment.