Skip to content

Commit 15d4b84

Browse files
committed
Update the export screen
1 parent ae1a12d commit 15d4b84

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

app/src/main/java/com/xinto/mauth/ui/screen/export/ExportScreen.kt

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import androidx.compose.ui.draw.drawBehind
3939
import androidx.compose.ui.graphics.Color
4040
import androidx.compose.ui.res.painterResource
4141
import androidx.compose.ui.res.stringResource
42+
import androidx.compose.ui.text.style.TextAlign
4243
import androidx.compose.ui.unit.dp
4344
import androidx.lifecycle.compose.collectAsStateWithLifecycle
4445
import com.xinto.mauth.R
@@ -167,20 +168,15 @@ private fun BatchExports(
167168
) {
168169
val pagerState = rememberPagerState { state.data.size }
169170
HorizontalPager(pagerState) {
170-
Surface(
171+
ZxingQrImage(
171172
modifier = Modifier
172173
.fillMaxWidth()
173-
.padding(horizontal = 12.dp),
174-
shape = MaterialTheme.shapes.large,
175-
tonalElevation = 1.dp
176-
) {
177-
ZxingQrImage(
178-
data = state.data[it],
179-
size = 512,
180-
backgroundColor = Color.Transparent,
181-
contentColor = MaterialTheme.colorScheme.onSurface
182-
)
183-
}
174+
.padding(horizontal = 24.dp),
175+
data = state.data[it],
176+
size = 512,
177+
backgroundColor = Color.Transparent,
178+
contentColor = MaterialTheme.colorScheme.onSurface
179+
)
184180
}
185181
if (state.data.size > 1) {
186182
Row(
@@ -206,6 +202,13 @@ private fun BatchExports(
206202
}
207203
}
208204
}
205+
206+
Text(
207+
modifier = Modifier.padding(32.dp),
208+
text = stringResource(R.string.export_batch_hint),
209+
style = MaterialTheme.typography.titleSmall,
210+
textAlign = TextAlign.Center
211+
)
209212
}
210213
}
211214
is BatchExportState.Error -> {

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<string name="qrscan_error">Insufficient permissions</string>
3737
<string name="qrscan_error_batch">Scanned QR code does not match previous.</string>
3838
<string name="qrscan_error_order">Scan QR codes in the correct order.</string>
39+
<string name="qrscan_info_batch">Scanned %1$d out of %2$d</string>
3940

4041
<string name="account_title_add">Add an account</string>
4142
<string name="account_title_edit">Edit an account</string>
@@ -89,10 +90,10 @@
8990

9091
<string name="export_title">Export</string>
9192
<string name="export_url_copy_success">Successfully copied the OTP URL to the clipboard</string>
93+
<string name="export_batch_hint">Scan this QR code using any Google Authenticator compatible app</string>
9294

9395
<string name="about_title">About</string>
9496
<string name="about_version">Version v%1$s</string>
9597
<string name="about_links_source">Source</string>
9698
<string name="about_links_feedback">Feedback</string>
97-
<string name="qrscan_info_batch">Scanned %1$d out of %2$d</string>
9899
</resources>

0 commit comments

Comments
 (0)