Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

feat(mobile): redesign Dub, add Home contributors, compact icon-only dock

debpalash830d920f2710
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a5b9178d..a58d6e9ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,11 @@ metadata and the backend fallback mirror it.
- Preview iOS and Android apps that run VoiceStudio on your phone, offline
+### Changed
+
+- iOS Home shows Electron's contributor avatars, Dub is redesigned around one source card with animated icons, and the bottom dock is icon-only
+- Model licence review on iOS and Android opens with a plain summary, rights rows and licence links; the raw terms move under Exact terms
+
### Added
- Preview iOS and Android companion apps: drive your own VoiceStudio from your phone (speak, voices and cloning, dubbing, dictation) after pairing by QR code; build from source for now ([guide](docs/mobile.md)) (#2965)
diff --git a/mobile/android/README.md b/mobile/android/README.md
index e2d279a2d..f96d593d9 100644
--- a/mobile/android/README.md
+++ b/mobile/android/README.md
@@ -291,8 +291,8 @@ installation marker is written; native loads reuse verification while the file s
Phone files and local licence receipts live under Android's `noBackupFilesDir`;
they are app-private and excluded from cloud and device backups. Non-commercial,
conditional, unknown and explicitly gated licences block download and load until
-accepted locally. The dialog displays the bundled complete inert `licence.terms`
-disclosure, attribution and fingerprint. Receipts store that fingerprint, app
+accepted locally. The dialog leads with a plain summary (category, rights rows, notes, https licence links) and keeps the bundled complete inert `licence.terms`
+disclosure, attribution and fingerprint under a collapsed Exact terms section. Receipts store that fingerprint, app
version and timestamp; the latest 20 accept/withdraw actions are retained.
A changed fingerprint or withdrawal blocks use without deleting weights.
@@ -452,3 +452,11 @@ saved phone voices select the reference in Speak, and projects open their
outputs and resume controls. Empty states are localized and downloads remain
explicit. Home replaces Speak in the five-item navigation; Speak opens from Home.
Desktop-only workspaces are not advertised as available mobile features.
+
+## Home, Dub and dock
+
+Home shows Electron's contributor avatars (`HomeContributors.kt`; the Gradle catalog task copies the
+images from `electron/.../home/contributors` into the APK assets, nothing is fetched at runtime and
+`tests/test_mobile_contract.py` guards the list). Dub opens with a dashed source card and the animated
+`DubGlyph`; the bottom navigation is icon-only with names as content descriptions.
+
diff --git a/mobile/android/app/build.gradle.kts b/mobile/android/app/build.gradle.kts
index 66187c2a2..e4d4387ec 100644
--- a/mobile/android/app/build.gradle.kts
+++ b/mobile/android/app/build.gradle.kts
@@ -36,6 +36,7 @@ val bundleCatalogs by tasks.registering {
inputs.file(repository.resolve("electron/public/signal-field.webp"))
inputs.file(repository.resolve("electron/src/shared/languages.json"))
inputs.file(repository.resolve("LICENSE"))
+ inputs.dir(repository.resolve("electron/src/renderer/src/features/home/contributors"))
inputs.files(fileTree(contracts) { include("strings*.en.json", "tokens.json", "openapi.json", "models.json") })
outputs.dir(layout.buildDirectory.dir("generated/catalogs"))
outputs.dir(layout.buildDirectory.dir("generated/catalogResources"))
@@ -45,6 +46,8 @@ val bundleCatalogs by tasks.registering {
assets.mkdirs()
repository.resolve("electron/public/signal-field.webp").copyTo(assets.resolve("signal-field.webp"), overwrite=true)
repository.resolve("electron/src/shared/languages.json").copyTo(assets.resolve("languages.json"), overwrite=true)
+ val avatars = repository.resolve("electron/src/renderer/src/features/home/contributors")
+ avatars.listFiles()!!.forEach { it.copyTo(assets.resolve("contributors/" + it.name).apply { parentFile.mkdirs() }, overwrite=true) }
val out = assets.resolve("locales").apply { mkdirs() }
assets.resolve("licenses").mkdirs()
repository.resolve("LICENSE").copyTo(assets.resolve("licenses/VoiceStudio-AGPL-3.0.txt"), overwrite=true)
diff --git a/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt b/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
index 501026b5f..a236eebd0 100644
--- a/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
+++ b/mobile/android/app/src/main/kotlin/com/voicestudio/mobile/MainActivity.kt
@@ -77,7 +77,7 @@ class MainActivity:ComponentActivity() {
val label=if(tab=="home") l.t("nav.home") else if(tab=="connect") l.t("mobile.tabs.connect") else l.t("mobile.tabs.$tab")
NavigationBarItem(selected=route==tab || (tab=="home" && (route=="speak" || route.startsWith("voice/") || route.startsWith("host-voice/") || route.startsWith("project"))),onClick={dismissKeyboard();nav.navigate(tab) {popUpTo(nav.graph.startDestinationId) {saveState=true};launchSingleTop=true;restoreState=tab!="home"}},
icon={Icon(when(tab) {"home" -> Icons.Default.Home;"speak" -> Icons.Default.PlayArrow;"voices" -> Icons.Default.Person;"dub" -> Icons.AutoMirrored.Filled.List;"dictate" -> Icons.Default.Edit;"connect" -> Icons.Default.Add;else -> Icons.Default.Settings},contentDescription=label)},
- label=if(LocalDensity.current.fontScale<=1.5f) {{Text(label)}} else null,
+ label=null,alwaysShowLabel=false,
colors=NavigationBarItemDefaults.colors(indicatorColor=role("messageSurface"),selectedIconColor=role("messageAction"),selectedTextColor=role("toolbarForeground"),unselectedIconColor=role("textMuted"),unselectedTextColor=role("textMuted")))
}
}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/DubComponents.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/DubComponents.kt
new file mode 100644
index 000000000..6773a496e
--- /dev/null
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/DubComponents.kt
@@ -0,0 +1,80 @@
+package com.voicestudio.mobile.features
+
+import androidx.compose.animation.core.*
+import androidx.compose.foundation.Canvas
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.*
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.runtime.*
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.drawBehind
+import androidx.compose.ui.geometry.CornerRadius
+import androidx.compose.ui.geometry.Offset
+import androidx.compose.ui.geometry.RoundRect
+import androidx.compose.ui.geometry.Size
+import androidx.compose.ui.graphics.Path
+import androidx.compose.ui.graphics.PathEffect
+import androidx.compose.ui.graphics.PathMeasure
+import androidx.compose.ui.graphics.StrokeCap
+import androidx.compose.ui.graphics.drawscope.Stroke
+import androidx.compose.ui.semantics.Role
+import androidx.compose.ui.semantics.clearAndSetSemantics
+import androidx.compose.ui.semantics.role
+import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.unit.Dp
+import androidx.compose.ui.unit.dp
+import com.voicestudio.mobile.designsystem.*
+import kotlin.math.PI
+import kotlin.math.max
+import kotlin.math.sin
+
+/**
+ * Vector dub mark: the frame draws itself once, then the waveform breathes.
+ * Infinite transitions stop when the system animation scale is 0 (Reduce Motion).
+ */
+@Composable fun DubGlyph(size: Dp = 72.dp, active: Boolean = false) {
+ val accent = role("messageAction")
+ val phase by rememberInfiniteTransition(label = "dub-glyph").animateFloat(0f, (2 * PI).toFloat(),
+ infiniteRepeatable(tween(if (active) 1050 else 2600, easing = LinearEasing)), label = "phase")
+ val drawn = remember { Animatable(0f) }
+ LaunchedEffect(Unit) { drawn.animateTo(1f, tween(900, easing = FastOutSlowInEasing)) }
+ val base = remember { floatArrayOf(.35f, .62f, 1f, .62f, .35f) }
+ Canvas(Modifier.size(size).clearAndSetSemantics {}) {
+ val w = this.size.width; val h = this.size.height
+ val corner = CornerRadius(w * .3f)
+ drawRoundRect(accent.copy(alpha = .10f), cornerRadius = corner)
+ val outline = Path().apply { addRoundRect(RoundRect(0f, 0f, w, h, corner)) }
+ val measure = PathMeasure().apply { setPath(outline, false) }
+ val partial = Path()
+ measure.getSegment(0f, measure.length * drawn.value, partial, true)
+ drawPath(partial, accent.copy(alpha = .85f), style = Stroke(max(1.5.dp.toPx(), w * .035f), cap = StrokeCap.Round))
+ val areaW = w * .46f; val areaH = h * .4f
+ val barW = areaW / 9f
+ for (index in base.indices) {
+ val wave = .72f + .28f * sin(phase * (if (active) 2f else 1f) + index * .9f)
+ val barH = areaH * base[index] * wave
+ drawRoundRect(accent, Offset((w - areaW) / 2f + barW * index * 2f, (h - barH) / 2f), Size(barW, barH), CornerRadius(barW / 2f))
+ }
+ }
+}
+
+/** The one big call to action on Dub: pick the media to dub. */
+@Composable fun DubSourceCard(enabled: Boolean = true, onClick: () -> Unit) {
+ val accent = role("messageAction")
+ val shape = MaterialTheme.shapes.large
+ Surface(shape = shape, color = role("surface"), modifier = Modifier.fillMaxWidth().heightIn(min = 168.dp)
+ .drawBehind {
+ val stroke = Stroke(1.5.dp.toPx(), pathEffect = PathEffect.dashPathEffect(floatArrayOf(7.dp.toPx(), 7.dp.toPx())))
+ drawRoundRect(accent.copy(alpha = .35f), cornerRadius = CornerRadius(16.dp.toPx()), style = stroke)
+ }
+ .clickable(enabled = enabled, onClick = onClick).semantics { role = Role.Button }) {
+ Column(Modifier.fillMaxWidth().padding(VSTheme.inset), horizontalAlignment = Alignment.CenterHorizontally,
+ verticalArrangement = Arrangement.spacedBy(VSTheme.gap, Alignment.CenterVertically)) {
+ DubGlyph(76.dp)
+ Text(tr("mobile.dub.pick_media"), style = MaterialTheme.typography.titleMedium)
+ }
+ }
+}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeContributors.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeContributors.kt
new file mode 100644
index 000000000..4f46055a5
--- /dev/null
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeContributors.kt
@@ -0,0 +1,73 @@
+package com.voicestudio.mobile.features
+
+import android.graphics.BitmapFactory
+import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.*
+import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Text
+import androidx.compose.runtime.*
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.graphics.ImageBitmap
+import androidx.compose.ui.graphics.asImageBitmap
+import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalUriHandler
+import androidx.compose.ui.semantics.contentDescription
+import androidx.compose.ui.semantics.semantics
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.dp
+import com.voicestudio.mobile.designsystem.*
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.withContext
+import kotlin.math.ceil
+import kotlin.math.min
+
+/**
+ * Human GitHub contributors with more than 10 commits, mirroring
+ * `electron/src/renderer/src/features/home/home-contributors-data.ts`. Avatars are copied from
+ * Electron's bundle into the APK assets at build time: nothing is fetched at runtime.
+ */
+object HomeContributors {
+ val logins = listOf("debpalash", "kevin9327", "psiberfunk", "velixio", "jaketame", "paoloantinori", "Chang-Jin-Lee", "Shivendra-Coherent", "marreiradigital")
+ const val REPOSITORY = "https://github.com/debpalash/VoiceStudio"
+ /** Three right-aligned rows that taper downward, filled right to left, ending with "All". */
+ fun rows(items: List<String>): List<List<String>> {
+ val top = min(items.size, ceil((items.size + 3) / 3.0).toInt())
+ val middle = min(items.size - top, ceil((items.size - top + 1) / 2.0).toInt())
+ return listOf(items.subList(0, top), items.subList(top, top + middle), items.subList(top + middle, items.size)).filter { it.isNotEmpty() }
+ }
+}
+
+@Composable fun ContributorCluster() {
+ val items = HomeContributors.logins + "all"
+ Column(horizontalAlignment = Alignment.End, verticalArrangement = Arrangement.spacedBy(6.dp)) {
+ HomeContributors.rows(items).forEach { row ->
+ Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { row.reversed().forEach { Contributor(it) } }
+ }
+ }
+}
+
+@Composable private fun Contributor(login: String) {
+ val uri = LocalUriHandler.current
+ val context = LocalContext.current
+ val all = login == "all"
+ val label = if (all) tr("homeUi.allContributors") else "@$login"
+ val avatar by produceState<ImageBitmap?>(null, login) {
+ if (!all) value = withContext(Dispatchers.IO) {
+ val name = context.assets.list("contributors")?.firstOrNull { it.substringBeforeLast('.') == login } ?: return@withContext null
+ context.assets.open("contributors/$name").use { BitmapFactory.decodeStream(it)?.asImageBitmap() }
+ }
+ }
+ Box(Modifier.size(40.dp).clip(CircleShape).background(role("surfaceRaised")).border(1.dp, role("border"), CircleShape)
+ .clickable(onClickLabel = label) { uri.openUri(if (all) "${HomeContributors.REPOSITORY}/graphs/contributors" else "https://github.com/$login") }
+ .semantics { contentDescription = label }, contentAlignment = Alignment.Center) {
+ if (all) Text(tr("homeUi.all"), style = MaterialTheme.typography.labelSmall, fontWeight = FontWeight.SemiBold)
+ else avatar?.let { Image(it, null, Modifier.fillMaxSize(), contentScale = ContentScale.Crop) }
+ }
+}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt
index 36878b012..7cd82d1b0 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeScreen.kt
@@ -60,6 +60,7 @@ private val destinations = listOf(
Column(Modifier.fillMaxWidth().padding(VSTheme.inset),verticalArrangement=Arrangement.spacedBy(VSTheme.gap)) {
Text(tr("homeUi.title"),style=MaterialTheme.typography.headlineLarge,fontWeight=FontWeight.SemiBold)
Text(tr("mobile.local.privacy"),style=MaterialTheme.typography.bodyMedium,color=role("textMuted"))
+ Box(Modifier.fillMaxWidth(),contentAlignment=Alignment.CenterEnd) {ContributorCluster()}
}
}
}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
index 9b4c09011..0aba8e975 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/DubScreen.kt
@@ -110,7 +110,7 @@ import java.io.File
ScreenTitle("mobile.tabs.dub")
StepHeading("mobile.simple.source",VSIcons.Video)
if(copying || catalog==null) InlineLoading()
- Secondary("mobile.dub.pick_media",!copying) {picker.launch(arrayOf("video/*","audio/*"))}
+ DubSourceCard(!copying) {picker.launch(arrayOf("video/*","audio/*"))}
if(filePath!=null) {
SelectedDubSource(sourceName ?: File(filePath!!).name) {File(filePath!!).delete();filePath=null;sourceName=null}
}
diff --git a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
index beda3e3cf..60f468979 100644
--- a/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
+++ b/mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/dub/PhoneDubScreen.kt
@@ -75,7 +75,7 @@ import java.io.File
ScreenTitle(if(libraryOnly) "projects.title" else "mobile.tabs.dub")
if(projectId==null && !libraryOnly) {
StepHeading("mobile.simple.source",VSIcons.Video)
- Secondary("mobile.dub.pick_media",!copying&&!state.busy) {picker.launch(arrayOf("audio/*","video/*"))}
+ DubSourceCard(!copying&&!state.busy) {picker.launch(arrayOf("audio/*","video/*"))}
path?.let {source ->SelectedDubSource(sourceName ?: File(source).name) {File(source).delete();path=null;sourceName=null}}
if(copying||catalog==null) InlineLoading()
StepHeading("mobile.simple.languages",VSIcons.Globe)
diff --git a/mobile/ios/README.md b/mobile/ios/README.md
index 55aa7f12e..c9fe71ba0 100644
--- a/mobile/ios/README.md
+++ b/mobile/ios/README.md
@@ -174,3 +174,15 @@ References: [Apple's Liquid Glass adoption guide](https://developer.apple.com/do
[Sheets](https://developer.apple.com/design/human-interface-guidelines/sheets),
[Layout](https://developer.apple.com/design/human-interface-guidelines/layout) and
[Accessibility](https://developer.apple.com/design/human-interface-guidelines/accessibility).
+
+## Home and Dub
+
+Home leads with the "VoiceStudio.sh Open Source" title and Electron's tapered cluster of
+GitHub contributor avatars (more than 10 commits, ending with "All"). The avatars are
+bundled in `Resources/Contributors.xcassets`, mirror
+`electron/src/renderer/src/features/home/home-contributors-data.ts` (guarded by
+`tests/test_mobile_contract.py`) and are never fetched at runtime; tapping one opens the
+profile in the browser. Dub is one big source card with an animated vector mark
+(`DubGlyph`, static under Reduce Motion), language and voice tiles, a consent row and live
+job cards. The bottom dock is icon-only; tab names remain accessibility labels.
+
diff --git a/mobile/ios/VoiceStudio/App/SelectionControls.swift b/mobile/ios/VoiceStudio/App/SelectionControls.swift
index 6f9273935..f23e6d877 100644
--- a/mobile/ios/VoiceStudio/App/SelectionControls.swift
+++ b/mobile/ios/VoiceStudio/App/SelectionControls.swift
@@ -42,6 +42,7 @@ struct ChoicePicker: View {
let options: [SelectionOption]
var compact = false
var icon: String? = nil
+ var tile = false
@State private var presenting = false
@State private var query = ""
private var filtered: [SelectionOption] {
@@ -49,7 +50,9 @@ struct ChoicePicker: View {
}
var body: some View {
Button { query = ""; presenting = true } label: {
- if compact {
+ if tile {
+ TileLabel(icon: icon ?? "circle", label: label, value: options.first { $0.id == selection }?.title ?? "")
+ } else if compact {
HStack(spacing: 4) {
Text(options.first { $0.id == selection }?.title ?? label).lineLimit(1).truncationMode(.tail)
Image(systemName: "chevron.down").accessibilityHidden(true)
diff --git a/mobile/ios/VoiceStudio/App/ThemeUI.swift b/mobile/ios/VoiceStudio/App/ThemeUI.swift
index 3b2a325e0..a6ab2282e 100644
--- a/mobile/ios/VoiceStudio/App/ThemeUI.swift
+++ b/mobile/ios/VoiceStudio/App/ThemeUI.swift
@@ -125,11 +125,11 @@ struct RootView: View {
if !model.consentAnswered { ConsentView() }
else {
TabView {
- NavigationStack { HomeView() }.tabItem { Label(model.t("nav.home"), systemImage: "house") }
- NavigationStack { VoicesView() }.tabItem { Label(model.t("mobile.tabs.voices"), systemImage: "person.wave.2") }
- NavigationStack { DubView() }.tabItem { Label(model.t("mobile.tabs.dub"), systemImage: "film") }
- NavigationStack { DictateView() }.tabItem { Label(model.t("mobile.tabs.dictate"), systemImage: "mic") }
- NavigationStack { SettingsView() }.tabItem { Label(model.t("mobile.tabs.settings"), systemImage: "gearshape") }
+ NavigationStack { HomeView() }.tabItem { StudioTabIcon(title: model.t("nav.home"), systemImage: "house") }
+ NavigationStack { VoicesView() }.tabItem { StudioTabIcon(title: model.t("mobile.tabs.voices"), systemImage: "person.wave.2") }
+ NavigationStack { DubView() }.tabItem { StudioTabIcon(title: model.t("mobile.tabs.dub"), systemImage: "film") }
+ NavigationStack { DictateView() }.tabItem { StudioTabIcon(title: model.t("mobile.tabs.dictate"), systemImage: "mic") }
+ NavigationStack { SettingsView() }.tabItem { StudioTabIcon(title: model.t("mobile.tabs.settings"), systemImage: "gearshape") }
}
.id(model.hostState.scopeID)
.modifier(StudioTabBehavior())
@@ -228,3 +228,12 @@ private struct StudioTabBehavior: ViewModifier {
#endif
}
}
+
+/// Icon-only tab: a compact dock. The title stays as the accessibility label.
+private struct StudioTabIcon: View {
+ let title: String
+ let systemImage: String
+ var body: some View {
+ Image(systemName: systemImage).accessibilityLabel(title)
+ }
+}
diff --git a/mobile/ios/VoiceStudio/Features/DubComponents.swift b/mobile/ios/VoiceStudio/Features/DubComponents.swift
new file mode 100644
index 000000000..c7dd0f445
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Features/DubComponents.swift
@@ -0,0 +1,172 @@
+import SwiftUI
+import VoiceStudioKit
+
+/// Vector dub mark: the frame draws itself once, then the waveform breathes.
+/// Static under Reduce Motion; `active` speeds it up while a job is running.
+struct DubGlyph: View {
+ @Environment(\.vsTheme) private var theme
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
+ var size: CGFloat = 72
+ var active = false
+ @State private var drawn = false
+ private static let base: [Double] = [0.35, 0.62, 1, 0.62, 0.35]
+ var body: some View {
+ let accent = theme.color("messageAction")
+ ZStack {
+ RoundedRectangle(cornerRadius: size * 0.3, style: .continuous).fill(accent.opacity(0.10))
+ RoundedRectangle(cornerRadius: size * 0.3, style: .continuous)
+ .trim(from: 0, to: drawn ? 1 : 0)
+ .stroke(accent.opacity(0.85), style: StrokeStyle(lineWidth: max(1.5, size * 0.035), lineCap: .round))
+ TimelineView(.animation(minimumInterval: 1.0 / 30.0, paused: reduceMotion)) { timeline in
+ Canvas { context, canvas in
+ let t = reduceMotion ? 0 : timeline.date.timeIntervalSinceReferenceDate
+ let speed = active ? 6.0 : 2.4
+ let barWidth = canvas.width / 9
+ for index in 0..<Self.base.count {
+ let wave = reduceMotion ? 1.0 : 0.72 + 0.28 * sin(t * speed + Double(index) * 0.9)
+ let height = canvas.height * Self.base[index] * wave
+ let rect = CGRect(x: barWidth * CGFloat(index * 2), y: (canvas.height - height) / 2, width: barWidth, height: height)
+ context.fill(Path(roundedRect: rect, cornerRadius: barWidth / 2), with: .color(accent))
+ }
+ }
+ }.frame(width: size * 0.46, height: size * 0.4)
+ }
+ .frame(width: size, height: size)
+ .onAppear { if reduceMotion { drawn = true } else { withAnimation(.easeOut(duration: 0.9)) { drawn = true } } }
+ .accessibilityHidden(true)
+ }
+}
+
+/// The one big call to action on Dub: pick the media to dub.
+struct DubSourceButton: View {
+ @Environment(AppModel.self) private var model
+ @Environment(\.vsTheme) private var theme
+ let action: () -> Void
+ var body: some View {
+ Button(action: action) {
+ VStack(spacing: VSTokens.spacingGap) {
+ DubGlyph(size: 76)
+ Text(model.t("mobile.dub.pick_media")).font(.headline)
+ }
+ .frame(maxWidth: .infinity, minHeight: 168).padding(Theme.compactInset)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous))
+ .overlay(RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous)
+ .strokeBorder(theme.color("messageAction").opacity(0.35), style: StrokeStyle(lineWidth: 1.5, dash: [7, 7])))
+ .contentShape(Rectangle())
+ }.buttonStyle(.plain).accessibilityIdentifier("dub.pick")
+ }
+}
+
+/// The chosen file, in the same card slot as the picker.
+struct DubFileCard: View {
+ @Environment(\.vsTheme) private var theme
+ let name: String
+ let remove: () -> Void
+ var body: some View {
+ HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: "film.fill").font(.title3).foregroundStyle(theme.color("messageAction"))
+ .frame(width: 44, height: 44).background(theme.color("messageSurface"), in: Circle())
+ .symbolEffect(.bounce, value: name).accessibilityHidden(true)
+ SelectedFileRow(name: name, remove: remove)
+ }
+ .padding(Theme.compactInset)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous))
+ }
+}
+
+/// A setting as a tile: icon, name and current value. Used inside `DubTiles`.
+struct TileLabel: View {
+ @Environment(\.vsTheme) private var theme
+ let icon: String
+ let label: String
+ let value: String
+ var body: some View {
+ VStack(alignment: .leading, spacing: 10) {
+ Image(systemName: icon).font(.title3.weight(.medium)).foregroundStyle(theme.color("messageAction"))
+ .frame(width: 40, height: 40).background(theme.color("messageSurface"), in: Circle())
+ .accessibilityHidden(true)
+ VStack(alignment: .leading, spacing: 2) {
+ Text(label).font(.caption).foregroundStyle(theme.color("textMuted"))
+ Text(value.isEmpty ? "–" : value).font(.subheadline.weight(.semibold)).lineLimit(2).multilineTextAlignment(.leading)
+ }
+ }
+ .frame(maxWidth: .infinity, minHeight: 112, alignment: .topLeading).padding(14)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous))
+ .contentShape(Rectangle())
+ .accessibilityElement(children: .ignore).accessibilityLabel(label).accessibilityValue(value)
+ }
+}
+
+/// Two tiles side by side; stacked at accessibility text sizes.
+struct DubTiles<Content: View>: View {
+ @Environment(\.dynamicTypeSize) private var typeSize
+ let content: Content
+ init(@ViewBuilder content: () -> Content) { self.content = content() }
+ var body: some View {
+ let layout = typeSize.isAccessibilitySize ? AnyLayout(VStackLayout(spacing: VSTokens.spacingGap)) : AnyLayout(HStackLayout(spacing: VSTokens.spacingGap))
+ layout { content }
+ }
+}
+
+struct DubConsentRow: View {
+ @Environment(AppModel.self) private var model
+ @Environment(\.vsTheme) private var theme
+ @Binding var isOn: Bool
+ var body: some View {
+ HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: isOn ? "checkmark.shield.fill" : "shield").font(.title3)
+ .foregroundStyle(theme.color(isOn ? "messageAction" : "iconMuted"))
+ .contentTransition(.symbolEffect(.replace)).symbolEffect(.bounce, value: isOn).accessibilityHidden(true)
+ Toggle(model.t("mobile.simple.voice_consent"), isOn: $isOn).font(.subheadline).frame(minHeight: 44)
+ InfoButton(title: model.t("mobile.voices.consent_title"), detail: model.t("mobile.voices.consent_body"))
+ }
+ .padding(.horizontal, Theme.compactInset)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous))
+ }
+}
+
+/// A running or paused job: live glyph, stage, percent and a thin progress bar.
+struct DubJobCard<Actions: View>: View {
+ @Environment(AppModel.self) private var model
+ @Environment(\.vsTheme) private var theme
+ let title: String
+ let stage: String
+ let fraction: Double
+ var running = true
+ let actions: Actions
+ init(title: String, stage: String, fraction: Double, running: Bool = true, @ViewBuilder actions: () -> Actions) {
+ self.title = title; self.stage = stage; self.fraction = fraction; self.running = running; self.actions = actions()
+ }
+ var body: some View {
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
+ HStack(spacing: VSTokens.spacingGap) {
+ DubGlyph(size: 48, active: running)
+ VStack(alignment: .leading, spacing: 2) {
+ Text(title).font(.subheadline.weight(.semibold)).lineLimit(1).truncationMode(.middle)
+ Text(stage).font(.caption).foregroundStyle(theme.color("textMuted")).lineLimit(1)
+ }.frame(maxWidth: .infinity, alignment: .leading)
+ Text(model.t("mobile.simple.percent", ["percent": String(Int((fraction * 100).rounded()))]))
+ .font(.subheadline.monospacedDigit()).foregroundStyle(theme.color("textMuted"))
+ .contentTransition(.numericText()).animation(.default, value: fraction)
+ }
+ ProgressView(value: fraction).tint(theme.color("messageAction")).accessibilityLabel(model.t("mobile.ios.progress"))
+ HStack(spacing: VSTokens.spacingGap) { actions }.labelStyle(.titleAndIcon).studioButton(.tertiary)
+ }
+ .padding(Theme.compactInset)
+ .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius, style: .continuous))
+ }
+}
+
+struct DubStartButton: View {
+ @Environment(AppModel.self) private var model
+ var busy = false
+ let action: () -> Void
+ var body: some View {
+ Button(action: action) {
+ Label { Text(model.t("mobile.dub.start")).font(.headline) } icon: {
+ Image(systemName: "waveform").symbolEffect(.variableColor.iterative.reversing, isActive: busy)
+ }.frame(maxWidth: .infinity)
+ }.studioButton(.primary).accessibilityIdentifier("dub.start")
+ .padding(.horizontal, Theme.compactInset).padding(.vertical, VSTokens.spacingGap / 2)
+ }
+}
diff --git a/mobile/ios/VoiceStudio/Features/DubView.swift b/mobile/ios/VoiceStudio/Features/DubView.swift
index 741eb185e..95612a66f 100644
--- a/mobile/ios/VoiceStudio/Features/DubView.swift
+++ b/mobile/ios/VoiceStudio/Features/DubView.swift
@@ -36,22 +36,21 @@ struct ComputerDubView: View {
var body: some View {
Page {
if model.connection.client == nil { NavigationLink(model.t("mobile.settings.connection")) { ConnectView() } }
- DubSourceButton { importing = true }
- if let selectedFile { SelectedFileRow(name: selectedFile.name) { self.selectedFile = nil } }
- TextField(model.t("mobile.dub.paste_url"), text: $sourceURL).keyboardType(.URL).textInputAutocapitalization(.never).autocorrectionDisabled().accessibilityIdentifier("dub.source_url")
- DubSetupCard {
+ if let selectedFile { DubFileCard(name: selectedFile.name) { self.selectedFile = nil } }
+ else { DubSourceButton { importing = true } }
+ HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: "link").foregroundStyle(theme.color("iconMuted")).accessibilityHidden(true)
+ TextField(model.t("mobile.dub.paste_url"), text: $sourceURL).keyboardType(.URL).textInputAutocapitalization(.never).autocorrectionDisabled().accessibilityIdentifier("dub.source_url")
+ }
+ DubTiles {
Button { selectingLanguages = true } label: {
- SelectionRow(label: model.t("mobile.dub.target_languages"), value: ListFormatter.localizedString(byJoining: languages.filter { selected.contains($0.code) }.map(\.name)))
+ TileLabel(icon: "globe", label: model.t("mobile.dub.target_languages"), value: ListFormatter.localizedString(byJoining: languages.filter { selected.contains($0.code) }.map(\.name)))
}.studioButton(.tertiary).accessibilityIdentifier("dub.languages")
- Divider()
- VoicePicker(selection: $profile, dubbing: true)
+ VoicePicker(selection: $profile, dubbing: true, tile: true)
}
if let pending = upload.pending {
- Card {
- if let name = pending.filename { Text(name).lineLimit(1).truncationMode(.middle) }
- Text(model.t("mobile.dub.uploading", ["percent": String(Int(upload.fraction * 100))]))
- ProgressView(value: upload.fraction).accessibilityLabel(model.t("mobile.ios.progress"))
- Button(model.t("mobile.ios.upload_cancel"), role: .destructive) { Task { await upload.cancel() } }
+ DubJobCard(title: pending.filename ?? model.t("mobile.tabs.dub"), stage: model.t("mobile.dub.uploading", ["percent": String(Int(upload.fraction * 100))]), fraction: upload.fraction) {
+ Button(model.t("mobile.ios.upload_cancel"), systemImage: "xmark", role: .destructive) { Task { await upload.cancel() } }
}
}
if let engine = model.dub.pendingTranslation {
@@ -65,15 +64,12 @@ struct ComputerDubView: View {
}
}
if let cp = model.dub.checkpoint {
- Card {
- Text(cp.title).lineLimit(1).truncationMode(.middle)
- Text(model.t("mobile.ios.dub_stages." + cp.stage.rawValue))
- ProgressView(value: model.dub.progress).accessibilityLabel(model.t("mobile.ios.progress"))
+ DubJobCard(title: cp.title, stage: model.t("mobile.ios.dub_stages." + cp.stage.rawValue), fraction: model.dub.progress, running: model.dub.monitoring) {
if cp.host != model.connection.active?.id { NavigationLink(model.t("mobile.simple.reconnect")) { ConnectView() } }
- else if cp.stage == .done { Button(model.t("mobile.dub.download")) { Task { await download(cp.jobID, name: cp.title) } } }
+ else if cp.stage == .done { Button(model.t("mobile.dub.download"), systemImage: "arrow.down.to.line") { Task { await download(cp.jobID, name: cp.title) } } }
else if cp.stage != .cancelled {
- if !model.dub.monitoring { Button(model.t("mobile.ios.upload_resume")) { model.monitor() } }
- Button(model.t("mobile.dub.abort"), role: .destructive) { Task { await model.perform { model.pauseMonitor(); try await model.dub.abort(api: model.api()) } } }
+ if !model.dub.monitoring { Button(model.t("mobile.ios.upload_resume"), systemImage: "play.fill") { model.monitor() } }
+ Button(model.t("mobile.dub.abort"), systemImage: "xmark", role: .destructive) { Task { await model.perform { model.pauseMonitor(); try await model.dub.abort(api: model.api()) } } }
}
}
}
@@ -83,6 +79,7 @@ struct ComputerDubView: View {
ForEach(model.dubHistory) { item in
ViewThatFits(in: .horizontal) {
HStack(spacing: VSTokens.spacingGap) {
+ Image(systemName: "film").foregroundStyle(theme.color("messageAction")).frame(width: 32).accessibilityHidden(true)
historyTitle(item)
historyActions(item)
}
@@ -98,7 +95,7 @@ struct ComputerDubView: View {
}
.navigationTitle(model.t("mobile.tabs.dub")).navigationBarTitleDisplayMode(.inline)
.safeAreaInset(edge: .bottom, spacing: 0) {
- DubStartButton { Task { await start() } }
+ DubStartButton(busy: upload.pending != nil || model.dub.monitoring) { Task { await start() } }
.disabled(model.connection.client == nil || profile == DubVoiceChoice.unselected || model.busy || upload.pending != nil || selected.isEmpty || (selectedFile == nil && sourceURL.isEmpty) || model.dub.monitoring)
}
.fileImporter(isPresented: $importing, allowedContentTypes: [.movie, .audio]) { result in
@@ -188,43 +185,3 @@ struct ShareSheet: UIViewControllerRepresentable {
func makeUIViewController(context: Context) -> UIActivityViewController { UIActivityViewController(activityItems: items, applicationActivities: nil) }
func updateUIViewController(_ uiViewController: UIActivityViewController, context: Context) {}
}
-
-/// Keep both processing routes in the same compact creation layout.
-struct DubSourceButton: View {
- @Environment(AppModel.self) private var model
- @Environment(\.vsTheme) private var theme
- let action: () -> Void
- var body: some View {
- Button(action: action) {
- HStack(spacing: VSTokens.spacingGap) {
- Image(systemName: "doc.badge.plus").font(.title2).foregroundStyle(theme.color("messageAction"))
- .accessibilityHidden(true)
- Text(model.t("mobile.dub.pick_media")).font(.headline).frame(maxWidth: .infinity, alignment: .leading)
- Image(systemName: "chevron.right").font(.subheadline).foregroundStyle(theme.color("iconMuted"))
- .accessibilityHidden(true)
- }.frame(minHeight: 44).padding(Theme.compactInset)
- .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius))
- .contentShape(Rectangle())
- }.buttonStyle(.plain)
- }
-}
-struct DubSetupCard<Content: View>: View {
- @Environment(\.vsTheme) private var theme
- let content: Content
- init(@ViewBuilder content: () -> Content) { self.content = content() }
- var body: some View {
- VStack(spacing: 0) { content }
- .padding(.horizontal, Theme.compactInset).padding(.vertical, VSTokens.spacingGap / 2)
- .background(theme.color("surface"), in: RoundedRectangle(cornerRadius: VSTokens.iosCardRadius))
- }
-}
-struct DubStartButton: View {
- @Environment(AppModel.self) private var model
- let action: () -> Void
- var body: some View {
- Button(action: action) {
- Text(model.t("mobile.dub.start")).font(.headline).frame(maxWidth: .infinity)
- }.studioButton(.primary).accessibilityIdentifier("dub.start")
- .padding(.horizontal, Theme.compactInset).padding(.vertical, VSTokens.spacingGap / 2)
- }
-}
diff --git a/mobile/ios/VoiceStudio/Features/HomeContributors.swift b/mobile/ios/VoiceStudio/Features/HomeContributors.swift
new file mode 100644
index 000000000..6dd4836e5
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Features/HomeContributors.swift
@@ -0,0 +1,54 @@
+import SwiftUI
+import VoiceStudioKit
+
+/// Human GitHub contributors with more than 10 commits, mirroring
+/// `electron/src/renderer/src/features/home/home-contributors-data.ts`.
+/// Avatars are bundled (Contributors.xcassets): nothing is fetched at runtime.
+enum HomeContributors {
+ static let logins = ["debpalash", "kevin9327", "psiberfunk", "velixio", "jaketame", "paoloantinori", "Chang-Jin-Lee", "Shivendra-Coherent", "marreiradigital"]
+ static let repository = URL(string: "https://github.com/debpalash/VoiceStudio")!
+ static func profile(_ login: String) -> URL { URL(string: "https://github.com/" + login)! }
+ /// Three right-aligned rows that taper downward, filled right to left, ending with "All".
+ static func rows(_ items: [String]) -> [[String]] {
+ let top = min(items.count, Int((Double(items.count + 3) / 3).rounded(.up)))
+ let middle = min(items.count - top, Int((Double(items.count - top + 1) / 2).rounded(.up)))
+ return [Array(items[0..<top]), Array(items[top..<(top + middle)]), Array(items[(top + middle)...])].filter { !$0.isEmpty }
+ }
+}
+
+struct ContributorCluster: View {
+ @Environment(AppModel.self) private var model
+ @Environment(\.vsTheme) private var theme
+ @Environment(\.accessibilityReduceMotion) private var reduceMotion
+ @State private var shown = false
+ private let size: CGFloat = 34
+ var body: some View {
+ let items = HomeContributors.logins + ["all"]
+ VStack(alignment: .trailing, spacing: 6) {
+ ForEach(Array(HomeContributors.rows(items).enumerated()), id: \.offset) { _, row in
+ HStack(spacing: 6) {
+ ForEach(Array(row.reversed().enumerated()), id: \.element) { index, login in avatar(login, delay: Double(index) * 0.05) }
+ }
+ }
+ }
+ .accessibilityElement(children: .contain).accessibilityLabel(model.t("homeUi.allContributors"))
+ .onAppear { shown = true }
+ }
+ private func avatar(_ login: String, delay: Double) -> some View {
+ Link(destination: login == "all" ? HomeContributors.repository.appendingPathComponent("graphs/contributors") : HomeContributors.profile(login)) {
+ Group {
+ if login == "all" {
+ Text(model.t("homeUi.all")).font(.caption2.weight(.semibold)).foregroundStyle(theme.color("text"))
+ .minimumScaleFactor(0.7).frame(width: size, height: size).background(theme.color("surfaceRaised"), in: Circle())
+ } else {
+ Image("contributor-" + login).resizable().scaledToFill().frame(width: size, height: size).clipShape(Circle())
+ }
+ }.overlay(Circle().strokeBorder(theme.color("border")))
+ }
+ .frame(minWidth: size, minHeight: size)
+ .scaleEffect(shown || reduceMotion ? 1 : 0.5).opacity(shown || reduceMotion ? 1 : 0)
+ .animation(reduceMotion ? nil : .spring(response: 0.5, dampingFraction: 0.7).delay(delay), value: shown)
+ .accessibilityLabel(login == "all" ? model.t("homeUi.allContributors") : "@" + login)
+ .accessibilityIdentifier("home.contributor." + login)
+ }
+}
diff --git a/mobile/ios/VoiceStudio/Features/HomeView.swift b/mobile/ios/VoiceStudio/Features/HomeView.swift
index b3808e7df..8e1532114 100644
--- a/mobile/ios/VoiceStudio/Features/HomeView.swift
+++ b/mobile/ios/VoiceStudio/Features/HomeView.swift
@@ -11,11 +11,13 @@ struct HomeView: View {
Page {
VStack(alignment: .leading, spacing: VSTokens.spacingGap * 2) {
VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
- Text(model.t("mobile.ios.app_name"))
+ Text(model.t("homeUi.title"))
.font(.custom("InterVariable", size: VSTokens.iosHomeWordmarkSize, relativeTo: .title).weight(.semibold))
- Text(model.t("mobile.local.privacy"))
- .font(.subheadline)
- .foregroundStyle(theme.color("textMuted"))
+ .fixedSize(horizontal: false, vertical: true)
+ ViewThatFits(in: .horizontal) {
+ HStack(alignment: .bottom, spacing: VSTokens.spacingGap) { privacy; ContributorCluster() }
+ VStack(alignment: .leading, spacing: VSTokens.spacingGap) { privacy; ContributorCluster().frame(maxWidth: .infinity, alignment: .trailing) }
+ }
}
.frame(maxWidth: .infinity, alignment: .leading).padding(Theme.compactInset)
.background(alignment: .trailing) {
@@ -79,6 +81,9 @@ struct HomeView: View {
.refreshable { await model.phone.refresh(); if model.connection.client != nil { await model.perform { try await model.refresh() } } }
.onDisappear { player.pause() }
}
+ private var privacy: some View {
+ Text(model.t("mobile.local.privacy")).font(.subheadline).foregroundStyle(theme.color("textMuted")).frame(maxWidth: .infinity, alignment: .leading)
+ }
private func destination<Content: View>(_ id: String, title: String, detail: String, icon: String, primary: Bool = false, @ViewBuilder content: () -> Content) -> some View {
NavigationLink(destination: content()) {
VStack(alignment: .leading, spacing: VSTokens.spacingGap) {
diff --git a/mobile/ios/VoiceStudio/Features/PhoneDubView.swift b/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
index fe1b7f824..1b4173a65 100644
--- a/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
+++ b/mobile/ios/VoiceStudio/Features/PhoneDubView.swift
@@ -28,26 +28,24 @@ struct PhoneDubView: View {
Page {
if projectID == nil && !libraryOnly {
if connect { NavigationLink(model.t("mobile.simple.reconnect")) { ConnectView() } }
- DubSourceButton { importing = true }.disabled(copying)
- if let source { SelectedFileRow(name: source.name) { self.source = nil } }
- DubSetupCard {
+ Group {
+ if let source { DubFileCard(name: source.name) { self.source = nil } }
+ else { DubSourceButton { importing = true } }
+ }.disabled(copying)
+ DubTiles {
Button { languages = true } label: {
- SelectionRow(label: model.t("mobile.dub.target_languages"), value: ListFormatter.localizedString(byJoining: choices.filter { targets.contains($0.code) }.map(\.name)))
+ TileLabel(icon: "globe", label: model.t("mobile.dub.target_languages"), value: ListFormatter.localizedString(byJoining: choices.filter { targets.contains($0.code) }.map(\.name)))
}.studioButton(.tertiary).accessibilityIdentifier("dub.languages")
- Divider()
- ChoicePicker(label: model.t("mobile.speak.voice"), selection: $voice, options: [SelectionOption(id: "", title: model.t("mobile.simple.reference"))] + model.phone.voices.map { SelectionOption(id: $0.id.uuidString, title: $0.name) })
- Divider()
- HStack {
- Toggle(model.t("mobile.simple.voice_consent"), isOn: $consent).font(.subheadline).frame(minHeight: 44)
- InfoButton(title: model.t("mobile.voices.consent_title"), detail: model.t("mobile.voices.consent_body"))
- }
+ ChoicePicker(label: model.t("mobile.speak.voice"), selection: $voice, options: [SelectionOption(id: "", title: model.t("mobile.simple.reference"))] + model.phone.voices.map { SelectionOption(id: $0.id.uuidString, title: $0.name) }, icon: "person.wave.2", tile: true)
}
- DisclosureGroup(model.t("mobile.simple.more")) {
+ DubConsentRow(isOn: $consent)
+ DisclosureGroup {
Toggle(model.t("mobile.simple.audio_only"), isOn: $audioOnly).frame(minHeight: 44)
phoneModel("dub-asr", .asr)
phoneModel("dub-translate", .translate)
phoneModel("dub", .clone)
- }.padding(.horizontal, Theme.compactInset)
+ } label: { Label(model.t("mobile.simple.more"), systemImage: "slider.horizontal.3") }
+ .padding(.horizontal, Theme.compactInset)
.disabled(copying || model.phone.activeDub != nil)
if !ready { LocalDownloadPrompt(items: model.phone.dubModels, feature: "mobile.tabs.dub", compact: true) }
if copying { ProgressView().accessibilityLabel(model.t("mobile.ios.progress")) }
@@ -56,22 +54,14 @@ struct PhoneDubView: View {
Text(model.t("mobile.dub.history")).font(.headline)
Group {
ForEach(records.filter { !$0.checkpoint.done }) { record in
- Card {
- Text(record.request.title).lineLimit(1)
- let progress = model.phone.activeDub == record.id ? model.phone.dubProgress : nil
- let percent = progress?.percent ?? record.checkpoint.percent
- HStack {
- Text(model.t(progress?.stage ?? record.checkpoint.stage)).frame(maxWidth: .infinity,alignment: .leading)
- Text(model.t("mobile.simple.percent",["percent": String(percent)]))
- }
- ProgressView(value: Double(percent)/100).accessibilityLabel(model.t("mobile.ios.progress"))
+ let progress = model.phone.activeDub == record.id ? model.phone.dubProgress : nil
+ let percent = progress?.percent ?? record.checkpoint.percent
+ DubJobCard(title: record.request.title, stage: model.t(progress?.stage ?? record.checkpoint.stage), fraction: Double(percent) / 100, running: model.phone.activeDub == record.id) {
if model.phone.activeDub == record.id {
- Button(model.t("common.cancel"),systemImage: "xmark") { model.phone.cancelDub() }
+ Button(model.t("common.cancel"), systemImage: "xmark") { model.phone.cancelDub() }
} else {
- HStack {
- Button(model.t("mobile.simple.resume"),systemImage: "play.fill") { model.phone.startDub(record.id) }.disabled(model.phone.activeDub != nil || model.busy)
- Button(model.t("mobile.simple.remove_job"),systemImage: "trash",role: .destructive) { remove(record) }.labelStyle(.iconOnly)
- }
+ Button(model.t("mobile.simple.resume"), systemImage: "play.fill") { model.phone.startDub(record.id) }.disabled(model.phone.activeDub != nil || model.busy)
+ Button(model.t("mobile.simple.remove_job"), systemImage: "trash", role: .destructive) { remove(record) }.labelStyle(.iconOnly)
}
}
}
@@ -79,6 +69,7 @@ struct PhoneDubView: View {
ForEach(records) { record in
ForEach(record.checkpoint.outputs) { output in
HStack {
+ Image(systemName: "film").foregroundStyle(theme.color("messageAction")).frame(width: 32).accessibilityHidden(true)
VStack(alignment: .leading) { Text(record.request.title).lineLimit(1); Text(output.name).font(.caption).foregroundStyle(theme.color("textMuted")) }.frame(maxWidth: .infinity,alignment: .leading)
Button(model.t("common.play"),systemImage: "play.fill") { open(record,output,action: .play) }
Button(model.t("mobile.speak.share"),systemImage: "square.and.arrow.up") { open(record,output,action: .share) }
@@ -93,7 +84,7 @@ struct PhoneDubView: View {
.navigationTitle(projectID != nil ? (records.first?.request.title ?? model.t("projects.title")) : model.t(libraryOnly ? "projects.title" : "mobile.tabs.dub")).navigationBarTitleDisplayMode(.inline)
.safeAreaInset(edge: .bottom, spacing: 0) {
if projectID == nil && !libraryOnly {
- DubStartButton(action: start)
+ DubStartButton(busy: copying || model.phone.activeDub != nil, action: start)
.disabled(!ready || !consent || source == nil || targets.isEmpty || model.busy || copying || model.phone.activeDub != nil)
}
}
diff --git a/mobile/ios/VoiceStudio/Features/SpeakView.swift b/mobile/ios/VoiceStudio/Features/SpeakView.swift
index ae3c57493..0b59ded2e 100644
--- a/mobile/ios/VoiceStudio/Features/SpeakView.swift
+++ b/mobile/ios/VoiceStudio/Features/SpeakView.swift
@@ -6,11 +6,12 @@ struct VoicePicker: View {
@Binding var selection: String
var dubbing = false
var compact = false
+ var tile = false
var body: some View {
ChoicePicker(label: model.t("mobile.speak.voice"), selection: $selection, options:
(dubbing ? [SelectionOption(id: DubVoiceChoice.unselected, title: model.t("mobile.dub.choose_voice"), enabled: false)] : []) +
[SelectionOption(id: "", title: model.t(DubVoiceChoice.defaultLabelKey))] +
- model.profiles.map { SelectionOption(id: $0.id, title: $0.name, subtitle: model.languages.language($0.language)?.name) }, compact: compact)
+ model.profiles.map { SelectionOption(id: $0.id, title: $0.name, subtitle: model.languages.language($0.language)?.name) }, compact: compact, icon: tile ? "person.wave.2" : nil, tile: tile)
}
}
struct SpeakView: View {
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/Contents.json
new file mode 100644
index 000000000..fe97fb1fb
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/Contents.json
@@ -0,0 +1 @@
+{"info": {"author": "xcode", "version": 1}}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Chang-Jin-Lee.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Chang-Jin-Lee.png
new file mode 100644
index 000000000..db1aa0b9c
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Chang-Jin-Lee.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Contents.json
new file mode 100644
index 000000000..d41762646
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Chang-Jin-Lee.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "Chang-Jin-Lee.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Contents.json
new file mode 100644
index 000000000..2cee3c754
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "Shivendra-Coherent.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Shivendra-Coherent.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Shivendra-Coherent.png
new file mode 100644
index 000000000..b153986f2
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-Shivendra-Coherent.imageset/Shivendra-Coherent.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/Contents.json
new file mode 100644
index 000000000..d640a17a5
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "debpalash.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/debpalash.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/debpalash.png
new file mode 100644
index 000000000..d0c4334dc
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-debpalash.imageset/debpalash.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/Contents.json
new file mode 100644
index 000000000..af67289df
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "jaketame.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/jaketame.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/jaketame.png
new file mode 100644
index 000000000..de84c7f1a
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-jaketame.imageset/jaketame.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/Contents.json
new file mode 100644
index 000000000..5b2cbb9fa
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "kevin9327.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/kevin9327.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/kevin9327.png
new file mode 100644
index 000000000..fd1602978
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-kevin9327.imageset/kevin9327.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/Contents.json
new file mode 100644
index 000000000..f1dbbfe96
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "marreiradigital.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/marreiradigital.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/marreiradigital.png
new file mode 100644
index 000000000..d40ea60d5
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-marreiradigital.imageset/marreiradigital.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/Contents.json
new file mode 100644
index 000000000..09cde6142
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "paoloantinori.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/paoloantinori.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/paoloantinori.png
new file mode 100644
index 000000000..9db0a4b0d
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-paoloantinori.imageset/paoloantinori.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/Contents.json
new file mode 100644
index 000000000..c359a5b2a
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "psiberfunk.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/psiberfunk.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/psiberfunk.png
new file mode 100644
index 000000000..974aba07d
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-psiberfunk.imageset/psiberfunk.png differ
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/Contents.json b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/Contents.json
new file mode 100644
index 000000000..4b3a082b6
--- /dev/null
+++ b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/Contents.json
@@ -0,0 +1,13 @@
+{
+ "images": [
+ {
+ "filename": "velixio.png",
+ "idiom": "universal",
+ "scale": "3x"
+ }
+ ],
+ "info": {
+ "author": "xcode",
+ "version": 1
+ }
+}
\ No newline at end of file
diff --git a/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/velixio.png b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/velixio.png
new file mode 100644
index 000000000..86ea62db8
Binary files /dev/null and b/mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-velixio.imageset/velixio.png differ
diff --git a/mobile/ios/VoiceStudioUITests/HomeScreens.swift b/mobile/ios/VoiceStudioUITests/HomeScreens.swift
index 4ec8078cf..d4b64c422 100644
--- a/mobile/ios/VoiceStudioUITests/HomeScreens.swift
+++ b/mobile/ios/VoiceStudioUITests/HomeScreens.swift
@@ -9,7 +9,7 @@ final class HomeScreens: XCTestCase {
XCTAssertTrue(title.exists)
XCTAssertEqual(title.label, "Home")
XCTAssertLessThan(title.frame.midX, app.frame.width / 2)
- XCTAssertTrue(app.staticTexts["VoiceStudio"].exists)
+ XCTAssertTrue(app.staticTexts["VoiceStudio.sh Open Source"].exists)
let attachment = XCTAttachment(screenshot: app.screenshot()); attachment.name = "Home-dark"; attachment.lifetime = .keepAlways; add(attachment)
for (route, title) in [("speak","Speak"),("voices","Voices"),("dub","Dub"),("dictate","Dictate"),("models","Models"),("connect","Connect to VoiceStudio")] {
let card = app.buttons["home."+route]
diff --git a/tests/test_mobile_contract.py b/tests/test_mobile_contract.py
index 82bb11274..920433278 100644
--- a/tests/test_mobile_contract.py
+++ b/tests/test_mobile_contract.py
@@ -377,3 +377,27 @@ def test_android_native_fetch_rejects_unsafe_archives(tmp_path, monkeypatch, dat
assert all(out.resolve() in p.resolve().parents or p.resolve() == out.resolve() for p in out.rglob("*"))
assert not (tmp_path / "escape.txt").exists()
assert not (tmp_path.parent / "outside").exists()
+
+
+def test_ios_home_contributors_match_electron_snapshot():
+ """The iOS Home cluster mirrors Electron's bundled snapshot, avatars included (offline)."""
+ import re
+
+ data = (ROOT / "electron/src/renderer/src/features/home/home-contributors-data.ts").read_text()
+ electron = re.findall(r"login: '([^']+)'", data)
+ swift = (ROOT / "mobile/ios/VoiceStudio/Features/HomeContributors.swift").read_text()
+ ios = re.findall(r'"([^"]+)"', re.search(r"static let logins = \[(.*?)\]", swift, re.S).group(1))
+ assert ios == electron
+ for login in electron:
+ assert (ROOT / f"mobile/ios/VoiceStudio/Resources/Contributors.xcassets/contributor-{login}.imageset/{login}.png").is_file()
+
+
+def test_android_home_contributors_match_electron_snapshot():
+ import re
+
+ electron = re.findall(r"login: '([^']+)'", (ROOT / "electron/src/renderer/src/features/home/home-contributors-data.ts").read_text())
+ kotlin = (ROOT / "mobile/android/features/src/main/kotlin/com/voicestudio/mobile/features/HomeContributors.kt").read_text()
+ android = re.findall(r'"([^"]+)"', re.search(r"val logins = listOf\((.*?)\)", kotlin, re.S).group(1))
+ assert android == electron
+ for login in electron: # the Gradle catalog task copies these into the APK assets
+ assert list((ROOT / "electron/src/renderer/src/features/home/contributors").glob(f"{login}.*"))