-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
220 additions
and
51 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
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
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/jocmp/capyreader/ui/settings/AccountSettingsStrings.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,32 @@ | ||
package com.jocmp.capyreader.ui.settings | ||
|
||
import androidx.annotation.StringRes | ||
import com.jocmp.capy.accounts.Source | ||
import com.jocmp.capyreader.R | ||
|
||
data class AccountSettingsStrings( | ||
@StringRes val dialogTitle: Int, | ||
@StringRes val dialogMessage: Int, | ||
@StringRes val dialogConfirmText: Int, | ||
@StringRes val requestRemoveText: Int | ||
) { | ||
companion object { | ||
fun find(source: Source): AccountSettingsStrings { | ||
return when (source) { | ||
Source.LOCAL -> AccountSettingsStrings( | ||
dialogTitle = R.string.settings_remove_account_title_local, | ||
dialogMessage = R.string.settings_remove_account_message_local, | ||
dialogConfirmText = R.string.settings_remove_account_confirm_local, | ||
requestRemoveText = R.string.settings_remove_account_button_local, | ||
) | ||
|
||
Source.FEEDBIN -> AccountSettingsStrings( | ||
dialogTitle = R.string.settings_remove_account_title_feedbin, | ||
dialogMessage = R.string.settings_remove_account_message_feedbin, | ||
dialogConfirmText = R.string.settings_remove_account_confirm_feedbin, | ||
requestRemoveText = R.string.settings_remove_account_button_feedbin, | ||
) | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/com/jocmp/capyreader/ui/settings/OPMLExportButton.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,26 @@ | ||
package com.jocmp.capyreader.ui.settings | ||
|
||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.MaterialTheme.colorScheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
|
||
@Composable | ||
fun OPMLExportButton() { | ||
Column { | ||
Button( | ||
onClick = {}, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = colorScheme.secondary, | ||
contentColor = colorScheme.onSecondary | ||
), | ||
modifier = Modifier.fillMaxWidth() | ||
) { | ||
Text("Export to OPML") | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
app/src/main/java/com/jocmp/capyreader/ui/settings/OPMLImportButton.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,23 @@ | ||
package com.jocmp.capyreader.ui.settings | ||
|
||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.MaterialTheme.colorScheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
|
||
@Composable | ||
fun OPMLImportButton() { | ||
Button( | ||
onClick = {}, | ||
colors = ButtonDefaults.buttonColors( | ||
containerColor = colorScheme.secondary, | ||
contentColor = colorScheme.onSecondary | ||
), | ||
modifier = Modifier.fillMaxWidth() | ||
) { | ||
Text("Import from File") | ||
} | ||
} |
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
Oops, something went wrong.