Skip to content

Commit 9500795

Browse files
committed
License nudge: clearer copy, layout, and dev trigger
- Swap the secondary button to "I only use Cmdr for personal purposes" (replaces "Remind me in 30 days"), wrap to two lines, and put it on the left of an equal-width row with the primary - Widen the modal (420 → 600 px), give the title some breathing room, split the lede into two paragraphs, fix the link to `https://getcmdr.com/pricing/` - `Button.svelte`: bump `line-height` from `1` (too tight, descenders crowded) to `1.5` so multi-line button text reads cleanly - Document `CMDR_MOCK_LICENSE=personal_reminder` as the way to pop the reminder on launch; drop the stale "edit `license.json` by hand" hint
1 parent 1753751 commit 9500795

3 files changed

Lines changed: 23 additions & 15 deletions

File tree

apps/desktop/src/lib/licensing/CLAUDE.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,18 @@ dismiss). The About window and modals read the cached value on mount.
101101

102102
## Development
103103

104-
**Run with mock license**:
104+
**Run with mock license**: Set `CMDR_MOCK_LICENSE` to one of `personal`, `personal_reminder`, `commercial`, `perpetual`,
105+
`expired`, or `expired_no_modal`. Debug builds only; release builds ignore it.
105106

106107
```bash
107-
CMDR_MOCK_LICENSE=commercial pnpm tauri dev
108+
CMDR_MOCK_LICENSE=commercial pnpm dev
109+
```
110+
111+
**Trigger the commercial reminder on launch**: use the `personal_reminder` mock value. The modal pops on app start
112+
without waiting 30 days or editing `license.json`.
113+
114+
```bash
115+
CMDR_MOCK_LICENSE=personal_reminder pnpm dev
108116
```
109117

110118
**Reset trial** (debug builds only):
@@ -113,8 +121,5 @@ CMDR_MOCK_LICENSE=commercial pnpm tauri dev
113121
security delete-generic-password -s "com.veszelovszki.cmdr" -a "trial-*"
114122
```
115123

116-
**Test commercial reminder**: Set `firstRunTimestamp` in
117-
`~/Library/Application Support/com.veszelovszki.cmdr/license.json` to 31 days ago.
118-
119124
**Generate a test license key**: See
120125
[API server CLAUDE.md](../../../../apps/api-server/CLAUDE.md#generate-a-test-license-key).

apps/desktop/src/lib/licensing/CommercialReminderModal.svelte

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
1717
async function handleGetCommercial() {
18-
await openExternalUrl('https://getcmdr.com/commercial')
18+
await openExternalUrl('https://getcmdr.com/pricing/')
1919
}
2020
</script>
2121

@@ -26,28 +26,28 @@
2626
onclose={() => {
2727
void handleDismiss()
2828
}}
29-
containerStyle="max-width: 420px; background: var(--color-bg-primary); border-color: var(--color-border)"
29+
containerStyle="max-width: 600px; background: var(--color-bg-primary); border-color: var(--color-border)"
3030
>
3131
{#snippet title()}Thanks for using Cmdr!{/snippet}
3232

3333
<div class="modal-body">
34-
<p class="message">
35-
You're using a Personal license. If you're using Cmdr at work, please get a Commercial license to stay
36-
compliant.
37-
</p>
34+
<p class="message">You're using a Personal license.</p>
35+
<p class="message">If you're using Cmdr at work, please get a Commercial license to stay compliant.</p>
3836

3937
<p class="info">Commercial licenses are $59/year/user and support continued development.</p>
4038

4139
<div class="actions">
40+
<Button variant="secondary" onclick={handleDismiss}>
41+
I only use Cmdr<br />for personal purposes
42+
</Button>
4243
<Button variant="primary" onclick={handleGetCommercial}>Get commercial license</Button>
43-
<Button variant="secondary" onclick={handleDismiss}>Remind me in 30 days</Button>
4444
</div>
4545
</div>
4646
</ModalDialog>
4747

4848
<style>
4949
.modal-body {
50-
padding: 0 var(--spacing-2xl) var(--spacing-xl);
50+
padding: var(--spacing-md) var(--spacing-2xl) var(--spacing-xl);
5151
}
5252
5353
.message {
@@ -67,6 +67,9 @@
6767
.actions {
6868
display: flex;
6969
gap: var(--spacing-md);
70-
justify-content: flex-end;
70+
}
71+
72+
.actions :global(button) {
73+
flex: 1;
7174
}
7275
</style>

apps/desktop/src/lib/ui/Button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<style>
3333
.btn {
3434
font-weight: 500;
35-
line-height: 1;
35+
line-height: 1.5;
3636
border-radius: var(--radius-md);
3737
transition: all var(--transition-base);
3838
}

0 commit comments

Comments
 (0)