Skip to content

Commit 3c12074

Browse files
committed
Mention CLI in main dropdown
1 parent 851f12f commit 3c12074

3 files changed

Lines changed: 17 additions & 29 deletions

File tree

crates-tauri/yaak-app/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,7 @@ async fn cmd_metadata(app_handle: AppHandle) -> YaakResult<AppMetaData> {
131131
}
132132

133133
async fn detect_cli_version() -> Option<String> {
134-
// Prefer `yaak`, but support the legacy `yaakcli` alias if present.
135-
if let Some(version) = detect_cli_version_for_binary("yaak").await {
136-
return Some(version);
137-
}
138-
detect_cli_version_for_binary("yaakcli").await
134+
detect_cli_version_for_binary("yaak").await
139135
}
140136

141137
async fn detect_cli_version_for_binary(program: &str) -> Option<String> {

src-web/components/Settings/SettingsLicense.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ function SettingsLicenseCmp() {
4141

4242
case 'trialing':
4343
return (
44-
<Banner color="info" className="@container flex items-center gap-x-5 max-w-xl">
45-
<LocalImage
46-
src="static/greg.jpeg"
47-
className="hidden @sm:block rounded-full h-14 w-14"
48-
/>
44+
<Banner color="info" className="max-w-lg">
4945
<p className="w-full">
5046
<strong>
5147
{pluralizeCount('day', differenceInDays(check.data.data.end, new Date()))}
@@ -55,10 +51,6 @@ function SettingsLicenseCmp() {
5551
<span className="opacity-50">Personal use is always free, forever.</span>
5652
<Separator className="my-2" />
5753
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
58-
<Link noUnderline href="mailto:support@yaak.app">
59-
Contact Support
60-
</Link>
61-
<Icon icon="dot" size="sm" color="secondary" />
6254
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
6355
Learn More
6456
</Link>
@@ -69,24 +61,16 @@ function SettingsLicenseCmp() {
6961

7062
case 'personal_use':
7163
return (
72-
<Banner color="notice" className="@container flex items-center gap-x-5 max-w-xl">
73-
<LocalImage
74-
src="static/greg.jpeg"
75-
className="hidden @sm:block rounded-full h-14 w-14"
76-
/>
64+
<Banner color="notice" className="max-w-lg">
7765
<p className="w-full">
7866
Your commercial-use trial has ended.
7967
<br />
8068
<span className="opacity-50">
81-
You may continue using Yaak for personal use free, forever.
69+
You may continue using Yaak for personal use only.
8270
<br />A license is required for commercial use.
8371
</span>
8472
<Separator className="my-2" />
8573
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
86-
<Link noUnderline href="mailto:support@yaak.app">
87-
Contact Support
88-
</Link>
89-
<Icon icon="dot" size="sm" color="secondary" />
9074
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
9175
Learn More
9276
</Link>

src-web/components/SettingsDropdown.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,26 @@ export function SettingsDropdown() {
6464
onSelect: () => openUrl('https://yaak.app/button/new'),
6565
},
6666
{ type: 'separator', label: `Yaak v${appInfo.version}` },
67+
{
68+
label: 'Check for Updates',
69+
leftSlot: <Icon icon="update" />,
70+
hidden: !appInfo.featureUpdater,
71+
onSelect: () => checkForUpdates.mutate(),
72+
},
6773
{
6874
label: 'Purchase License',
6975
color: 'success',
7076
hidden: check.data == null || check.data.status === 'active',
7177
leftSlot: <Icon icon="circle_dollar_sign" />,
72-
onSelect: () => openSettings.mutate('license'),
78+
rightSlot: <Icon icon="external_link" color="success" className="opacity-60" />,
79+
onSelect: () => openUrl('https://yaak.app/pricing'),
7380
},
7481
{
75-
label: 'Check for Updates',
76-
leftSlot: <Icon icon="update" />,
77-
hidden: !appInfo.featureUpdater,
78-
onSelect: () => checkForUpdates.mutate(),
82+
label: 'Install CLI',
83+
hidden: appInfo.cliVersion != null,
84+
leftSlot: <Icon icon="square_terminal" />,
85+
rightSlot: <Icon icon="external_link" color="secondary" />,
86+
onSelect: () => openUrl('https://yaak.app/docs/cli'),
7987
},
8088
{
8189
label: 'Feedback',

0 commit comments

Comments
 (0)