Skip to content

Commit

Permalink
SIANXSVC-1229: remove and deactivate menu entries
Browse files Browse the repository at this point in the history
  • Loading branch information
anx-bkelhar committed Mar 26, 2024
1 parent d79b1e1 commit 9a352d8
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 99 deletions.
15 changes: 6 additions & 9 deletions core/locale/src/main/java/com/twofasapp/locale/Links.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import androidx.compose.runtime.Stable
@Stable
@Immutable
class Links {
val playStore = "https://play.google.com/store/apps/details?id=com.twofasapp"
val playStore = "https://play.google.com/store/apps/details?id=at.anexia.authenticator"
val terms = "https://2fas.com/terms-of-service"
val privacyPolicy = "https://2fas.com/privacy-policy"
val donate = "https://2fas.com/donate"
val support = "https://support.2fas.com"
val browserExt = "https://2fas.com/be"
val youtube = "https://www.youtube.com/@2fas"
val twitter = "https://twitter.com/2FAS_com"
val discord = "https://discord.gg/q4cP6qh2g5"
val github = "https://github.com/twofas"
val linkedin = "https://www.linkedin.com/company/2fasapp/"
val reddit = "https://www.reddit.com/r/2fas_com"
val facebook = "https://facebook.com/twofas"
val youtube = "https://www.youtube.com/user/anexiagmbh"
val twitter = "https://twitter.com/_anexia"
val linkedin = "https://at.linkedin.com/company/anexia"
val instagram = "https://www.instagram.com/_anexia/"
val facebook = "https://www.facebook.com/anexiagmbh"
}
2 changes: 1 addition & 1 deletion core/locale/src/main/java/com/twofasapp/locale/Strings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class Strings(c: Context) {
val aboutTellFriend = c.getString(R.string.settings__tell_a_friend)
val aboutTellFriendShareText = c.getString(R.string.settings__recommendation)
val aboutSocialMedia = c.getString(R.string.social__social_media)
val aboutSocialDiscord = c.getString(R.string.social__discord)
val aboutSocialInstagram = c.getString(R.string.social__instagram)
val aboutSocialYouTube = c.getString(R.string.social__youtube)
val aboutSocialTwitter = c.getString(R.string.social__twitter)
val aboutSocialGitHub = c.getString(R.string.social__github)
Expand Down
2 changes: 1 addition & 1 deletion core/locale/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
<string name="settings__option_screenshots_confirm_title">Willst du Screenshots innerhalb der App zulassen?</string>
<string name="settings__option_screenshots_confirm_description">Bist du sicher? Diese Option ermöglicht es dir, Screenshots von jedem Bildschirm innerhalb der App aufzunehmen und aufzuzeichnen. Allerdings erlaubt dies auch externe Versuche, Bildschirme in der App zu erfassen. Aus Sicherheitsgründen wird diese Option automatisch nach 5 Minuten deaktiviert.</string>
<string name="social__social_media">Soziale Medien</string>
<string name="social__discord">Discord</string>
<string name="social__instagram">Instagram</string>
<string name="social__youtube">YouTube</string>
<string name="social__twitter">X (ehemals Twitter)</string>
<string name="social__github">GitHub</string>
Expand Down
2 changes: 1 addition & 1 deletion core/locale/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
<string name="settings__option_screenshots_confirm_title">Allow screenshots of the app?</string>
<string name="settings__option_screenshots_confirm_description">Are you sure? This option allows you to screenshot and record any screen within the app. However, this will also allow any external attempts of capturing screens in the app.\nFor safety reasons, this option will be automatically turned off after 5 minutes.</string>
<string name="social__social_media">Social media links</string>
<string name="social__discord">Discord</string>
<string name="social__instagram">Instagram</string>
<string name="social__youtube">YouTube</string>
<string name="social__twitter">X (formerly Twitter)</string>
<string name="social__github">GitHub</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ private fun ScreenContent(
}
}

item {
SettingsLink(title = TwLocale.strings.aboutTerms, icon = TwIcons.Terms, external = true) {
uriHandler.openSafely(TwLocale.links.terms, activity)
}
}

item {
SettingsLink(title = TwLocale.strings.aboutLicenses, icon = TwIcons.Licenses) {
onLicensesClick()
Expand All @@ -97,20 +91,6 @@ private fun ScreenContent(

item { SettingsDivider() }

item { SettingsHeader(title = TwLocale.strings.aboutShare) }

item {
SettingsLink(title = TwLocale.strings.aboutTellFriend, icon = TwIcons.Share) {
ShareCompat.IntentBuilder(activity)
.setType("text/plain")
.setChooserTitle("Share 2FAS")
.setText(shareText)
.startChooser()
}
}

item { SettingsDivider() }

item { SettingsHeader(title = TwLocale.strings.aboutSendCrashes) }

item {
Expand All @@ -129,11 +109,11 @@ private fun ScreenContent(

item {
SettingsLink(
title = TwLocale.strings.aboutSocialDiscord,
image = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_discord),
title = TwLocale.strings.aboutSocialInstagram,
image = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_youtube),
external = true
) {
uriHandler.openSafely(TwLocale.links.discord, activity)
uriHandler.openSafely(TwLocale.links.instagram, activity)
}
}

Expand All @@ -157,16 +137,6 @@ private fun ScreenContent(
}
}

item {
SettingsLink(
title = TwLocale.strings.aboutSocialGitHub,
image = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_github),
external = true
) {
uriHandler.openSafely(TwLocale.links.github, activity)
}
}

item {
SettingsLink(
title = TwLocale.strings.aboutSocialLinkedIn,
Expand All @@ -177,16 +147,6 @@ private fun ScreenContent(
}
}

item {
SettingsLink(
title = TwLocale.strings.aboutSocialReddit,
image = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_reddit),
external = true
) {
uriHandler.openSafely(TwLocale.links.reddit, activity)
}
}

item {
SettingsLink(
title = TwLocale.strings.aboutSocialFacebook,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,6 @@ internal fun ServicesAppBar(
showBackButton = false,
scrollBehavior = scrollBehavior,
actions = {
Box {
TwIconButton(
painter = TwIcons.Notification,
tint = TwTheme.color.iconTint,
onClick = onNotificationsClick,
)

if (hasUnreadNotifications) {
Badge(
containerColor = TwTheme.color.primary,
modifier = Modifier
.align(Alignment.Center)
.padding(start = 18.dp, bottom = 18.dp)
)
}
}
}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ private fun SettingsScreen(
}
}

item {
SettingsLink(title = TwLocale.strings.settingsSupport, icon = TwIcons.Support, external = true) {
uriHandler.openSafely(TwLocale.links.support, activity)
}
}

item {
SettingsLink(title = TwLocale.strings.settingsAbout, icon = TwIcons.Info) {
listener.openAbout()
Expand All @@ -115,12 +109,6 @@ private fun SettingsScreen(

item { SettingsDivider() }

item {
SettingsLink(title = TwLocale.strings.settingsDonate, icon = TwIcons.Favorite, external = true) {
uriHandler.openSafely(TwLocale.links.donate, activity)
}
}

item {
Row(
modifier = Modifier
Expand All @@ -129,12 +117,12 @@ private fun SettingsScreen(
horizontalArrangement = Arrangement.spacedBy(14.dp, Alignment.CenterHorizontally),
) {
Image(
painter = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_discord),
painter = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_youtube),
contentDescription = null,
modifier = Modifier
.size(52.dp)
.clip(CircleShape)
.clickable { uriHandler.openSafely(TwLocale.links.discord, activity) }
.clickable { uriHandler.openSafely(TwLocale.links.instagram, activity) }
.padding(14.dp),
)
Image(
Expand All @@ -156,13 +144,13 @@ private fun SettingsScreen(
.padding(14.dp),
)
Icon(
painter = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_github),
painter = painterResource(id = com.twofasapp.designsystem.R.drawable.ic_facebook),
contentDescription = null,
tint = TwTheme.color.onSurfacePrimary,
modifier = Modifier
.size(52.dp)
.clip(CircleShape)
.clickable { uriHandler.openSafely(TwLocale.links.github, activity) }
.clickable { uriHandler.openSafely(TwLocale.links.facebook, activity) }
.padding(14.dp),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,25 +130,13 @@ internal fun ScreenContent(
}
}

if (pagerState.currentPage == 0) {
Text(
text = TwLocale.strings.startupTermsLabel,
style = MaterialTheme.typography.bodyMedium,
color = TwTheme.color.onSurfaceSecondary,
modifier = Modifier
.clip(TwTheme.shape.roundedDefault)
.clickable { uriHandler.openSafely(TwLocale.links.terms, context) }
.padding(4.dp)
)
} else {
HorizontalPagerIndicator(
pagerState = pagerState,
activeColor = TwTheme.color.primary,
inactiveColor = TwTheme.color.divider,
pageCount = pagerState.pageCount - 1,
pageIndexMapping = { it - 1 }
)
}

Spacer(modifier = Modifier.height(36.dp))

Expand Down

0 comments on commit 9a352d8

Please sign in to comment.