mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-18 14:59:42 +02:00
Mention CLI in main dropdown
This commit is contained in:
@@ -131,11 +131,7 @@ async fn cmd_metadata(app_handle: AppHandle) -> YaakResult<AppMetaData> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn detect_cli_version() -> Option<String> {
|
async fn detect_cli_version() -> Option<String> {
|
||||||
// Prefer `yaak`, but support the legacy `yaakcli` alias if present.
|
detect_cli_version_for_binary("yaak").await
|
||||||
if let Some(version) = detect_cli_version_for_binary("yaak").await {
|
|
||||||
return Some(version);
|
|
||||||
}
|
|
||||||
detect_cli_version_for_binary("yaakcli").await
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn detect_cli_version_for_binary(program: &str) -> Option<String> {
|
async fn detect_cli_version_for_binary(program: &str) -> Option<String> {
|
||||||
|
|||||||
@@ -41,11 +41,7 @@ function SettingsLicenseCmp() {
|
|||||||
|
|
||||||
case 'trialing':
|
case 'trialing':
|
||||||
return (
|
return (
|
||||||
<Banner color="info" className="@container flex items-center gap-x-5 max-w-xl">
|
<Banner color="info" className="max-w-lg">
|
||||||
<LocalImage
|
|
||||||
src="static/greg.jpeg"
|
|
||||||
className="hidden @sm:block rounded-full h-14 w-14"
|
|
||||||
/>
|
|
||||||
<p className="w-full">
|
<p className="w-full">
|
||||||
<strong>
|
<strong>
|
||||||
{pluralizeCount('day', differenceInDays(check.data.data.end, new Date()))}
|
{pluralizeCount('day', differenceInDays(check.data.data.end, new Date()))}
|
||||||
@@ -55,10 +51,6 @@ function SettingsLicenseCmp() {
|
|||||||
<span className="opacity-50">Personal use is always free, forever.</span>
|
<span className="opacity-50">Personal use is always free, forever.</span>
|
||||||
<Separator className="my-2" />
|
<Separator className="my-2" />
|
||||||
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
|
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
|
||||||
<Link noUnderline href="mailto:support@yaak.app">
|
|
||||||
Contact Support
|
|
||||||
</Link>
|
|
||||||
<Icon icon="dot" size="sm" color="secondary" />
|
|
||||||
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
|
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
|
||||||
Learn More
|
Learn More
|
||||||
</Link>
|
</Link>
|
||||||
@@ -69,24 +61,16 @@ function SettingsLicenseCmp() {
|
|||||||
|
|
||||||
case 'personal_use':
|
case 'personal_use':
|
||||||
return (
|
return (
|
||||||
<Banner color="notice" className="@container flex items-center gap-x-5 max-w-xl">
|
<Banner color="notice" className="max-w-lg">
|
||||||
<LocalImage
|
|
||||||
src="static/greg.jpeg"
|
|
||||||
className="hidden @sm:block rounded-full h-14 w-14"
|
|
||||||
/>
|
|
||||||
<p className="w-full">
|
<p className="w-full">
|
||||||
Your commercial-use trial has ended.
|
Your commercial-use trial has ended.
|
||||||
<br />
|
<br />
|
||||||
<span className="opacity-50">
|
<span className="opacity-50">
|
||||||
You may continue using Yaak for personal use free, forever.
|
You may continue using Yaak for personal use only.
|
||||||
<br />A license is required for commercial use.
|
<br />A license is required for commercial use.
|
||||||
</span>
|
</span>
|
||||||
<Separator className="my-2" />
|
<Separator className="my-2" />
|
||||||
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
|
<div className="flex flex-wrap items-center gap-x-2 text-sm text-notice">
|
||||||
<Link noUnderline href="mailto:support@yaak.app">
|
|
||||||
Contact Support
|
|
||||||
</Link>
|
|
||||||
<Icon icon="dot" size="sm" color="secondary" />
|
|
||||||
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
|
<Link noUnderline href={`https://yaak.app/pricing?s=learn&t=${check.data.status}`}>
|
||||||
Learn More
|
Learn More
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -64,19 +64,27 @@ export function SettingsDropdown() {
|
|||||||
onSelect: () => openUrl('https://yaak.app/button/new'),
|
onSelect: () => openUrl('https://yaak.app/button/new'),
|
||||||
},
|
},
|
||||||
{ type: 'separator', label: `Yaak v${appInfo.version}` },
|
{ type: 'separator', label: `Yaak v${appInfo.version}` },
|
||||||
{
|
|
||||||
label: 'Purchase License',
|
|
||||||
color: 'success',
|
|
||||||
hidden: check.data == null || check.data.status === 'active',
|
|
||||||
leftSlot: <Icon icon="circle_dollar_sign" />,
|
|
||||||
onSelect: () => openSettings.mutate('license'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Check for Updates',
|
label: 'Check for Updates',
|
||||||
leftSlot: <Icon icon="update" />,
|
leftSlot: <Icon icon="update" />,
|
||||||
hidden: !appInfo.featureUpdater,
|
hidden: !appInfo.featureUpdater,
|
||||||
onSelect: () => checkForUpdates.mutate(),
|
onSelect: () => checkForUpdates.mutate(),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Purchase License',
|
||||||
|
color: 'success',
|
||||||
|
hidden: check.data == null || check.data.status === 'active',
|
||||||
|
leftSlot: <Icon icon="circle_dollar_sign" />,
|
||||||
|
rightSlot: <Icon icon="external_link" color="success" className="opacity-60" />,
|
||||||
|
onSelect: () => openUrl('https://yaak.app/pricing'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Install CLI',
|
||||||
|
hidden: appInfo.cliVersion != null,
|
||||||
|
leftSlot: <Icon icon="square_terminal" />,
|
||||||
|
rightSlot: <Icon icon="external_link" color="secondary" />,
|
||||||
|
onSelect: () => openUrl('https://yaak.app/docs/cli'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Feedback',
|
label: 'Feedback',
|
||||||
leftSlot: <Icon icon="chat" />,
|
leftSlot: <Icon icon="chat" />,
|
||||||
|
|||||||
Reference in New Issue
Block a user