feat: onboarding tunnel step UX improvements
- Rename "Skip" to "Next" / "跳过" to "下一步" across all locales - Show loading spinner only when auto-redirecting (localhost), hide it otherwise - Replace plain tunnel URL text with a clickable link - Remove redundant duplicate anchor in non-localhost done/dns_wait phase
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "A temporary public domain has been assigned to you",
|
||||
"tunnel_opt_in_title": "Get an automatically assigned public domain?",
|
||||
"tunnel_opt_in_yes": "Yes",
|
||||
"tunnel_opt_in_skip": "Skip",
|
||||
"tunnel_opt_in_skip": "Next",
|
||||
"tunnel_progress": "Starting tunnel...",
|
||||
"tunnel_error": "Tunnel error",
|
||||
"tunnel_get_domain": "Get Public Domain"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"tunnel_domain_assigned": "已为您分配了一个临时的公网域名",
|
||||
"tunnel_opt_in_title": "获取自动分配的公网域名?",
|
||||
"tunnel_opt_in_yes": "是",
|
||||
"tunnel_opt_in_skip": "跳过",
|
||||
"tunnel_opt_in_skip": "下一步",
|
||||
"tunnel_progress": "正在启动 Tunnel...",
|
||||
"tunnel_error": "Tunnel 出错",
|
||||
"tunnel_get_domain": "获取公网域名"
|
||||
|
||||
@@ -195,28 +195,25 @@ export default function GetPublicDomain() {
|
||||
if (phase === "done" && tunnelUrl) {
|
||||
return (
|
||||
<div className="flex-center flex-col h-full text-center gap-6 dark:text-gray-100 px-4 md:max-w-md m-auto">
|
||||
<div className="w-10 h-10 border-4 border-green-400 border-t-transparent rounded-full animate-spin" />
|
||||
<span className="font-mono text-sm break-all text-green-600 dark:text-green-400">
|
||||
{isLocalhost && (
|
||||
<div className="w-10 h-10 border-4 border-green-400 border-t-transparent rounded-full animate-spin" />
|
||||
)}
|
||||
<a
|
||||
href={tunnelUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-mono text-sm break-all text-green-600 dark:text-green-400 underline"
|
||||
>
|
||||
{tunnelUrl}
|
||||
</span>
|
||||
</a>
|
||||
{isLocalhost ? (
|
||||
<span className="text-lg font-semibold">
|
||||
{t("tunnel_redirect_countdown", { seconds: countdown })}
|
||||
</span>
|
||||
) : (
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<a
|
||||
href={tunnelUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-500 underline text-sm"
|
||||
>
|
||||
{tunnelUrl}
|
||||
</a>
|
||||
<StyledButton className="w-32 h-11" onClick={nextStep}>
|
||||
{t("tunnel_opt_in_skip")}
|
||||
</StyledButton>
|
||||
</div>
|
||||
<StyledButton className="w-32 h-11" onClick={nextStep}>
|
||||
{t("tunnel_opt_in_skip")}
|
||||
</StyledButton>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -165,11 +165,18 @@ export default function WelcomePage() {
|
||||
if (phase === "dns_wait" || phase === "redirecting") {
|
||||
return (
|
||||
<div className="flex-center flex-col h-full text-center gap-6 dark:text-gray-100 px-4 md:max-w-md m-auto">
|
||||
<div className="w-10 h-10 border-4 border-green-400 border-t-transparent rounded-full animate-spin" />
|
||||
{isLocalhost && (
|
||||
<div className="w-10 h-10 border-4 border-green-400 border-t-transparent rounded-full animate-spin" />
|
||||
)}
|
||||
{tunnelUrl && (
|
||||
<span className="font-mono text-sm break-all text-green-600 dark:text-green-400">
|
||||
<a
|
||||
href={tunnelUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="font-mono text-sm break-all text-green-600 dark:text-green-400 underline"
|
||||
>
|
||||
{tunnelUrl}
|
||||
</span>
|
||||
</a>
|
||||
)}
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||
{t("tunnel_dns_warning")}
|
||||
@@ -179,21 +186,9 @@ export default function WelcomePage() {
|
||||
{t("tunnel_redirect_countdown", { seconds: countdown })}
|
||||
</span>
|
||||
) : (
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
{tunnelUrl && (
|
||||
<a
|
||||
href={tunnelUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-blue-500 underline text-sm"
|
||||
>
|
||||
{tunnelUrl}
|
||||
</a>
|
||||
)}
|
||||
<StyledButton className="w-32 h-11" onClick={nextStep}>
|
||||
{t("tunnel_opt_in_skip")}
|
||||
</StyledButton>
|
||||
</div>
|
||||
<StyledButton className="w-32 h-11" onClick={nextStep}>
|
||||
{t("tunnel_opt_in_skip")}
|
||||
</StyledButton>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user