Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat(apps): copy the website link from a button on the install page

leepokaiac8e63c892b2
diff --git a/apps/android/WhatsNew.md b/apps/android/WhatsNew.md
index 3945960c..4dcf7181 100644
--- a/apps/android/WhatsNew.md
+++ b/apps/android/WhatsNew.md
@@ -9,7 +9,7 @@ else a generic "Bug fixes and improvements" line. Delete old sections.
## 2.39.0
### zh-Hant
-- 第一次設定時,如果帳號裡已有電腦,可以向它申請訪問,或配對一臺新電腦(例如 VPS)。安裝頁也能直接複製或分享下載連結到電腦。
+- 第一次設定時,如果帳號裡已有電腦,可以向它申請訪問,或配對一臺新電腦(例如 VPS)。安裝頁也能一鍵複製網站連結,到電腦上下載。
- bot 用了不只一種智慧體時,列表會在頭像左下角標出各自的智慧體標誌,可在「設定 › 外觀」關閉。
- 修正與電腦的連線中斷時,app 可能閃退的問題。
- 語音通話中語音辨識偶爾出錯時,會送出已聽到的內容並繼續聆聽,不再直接結束通話。
@@ -22,7 +22,7 @@ else a generic "Bug fixes and improvements" line. Delete old sections.
- 擴充功能的「已安裝」提示也會顯示技能的圖示。
### en-US
-- First-time setup offers your account's computers or a new one, plus a download link to share.
+- First-time setup offers your account's computers or a new one, plus a website link to copy.
- When bots use different agents, the bot list shows each one's logo (off in Settings › Appearance).
- Fixed a crash when the connection dropped.
- A one-off speech error no longer ends a voice call.
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/OnboardingTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/OnboardingTest.kt
index 886731e6..6bf9fc9b 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/OnboardingTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/OnboardingTest.kt
@@ -1,11 +1,14 @@
package com.codync.android
+import android.content.ClipboardManager
import androidx.compose.runtime.mutableStateOf
import androidx.compose.ui.test.*
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.lifecycle.viewmodel.compose.viewModel
+import androidx.test.platform.app.InstrumentationRegistry
import com.codync.android.core.CloudComputer
import com.codync.android.core.Computer
+import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
@@ -87,8 +90,7 @@ class OnboardingTest {
compose.setContent { Hosted { CodyncApp(signedIn(), emptyMap(), viewModel()) } }
compose.onNodeWithText("Install Codync\non your computer").assertIsDisplayed()
compose.onNodeWithText("Connect a computer").assertDoesNotExist()
- compose.onNodeWithText("https://www.codync.dev/#install").performScrollTo().assertIsDisplayed()
- compose.onNodeWithContentDescription("Share link").assertIsDisplayed()
+ compose.onNodeWithText("Copy website link").performScrollTo().assertIsDisplayed()
compose.onNodeWithText("Sign in there with [email protected] and it shows up here.").assertIsDisplayed()
}
@@ -141,6 +143,18 @@ class OnboardingTest {
assertTrue(skipped)
}
+ @Test fun theWebsiteLinkButtonCopiesTheLinkAndSaysSo() {
+ // The page's bot never stops moving, and "Copied" lasts only a moment: step the clock by hand.
+ compose.mainClock.autoAdvance = false
+ compose.setContent { Hosted { PairingView(AccountContext(loading = false), viewModel()) } }
+ step()
+ compose.onNodeWithText("Copy website link").performClick()
+ compose.mainClock.advanceTimeBy(500)
+ compose.onNodeWithText("Copied").assertExists()
+ val clipboard = InstrumentationRegistry.getInstrumentation().targetContext.getSystemService(ClipboardManager::class.java)
+ assertEquals("https://www.codync.dev", clipboard.primaryClip?.getItemAt(0)?.text?.toString())
+ }
+
@Test fun macPairingPointsToTheMenuBarApp() {
compose.setContent { Hosted { PairingView(AccountContext(loading = false), viewModel()) } }
compose.onNodeWithText("Continue").performClick()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
index 5a5d4cb6..e787d481 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AnalyticsEvent.kt
@@ -170,7 +170,7 @@ internal enum class NotificationKind(override val wire: String, val category: St
internal enum class PhoneSetting(override val wire: String) : CatalogValue { Push("push"), LiveActivities("live_activities") }
-/** What an outbound link leads to (`install_command`: an install command copied; `install_link`: the download link copied or shared). */
+/** What an outbound link leads to (`install_command`: an install command copied; `install_link`: the website link copied). */
internal enum class OutboundLink(override val wire: String) : CatalogValue {
Github("github"), Issues("issues"), AppStore("app_store"), Demo("demo"), Tailscale("tailscale"), Privacy("privacy"), InstallCommand("install_command"),
InstallLink("install_link"),
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt b/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
index 1b0e0e48..77515fa2 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/PairingView.kt
@@ -1,8 +1,6 @@
package com.codync.android
import android.content.ClipData
-import android.content.Context
-import android.content.Intent
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.AnimatedVisibility
@@ -53,7 +51,6 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.ClipEntry
import androidx.compose.ui.platform.LocalClipboard
-import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
@@ -118,6 +115,7 @@ private enum class ComputerOS { Mac, Linux }
// MARK: - Install
@Composable private fun InstallPage(os: ComputerOS, choose: (ComputerOS) -> Unit, email: String?, next: () -> Unit) {
+ val (linkCopied, copyLink) = rememberCopy(WEBSITE_LINK, OutboundLink.InstallLink)
Column(Modifier.fillMaxSize()) {
Column(Modifier.weight(1f).verticalScroll(rememberScrollState()).padding(horizontal = 24.dp).padding(bottom = 16.dp),
verticalArrangement = Arrangement.spacedBy(24.dp)) {
@@ -131,8 +129,15 @@ private enum class ComputerOS { Mac, Linux }
Text(tr("Your bots run there. This phone is how you talk to them."), style = Type.body, color = Palette.secondary)
}
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
- Hint("Send this link to your computer")
- CommandBlock(DOWNLOAD_LINK, records = OutboundLink.InstallLink, share = true)
+ Hint("Open the website on your computer to download Codync")
+ SecondaryButton(copyLink, Modifier.fillMaxWidth()) {
+ Crossfade(linkCopied, animationSpec = Motion.morph(), label = "Copy link") { done ->
+ Row(Modifier.fillMaxWidth(), Arrangement.spacedBy(8.dp, Alignment.CenterHorizontally), Alignment.CenterVertically) {
+ Symbol(if (done) "checkmark" else "doc.on.doc", size = 18.dp, tint = Palette.text)
+ Text(tr(if (done) "Copied" else "Copy website link"), style = Type.headline)
+ }
+ }
+ }
// The same account is what lets this phone find the computer afterwards.
if (email != null) Text(tr("Sign in there with {email} and it shows up here.").replace("{email}", email),
style = Type.subheadline, color = Palette.secondary)
@@ -179,36 +184,35 @@ private enum class ComputerOS { Mac, Linux }
/** A small label above a `CommandBlock`. */
@Composable private fun Hint(text: String) = Text(tr(text), style = Type.footnote, color = Palette.secondary)
-/** A terminal command or link with a copy button (and with `share`, the share sheet); either counts as opening `records`. */
-@Composable private fun CommandBlock(command: String, records: OutboundLink? = null, share: Boolean = false) {
+/** Whether [text] was just copied, and what copies it; copying counts as opening [records]. */
+@Composable private fun rememberCopy(text: String, records: OutboundLink?): Pair<Boolean, () -> Unit> {
val clipboard = LocalClipboard.current
- val context = LocalContext.current
val scope = rememberCoroutineScope()
var copied by remember { mutableStateOf(false) }
+ val copy: () -> Unit = {
+ scope.launch {
+ clipboard.setClipEntry(ClipEntry(ClipData.newPlainText("Command", text)))
+ records?.let { Analytics.capture(AnalyticsEvent.LinkOpened(it)) }
+ copied = true; delay(1500); copied = false
+ }
+ }
+ return copied to copy
+}
+
+/** A terminal command or link with a copy button; copying it counts as opening `records`. */
+@Composable private fun CommandBlock(command: String, records: OutboundLink? = null) {
+ val (copied, copy) = rememberCopy(command, records)
Row(Modifier.fillMaxWidth().clip(RoundedRectangle(12.dp)).background(Palette.codeBackground).padding(start = 14.dp, end = 4.dp, top = 4.dp, bottom = 4.dp),
verticalAlignment = Alignment.Top, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
SelectionContainer(Modifier.weight(1f).padding(vertical = 6.dp)) {
Text(command, style = Type.footnote.monospaced, color = Palette.text)
}
Crossfade(copied, animationSpec = Motion.morph(), label = "Copy") { done ->
- IconButton(if (done) "Copied" else "Copy", if (done) "checkmark" else "doc.on.doc") {
- scope.launch {
- clipboard.setClipEntry(ClipEntry(ClipData.newPlainText("Command", command)))
- records?.let { Analytics.capture(AnalyticsEvent.LinkOpened(it)) }
- copied = true; delay(1500); copied = false
- }
- }
- }
- if (share) IconButton("Share link", "square.and.arrow.up") {
- records?.let { Analytics.capture(AnalyticsEvent.LinkOpened(it)) }
- context.shareText(command)
+ IconButton(if (done) "Copied" else "Copy", if (done) "checkmark" else "doc.on.doc", action = copy)
}
}
}
-private fun Context.shareText(text: String) =
- startActivity(Intent.createChooser(Intent(Intent.ACTION_SEND).setType("text/plain").putExtra(Intent.EXTRA_TEXT, text), null))
-
// MARK: - Scan
@Composable private fun ScanPage(state: AccountContext, store: AccountStore, os: ComputerOS, paired: () -> Unit) {
@@ -290,8 +294,8 @@ private fun Context.shareText(text: String) =
internal val PAGE_TITLE = Type.system(30f, FontWeight.SemiBold).copy(letterSpacing = (-0.5).sp)
-/** The website's downloads, for whatever the computer runs. */
-private const val DOWNLOAD_LINK = "https://www.codync.dev/#install"
+/** The website: its first button downloads for whatever the computer runs. */
+private const val WEBSITE_LINK = "https://www.codync.dev"
/** Tailscale gives every device an address in 100.64.0.0/10 on its VPN (`tun`) interface. */
private fun tailscaleConnected(): Boolean = try {
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
index 722d88bf..cc4a85fd 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Frage einen Computer in deinem Konto nach Zugriff an oder kopple einen neuen, etwa einen VPS.",
"Pair a new computer": "Neuen Computer koppeln",
"Install Codync on a VPS or another machine.": "Installiere Codync auf einem VPS oder einem anderen Rechner.",
- "Send this link to your computer": "Schicke diesen Link an deinen Computer",
+ "Open the website on your computer to download Codync": "Öffne die Website auf deinem Computer, um Codync herunterzuladen",
"Sign in there with {email} and it shows up here.": "Melde dich dort mit {email} an, dann erscheint er hier.",
- "Share link": "Link teilen",
+ "Copy website link": "Website-Link kopieren",
"Check the code on {name}": "Prüfe den Code auf {name}",
"Approve on {name}": "Auf {name} genehmigen",
"Asking {name}…": "{name} wird gefragt…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
index 6fb50d77..1e871ef8 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Solicita acceso a una computadora de tu cuenta o vincula una nueva, como un VPS.",
"Pair a new computer": "Vincular una computadora nueva",
"Install Codync on a VPS or another machine.": "Instala Codync en un VPS u otra máquina.",
- "Send this link to your computer": "Envía este enlace a tu computadora",
+ "Open the website on your computer to download Codync": "Abre el sitio web en tu computadora para descargar Codync",
"Sign in there with {email} and it shows up here.": "Inicia sesión allí con {email} y aparecerá aquí.",
- "Share link": "Compartir enlace",
+ "Copy website link": "Copiar enlace del sitio web",
"Check the code on {name}": "Comprueba el código en {name}",
"Approve on {name}": "Aprueba en {name}",
"Asking {name}…": "Preguntando a {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
index f01e2913..0f672e0a 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Demandez l'accès à un ordinateur de votre compte, ou associez-en un nouveau, comme un VPS.",
"Pair a new computer": "Associer un nouvel ordinateur",
"Install Codync on a VPS or another machine.": "Installez Codync sur un VPS ou une autre machine.",
- "Send this link to your computer": "Envoyez ce lien sur votre ordinateur",
+ "Open the website on your computer to download Codync": "Ouvrez le site sur votre ordinateur pour télécharger Codync",
"Sign in there with {email} and it shows up here.": "Connectez-vous-y avec {email} et il apparaîtra ici.",
- "Share link": "Partager le lien",
+ "Copy website link": "Copier le lien du site",
"Check the code on {name}": "Vérifiez le code sur {name}",
"Approve on {name}": "Approuvez sur {name}",
"Asking {name}…": "Demande à {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/it.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/it.json
index 20b64d93..05af1342 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/it.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/it.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Richiedi l'accesso a un computer del tuo account o associane uno nuovo, ad esempio un VPS.",
"Pair a new computer": "Associa un nuovo computer",
"Install Codync on a VPS or another machine.": "Installa Codync su un VPS o su un'altra macchina.",
- "Send this link to your computer": "Invia questo link al tuo computer",
+ "Open the website on your computer to download Codync": "Apri il sito sul tuo computer per scaricare Codync",
"Sign in there with {email} and it shows up here.": "Accedi lì con {email} e comparirà qui.",
- "Share link": "Condividi link",
+ "Copy website link": "Copia il link del sito",
"Check the code on {name}": "Controlla il codice su {name}",
"Approve on {name}": "Approva su {name}",
"Asking {name}…": "Richiesta a {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
index 3e41eb9f..fe7fac0c 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "アカウント内のコンピューターにアクセスを要求するか、VPS などの新しいコンピューターをペアリングします。",
"Pair a new computer": "新しいコンピューターをペアリングする",
"Install Codync on a VPS or another machine.": "VPS や別のマシンに Codync をインストールします。",
- "Send this link to your computer": "このリンクをコンピューターに送る",
+ "Open the website on your computer to download Codync": "コンピューターでウェブサイトを開いて Codync をダウンロードする",
"Sign in there with {email} and it shows up here.": "そのコンピューターで {email} でサインインすると、ここに表示されます。",
- "Share link": "リンクを共有",
+ "Copy website link": "ウェブサイトのリンクをコピー",
"Check the code on {name}": "{name} のコードを確認",
"Approve on {name}": "{name} で承認",
"Asking {name}…": "{name} に確認しています…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
index 51d74ee6..3b185883 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "계정에 있는 컴퓨터에 접근을 요청하거나 VPS 같은 새 컴퓨터를 페어링하세요.",
"Pair a new computer": "새 컴퓨터 페어링",
"Install Codync on a VPS or another machine.": "VPS나 다른 컴퓨터에 Codync를 설치합니다.",
- "Send this link to your computer": "이 링크를 컴퓨터로 보내세요",
+ "Open the website on your computer to download Codync": "컴퓨터에서 웹사이트를 열어 Codync를 다운로드하세요",
"Sign in there with {email} and it shows up here.": "그 컴퓨터에서 {email}(으)로 로그인하면 여기에 표시됩니다.",
- "Share link": "링크 공유",
+ "Copy website link": "웹사이트 링크 복사",
"Check the code on {name}": "{name}에서 코드 확인",
"Approve on {name}": "{name}에서 승인",
"Asking {name}…": "{name}에 요청하는 중…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/pt-BR.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/pt-BR.json
index 2660a975..b2312c85 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/pt-BR.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/pt-BR.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Peça acesso a um computador da sua conta ou pareie um novo, como um VPS.",
"Pair a new computer": "Parear um novo computador",
"Install Codync on a VPS or another machine.": "Instale o Codync em um VPS ou outra máquina.",
- "Send this link to your computer": "Envie este link para o seu computador",
+ "Open the website on your computer to download Codync": "Abra o site no seu computador para baixar o Codync",
"Sign in there with {email} and it shows up here.": "Entre lá com {email} e ele aparecerá aqui.",
- "Share link": "Compartilhar link",
+ "Copy website link": "Copiar link do site",
"Check the code on {name}": "Confira o código em {name}",
"Approve on {name}": "Aprove em {name}",
"Asking {name}…": "Perguntando a {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ru.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ru.json
index f4f0df63..afde0f4a 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ru.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ru.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "Запросите доступ к компьютеру из вашего аккаунта или подключите новый, например VPS.",
"Pair a new computer": "Подключить новый компьютер",
"Install Codync on a VPS or another machine.": "Установите Codync на VPS или другую машину.",
- "Send this link to your computer": "Отправьте эту ссылку на компьютер",
+ "Open the website on your computer to download Codync": "Откройте сайт на компьютере, чтобы скачать Codync",
"Sign in there with {email} and it shows up here.": "Войдите там как {email}, и он появится здесь.",
- "Share link": "Поделиться ссылкой",
+ "Copy website link": "Скопировать ссылку на сайт",
"Check the code on {name}": "Сверьте код на компьютере {name}",
"Approve on {name}": "Подтвердите на компьютере {name}",
"Asking {name}…": "Обращаемся к {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
index 285df268..e848215f 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "向账户里的电脑申请访问,或配对一台新电脑,例如 VPS。",
"Pair a new computer": "配对一台新电脑",
"Install Codync on a VPS or another machine.": "在 VPS 或另一台机器上安装 Codync。",
- "Send this link to your computer": "把这个链接发到你的电脑",
+ "Open the website on your computer to download Codync": "在电脑上打开网站来下载 Codync",
"Sign in there with {email} and it shows up here.": "在电脑上用 {email} 登录,它就会出现在这里。",
- "Share link": "分享链接",
+ "Copy website link": "复制网站链接",
"Check the code on {name}": "核对 {name} 上显示的码",
"Approve on {name}": "在 {name} 上同意",
"Asking {name}…": "正在询问 {name}…",
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
index 618e5366..246fa6c1 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
@@ -1785,9 +1785,9 @@
"Ask a computer in your account for access, or pair a new one, like a VPS.": "向賬戶裡的電腦申請訪問,或配對一臺新電腦,例如 VPS。",
"Pair a new computer": "配對一臺新電腦",
"Install Codync on a VPS or another machine.": "在 VPS 或另一臺機器上安裝 Codync。",
- "Send this link to your computer": "把這個連結傳到你的電腦",
+ "Open the website on your computer to download Codync": "在電腦上開啟網站來下載 Codync",
"Sign in there with {email} and it shows up here.": "在電腦上用 {email} 登入,它就會出現在這裡。",
- "Share link": "分享連結",
+ "Copy website link": "複製網站連結",
"Check the code on {name}": "核對 {name} 上顯示的碼",
"Approve on {name}": "在 {name} 上同意",
"Asking {name}…": "正在詢問 {name}…",
diff --git a/apps/ios/Views/PairingView.swift b/apps/ios/Views/PairingView.swift
index 48186a17..8fecb84a 100644
--- a/apps/ios/Views/PairingView.swift
+++ b/apps/ios/Views/PairingView.swift
@@ -97,12 +97,13 @@ private enum ComputerOS: Hashable { case mac, linux }
// MARK: - Install
private struct InstallPage: View {
- /// The website's downloads, for whatever the computer runs.
- private static let downloadLink = URL(string: "https://www.codync.dev/#install")!
+ /// The website: its first button downloads for whatever the computer runs.
+ private static let websiteLink = "https://www.codync.dev"
@Binding var os: ComputerOS
let next: () -> Void
@Environment(AccountSession.self) private var account
+ @State private var linkCopied = false
var body: some View {
VStack(alignment: .leading, spacing: 0) {
@@ -127,8 +128,16 @@ private struct InstallPage: View {
}
VStack(alignment: .leading, spacing: 10) {
- Hint("Send this link to your computer")
- CommandBlock(Self.downloadLink.absoluteString, records: .installLink, share: Self.downloadLink)
+ Hint("Open the website on your computer to download Codync")
+ Button {
+ copyToClipboard(Self.websiteLink, records: .installLink, copied: $linkCopied)
+ } label: {
+ Label(L10n.tr(linkCopied ? "Copied" : "Copy website link"), systemImage: linkCopied ? "checkmark" : "doc.on.doc")
+ .font(.headline)
+ .frame(maxWidth: .infinity)
+ .contentTransition(.opacity)
+ }
+ .buttonStyle(.secondary)
// The same account is what lets this phone find the computer afterwards.
if let email = account.email {
Text(L10n.tr("Sign in there with {email} and it shows up here.").replacingOccurrences(of: "{email}", with: email))
@@ -187,17 +196,26 @@ private struct Hint: View {
}
}
-/// A terminal command or link with a copy button; copying it (or sharing `share`) counts as opening `records`.
+/// Copies `text`, counts as opening `records`, and says so through `copied` for a moment.
+@MainActor private func copyToClipboard(_ text: String, records: AnalyticsEvent.Link?, copied: Binding<Bool>) {
+ UIPasteboard.general.string = text
+ if let records { Analytics.shared.capture(.linkOpened(records)) }
+ withAnimation(Motion.morph) { copied.wrappedValue = true }
+ Task {
+ try? await Task.sleep(for: .seconds(1.5))
+ withAnimation(Motion.morph) { copied.wrappedValue = false }
+ }
+}
+
+/// A terminal command or link with a copy button; copying it counts as opening `records`.
private struct CommandBlock: View {
let command: String
let records: AnalyticsEvent.Link?
- let share: URL?
@State private var copied = false
- init(_ command: String, records: AnalyticsEvent.Link? = nil, share: URL? = nil) {
+ init(_ command: String, records: AnalyticsEvent.Link? = nil) {
self.command = command
self.records = records
- self.share = share
}
var body: some View {
@@ -210,25 +228,9 @@ private struct CommandBlock: View {
.padding(.vertical, 6)
.contentTransition(.opacity)
IconButton(copied ? "Copied" : "Copy", systemImage: copied ? "checkmark" : "doc.on.doc") {
- UIPasteboard.general.string = command
- if let records { Analytics.shared.capture(.linkOpened(records)) }
- withAnimation(Motion.morph) { copied = true }
- Task {
- try? await Task.sleep(for: .seconds(1.5))
- withAnimation(Motion.morph) { copied = false }
- }
+ copyToClipboard(command, records: records, copied: $copied)
}
.contentTransition(.symbolEffect(.replace))
- if let share {
- ShareLink(item: share) {
- Label(L10n.tr("Share link"), systemImage: "square.and.arrow.up")
- }
- .labelStyle(.iconOnly)
- .buttonStyle(IconButtonStyle())
- .simultaneousGesture(TapGesture().onEnded {
- if let records { Analytics.shared.capture(.linkOpened(records)) }
- })
- }
}
.padding(.leading, 14)
.padding(.trailing, 4)
diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.md
index c8b25ebf..015e7f63 100644
--- a/apps/ios/WhatsNew.md
+++ b/apps/ios/WhatsNew.md
@@ -8,7 +8,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
## 2.39.0
### zh-Hant
-- 第一次設定時,如果帳號裡已有電腦,可以向它申請訪問,或配對一臺新電腦(例如 VPS)。安裝頁也能直接複製或分享下載連結到電腦。
+- 第一次設定時,如果帳號裡已有電腦,可以向它申請訪問,或配對一臺新電腦(例如 VPS)。安裝頁也能一鍵複製網站連結,到電腦上下載。
- bot 用了不只一種智慧體時,列表會在頭像左下角標出各自的智慧體標誌,可在「設定 › 外觀」關閉。
- 修正語音通話中,bot 唸完回覆、要再聽你說話時 app 可能閃退的問題。
- 語音通話的對話紀錄更好讀:最上方顯示是跟哪個 bot、什麼時候、通話多久,語音說的話也更清楚。
@@ -22,7 +22,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
- 擴充功能的「已安裝」提示也會顯示技能的圖示。
### en-US
-- First-time setup now checks your account: ask a computer already in it for access, or pair a new one, like a VPS. The install page also has a download link to copy or share to your computer.
+- First-time setup now checks your account: ask a computer already in it for access, or pair a new one, like a VPS. The install page also has a button that copies the website link, to download on your computer.
- When your bots use more than one agent, the bot list marks each avatar with its agent's logo. Turn it off in Settings › Appearance.
- Fixed a crash in voice calls when the bot finished reading a reply and started listening again.
- A call's conversation is easier to read: the bot, when the call ended and how long it lasted sit at the top, and the voice's words are clearer.
diff --git a/apps/maestro/computer-choice-empty.yaml b/apps/maestro/computer-choice-empty.yaml
index 46196b92..f3415f50 100644
--- a/apps/maestro/computer-choice-empty.yaml
+++ b/apps/maestro/computer-choice-empty.yaml
@@ -24,4 +24,4 @@ tags:
visible: "Install Codync.*"
timeout: 20000
- assertNotVisible: "Connect a computer"
-- assertVisible: "https://www.codync.dev/#install"
+- assertVisible: "Copy website link"
diff --git a/apps/maestro/computer-choice.yaml b/apps/maestro/computer-choice.yaml
index 87a6f02e..8336ce4e 100644
--- a/apps/maestro/computer-choice.yaml
+++ b/apps/maestro/computer-choice.yaml
@@ -29,10 +29,8 @@ tags:
- assertVisible: "Skip"
- tapOn: "Pair a new computer"
- assertVisible: "Install Codync.*"
-- assertVisible: "https://www.codync.dev/#install"
-- assertVisible: "Send this link to your computer"
-- assertVisible: "Copy"
-- assertVisible: "Share link"
+- assertVisible: "Open the website on your computer.*"
+- assertVisible: "Copy website link"
- tapOn: "Back"
- assertVisible: "Connect a computer"
- tapOn: "Ask for access"
diff --git a/docs/guides/accounts-and-ssh.md b/docs/guides/accounts-and-ssh.md
index 47471393..fafbe883 100644
--- a/docs/guides/accounts-and-ssh.md
+++ b/docs/guides/accounts-and-ssh.md
@@ -117,8 +117,8 @@ QR pairing requires the phone and the computer to be in the same account
from it. With computers in the account, the first page lists them (**Ask for access**: nothing
is requested until the tap, since the user may be here to set up another computer) next to
**Pair a new computer**, which leads to the install page. With none, or only older copies, setup
-goes straight to the install page. That page has the website's download link to copy or share
-to the computer. A computer that joins the account meanwhile brings up the first page the next
+goes straight to the install page. That page has a button that copies the website's link,
+to open on the computer. A computer that joins the account meanwhile brings up the first page the next
time the app is opened, unless the user already chose to pair or moved on to scanning. Only
reaching a computer or **Skip** finishes setup. The first page and the scan step always offer
**Skip**. Skipping finishes onboarding and opens the main
diff --git a/docs/reference/analytics-events.md b/docs/reference/analytics-events.md
index e5261a58..1295f2f9 100644
--- a/docs/reference/analytics-events.md
+++ b/docs/reference/analytics-events.md
@@ -57,7 +57,7 @@ host answers and sends it once the host is up.
| `notifications_answered` | iOS, Android | The system notification prompt was answered | `granted`, `source` (`settings`/`widgets`/`automatic`) |
| `notification_opened` | iOS, Android | A Codync notification was tapped | `kind` (`done`/`needs_input`/`failed`) |
| `star_prompt_answered` | host `track` (desktop) | The GitHub star setup invitation or reminder was answered or closed | `ask` (`first`/`second`), `starred` |
-| `link_opened` | host `track` (desktop), iOS, Android | An outbound link was opened (`install_command`: an install command copied; `install_link`: the phone's download link copied or shared) | `link` (`github`/`docs`/`issues`/`discord`/`app_store`/`demo`/`tailscale`/`privacy`/`support`/`install_command`/`install_link`/`product_hunt`) |
+| `link_opened` | host `track` (desktop), iOS, Android | An outbound link was opened (`install_command`: an install command copied; `install_link`: the phone's website link copied) | `link` (`github`/`docs`/`issues`/`discord`/`app_store`/`demo`/`tailscale`/`privacy`/`support`/`install_command`/`install_link`/`product_hunt`) |
## Using Codync
diff --git a/web/content/docs/getting-started.mdx b/web/content/docs/getting-started.mdx
index 720ff405..03fffc78 100644
--- a/web/content/docs/getting-started.mdx
+++ b/web/content/docs/getting-started.mdx
@@ -89,7 +89,7 @@ After pairing, the phone connects directly when it's on the same Wi-Fi or Tailsc
If you signed in to the same account on the computer and the phone, the phone can ask the computer for access instead of scanning: the first page lists your account's computers with **Ask for access**. The computer then shows the request and a code for you to check. See [Remote access](/docs/remote-access).
-Started on the phone, with Codync not on the computer yet? The install page has a download link: copy it or share it to the computer, and open it there. Sign in there with the same account, and the computer shows up on the phone the next time you open the app.
+Started on the phone, with Codync not on the computer yet? The install page has **Copy website link**: open that link on the computer and download Codync there. Sign in there with the same account, and the computer shows up on the phone the next time you open the app.
## 4. Meet your lead bot