Skip to content

Commit

Permalink
Merge branch 'release/5.4.6' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rafakob committed Sep 3, 2024
2 parents a65b60a + decd8b6 commit 3b9b73b
Show file tree
Hide file tree
Showing 139 changed files with 734 additions and 724 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/captures
Gemfile
Gemfile.lock
.kotlin/*

# Built application files
/*/build/
Expand Down
15 changes: 8 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.archivesName

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.twofasAndroidApplication)
Expand All @@ -17,12 +15,15 @@ android {

defaultConfig {
applicationId = "com.twofasapp"
versionName = "5.4.5"
versionCode = 5000022

val versionCodeOffset = 5000000
versionName = "5.4.6"
versionCode = 5000025
}

archivesName.set("TwoFas-$versionName-${versionCode!! - versionCodeOffset}")
applicationVariants.all {
outputs.all {
val output = this as? com.android.build.gradle.internal.api.BaseVariantOutputImpl
output?.outputFileName = "TwoFas-$versionName-${versionCode - 5000000}.apk"
}
}

ksp {
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/twofasapp/ui/main/StartActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ class StartActivity : AppCompatActivity(), AuthAware {
)
}

override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
// intent?.data?.let {
// deeplinkHandler.setQueuedDeeplink(incomingData = it.toString())
// }
}

override fun onAuthenticated() {
intent?.data?.let {
deeplinkHandler.setQueuedDeeplink(incomingData = it.toString())
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins {
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.kotlinParcelize) apply false
alias(libs.plugins.kotlinKapt) apply false
alias(libs.plugins.kotlinComposeCompiler) apply false
alias(libs.plugins.gradleVersions)
alias(libs.plugins.versionCatalogUpdate)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import org.gradle.api.Project
class TwoFasComposePlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("org.jetbrains.kotlin.plugin.compose")

getBuildExtension()?.apply {
buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = libs.findVersionString("composeCompiler")
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ internal fun Project.applyKotlinAndroid(
excludes += "META-INF/NOTICE"
excludes += "META-INF/NOTICE.txt"
excludes += "META-INF/notice.txt"
excludes += "META-INF/ASL2.0"
excludes += "META-INF/INDEX.LIST"
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ fun TwButton(
Button(
onClick = onClick,
colors = ButtonDefaults.buttonColors(
containerColor = TwTheme.color.button,
contentColor = TwTheme.color.onButton,
containerColor = TwTheme.color.primary,
contentColor = Color.White,
),
enabled = enabled,
modifier = modifier.height(height),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.ui.graphics.luminance
import com.twofasapp.designsystem.TwTheme

abstract class ThemeColors {
abstract val primary: Color
abstract val background: Color
abstract val surface: Color
abstract val surfaceVariant: Color
Expand All @@ -18,26 +19,21 @@ abstract class ThemeColors {
abstract val switchTrack: Color
abstract val switchThumb: Color

val primary: Color = Color(0xFFED1C24)
val primaryDark: Color = Color(0xFFD81F26)

val button: Color = primary
val onButton: Color = Color.White

val divider: Color
get() = surfaceVariant

val iconTint: Color
get() = onSurfaceSecondary

val error: Color = Color(0xFFB9171E)
val error: Color = Color(0xFFF83A40)

val accentLightBlue: Color = Color(0xFF7F9CFF)
val accentIndigo: Color = Color(0xFF5E5CE6)
val accentPurple: Color = Color(0xFF8C49DE)
val accentTurquoise: Color = Color(0xFF2FCFBC)
val accentGreen: Color = Color(0xFF03BF38)
val accentRed: Color = Color(0xFFED1C24)
val accentRed: Color
get() = primary
val accentOrange: Color = Color(0xFFFF7A00)
val accentYellow: Color = Color(0xFFFFBA0A)
val accentPink: Color = Color(0xFFca49de)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.ui.graphics.Color
@Immutable
@Stable
class ThemeColorsDark : ThemeColors() {
override val primary: Color = Color(0xFFF83A40)
override val background: Color = Color(0xFF101116)
override val surface: Color = Color(0xFF1A1B21)
override val surfaceVariant: Color = Color(0xFF232323)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.ui.graphics.Color
@Immutable
@Stable
class ThemeColorsLight : ThemeColors() {
override val primary: Color = Color(0xFFED1C24)
override val background: Color = Color(0xFFFFFFFF)
override val surface: Color = Color(0xFFF9F9F9)
override val surfaceVariant: Color = Color(0xFFEEEEEE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ fun DsService(
text = state.info,
textStyles = textStyles,
style = style,
spacer = editMode.not(),
modifier = Modifier.fillMaxWidth(),
)

Expand All @@ -154,7 +155,7 @@ fun DsService(
code = state.code,
nextCode = state.nextCode,
timer = state.timer,
nextCodeVisible = state.isNextCodeEnabled(showNextCode),
nextCodeVisible = state.isNextCodeEnabled(showNextCode) && editMode.not() && (state.revealed || hideCodes.not()),
nextCodeGravity = when (style) {
ServiceStyle.Default -> NextCodeGravity.Below
ServiceStyle.Compact -> NextCodeGravity.End
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fun SettingsHeader(title: String) {
Text(
text = title,
style = TwTheme.typo.body2,
color = TwTheme.color.primaryDark,
color = TwTheme.color.primary,
modifier = Modifier
.fillMaxWidth()
.padding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ fun SettingsLink(
.fillMaxWidth()
.clickable(onClick != null && enabled) { onClick?.invoke() }
.heightIn(min = 56.dp)
.alpha(if (enabled) 1f else 0.3f)
.padding(vertical = if (endContent == null) 16.dp else 8.dp)
.padding(start = 24.dp, end = 16.dp),
verticalArrangement = Arrangement.Center
Expand All @@ -61,22 +60,29 @@ fun SettingsLink(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Image(icon, image, iconTint, showEmptySpaceWhenNoIcon)
Image(
icon, image, iconTint, showEmptySpaceWhenNoIcon,
modifier = Modifier.alpha(if (enabled) 1f else 0.3f)
)

Spacer(Modifier.size(24.dp))

Column(Modifier.weight(1f)) {
Title(
title = title,
textColor = textColor,
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.alpha(if (enabled) 1f else 0.4f)
)

if (alignCenterIcon && subtitleGravity == SubtitleGravity.Bottom) {
Subtitle(
subtitle = subtitle,
textColorSecondary = textColorSecondary,
modifier = Modifier.fillMaxWidth()
modifier = Modifier
.fillMaxWidth()
.alpha(if (enabled) 1f else 0.9f)
)
}
}
Expand Down Expand Up @@ -119,12 +125,13 @@ private fun Image(
image: Painter?,
iconTint: Color?,
showEmptySpaceWhenIconMissing: Boolean,
modifier: Modifier = Modifier,
) {
if (icon != null) {
Icon(
painter = icon,
contentDescription = null,
modifier = Modifier.size(24.dp),
modifier = modifier.size(24.dp),
tint = if (iconTint != null) iconTint else TwTheme.color.primary
)
} else if (image != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.twofasapp.designsystem.settings

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.tooling.preview.Preview
Expand Down Expand Up @@ -39,6 +40,7 @@ fun SettingsSwitch(
checked = checked,
onCheckedChange = onCheckedChange,
enabled = enabled,
modifier = Modifier.alpha(if (enabled) 1f else 0.4f)
)
},
showEmptySpaceWhenNoIcon = showEmptySpaceWhenIconMissing,
Expand Down
13 changes: 9 additions & 4 deletions core/locale/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Project: 2FAS App
Locale: de-DE, German (Germany)
Exported by: rafakob
Exported at: Thu, 23 May 2024 09:50:25 -0700
Exported at: Tue, 03 Sep 2024 14:27:02 -0700
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- InfoPlist.strings
Expand Down Expand Up @@ -368,8 +368,6 @@
<string name="backup__services_imported_count">%d Dienste aus Datei importiert</string>
<!-- backup__user_has_icloud_problem -->
<string name="backup__icloud_problem">Es existiert ein Problem mit iCloud. Überprüfe die Systemeinstellungen</string>
<!-- backup__newer_schema_unsupported -->
<string name="backup__newer_format_not_supported">Diese Datei ist in einer neueren Format-Version als diese, die die App unterstützt</string>
<!-- backup__encrypted_unsupported -->
<string name="backup__encrypted_files_not_supported">Diese Datei ist verschlüsselt. Wir unterstützen nur unverschlüsselte Dateien</string>
<string name="tokens__copy_token">Token kopieren</string>
Expand Down Expand Up @@ -453,7 +451,7 @@
<string name="browser__code_failure">Fehler beim Senden des Codes. %s</string>
<string name="browser__deleting_paired_device_title">Gekoppeltes Gerät löschen</string>
<string name="browser__deleting_paired_device_content">Möchtest du wirklich dieses gekoppelte Gerät löschen?</string>
<string name="browser__pairing_date">Datum verbunden</string>
<string name="browser__pairing_date">Verbindungsdatum</string>
<string name="browser__forget_this_browser">Diesen Webbrowser vergessen</string>
<!-- browser__service_is_paired_list_description -->
<string name="browser__paired_domains_list_title">Liste von gekoppelten Domains.</string>
Expand Down Expand Up @@ -846,4 +844,11 @@
<string name="security__repeat_new_pin_short">Neuen PIN wiederholen</string>
<string name="commons__success">Erfolgreich</string>
<string name="security__enter_pin_short">PIN eingeben</string>
<string name="settings__sort_tokens">Token sortieren</string>
<string name="appleWatch__installation_info_title">2FAS Apple Watch-App Installation</string>
<string name="appleWatch__installation_first_step">2FAS Auth über die Watch-App installieren</string>
<string name="appleWatch__installation_first_step_link">Watch-App öffnen</string>
<string name="appleWatch__installation_second_step">Stelle sicher, dass die iCloud-Synchronisierung aktiviert ist</string>
<string name="appleWatch__installation_second_step_link">Gehe zu den 2FAS-Backup-Einstellungen</string>
<string name="settings__apple_watch">Apple Watch</string>
</resources>
Loading

0 comments on commit 3b9b73b

Please sign in to comment.