-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(settings): move to top bar, add categories
- Loading branch information
1 parent
8c35edd
commit ec72d2e
Showing
39 changed files
with
1,426 additions
and
1,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
data class CreditsData( | ||
val name: Any, | ||
val description: Any, | ||
val url: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package com.aliernfrog.pftool.data | ||
|
||
data class Social( | ||
val name: String, | ||
val label: String, | ||
val icon: Any, | ||
val url: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 0 additions & 68 deletions
68
app/src/main/java/com/aliernfrog/pftool/ui/component/FilesDowngradeNotice.kt
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
app/src/main/java/com/aliernfrog/pftool/ui/component/SettingsButton.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.aliernfrog.pftool.ui.component | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.Settings | ||
import androidx.compose.material3.Badge | ||
import androidx.compose.material3.BadgedBox | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.IconButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.res.stringResource | ||
import com.aliernfrog.pftool.R | ||
import com.aliernfrog.pftool.util.Destination | ||
|
||
@Composable | ||
fun SettingsButton( | ||
modifier: Modifier = Modifier, | ||
onClick: () -> Unit | ||
) { | ||
val hasNotification = Destination.SETTINGS.hasNotification.value | ||
|
||
@Composable | ||
fun SettingsIcon() { | ||
Icon( | ||
imageVector = Icons.Default.Settings, | ||
contentDescription = stringResource(R.string.settings) | ||
) | ||
} | ||
|
||
IconButton( | ||
modifier = modifier, | ||
onClick = { | ||
onClick() | ||
Destination.SETTINGS.hasNotification.value = false | ||
} | ||
) { | ||
if (hasNotification) BadgedBox( | ||
badge = { Badge() } | ||
) { | ||
SettingsIcon() | ||
} | ||
else SettingsIcon() | ||
} | ||
} |
Oops, something went wrong.