commit dea88084b7fb03da6772680e92f34ed9755afc93 Author: Craig Everett Date: Mon Aug 17 18:32:40 2026 +0900 WIP: non-working init diff --git a/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/task.artifact.md b/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/task.artifact.md new file mode 100644 index 0000000..7fec665 --- /dev/null +++ b/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/task.artifact.md @@ -0,0 +1,20 @@ +- [x] Task 1: Define Colors and Theme +- [x] Task 2: Create Initial Reusable Components +- [x] Task 3: Implement Initial Screens (Splash, Onboarding) +- [ ] Task 4: Complete Wallet Setup Flow + - [ ] Add `MnemonicDisplayScreen` (24-word grid) + - [ ] Add `MnemonicVerifyScreen` (Verification challenge) + - [ ] Add `MnemonicInputScreen` (Recovery input) + - [ ] Add `SetupSuccessScreen` (Reusable success layout) +- [ ] Task 5: Implement Transaction Flow + - [ ] Add `SendFormScreen` (Amount, Address, Dropdowns) + - [ ] Add `SendReviewScreen` (Confirmation) + - [ ] Add `QRScannerScreen` (Scanning mockup) + - [ ] Add `QRReceiveScreen` (QR display) +- [ ] Task 6: Implement Management & Settings + - [ ] Add `SettingsScreen` (Biometrics toggle) + - [ ] Add `ManageOverviewScreen` (Wallets/Accounts list) + - [ ] Add `WalletDetailScreen` and `AccountDetailScreen` + - [ ] Add `DeleteConfirmationScreen` + - [ ] Add `ExplorerScreen` (Placeholder for Transactions) +- [ ] Task 7: Update Router in MainActivity diff --git a/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/walkthrough.artifact.md b/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/walkthrough.artifact.md new file mode 100644 index 0000000..5c58c22 --- /dev/null +++ b/.artifacts/b3cb996b-7f1f-4810-999d-5be96c526f74/walkthrough.artifact.md @@ -0,0 +1,30 @@ +# Walkthrough - Edge-to-Edge Layout Fixes + +I have implemented comprehensive edge-to-edge layout support across the GajuMobile wallet. This ensures that UI elements, particularly bottom action buttons, are correctly positioned above system software navigation bars and below the status bar, preventing any awkward overlap on modern Android devices. + +## Changes Made + +### [core] +- **[MODIFY] [MainActivity.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/MainActivity.kt):** Disabled `isNavigationBarContrastEnforced` to allow the app's custom theme and backgrounds to flow seamlessly into the system navigation area. + +### [ui-components] +- **[MODIFY] [GajuComponents.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/components/GajuComponents.kt):** + - Updated `GajuBottomNavigation` to use `windowInsetsPadding(WindowInsets.navigationBars)`, ensuring the navigation icons stay above the system buttons. + - Refactored `SuccessLayout` to use a proper `Scaffold` with a fixed `bottomBar` for action buttons, utilizing `innerPadding` for the main scrollable content. + +### [ui-screens] +- **[OnboardingFlow.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/screens/OnboardingFlow.kt) & [SplashScreen.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/screens/SplashScreen.kt):** Applied `safeDrawingPadding()` to top-level containers to keep branding and buttons within the safe viewport. +- **[WalletSetupScreens.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/screens/WalletSetupScreens.kt), [TransactionScreens.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/screens/TransactionScreens.kt), & [ManagementScreens.kt](file:///home/ceverett/vcs/android/MyApplication/app/src/main/java/swiss/qpq/gajumobile/ui/screens/ManagementScreens.kt):** + - Refactored screens with bottom buttons (e.g., Mnemonic Grid, Send Form, Manage Detail) to use `Scaffold`. + - Moved action buttons into the `bottomBar` slot, ensuring they are fixed and correctly spaced above system navigation. + - Wrapped middle content in `verticalScroll` and applied `innerPadding`, allowing long lists (like the 24-word recovery grid) to scroll properly without being cut off. + +## Layout Improvements +- **Fixed Overlap:** Critical buttons like "CONTINUE", "NEXT", and "SEND" are now guaranteed to be tappable and visible above software buttons. +- **Scrolling Robustness:** Long forms and lists now utilize the full height of the screen, scrolling behind the transparent system bars while maintaining clear interaction boundaries. + +## Verification Results + +### Build & Deploy +- Successfully executed `./gradlew assembleDebug`. +- Verified in Compose Preview that the `bottomBar` correctly accounts for system insets in both Dark and Light modes. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..ee21552 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +GajuMobile \ No newline at end of file diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b86273d --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..b49fb06 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/deviceManager.xml b/.idea/deviceManager.xml new file mode 100644 index 0000000..91f9558 --- /dev/null +++ b/.idea/deviceManager.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..02c4aa5 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..7061a0d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,61 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..a599984 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/planningMode.xml b/.idea/planningMode.xml new file mode 100644 index 0000000..b5ff7b5 --- /dev/null +++ b/.idea/planningMode.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/TestGajuFormat.class b/TestGajuFormat.class new file mode 100644 index 0000000..3b5d62c Binary files /dev/null and b/TestGajuFormat.class differ diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..fd25772 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,57 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.compose) +} + +android { + namespace = "swiss.qpq.gajumobile" + compileSdk { + version = release(36) { + minorApiLevel = 1 + } + } + + defaultConfig { + applicationId = "swiss.qpq.gajumobile" + minSdk = 34 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + optimization { + enable = false + } + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + buildFeatures { + compose = true + } +} + +dependencies { + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.compose.material3) + implementation(libs.androidx.compose.material3.adaptive.navigation.suite) + implementation(libs.androidx.compose.ui) + implementation(libs.androidx.compose.ui.graphics) + implementation(libs.androidx.compose.ui.tooling.preview) + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + testImplementation(libs.junit) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.compose.ui.test.junit4) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(libs.androidx.junit) + debugImplementation(libs.androidx.compose.ui.test.manifest) + debugImplementation(libs.androidx.compose.ui.tooling) +} \ No newline at end of file diff --git a/app/src/androidTest/java/swiss/qpq/gajumobile/ExampleInstrumentedTest.kt b/app/src/androidTest/java/swiss/qpq/gajumobile/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..25dfabc --- /dev/null +++ b/app/src/androidTest/java/swiss/qpq/gajumobile/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package swiss.qpq.gajumobile + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("swiss.qpq.gajumobile", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7551a7d --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/swiss/qpq/gajumobile/MainActivity.kt b/app/src/main/java/swiss/qpq/gajumobile/MainActivity.kt new file mode 100644 index 0000000..e2a3071 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/MainActivity.kt @@ -0,0 +1,223 @@ +package swiss.qpq.gajumobile + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.runtime.* +import androidx.compose.runtime.saveable.rememberSaveable +import swiss.qpq.gajumobile.ui.screens.* +import swiss.qpq.gajumobile.ui.theme.MyApplicationTheme + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + enableEdgeToEdge() + window.isNavigationBarContrastEnforced = false + setContent { + MyApplicationTheme { + GajuRouter() + } + } + } +} + +enum class Screen { + SPLASH, + ONBOARDING_CONTINUE, + BIOMETRICS_PROMPT, + SETUP_CHOICE, + CREATE_MNEMONIC, + MNEMONIC_GRID, + MNEMONIC_VERIFY, + RECOVER_MNEMONIC, + SETUP_SUCCESS, + DASHBOARD, + QR_SCANNER, + QR_RECEIVE, + SEND_FORM, + SEND_REVIEW, + SEND_SUCCESS, + SETTINGS, + MANAGE_OVERVIEW, + MANAGE_WALLET, + MANAGE_ACCOUNT, + DELETE_CONFIRM, + EXPLORER +} + +@Composable +fun GajuRouter() { + var currentScreen by rememberSaveable { mutableStateOf(value = Screen.SPLASH) } + var setupRecovered by rememberSaveable { mutableStateOf(value = false) } + var selectedWallet by rememberSaveable { mutableStateOf(value = "Primary") } + var selectedAccount by rememberSaveable { mutableStateOf(value = "Daily") } + var deleteType by rememberSaveable { mutableStateOf(value = "WALLET") } + var deleteName by rememberSaveable { mutableStateOf(value = "") } + + when (currentScreen) { + Screen.SPLASH -> { + SplashScreen { currentScreen = Screen.ONBOARDING_CONTINUE } + } + Screen.ONBOARDING_CONTINUE -> { + WelcomeContinueScreen { currentScreen = Screen.BIOMETRICS_PROMPT } + } + Screen.BIOMETRICS_PROMPT -> { + BiometricsPromptScreen( + onYes = { currentScreen = Screen.SETUP_CHOICE }, + ) { currentScreen = Screen.SETUP_CHOICE } + } + Screen.SETUP_CHOICE -> { + SetupChoiceScreen( + onCreate = { + setupRecovered = false + currentScreen = Screen.CREATE_MNEMONIC + }, + ) { + setupRecovered = true + currentScreen = Screen.RECOVER_MNEMONIC + } + } + Screen.CREATE_MNEMONIC -> { + CreateAccountMnemonicScreen( + onNext = { currentScreen = Screen.MNEMONIC_GRID }, + ) { currentScreen = Screen.SETUP_CHOICE } + } + Screen.MNEMONIC_GRID -> { + MnemonicGridScreen( + onNext = { currentScreen = Screen.MNEMONIC_VERIFY }, + ) { currentScreen = Screen.CREATE_MNEMONIC } + } + Screen.MNEMONIC_VERIFY -> { + MnemonicVerifyScreen( + onFinish = { currentScreen = Screen.SETUP_SUCCESS }, + ) { currentScreen = Screen.MNEMONIC_GRID } + } + Screen.RECOVER_MNEMONIC -> { + RecoverMnemonicScreen( + onRecover = { currentScreen = Screen.SETUP_SUCCESS }, + ) { currentScreen = Screen.SETUP_CHOICE } + } + Screen.SETUP_SUCCESS -> { + SetupSuccessScreen( + isRecovered = setupRecovered, + onProceed = { currentScreen = Screen.DASHBOARD }, + ) + } + Screen.DASHBOARD -> { + DashboardScreen( + onSend = { currentScreen = Screen.QR_SCANNER }, + onReceive = { currentScreen = Screen.QR_RECEIVE }, + onNavigate = { dest -> + currentScreen = when (dest) { + "settings" -> Screen.SETTINGS + "manage" -> Screen.MANAGE_OVERVIEW + "transactions" -> Screen.EXPLORER + else -> Screen.DASHBOARD + } + }, + ) + } + Screen.QR_SCANNER -> { + QRScannerScreen( + onGenerate = { currentScreen = Screen.QR_RECEIVE }, + onUpload = { /* TODO */ }, + ) { currentScreen = Screen.DASHBOARD } + } + Screen.QR_RECEIVE -> { + QRReceiveScreen( + onDone = { currentScreen = Screen.DASHBOARD }, + ) { currentScreen = Screen.DASHBOARD } + } + Screen.SEND_FORM -> { + SendFormScreen( + onReview = { currentScreen = Screen.SEND_REVIEW }, + ) { currentScreen = Screen.DASHBOARD } + } + Screen.SEND_REVIEW -> { + SendReviewScreen( + onSend = { currentScreen = Screen.SEND_SUCCESS }, + ) { currentScreen = Screen.SEND_FORM } + } + Screen.SEND_SUCCESS -> { + TransactionSuccessScreen { currentScreen = Screen.DASHBOARD } + } + Screen.SETTINGS -> { + SettingsScreen( + onNavigate = { dest -> + currentScreen = when (dest) { + "dashboard" -> Screen.DASHBOARD + "manage" -> Screen.MANAGE_OVERVIEW + "transactions" -> Screen.EXPLORER + else -> Screen.SETTINGS + } + }, + onBack = { currentScreen = Screen.DASHBOARD }, + ) + } + Screen.MANAGE_OVERVIEW -> { + ManageOverviewScreen( + onWalletDetail = { + selectedWallet = it + currentScreen = Screen.MANAGE_WALLET + }, + onAccountDetail = { + selectedAccount = it + currentScreen = Screen.MANAGE_ACCOUNT + }, + onNavigate = { dest -> + currentScreen = when (dest) { + "dashboard" -> Screen.DASHBOARD + "settings" -> Screen.SETTINGS + "transactions" -> Screen.EXPLORER + else -> Screen.MANAGE_OVERVIEW + } + }, + ) + } + Screen.MANAGE_WALLET -> { + ManageWalletScreen( + walletName = selectedWallet, + onDelete = { + deleteType = "WALLET" + deleteName = selectedWallet + currentScreen = Screen.DELETE_CONFIRM + }, + onBack = { currentScreen = Screen.MANAGE_OVERVIEW }, + ) + } + Screen.MANAGE_ACCOUNT -> { + ManageAccountScreen( + accountName = selectedAccount, + walletName = selectedWallet, + onDelete = { + deleteType = "ACCOUNT" + deleteName = selectedAccount + currentScreen = Screen.DELETE_CONFIRM + }, + onBack = { currentScreen = Screen.MANAGE_OVERVIEW }, + ) + } + Screen.DELETE_CONFIRM -> { + DeleteConfirmationScreen( + type = deleteType, + name = deleteName, + onConfirm = { currentScreen = Screen.MANAGE_OVERVIEW }, + onCancel = { currentScreen = Screen.MANAGE_OVERVIEW }, + ) + } + Screen.EXPLORER -> { + ExplorerScreen( + onNavigate = { dest -> + currentScreen = when (dest) { + "dashboard" -> Screen.DASHBOARD + "settings" -> Screen.SETTINGS + "manage" -> Screen.MANAGE_OVERVIEW + else -> Screen.EXPLORER + } + }, + onBack = { currentScreen = Screen.DASHBOARD }, + ) + } + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/components/GajuComponents.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/components/GajuComponents.kt new file mode 100644 index 0000000..2ce910c --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/components/GajuComponents.kt @@ -0,0 +1,352 @@ +package swiss.qpq.gajumobile.ui.components + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R + +@Composable +fun GajuButton( + text: String, + onClick: () -> Unit, + modifier: Modifier = Modifier, + containerColor: Color = MaterialTheme.colorScheme.primary, + contentColor: Color = MaterialTheme.colorScheme.onPrimary, +) { + Button( + onClick = onClick, + modifier = modifier + .fillMaxWidth() + .height(56.dp), + shape = RoundedCornerShape(16.dp), + colors = ButtonDefaults.buttonColors( + containerColor = containerColor, + contentColor = contentColor, + ), + ) { + Text( + text = text.uppercase(), + fontSize = 18.sp, + fontWeight = FontWeight.Bold, + ) + } +} + +@Composable +fun GajuHeader() { + Row( + modifier = Modifier + .fillMaxWidth() + .padding(16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Center, + ) { + Icon( + painter = painterResource(id = R.drawable.gajumobile_icon_colored), + contentDescription = null, + modifier = Modifier.size(32.dp), + tint = Color.Unspecified, + ) + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = "GajuMobile", + fontSize = 24.sp, + fontWeight = FontWeight.Bold, + color = MaterialTheme.colorScheme.onBackground, + ) + } +} + +@Composable +fun GajuBottomNavigation( + currentDestination: String, + onNavigate: (String) -> Unit, +) { + Surface( + modifier = Modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surface, + tonalElevation = 8.dp, + ) { + Row( + modifier = Modifier + .windowInsetsPadding(WindowInsets.navigationBars) + .fillMaxWidth() + .padding(vertical = 8.dp, horizontal = 16.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Icon( + painter = painterResource(id = R.drawable.gajumobile_icon_colored), + contentDescription = "Home", + modifier = Modifier + .size(40.dp) + .clickable { onNavigate("dashboard") }, + tint = Color.Unspecified, + ) + + NavigationItem( + label = "SETTINGS", + icon = R.drawable.settings, + selected = currentDestination == "settings", + ) { onNavigate("settings") } + + NavigationItem( + label = "MANAGE", + icon = R.drawable.ic_account_box, + selected = currentDestination == "manage", + ) { onNavigate("manage") } + + NavigationItem( + label = "TRANSACTIONS", + icon = R.drawable.ic_favorite, + selected = currentDestination == "transactions", + ) { onNavigate("transactions") } + } + } +} + +@Composable +private fun NavigationItem( + label: String, + icon: Int, + selected: Boolean, + onClick: () -> Unit, +) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.clickable { onClick() }, + ) { + Icon( + painter = painterResource(id = icon), + contentDescription = label, + modifier = Modifier.size(24.dp), + tint = if (selected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant, + ) + Text( + text = label, + fontSize = 10.sp, + fontWeight = FontWeight.Bold, + color = if (selected) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant, + ) + } +} + +@Composable +fun ActionCircle( + text: String, + containerColor: Color, + contentColor: Color, + onClick: () -> Unit, +) { + Box( + modifier = Modifier + .size(120.dp) + .clip(CircleShape) + .background(containerColor) + .clickable { onClick() }, + contentAlignment = Alignment.Center, + ) { + Text( + text = text.uppercase(), + color = contentColor, + fontWeight = FontWeight.Bold, + ) + } +} + +@Composable +fun MnemonicReveal( + mnemonic: String, + modifier: Modifier = Modifier, +) { + var revealed by remember { mutableStateOf(value = false) } + + Box( + modifier = modifier + .fillMaxWidth() + .background(MaterialTheme.colorScheme.surfaceVariant, RoundedCornerShape(8.dp)) + .clickable { revealed = !revealed } + .padding(16.dp), + contentAlignment = Alignment.Center, + ) { + if (revealed) { + Text( + text = mnemonic, + color = MaterialTheme.colorScheme.onSurfaceVariant, + textAlign = TextAlign.Center, + ) + } else { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), + ) + Text( + text = "TAP TO REVEAL", + color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), + fontWeight = FontWeight.Bold, + ) + } + } + } +} + +@Composable +fun GajuTextField( + value: String, + onValueChange: (String) -> Unit, + label: String, + modifier: Modifier = Modifier, + placeholder: String = "", + trailingIcon: @Composable (() -> Unit)? = null, +) { + Column(modifier = modifier) { + Text( + text = label.uppercase(), + fontSize = 14.sp, + color = MaterialTheme.colorScheme.onBackground, + modifier = Modifier.padding(bottom = 8.dp), + ) + OutlinedTextField( + value = value, + onValueChange = onValueChange, + placeholder = { Text(placeholder, color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.5f)) }, + modifier = Modifier.fillMaxWidth(), + colors = OutlinedTextFieldDefaults.colors( + unfocusedContainerColor = MaterialTheme.colorScheme.surfaceVariant, + focusedContainerColor = MaterialTheme.colorScheme.surfaceVariant, + unfocusedTextColor = MaterialTheme.colorScheme.onSurfaceVariant, + focusedTextColor = MaterialTheme.colorScheme.onSurfaceVariant, + unfocusedBorderColor = Color.Transparent, + focusedBorderColor = MaterialTheme.colorScheme.primary, + ), + shape = RoundedCornerShape(8.dp), + trailingIcon = trailingIcon, + ) + } +} + +@Composable +fun WarningBox( + title: String, + content: String, + modifier: Modifier = Modifier, + icon: Int = R.drawable.ic_favorite, // Default warning icon placeholder +) { + Surface( + modifier = modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(8.dp), + ) { + Column( + modifier = Modifier.padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Icon( + painter = painterResource(id = icon), + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(48.dp), + ) + Text( + text = title.uppercase(), + fontWeight = FontWeight.ExtraBold, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Text( + text = content, + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 14.sp, + modifier = Modifier.padding(vertical = 8.dp), + ) + } + } +} + +@Composable +fun SuccessLayout( + title: String, + content: @Composable ColumnScope.() -> Unit, + onProceed: () -> Unit, + proceedText: String = "PROCEED TO DASHBOARD", +) { + var checked by remember { mutableStateOf(value = false) } + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier + .padding(bottom = 24.dp) + .clickable { checked = !checked }, + ) { + Checkbox( + checked = checked, + onCheckedChange = { checked = it }, + colors = CheckboxDefaults.colors( + checkedColor = MaterialTheme.colorScheme.primary, + uncheckedColor = MaterialTheme.colorScheme.onBackground, + ), + ) + Text( + text = "I understand and fully assume the risks.", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + modifier = Modifier.padding(start = 8.dp), + ) + } + + GajuButton( + text = proceedText, + onClick = onProceed, + containerColor = if (checked) Color.White else Color.LightGray, + contentColor = Color.Black, + modifier = Modifier.fillMaxWidth(), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = title.uppercase(), + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + content() + } + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/DashboardScreen.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/DashboardScreen.kt new file mode 100644 index 0000000..bebd4bd --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/DashboardScreen.kt @@ -0,0 +1,148 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R +import swiss.qpq.gajumobile.ui.components.ActionCircle +import swiss.qpq.gajumobile.ui.components.GajuBottomNavigation +import swiss.qpq.gajumobile.ui.components.GajuHeader + +@Composable +fun DashboardScreen( + onSend: () -> Unit, + onReceive: () -> Unit, + onNavigate: (String) -> Unit, +) { + var selectedTab by remember { mutableIntStateOf(0) } + val tabs = listOf("DAILY", "SHOPPING", "INCIDENTALS") + + Scaffold( + bottomBar = { GajuBottomNavigation("dashboard", onNavigate) }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "EXPENSES", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(top = 16.dp), + ) + + SecondaryTabRow( + selectedTabIndex = selectedTab, + containerColor = Color.Transparent, + contentColor = MaterialTheme.colorScheme.onBackground, + divider = {}, + indicator = { + TabRowDefaults.SecondaryIndicator( + Modifier.tabIndicatorOffset(selectedTab), + color = MaterialTheme.colorScheme.primary, + ) + }, + modifier = Modifier.padding(vertical = 16.dp), + ) { + tabs.forEachIndexed { index, title -> + Tab( + selected = selectedTab == index, + onClick = { selectedTab = index }, + text = { + Text( + title, + color = if (selectedTab == index) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant, + fontWeight = FontWeight.Bold, + ) + } + ) + } + } + + Box( + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 24.dp) + .background(MaterialTheme.colorScheme.surfaceVariant, RoundedCornerShape(16.dp)) + .padding(24.dp), + ) { + Column { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text("BALANCE", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + Icon( + painter = painterResource(id = R.drawable.ic_favorite), // Replace with eye icon + contentDescription = null, + tint = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.size(24.dp), + ) + } + + Spacer(modifier = Modifier.height(16.dp)) + + Row(verticalAlignment = Alignment.CenterVertically) { + Text("木", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 24.sp) + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = "128,990,422", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 32.sp, + fontWeight = FontWeight.Bold, + ) + Text( + text = ".129,853", + color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), + fontSize = 18.sp, + ) + } + + Row(modifier = Modifier.padding(start = 32.dp)) { + Text("Gajus", color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), fontSize = 10.sp) + Spacer(modifier = Modifier.width(16.dp)) + Text("Pucks", color = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), fontSize = 10.sp) + } + } + } + + Spacer(modifier = Modifier.weight(1f)) + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 64.dp), + horizontalArrangement = Arrangement.SpaceEvenly, + ) { + ActionCircle( + text = "SEND", + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + onClick = onSend, + ) + ActionCircle( + text = "RECEIVE", + containerColor = MaterialTheme.colorScheme.primary, + contentColor = MaterialTheme.colorScheme.onPrimary, + onClick = onReceive, + ) + } + } + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/ManagementScreens.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/ManagementScreens.kt new file mode 100644 index 0000000..7d54076 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/ManagementScreens.kt @@ -0,0 +1,570 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R +import swiss.qpq.gajumobile.ui.components.* + +@Composable +fun SettingsScreen( + onNavigate: (String) -> Unit, + onBack: () -> Unit, +) { + var biometricsEnabled by remember { mutableStateOf(value = true) } + + Scaffold( + bottomBar = { GajuBottomNavigation("settings", onNavigate) }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "SETTINGS", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Icon( + painter = painterResource(id = R.drawable.settings), + contentDescription = null, + modifier = Modifier.size(32.dp), + tint = MaterialTheme.colorScheme.onBackground, + ) + + Spacer(modifier = Modifier.height(32.dp)) + + Surface( + modifier = Modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(8.dp), + ) { + Text( + text = "APP SECURITY", + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant, + modifier = Modifier.padding(16.dp), + ) + } + + Spacer(modifier = Modifier.height(24.dp)) + + Row( + modifier = Modifier.fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween, + ) { + Text( + text = "ENABLE BIOMETRICS LOGIN", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + ) + Switch( + checked = biometricsEnabled, + onCheckedChange = { biometricsEnabled = it }, + colors = SwitchDefaults.colors( + checkedThumbColor = Color.White, + checkedTrackColor = MaterialTheme.colorScheme.primary, + ), + ) + } + + Spacer(modifier = Modifier.weight(1f)) + + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.Start)) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + } +} + +@Composable +fun ManageOverviewScreen( + onWalletDetail: (String) -> Unit, + onAccountDetail: (String) -> Unit, + onNavigate: (String) -> Unit, +) { + Scaffold( + bottomBar = { GajuBottomNavigation("manage", onNavigate) }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "MANAGE", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Text( + text = "Every wallet can have multiple accounts.\nEvery account within a wallet has its own mnemonic phrase.\nMake sure you save the mnemonics for each account. Lost mnemonics cannot be retrieved.", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 12.sp, + textAlign = TextAlign.Center, + modifier = Modifier.padding(bottom = 32.dp), + ) + + WalletCard( + name = "PRIMARY WALLET", + accounts = listOf("DAILY", "SHOPPING", "INCIDENTALS"), + onWalletClick = { onWalletDetail("Primary") }, + onAccountClick = onAccountDetail, + ) + + Spacer(modifier = Modifier.height(24.dp)) + + WalletCard( + name = "SAVINGS WALLET", + accounts = listOf("EMERGENCY"), + onWalletClick = { onWalletDetail("Savings") }, + onAccountClick = onAccountDetail, + ) + + Spacer(modifier = Modifier.height(32.dp)) + + FloatingActionButton( + onClick = { /* TODO */ }, + containerColor = MaterialTheme.colorScheme.primary, + contentColor = Color.White, + shape = CircleShape, + ) { + Icon(painterResource(R.drawable.ic_favorite), contentDescription = "Add Wallet") + } + Text("Add a new wallet", color = MaterialTheme.colorScheme.onBackground, fontSize = 12.sp, modifier = Modifier.padding(top = 8.dp)) + } + } +} + +@Composable +private fun WalletCard( + name: String, + accounts: List, + onWalletClick: () -> Unit, + onAccountClick: (String) -> Unit, +) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Surface( + modifier = Modifier.fillMaxWidth().clickable { onWalletClick() }, + color = Color.White, + shape = RoundedCornerShape(8.dp), + ) { + Row( + modifier = Modifier.padding(16.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Spacer(modifier = Modifier.width(32.dp)) + Text(text = name, color = Color.Black, fontWeight = FontWeight.Bold) + Icon(painterResource(R.drawable.settings), null, tint = Color.Black, modifier = Modifier.size(24.dp)) + } + } + + Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(top = 16.dp)) { + Text("Accounts within this wallet:", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + } + + accounts.forEach { account -> + Surface( + modifier = Modifier.padding(top = 8.dp).width(200.dp).clickable { onAccountClick(account) }, + color = Color.Gray, + shape = RoundedCornerShape(8.dp), + ) { + Row( + modifier = Modifier.padding(12.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Text(text = account, color = Color.White, fontSize = 14.sp) + Icon(painterResource(R.drawable.settings), null, tint = Color.White, modifier = Modifier.size(16.dp)) + } + } + } + + Row( + modifier = Modifier.padding(top = 16.dp).clickable { /* TODO */ }, + verticalAlignment = Alignment.CenterVertically, + ) { + Icon(painterResource(R.drawable.ic_favorite), null, tint = MaterialTheme.colorScheme.onSurface, modifier = Modifier.size(20.dp)) + Spacer(modifier = Modifier.width(8.dp)) + Text("Add a new account within this wallet", color = MaterialTheme.colorScheme.onSurface, fontSize = 12.sp) + } + } +} + +@Composable +fun ExplorerScreen( + onNavigate: (String) -> Unit, + onBack: () -> Unit, +) { + Scaffold( + bottomBar = { GajuBottomNavigation("transactions", onNavigate) }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "TRANSACTIONS", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Text("Loading Groot", color = MaterialTheme.colorScheme.primary, fontStyle = androidx.compose.ui.text.font.FontStyle.Italic) + + Spacer(modifier = Modifier.height(16.dp)) + + Surface( + modifier = Modifier.fillMaxWidth().weight(1f).padding(horizontal = 24.dp, vertical = 8.dp), + color = Color.White, + shape = RoundedCornerShape(4.dp), + ) { + Box(contentAlignment = Alignment.Center) { + Text("Gaju Explorer Content", color = Color.Gray) + } + } + + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.Start).padding(16.dp)) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + } +} + +@Composable +fun ManageWalletScreen( + walletName: String, + onDelete: () -> Unit, + onBack: () -> Unit, +) { + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + ManageAction(label = "Delete this wallet", icon = R.drawable.ic_favorite, isDestructive = true, onClick = onDelete) + + Spacer(modifier = Modifier.height(16.dp)) + + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.Start)) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "MANAGE WALLET", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Surface( + modifier = Modifier.fillMaxWidth(), + color = Color.White, + shape = RoundedCornerShape(8.dp), + ) { + Row( + modifier = Modifier.padding(16.dp), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically, + ) { + Spacer(modifier = Modifier.width(32.dp)) + Text(text = walletName.uppercase(), color = Color.Black, fontWeight = FontWeight.Bold) + Icon(painterResource(R.drawable.settings), null, tint = Color.Black) + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + Text("Accounts within this wallet", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + Text("DAILY 木 128,990,422.129,853", color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(top = 16.dp)) + Text("SHOPPING 木 65,829,121.9,803", color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(top = 8.dp)) + Text("INCIDENTALS 木 45,001,442.223,000,034", color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(top = 8.dp)) + + Spacer(modifier = Modifier.height(32.dp)) + + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceEvenly) { + ManageAction(label = "Rename this wallet", icon = R.drawable.ic_favorite) + ManageAction(label = "Add a new account", icon = R.drawable.ic_favorite) + } + } + } +} + +@Composable +fun ManageAccountScreen( + accountName: String, + walletName: String, + onDelete: () -> Unit, + onBack: () -> Unit, +) { + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + ManageAction(label = "Delete this account", icon = R.drawable.ic_favorite, isDestructive = true, onClick = onDelete) + + Spacer(modifier = Modifier.height(16.dp)) + + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.Start)) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "MANAGE ACCOUNT", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Surface( + modifier = Modifier.fillMaxWidth(), + color = Color.Transparent, + shape = RoundedCornerShape(8.dp), + border = androidx.compose.foundation.BorderStroke(1.dp, Color.White), + ) { + Text( + text = walletName.uppercase(), + color = Color.White, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(16.dp), + textAlign = TextAlign.Center, + ) + } + + Spacer(modifier = Modifier.height(32.dp)) + + GajuButton( + text = accountName, + onClick = {}, + containerColor = MaterialTheme.colorScheme.primary, + modifier = Modifier.width(200.dp), + ) + Text("木 128,990,422.129,853", color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(top = 8.dp)) + + Spacer(modifier = Modifier.height(64.dp)) + + ManageAction(label = "Rename this account", icon = R.drawable.ic_favorite) + } + } +} + +@Composable +fun DeleteConfirmationScreen( + type: String, // "WALLET" or "ACCOUNT" + name: String, + onConfirm: () -> Unit, + onCancel: () -> Unit, +) { + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "CANCEL", + onClick = onCancel, + modifier = Modifier.fillMaxWidth(), + containerColor = Color.White, + contentColor = Color.Black, + ) + Spacer(modifier = Modifier.height(16.dp)) + GajuButton( + text = "CONFIRM\nDELETE", + onClick = onConfirm, + modifier = Modifier.fillMaxWidth(), + containerColor = Color(0xFFF44336), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "DELETE $type", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + Surface( + modifier = Modifier.fillMaxWidth(), + color = Color.White, + shape = RoundedCornerShape(8.dp), + ) { + Text( + text = name.uppercase(), + color = Color.Black, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(16.dp), + textAlign = TextAlign.Center, + ) + } + + Spacer(modifier = Modifier.height(32.dp)) + + Text("Accounts within this wallet", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + Text("DAILY 木 128,990,422.129,853", color = MaterialTheme.colorScheme.onBackground, modifier = Modifier.padding(top = 16.dp)) + + Spacer(modifier = Modifier.height(32.dp)) + + Text( + text = "WARNING: Deleting a $type will delete all accounts within it.", + color = Color.Yellow, + fontWeight = FontWeight.Bold, + fontSize = 12.sp, + textAlign = TextAlign.Center, + ) + + Text( + text = """ + To recover a deleted account, you will need your mnemonic phrase. Lost mnemonic phrases cannot be retrieved. + + All funds within a lost account are also lost. + + Back up your mnemonic phrases for every account before making any changes here to be safe. + + This action cannot be undone. + """.trimIndent(), + color = MaterialTheme.colorScheme.onBackground, + fontSize = 12.sp, + textAlign = TextAlign.Center, + modifier = Modifier.padding(vertical = 16.dp), + ) + + var checked by remember { mutableStateOf(value = false) } + Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.clickable { checked = !checked }) { + Checkbox(checked = checked, onCheckedChange = { checked = it }) + Text( + "I understand and assume all risks from this action. I would like to proceed.", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onBackground, + ) + } + } + } +} + +@Composable +private fun ManageAction(label: String, icon: Int, isDestructive: Boolean = false, onClick: () -> Unit = {}) { + Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.clickable { onClick() }) { + Icon( + painterResource(icon), + null, + tint = if (isDestructive) Color.Red else MaterialTheme.colorScheme.onSurface, + modifier = Modifier.size(20.dp), + ) + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = label, + color = if (isDestructive) Color.Red else MaterialTheme.colorScheme.onSurface, + fontSize = 12.sp, + ) + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/OnboardingFlow.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/OnboardingFlow.kt new file mode 100644 index 0000000..71e8b37 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/OnboardingFlow.kt @@ -0,0 +1,116 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R +import swiss.qpq.gajumobile.ui.components.GajuButton + +@Composable +fun WelcomeContinueScreen(onContinue: () -> Unit) { + Box( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .safeDrawingPadding(), + contentAlignment = Alignment.Center, + ) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Surface( + modifier = Modifier.size(180.dp), + shape = androidx.compose.foundation.shape.RoundedCornerShape(40.dp), + color = Color.Transparent, + border = androidx.compose.foundation.BorderStroke(1.dp, Color.Gray), + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + painter = painterResource(id = R.drawable.ic_account_box), // Replace with actual alien icon if available + contentDescription = null, + modifier = Modifier.size(120.dp), + tint = MaterialTheme.colorScheme.onSurface, + ) + } + } + + Spacer(modifier = Modifier.height(64.dp)) + + GajuButton( + text = "CONTINUE", + onClick = onContinue, + modifier = Modifier.width(200.dp), + ) + } + } +} + +@Composable +fun BiometricsPromptScreen( + onYes: () -> Unit, + onNo: () -> Unit, +) { + Box( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .safeDrawingPadding(), + contentAlignment = Alignment.Center, + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(32.dp), + ) { + Image( + painter = painterResource(id = R.drawable.gajumobile_icon_colored), + contentDescription = null, + modifier = Modifier.size(100.dp), + ) + + Spacer(modifier = Modifier.height(48.dp)) + + Text( + text = "Would you like to use your phone biometrics for logging in to this app?", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + textAlign = TextAlign.Center, + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Text( + text = "Don't worry. You can still change this in your settings later.", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 14.sp, + textAlign = TextAlign.Center, + ) + + Spacer(modifier = Modifier.height(64.dp)) + + Row(modifier = Modifier.fillMaxWidth()) { + GajuButton( + text = "NO", + onClick = onNo, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "YES", + onClick = onYes, + modifier = Modifier.weight(1f), + ) + } + } + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/SplashScreen.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/SplashScreen.kt new file mode 100644 index 0000000..06f2a0f --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/SplashScreen.kt @@ -0,0 +1,50 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import kotlinx.coroutines.delay +import swiss.qpq.gajumobile.R + +import kotlin.time.Duration.Companion.seconds + +@Composable +fun SplashScreen(onTimeout: () -> Unit) { + LaunchedEffect(Unit) { + delay(2.seconds) + onTimeout() + } + + Box( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .safeDrawingPadding(), + contentAlignment = Alignment.Center, + ) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Image( + painter = painterResource(id = R.drawable.gajumobile_logo_colored), + contentDescription = null, + modifier = Modifier.size(200.dp), + ) + Spacer(modifier = Modifier.height(24.dp)) + Text( + text = "Welcome to smarter, safer finance.", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 16.sp, + fontWeight = FontWeight.Medium, + ) + } + } +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/TransactionScreens.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/TransactionScreens.kt new file mode 100644 index 0000000..f2b838d --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/TransactionScreens.kt @@ -0,0 +1,423 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R +import swiss.qpq.gajumobile.ui.components.* + +@Composable +fun QRScannerScreen( + onGenerate: () -> Unit, + onUpload: () -> Unit, + onBack: () -> Unit, +) { + Box( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .safeDrawingPadding(), + ) { + Column( + modifier = Modifier.fillMaxSize(), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "SCAN QR", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Light, + modifier = Modifier.padding(top = 16.dp), + ) + + Spacer(modifier = Modifier.weight(1f)) + + // Scanner Viewfinder Mockup + Box( + modifier = Modifier + .size(280.dp) + .border(2.dp, Color.White, RoundedCornerShape(16.dp)), + contentAlignment = Alignment.Center, + ) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), // Replace with scan icon + contentDescription = null, + modifier = Modifier.size(80.dp), + tint = MaterialTheme.colorScheme.primary, + ) + } + + Spacer(modifier = Modifier.weight(1f)) + + Row( + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 48.dp), + horizontalArrangement = Arrangement.SpaceEvenly, + ) { + ScannerAction(label = "GENERATE QR", icon = R.drawable.ic_favorite, onClick = onGenerate) + ScannerAction(label = "UPLOAD QR", icon = R.drawable.ic_favorite, onClick = onUpload) + } + } + + // Back arrow button from mockup + IconButton( + onClick = onBack, + modifier = Modifier.align(Alignment.CenterStart).padding(start = 16.dp).size(48.dp), + ) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), // Replace with back arrow + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(32.dp), + ) + } + } +} + +@Composable +private fun ScannerAction(label: String, icon: Int, onClick: () -> Unit) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Surface( + modifier = Modifier.size(48.dp).clickable { onClick() }, + shape = RoundedCornerShape(8.dp), + color = MaterialTheme.colorScheme.surfaceVariant, + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + painter = painterResource(id = icon), + contentDescription = null, + modifier = Modifier.size(24.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } + } + Text( + text = label, + fontSize = 10.sp, + color = MaterialTheme.colorScheme.onBackground, + modifier = Modifier.padding(top = 8.dp), + ) + } +} + +@Composable +fun QRReceiveScreen( + onDone: () -> Unit, + onBack: () -> Unit, +) { + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(horizontal = 24.dp, vertical = 32.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuButton( + text = "DONE", + onClick = onDone, + modifier = Modifier.width(160.dp), + ) + + Spacer(modifier = Modifier.height(16.dp)) + + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.Start)) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = "Back", + tint = MaterialTheme.colorScheme.primary, + ) + } + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Spacer(modifier = Modifier.weight(1f)) + + // QR Code Placeholder + Surface( + modifier = Modifier.size(240.dp), + color = Color.White, + shape = RoundedCornerShape(16.dp), + ) { + Box(contentAlignment = Alignment.Center) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), // Replace with actual QR + contentDescription = "QR Code", + modifier = Modifier.size(180.dp), + tint = Color.Black, + ) + } + } + + Text( + text = "Sender must scan this QR.", + color = MaterialTheme.colorScheme.onBackground, + modifier = Modifier.padding(top = 24.dp), + ) + Text( + text = "You can also send them a screenshot of this QR.", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 12.sp, + fontStyle = androidx.compose.ui.text.font.FontStyle.Italic, + ) + + Spacer(modifier = Modifier.weight(1f)) + } + } +} + +@Composable +fun SendFormScreen( + onReview: () -> Unit, + onBack: () -> Unit, +) { + var toAddress by remember { mutableStateOf(value = "") } + var amount by remember { mutableStateOf(value = "") } + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Row( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "BACK", + onClick = onBack, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "REVIEW", + onClick = onReview, + modifier = Modifier.weight(1f), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "SEND", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 24.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + Text("SENDING FROM", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + Spacer(modifier = Modifier.width(8.dp)) + Text("DAILY", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold) + Icon(painterResource(R.drawable.ic_favorite), null, tint = Color.Gray) // Dropdown arrow + } + Text( + text = "PRIMARY WALLET", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 12.sp, + modifier = Modifier.align(Alignment.End), + ) + + Spacer(modifier = Modifier.height(24.dp)) + + GajuTextField( + value = toAddress, + onValueChange = { toAddress = it }, + label = "SENDING TO", + placeholder = "ak_...", + modifier = Modifier.fillMaxWidth(), + ) + + Spacer(modifier = Modifier.height(24.dp)) + + GajuTextField( + value = amount, + onValueChange = { amount = it }, + label = "AMOUNT", + placeholder = "0.0", + modifier = Modifier.fillMaxWidth(), + trailingIcon = { Text("木", color = MaterialTheme.colorScheme.onSurface) }, + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { + Text("CURRENCY", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 14.sp) + Spacer(modifier = Modifier.width(8.dp)) + Text("木 Gajus", color = MaterialTheme.colorScheme.onBackground) + Icon(painterResource(R.drawable.ic_favorite), null, tint = Color.Gray) + } + } + } +} + +@Composable +fun SendReviewScreen( + onSend: () -> Unit, + onBack: () -> Unit, +) { + var confirmed by remember { mutableStateOf(value = false) } + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Column( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + Row( + verticalAlignment = Alignment.CenterVertically, + modifier = Modifier.clickable { confirmed = !confirmed }.padding(bottom = 24.dp) + ) { + Checkbox(checked = confirmed, onCheckedChange = { confirmed = it }) + Text( + "I confirm that the above details are correct and I would like to proceed.", + fontSize = 12.sp, + color = MaterialTheme.colorScheme.onBackground, + ) + } + + Row(modifier = Modifier.fillMaxWidth()) { + GajuButton( + text = "BACK", + onClick = onBack, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "SEND", + onClick = onSend, + modifier = Modifier.weight(1f), + containerColor = if (confirmed) MaterialTheme.colorScheme.primary else Color.LightGray, + ) + } + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "SEND", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 24.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Text("SENDING FROM", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 12.sp) + Text("DAILY Account", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold) + Text("PRIMARY WALLET", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 10.sp) + + Spacer(modifier = Modifier.height(16.dp)) + + Text("SENDING TO", color = MaterialTheme.colorScheme.onSurfaceVariant, fontSize = 12.sp) + Text("ALICE S....VAN", fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onBackground) + Text( + text = "ak_9jzmTHpVCbXfMSfyvxGV1ZLbzR8YqdK4jpSL5WgUKLGM4XPVp", + fontSize = 10.sp, + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + + Spacer(modifier = Modifier.height(24.dp)) + + Surface( + modifier = Modifier.fillMaxWidth(), + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(16.dp), + ) { + Column(modifier = Modifier.padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally) { + Text("You are sending a payment of", fontSize = 14.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + Text("木 22,980.78991", fontSize = 24.sp, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.primary) + Text("to", fontSize = 14.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + Text("ak_9jzm...", fontSize = 12.sp, color = MaterialTheme.colorScheme.onSurfaceVariant) + + Spacer(modifier = Modifier.height(16.dp)) + Text("THIS ACTION CANNOT BE UNDONE.", fontWeight = FontWeight.ExtraBold, color = MaterialTheme.colorScheme.onSurfaceVariant) + Text("Are you sure you want to proceed?", fontStyle = androidx.compose.ui.text.font.FontStyle.Italic, color = MaterialTheme.colorScheme.onSurfaceVariant) + } + } + } + } +} + +@Composable +fun TransactionSuccessScreen( + onExit: () -> Unit, +) { + SuccessLayout( + title = "SEND", + proceedText = "EXIT", + onProceed = onExit, + content = { + Text("Transaction Successful!", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold) + Spacer(modifier = Modifier.height(32.dp)) + Text("You have successfully sent a payment of", fontSize = 14.sp, color = MaterialTheme.colorScheme.onBackground) + Text("木 22,980.78991", fontSize = 24.sp, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.primary) + Text("to", fontSize = 14.sp, color = MaterialTheme.colorScheme.onBackground) + Text("ak_9jzm...", fontSize = 12.sp, color = MaterialTheme.colorScheme.onBackground) + + Spacer(modifier = Modifier.height(32.dp)) + Text("The amount has been subtracted from the DAILY account in your PRIMARY WALLET.", textAlign = TextAlign.Center, fontSize = 12.sp, color = MaterialTheme.colorScheme.onBackground) + + Spacer(modifier = Modifier.height(32.dp)) + Text("You can track this transaction on-chain here.", fontSize = 12.sp, color = MaterialTheme.colorScheme.onBackground) + Text("VIEW TRANSACTION ON-CHAIN", color = MaterialTheme.colorScheme.primary, fontWeight = FontWeight.Bold, fontSize = 12.sp) + }, + ) +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/screens/WalletSetupScreens.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/WalletSetupScreens.kt new file mode 100644 index 0000000..50d6632 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/screens/WalletSetupScreens.kt @@ -0,0 +1,538 @@ +package swiss.qpq.gajumobile.ui.screens + +import androidx.compose.foundation.Image +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.itemsIndexed +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import swiss.qpq.gajumobile.R +import swiss.qpq.gajumobile.ui.components.GajuButton +import swiss.qpq.gajumobile.ui.components.GajuHeader +import swiss.qpq.gajumobile.ui.components.GajuTextField +import swiss.qpq.gajumobile.ui.components.MnemonicReveal +import swiss.qpq.gajumobile.ui.components.SuccessLayout +import swiss.qpq.gajumobile.ui.components.WarningBox + +@Composable +fun SetupChoiceScreen( + onCreate: () -> Unit, + onRecover: () -> Unit, +) { + Box( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .safeDrawingPadding(), + contentAlignment = Alignment.Center, + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.padding(32.dp), + ) { + Image( + painter = painterResource(id = R.drawable.gajumobile_icon_colored), + contentDescription = null, + modifier = Modifier.size(120.dp), + ) + + Spacer(modifier = Modifier.height(64.dp)) + + GajuButton( + text = "CREATE\nACCOUNT", + onClick = onCreate, + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + + Spacer(modifier = Modifier.height(24.dp)) + + GajuButton( + text = "RECOVER\nEXISTING ACCOUNT", + onClick = onRecover, + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + + Spacer(modifier = Modifier.height(24.dp)) + + Text( + text = "To recover and existing account, you will need your mnemonic phrase. You can add existing accounts later if you don't have access to your mnemonic phrase at the moment.", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 12.sp, + textAlign = TextAlign.Center, + fontStyle = androidx.compose.ui.text.font.FontStyle.Italic, + ) + } + } +} + +@Composable +fun CreateAccountMnemonicScreen( + onNext: () -> Unit, + onCancel: () -> Unit, +) { + var accountName by remember { mutableStateOf(value = "") } + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Row( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "CANCEL", + onClick = onCancel, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "NEXT", + onClick = onNext, + modifier = Modifier.weight(1f), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "CREATE NEW ACCOUNT", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + GajuTextField( + value = accountName, + onValueChange = { accountName = it }, + label = "ACCOUNT NAME", + placeholder = "Name your account", + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Text( + text = "MNEMONIC PHRASE", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + modifier = Modifier.align(Alignment.Start), + ) + + Spacer(modifier = Modifier.height(8.dp)) + + Surface( + modifier = Modifier + .fillMaxWidth() + .heightIn(min = 200.dp), + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(8.dp), + ) { + Column( + modifier = Modifier.padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + WarningBox( + title = "IMPORTANT", + content = "Do not let anyone else see this.\nThis may be used to access your funds.", + ) + + Spacer(modifier = Modifier.height(24.dp)) + + Text( + text = "You will need to verify this mnemonic phrase in the next window to proceed. Get ready to back this up on a piece of paper. Make sure nobody else can access it.", + textAlign = TextAlign.Center, + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 12.sp, + ) + + Spacer(modifier = Modifier.height(16.dp)) + + MnemonicReveal(mnemonic = "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual") + } + } + } + } +} + +@Composable +fun MnemonicGridScreen( + onNext: () -> Unit, + onBack: () -> Unit, +) { + val mnemonic = "abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual".split(" ") + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Row( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "BACK", + onClick = onBack, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "NEXT", + onClick = onNext, + modifier = Modifier.weight(1f), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "CREATE NEW ACCOUNT", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + GajuTextField( + value = "DAILY", + onValueChange = {}, + label = "ACCOUNT NAME", + modifier = Modifier.fillMaxWidth(), + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Text( + text = "MNEMONIC PHRASE", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + modifier = Modifier.align(Alignment.Start), + ) + + Spacer(modifier = Modifier.height(8.dp)) + + var hidden by remember { mutableStateOf(value = false) } + + Surface( + modifier = Modifier + .fillMaxWidth() + .weight(1f), + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(8.dp), + ) { + Column( + modifier = Modifier.padding(16.dp), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + if (hidden) { + Box( + modifier = Modifier + .fillMaxSize() + .clickable { hidden = false }, + contentAlignment = Alignment.Center, + ) { + Text( + text = "TAP TO SHOW", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontWeight = FontWeight.Bold, + ) + } + } else { + LazyVerticalGrid( + columns = GridCells.Fixed(count = 2), + modifier = Modifier.weight(1f), + contentPadding = PaddingValues(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + horizontalArrangement = Arrangement.spacedBy(16.dp), + ) { + itemsIndexed(mnemonic) { index, word -> + Text( + text = "${index + 1}. $word", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontSize = 14.sp, + ) + } + } + + Row( + modifier = Modifier + .fillMaxWidth() + .clickable { hidden = true } + .padding(vertical = 16.dp), + horizontalArrangement = Arrangement.Center, + verticalAlignment = Alignment.CenterVertically, + ) { + Icon( + painter = painterResource(id = R.drawable.ic_favorite), + contentDescription = null, + modifier = Modifier.size(24.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant, + ) + Spacer(modifier = Modifier.width(8.dp)) + Text( + text = "TAP TO HIDE.", + color = MaterialTheme.colorScheme.onSurfaceVariant, + fontWeight = FontWeight.Bold, + ) + } + } + } + } + } + } +} + +@Composable +fun MnemonicVerifyScreen( + onFinish: () -> Unit, + onBack: () -> Unit, +) { + val wordsToVerify = listOf("Word 9", "Word 22", "Word 3", "Word 12", "Word 17", "Word 15") + + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Row( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "BACK", + onClick = onBack, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "FINISH", + onClick = onFinish, + modifier = Modifier.weight(1f), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "CREATE NEW ACCOUNT", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + GajuTextField( + value = "", + onValueChange = {}, + label = "ACCOUNT NAME", + placeholder = "Name your account", + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Text( + text = "Verify your mnemonic", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + modifier = Modifier + .align(Alignment.Start) + .padding(bottom = 8.dp), + ) + + wordsToVerify.forEach { label -> + GajuTextField( + value = "", + onValueChange = {}, + label = "", + placeholder = label, + modifier = Modifier.padding(vertical = 4.dp), + ) + } + } + } +} + +@Composable +fun RecoverMnemonicScreen( + onRecover: () -> Unit, + onBack: () -> Unit, +) { + Scaffold( + modifier = Modifier.fillMaxSize(), + bottomBar = { + Row( + modifier = Modifier + .fillMaxWidth() + .windowInsetsPadding(WindowInsets.navigationBars) + .padding(24.dp), + ) { + GajuButton( + text = "BACK", + onClick = onBack, + modifier = Modifier.weight(1f), + containerColor = MaterialTheme.colorScheme.secondary, + contentColor = MaterialTheme.colorScheme.onSecondary, + ) + Spacer(modifier = Modifier.width(16.dp)) + GajuButton( + text = "RECOVER\nACCOUNT", + onClick = onRecover, + modifier = Modifier.weight(1f), + ) + } + }, + ) { innerPadding -> + Column( + modifier = Modifier + .fillMaxSize() + .background(MaterialTheme.colorScheme.background) + .padding(innerPadding) + .padding(horizontal = 24.dp) + .verticalScroll(rememberScrollState()), + horizontalAlignment = Alignment.CenterHorizontally, + ) { + GajuHeader() + + Text( + text = "CREATE NEW ACCOUNT", // Mockup uses same title for recovery + color = MaterialTheme.colorScheme.onBackground, + fontSize = 20.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.padding(vertical = 24.dp), + ) + + GajuTextField( + value = "", + onValueChange = {}, + label = "ACCOUNT NAME", + placeholder = "Name your account", + ) + + Spacer(modifier = Modifier.height(16.dp)) + + Text( + text = "Input your mnemonic", + color = MaterialTheme.colorScheme.onBackground, + fontSize = 14.sp, + modifier = Modifier + .align(Alignment.Start) + .padding(bottom = 8.dp), + ) + + for (i in 0 until 12) { + Row(modifier = Modifier.padding(vertical = 4.dp)) { + GajuTextField( + value = "", + onValueChange = {}, + label = "", + placeholder = "Word ${i + 1}", + modifier = Modifier.weight(1f), + ) + Spacer(modifier = Modifier.width(12.dp)) + GajuTextField( + value = "", + onValueChange = {}, + label = "", + placeholder = "Word ${i + 13}", + modifier = Modifier.weight(1f), + ) + } + } + } + } +} + +@Composable +fun SetupSuccessScreen( + isRecovered: Boolean, + onProceed: () -> Unit, +) { + SuccessLayout( + title = "CREATE NEW ACCOUNT", + onProceed = onProceed, + content = { + GajuTextField( + value = "DAILY", + onValueChange = {}, + label = "ACCOUNT NAME", + modifier = Modifier.fillMaxWidth(), + ) + + Text( + text = if (isRecovered) "Account successfully recovered!" else "Account successfully created!", + color = MaterialTheme.colorScheme.primary, + fontStyle = androidx.compose.ui.text.font.FontStyle.Italic, + modifier = Modifier.padding(vertical = 16.dp), + ) + + Text( + text = """ + Do not lose your mnemonic phrase! + Lost mnemonic phrases cannot be recovered. + Losing your mnemonic phrase can result in lost funds! + + Each account has a different mnemonic phrase. + You must back up each account separately. + + You can recheck mnemonic phrases under your MANAGE ACCOUNTS interface. + """.trimIndent(), + color = MaterialTheme.colorScheme.onBackground, + fontSize = 12.sp, + textAlign = TextAlign.Start, + modifier = Modifier.padding(top = 16.dp), + ) + }, + ) +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Color.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Color.kt new file mode 100644 index 0000000..f0114da --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Color.kt @@ -0,0 +1,11 @@ +package swiss.qpq.gajumobile.ui.theme + +import androidx.compose.ui.graphics.Color + +val Purple80 = Color(0xFFD0BCFF) +val PurpleGrey80 = Color(0xFFCCC2DC) +val Pink80 = Color(0xFFEFB8C8) + +val Purple40 = Color(0xFF6650a4) +val PurpleGrey40 = Color(0xFF625b71) +val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/theme/GajuColors.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/GajuColors.kt new file mode 100644 index 0000000..ba5c83f --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/GajuColors.kt @@ -0,0 +1,32 @@ +package swiss.qpq.gajumobile.ui.theme + +import androidx.compose.ui.graphics.Color + +// Neon Dark Palette +val NeonDarkBackground = Color(0xFF1C1B1F) +val NeonDarkSurface = Color(0xFF252429) +val NeonDarkSurfaceVariant = Color(0xFF121212) +val NeonDarkPrimary = Color(0xFF9F72FF) +val NeonDarkSecondary = Color(0xFFE0E0E0) +val NeonDarkAccent = Color(0xFF00E5FF) +val NeonDarkOnPrimary = Color(0xFFFFFFFF) +val NeonDarkOnSecondary = Color(0xFF000000) +val NeonDarkOnBackground = Color(0xFFFFFFFF) +val NeonDarkOnSurface = Color(0xFFFFFFFF) +val NeonDarkOnSurfaceVariant = Color(0xFFE0E0E0) + +// Classic Light Palette +val ClassicLightBackground = Color(0xFFFFFFFF) +val ClassicLightSurface = Color(0xFFF5F5F5) +val ClassicLightSurfaceVariant = Color(0xFFEEEEEE) +val ClassicLightPrimary = Color(0xFF6200EE) +val ClassicLightSecondary = Color(0xFF757575) +val ClassicLightOnPrimary = Color(0xFFFFFFFF) +val ClassicLightOnSecondary = Color(0xFFFFFFFF) +val ClassicLightOnBackground = Color(0xFF000000) +val ClassicLightOnSurface = Color(0xFF000000) +val ClassicLightOnSurfaceVariant = Color(0xFF424242) + +// Logo Gradient Colors (approximate from image) +val GajuLogoPurple = Color(0xFF9D39FF) +val GajuLogoTeal = Color(0xFF39FFEA) diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Theme.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Theme.kt new file mode 100644 index 0000000..cf1e396 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Theme.kt @@ -0,0 +1,62 @@ +package swiss.qpq.gajumobile.ui.theme + +import android.app.Activity +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.ui.platform.LocalView +import androidx.core.view.WindowCompat + +private val NeonDarkColorScheme = darkColorScheme( + primary = NeonDarkPrimary, + secondary = NeonDarkSecondary, + tertiary = NeonDarkAccent, + background = NeonDarkBackground, + surface = NeonDarkSurface, + surfaceVariant = NeonDarkSurfaceVariant, + onPrimary = NeonDarkOnPrimary, + onSecondary = NeonDarkOnSecondary, + onBackground = NeonDarkOnBackground, + onSurface = NeonDarkOnSurface, + onSurfaceVariant = NeonDarkOnSurfaceVariant, +) + +private val ClassicLightColorScheme = lightColorScheme( + primary = ClassicLightPrimary, + secondary = ClassicLightSecondary, + background = ClassicLightBackground, + surface = ClassicLightSurface, + surfaceVariant = ClassicLightSurfaceVariant, + onPrimary = ClassicLightOnPrimary, + onSecondary = ClassicLightOnSecondary, + onBackground = ClassicLightOnBackground, + onSurface = ClassicLightOnSurface, + onSurfaceVariant = ClassicLightOnSurfaceVariant, +) + +@Composable +fun MyApplicationTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + content: @Composable () -> Unit +) { + val colorScheme = if (darkTheme) NeonDarkColorScheme else ClassicLightColorScheme + + val view = LocalView.current + if (!view.isInEditMode) { + SideEffect { + val window = (view.context as Activity).window + WindowCompat.getInsetsController(window, view).apply { + isAppearanceLightStatusBars = !darkTheme + } + } + } + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} diff --git a/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Type.kt b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Type.kt new file mode 100644 index 0000000..12a54e9 --- /dev/null +++ b/app/src/main/java/swiss/qpq/gajumobile/ui/theme/Type.kt @@ -0,0 +1,34 @@ +package swiss.qpq.gajumobile.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +// Set of Material typography styles to start with +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ) + /* Other default text styles to override + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ), + labelSmall = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Medium, + fontSize = 11.sp, + lineHeight = 16.sp, + letterSpacing = 0.5.sp + ) + */ +) \ No newline at end of file diff --git a/app/src/main/keepRules/rules.keep b/app/src/main/keepRules/rules.keep new file mode 100644 index 0000000..d7e081a --- /dev/null +++ b/app/src/main/keepRules/rules.keep @@ -0,0 +1,12 @@ +# Add project specific R8 rules here. +# AGP will combine all keep rule files in src/main/keepRules to pass to R8 +# +# For more details, see +# https://d.android.com/r/tools/r8/keep-rules + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} \ No newline at end of file diff --git a/app/src/main/res/drawable/gajumobile_colored.png b/app/src/main/res/drawable/gajumobile_colored.png new file mode 100644 index 0000000..d636782 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_colored.png differ diff --git a/app/src/main/res/drawable/gajumobile_horizontal.png b/app/src/main/res/drawable/gajumobile_horizontal.png new file mode 100644 index 0000000..adea7e5 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_horizontal.png differ diff --git a/app/src/main/res/drawable/gajumobile_horizontal_colored.png b/app/src/main/res/drawable/gajumobile_horizontal_colored.png new file mode 100644 index 0000000..c59e1d0 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_horizontal_colored.png differ diff --git a/app/src/main/res/drawable/gajumobile_horizontal_white.png b/app/src/main/res/drawable/gajumobile_horizontal_white.png new file mode 100644 index 0000000..246c701 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_horizontal_white.png differ diff --git a/app/src/main/res/drawable/gajumobile_icon.png b/app/src/main/res/drawable/gajumobile_icon.png new file mode 100644 index 0000000..97edc40 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_icon.png differ diff --git a/app/src/main/res/drawable/gajumobile_icon_colored.png b/app/src/main/res/drawable/gajumobile_icon_colored.png new file mode 100644 index 0000000..14a9886 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_icon_colored.png differ diff --git a/app/src/main/res/drawable/gajumobile_icon_white.png b/app/src/main/res/drawable/gajumobile_icon_white.png new file mode 100644 index 0000000..428fe7b Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_icon_white.png differ diff --git a/app/src/main/res/drawable/gajumobile_logo.png b/app/src/main/res/drawable/gajumobile_logo.png new file mode 100644 index 0000000..dabf29a Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_logo.png differ diff --git a/app/src/main/res/drawable/gajumobile_logo_colored.png b/app/src/main/res/drawable/gajumobile_logo_colored.png new file mode 100644 index 0000000..a377fbe Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_logo_colored.png differ diff --git a/app/src/main/res/drawable/gajumobile_logo_white.png b/app/src/main/res/drawable/gajumobile_logo_white.png new file mode 100644 index 0000000..1b6ff82 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_logo_white.png differ diff --git a/app/src/main/res/drawable/gajumobile_teaser_screen.png b/app/src/main/res/drawable/gajumobile_teaser_screen.png new file mode 100644 index 0000000..d1869f2 Binary files /dev/null and b/app/src/main/res/drawable/gajumobile_teaser_screen.png differ diff --git a/app/src/main/res/drawable/ic_account_box.xml b/app/src/main/res/drawable/ic_account_box.xml new file mode 100644 index 0000000..86b08cb --- /dev/null +++ b/app/src/main/res/drawable/ic_account_box.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_favorite.xml b/app/src/main/res/drawable/ic_favorite.xml new file mode 100644 index 0000000..bdd6245 --- /dev/null +++ b/app/src/main/res/drawable/ic_favorite.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_home.xml b/app/src/main/res/drawable/ic_home.xml new file mode 100644 index 0000000..b79a902 --- /dev/null +++ b/app/src/main/res/drawable/ic_home.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/settings.png b/app/src/main/res/drawable/settings.png new file mode 100644 index 0000000..d1101fa Binary files /dev/null and b/app/src/main/res/drawable/settings.png differ diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/app/src/main/res/mipmap-anydpi/ic_launcher.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml new file mode 100644 index 0000000..6f3b755 --- /dev/null +++ b/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..109edc7 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + GajuMobile + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..cd6a3ab --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + +