Skip to content

Commit d9a748d

Browse files
committed
Update install instructions
1 parent 4f57c3c commit d9a748d

4 files changed

Lines changed: 160 additions & 122 deletions

File tree

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,27 +129,20 @@ ws.onerror = (err) => console.error('WebSocket error:', err);
129129
- Warns 14 days before expiry
130130
- Falls back to cache if GitHub is unreachable
131131

132-
## Manual Installation
132+
## Installation
133+
134+
Install from the [Logitech Marketplace](https://marketplace.logi.com/plugin/HapticWeb/en) directly within Logi Options+. You can find plugins in the Haptic Feedback area of your MX Master 4 settings.
135+
136+
### Manual Installation
133137

134138
1. Open Logitech Options+ and click on your MX Master 4.
135139
2. In the left sidebar, open the `HAPTIC FEEDBACK` tab and click on the haptic feedback settings popover.
136-
3. In the new right sidebar, click the `INSTALL AND UNINSTALL PLUGINS` button. Now you're in the plugin management window.
140+
3. In the new right sidebar, click the `INSTALL AND UNINSTALL PLUGINS` button.
137141
4. Download the `HapticWeb.lplug4` release asset from [GitHub Releases](https://github.com/fallstop/HapticWebPlugin/releases) and double-click it.
138142
5. This will trigger an installation dialog in Logitech Options+. Press continue.
139143
6. The server starts automatically at `https://local.jmw.nz:41443/`
140144
7. Test at [https://haptics.jmw.nz](https://haptics.jmw.nz)
141145

142-
### Uninstalling
143-
A manually installed plugin doesn't show in the plugin list, so to uninstall, simply delete the plugin folder:
144-
145-
```bash
146-
# Windows
147-
C:\Users\USERNAME\AppData\Local\Logi\LogiPluginService\Plugins\HapticWebPlugin\
148-
149-
# macOS
150-
~/Library/Application Support/Logi/LogiPluginService/Plugins/HapticWebPlugin/
151-
```
152-
153146
## Development
154147

155148
### Building

web-demo/src/routes/+page.svelte

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,26 @@
1515
import Download from "@lucide/svelte/icons/download";
1616
import Vibrate from "@lucide/svelte/icons/vibrate";
1717
import Zap from "@lucide/svelte/icons/zap";
18+
import { onMount } from "svelte";
19+
import { fade } from "svelte/transition";
1820
1921
const connected = $derived(isConnected());
2022
const hasInitiated = $derived(hasInitiatedConnection());
2123
const connectionState = $derived(getConnectionState());
2224
25+
let installCount: number | null = $state(null);
26+
27+
onMount(async () => {
28+
try {
29+
const res = await fetch("/_api/downloads");
30+
if (!res.ok) return;
31+
const data = await res.json();
32+
if (data.downloads != null) installCount = data.downloads;
33+
} catch {
34+
/* ignore */
35+
}
36+
});
37+
2338
function handleConnect() {
2439
connect();
2540
}
@@ -45,6 +60,19 @@
4560
<div class="flex items-center gap-3">
4661
<Badge variant="outline">Logi Actions SDK</Badge>
4762
<Badge variant="outline">Open Source</Badge>
63+
<Badge variant="outline" class={installCount == null ? 'invisible' : ''}>
64+
{#if installCount != null}
65+
<span in:fade={{ duration: 300 }} class="inline-flex items-center gap-1">
66+
<Download class="w-3 h-3" />
67+
{installCount.toLocaleString()} installs
68+
</span>
69+
{:else}
70+
<span class="inline-flex items-center gap-1 invisible">
71+
<Download class="w-3 h-3" />
72+
0,000 installs
73+
</span>
74+
{/if}
75+
</Badge>
4876
</div>
4977

5078
<h1 class="text-4xl sm:text-5xl font-bold tracking-tight">
@@ -120,8 +148,8 @@
120148
</div>
121149
<h3 class="text-xl font-semibold">1. Install</h3>
122150
<p class="text-muted-foreground text-sm">
123-
Download the plugin and install it through Logi Options+. Takes less
124-
than a minute.
151+
Install from the Logitech Marketplace in Logi Options+, or download
152+
manually from GitHub. Takes less than a minute.
125153
</p>
126154
<a
127155
href="/install"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { json } from '@sveltejs/kit';
2+
import type { RequestHandler } from './$types';
3+
4+
export const GET: RequestHandler = async () => {
5+
try {
6+
const res = await fetch('https://marketplace.logi.com/api/downloads', {
7+
signal: AbortSignal.timeout(5000)
8+
});
9+
if (!res.ok) return json({ downloads: null });
10+
const data = await res.json();
11+
const count = data?.plugins?.HapticWeb?.downloads;
12+
if (count != null) {
13+
return json({ downloads: count });
14+
}
15+
} catch {
16+
/* ignore */
17+
}
18+
return json({ downloads: null });
19+
};

web-demo/src/routes/install/+page.svelte

Lines changed: 105 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import { Button } from "$lib/components/ui/button";
33
import { Separator } from "$lib/components/ui/separator";
44
import AlertTriangle from "@lucide/svelte/icons/alert-triangle";
5+
import ChevronRight from "@lucide/svelte/icons/chevron-right";
56
import Download from "@lucide/svelte/icons/download";
67
import ExternalLink from "@lucide/svelte/icons/external-link";
7-
import Folder from "@lucide/svelte/icons/folder";
8-
import Trash2 from "@lucide/svelte/icons/trash-2";
8+
import Store from "@lucide/svelte/icons/store";
99
</script>
1010

1111
<svelte:head>
@@ -15,13 +15,12 @@
1515
content="Install the HapticWeb plugin for MX Master 4 haptic feedback." />
1616
</svelte:head>
1717

18-
<div class="max-w-6xl mx-auto px-4 py-12">
18+
<div class="max-w-4xl mx-auto px-4 py-12">
1919
<!-- Header -->
2020
<div class="space-y-4 mb-12">
2121
<h1 class="text-4xl font-bold">Install HapticWeb Plugin</h1>
2222
<p class="text-lg text-muted-foreground">
23-
Get the plugin running in under a minute. Just download, double-click, and
24-
you're ready.
23+
Get the plugin running in under a minute.
2524
</p>
2625
</div>
2726

@@ -32,7 +31,9 @@
3231
<div class="p-4 rounded-lg border border-border bg-card flex gap-4">
3332
<img
3433
src="/mx-master4.webp"
35-
alt="MX Master 4"
34+
alt=""
35+
width="64"
36+
height="64"
3637
class="w-16 h-16 object-contain" />
3738
<div>
3839
<h3 class="font-medium">Logitech MX Master 4</h3>
@@ -44,7 +45,9 @@
4445
<div class="p-4 rounded-lg border border-border bg-card flex gap-4">
4546
<img
4647
src="/options-plus.png"
47-
alt="Logi Options+"
48+
alt=""
49+
width="64"
50+
height="64"
4851
class="w-16 h-16 object-contain" />
4952
<div>
5053
<h3 class="font-medium">Logi Options+</h3>
@@ -65,88 +68,115 @@
6568

6669
<Separator class="mb-12" />
6770

68-
<!-- Installation Steps -->
71+
<!-- Marketplace Installation -->
6972
<section class="mb-12">
7073
<h2 class="text-2xl font-semibold mb-6">Installation</h2>
7174

72-
<div class="space-y-6">
73-
<!-- Step 1 -->
74-
<div class="flex gap-4">
75+
<a
76+
href="https://marketplace.logi.com/plugin/HapticWeb/en"
77+
target="_blank"
78+
rel="noopener noreferrer"
79+
class="group block p-6 rounded-xl border border-primary/30 bg-primary/5 hover:bg-primary/10 transition-colors">
80+
<div class="flex items-center gap-4">
7581
<div
76-
class="shrink-0 w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold">
77-
1
82+
class="shrink-0 w-12 h-12 rounded-lg bg-primary/20 flex items-center justify-center">
83+
<Store class="w-6 h-6 text-primary" />
7884
</div>
79-
<div class="flex-1 space-y-3">
80-
<h3 class="font-medium">Download the plugin</h3>
81-
<p class="text-sm text-muted-foreground">
82-
Get the latest
83-
<code class="px-1.5 py-0.5 rounded bg-muted text-foreground">
84-
HapticWeb.lplug4
85-
</code>
86-
file from GitHub Releases.
85+
<div class="flex-1">
86+
<h3 class="text-lg font-medium group-hover:text-primary transition-colors">
87+
Install from the Logitech Marketplace
88+
</h3>
89+
<p class="text-sm text-muted-foreground mt-1">
90+
Open Logi Options+, go to your MX Master 4's <strong>Haptic Feedback</strong> settings, and find HapticWeb in the marketplace.
8791
</p>
88-
<Button
89-
href="https://github.com/fallstop/HapticWebPlugin/releases/latest/download/HapticWeb.lplug4"
90-
variant="outline"
91-
size="sm">
92-
<Download class="w-4 h-4 mr-2" />
93-
Download HapticWeb.lplug4
94-
</Button>
9592
</div>
93+
<ExternalLink class="w-5 h-5 text-muted-foreground shrink-0" />
9694
</div>
95+
</a>
96+
</section>
9797

98-
<!-- Step 2 -->
99-
<div class="flex gap-4">
100-
<div
101-
class="shrink-0 w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold">
102-
2
103-
</div>
104-
<div class="flex-1 space-y-3">
105-
<h3 class="font-medium">Open plugin management in Logi Options+</h3>
106-
<p class="text-sm text-muted-foreground">
107-
Open Logi Options+ → Click on your MX Master 4 → Go to <strong
108-
>HAPTIC FEEDBACK</strong>
109-
in the sidebar → Click the settings popover → Click
110-
<strong>INSTALL AND UNINSTALL PLUGINS</strong>.
111-
</p>
112-
</div>
113-
</div>
98+
<!-- Manual Installation (collapsed feel) -->
99+
<section class="mb-12">
100+
<h2 class="text-xl font-semibold mb-4 text-muted-foreground">Manual Installation</h2>
114101

115-
<!-- Step 3 -->
116-
<div class="flex gap-4">
117-
<div
118-
class="shrink-0 w-8 h-8 rounded-full bg-primary/20 flex items-center justify-center text-primary font-semibold">
119-
3
102+
<div class="rounded-xl border border-border bg-card p-6">
103+
<div class="space-y-5">
104+
<!-- Step 1 -->
105+
<div class="flex gap-3">
106+
<div
107+
class="shrink-0 w-7 h-7 rounded-full bg-primary/15 flex items-center justify-center text-primary text-sm font-semibold">
108+
1
109+
</div>
110+
<div class="flex-1 space-y-2">
111+
<h3 class="font-medium text-sm">Download the plugin</h3>
112+
<p class="text-sm text-muted-foreground">
113+
Get the latest
114+
<code class="px-1.5 py-0.5 rounded bg-muted text-foreground text-xs">HapticWeb.lplug4</code>
115+
from GitHub Releases.
116+
</p>
117+
<Button
118+
href="https://github.com/fallstop/HapticWebPlugin/releases/latest/download/HapticWeb.lplug4"
119+
variant="outline"
120+
size="sm">
121+
<Download class="w-4 h-4 mr-1" />
122+
Download HapticWeb.lplug4
123+
</Button>
124+
</div>
120125
</div>
121-
<div class="flex-1 space-y-3">
122-
<h3 class="font-medium">Install the plugin</h3>
123-
<p class="text-sm text-muted-foreground">
124-
Double-click the downloaded <code
125-
class="px-1.5 py-0.5 rounded bg-muted text-foreground"
126-
>HapticWeb.lplug4</code>
127-
file. Logi Options+ will show an installation dialog — click
128-
<strong>Continue</strong>.
129-
</p>
126+
127+
<Separator />
128+
129+
<!-- Step 2 -->
130+
<div class="flex gap-3">
131+
<div
132+
class="shrink-0 w-7 h-7 rounded-full bg-primary/15 flex items-center justify-center text-primary text-sm font-semibold">
133+
2
134+
</div>
135+
<div class="flex-1">
136+
<h3 class="font-medium text-sm">Open plugin management</h3>
137+
<p class="text-sm text-muted-foreground mt-1">
138+
Logi Options+ <ChevronRight class="w-3 h-3 inline" /> MX Master 4 <ChevronRight class="w-3 h-3 inline" />
139+
<strong>Haptic Feedback</strong> <ChevronRight class="w-3 h-3 inline" /> Settings popover <ChevronRight class="w-3 h-3 inline" />
140+
<strong>Install and Uninstall Plugins</strong>
141+
</p>
142+
</div>
130143
</div>
131-
</div>
132144

133-
<!-- Step 4 -->
134-
<div class="flex gap-4">
135-
<div
136-
class="shrink-0 w-8 h-8 rounded-full bg-green-500/20 flex items-center justify-center text-green-500 font-semibold">
137-
4
145+
<Separator />
146+
147+
<!-- Step 3 -->
148+
<div class="flex gap-3">
149+
<div
150+
class="shrink-0 w-7 h-7 rounded-full bg-primary/15 flex items-center justify-center text-primary text-sm font-semibold">
151+
3
152+
</div>
153+
<div class="flex-1">
154+
<h3 class="font-medium text-sm">Install the plugin</h3>
155+
<p class="text-sm text-muted-foreground mt-1">
156+
Double-click the downloaded
157+
<code class="px-1.5 py-0.5 rounded bg-muted text-foreground text-xs">HapticWeb.lplug4</code>
158+
file and click <strong>Continue</strong> in the dialog.
159+
</p>
160+
</div>
138161
</div>
139-
<div class="flex-1 space-y-3">
140-
<h3 class="font-medium">Done!</h3>
141-
<p class="text-sm text-muted-foreground">
142-
The server starts automatically at <code
143-
class="px-1.5 py-0.5 rounded bg-muted text-foreground"
144-
>https://local.jmw.nz:41443/</code
145-
>. Test it on the
146-
<a href="/playground" class="text-primary hover:underline"
147-
>Playground</a
148-
>.
149-
</p>
162+
163+
<Separator />
164+
165+
<!-- Step 4 -->
166+
<div class="flex gap-3">
167+
<div
168+
class="shrink-0 w-7 h-7 rounded-full bg-green-500/15 flex items-center justify-center text-green-500 text-sm font-semibold">
169+
4
170+
</div>
171+
<div class="flex-1">
172+
<h3 class="font-medium text-sm">Done!</h3>
173+
<p class="text-sm text-muted-foreground mt-1">
174+
The server starts automatically at
175+
<code class="px-1.5 py-0.5 rounded bg-muted text-foreground text-xs">https://local.jmw.nz:41443/</code>.
176+
Test it on the
177+
<a href="/playground" class="text-primary hover:underline">Playground</a>.
178+
</p>
179+
</div>
150180
</div>
151181
</div>
152182
</div>
@@ -176,38 +206,6 @@
176206

177207
<Separator class="mb-12" />
178208

179-
<!-- Uninstalling -->
180-
<section class="mb-12">
181-
<h2 class="text-2xl font-semibold mb-6 flex items-center gap-2">
182-
<Trash2 class="w-5 h-5" />
183-
Uninstalling
184-
</h2>
185-
<p class="text-muted-foreground mb-4">
186-
Manually installed plugins don't appear in Logi Options+ plugin list. To
187-
uninstall, delete the plugin folder:
188-
</p>
189-
190-
<div class="space-y-3">
191-
<div class="p-3 rounded-lg bg-muted font-mono text-sm">
192-
<div class="flex items-center gap-2 text-muted-foreground mb-1">
193-
<Folder class="w-4 h-4" />
194-
<span class="font-sans text-xs">Windows</span>
195-
</div>
196-
C:\Users\USERNAME\AppData\Local\Logi\LogiPluginService\Plugins\HapticWebPlugin\
197-
</div>
198-
199-
<div class="p-3 rounded-lg bg-muted font-mono text-sm">
200-
<div class="flex items-center gap-2 text-muted-foreground mb-1">
201-
<Folder class="w-4 h-4" />
202-
<span class="font-sans text-xs">macOS</span>
203-
</div>
204-
~/Library/Application Support/Logi/LogiPluginService/Plugins/HapticWebPlugin/
205-
</div>
206-
</div>
207-
</section>
208-
209-
<Separator class="mb-12" />
210-
211209
<!-- Troubleshooting -->
212210
<section>
213211
<h2 class="text-2xl font-semibold mb-6 flex items-center gap-2">

0 commit comments

Comments
 (0)