A page plugin that turns a Magpie Web address into Feishu's client/web_url/open AppLink (mode=appCenter), so Magpie Web opens in Feishu desktop's left sidebar. No permissions, no request: the page only builds the link. Addresses with credentials, a query or a fragment are refused (keeps ?k= keys out of a shared link), and plain HTTP only on loopback. By zhaiqiming. Run at the reviewed head f3164eb2 (mica, temp HOME): - bun test packages/feishu-sidebar: 3 pass, 0 fail. - bun scripts/check.mjs feishu-sidebar: ok. bun test scripts: 39 pass. - The page itself, with a stub bridge, in Playwright Chromium and WebKit at 400px, en and zh-CN: the title is translated, Enter on a loopback address shows the link, a ?k= address shows the error and hides the link, nothing scrolls sideways. Not tried: Feishu desktop itself (the author verified it on macOS). The package's first npm version waits for the owner; dist serves it.
33 lines
1.4 KiB
HTML
33 lines
1.4 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Feishu sidebar</title>
|
||
<link rel="stylesheet" href="style.css">
|
||
<script src="_magpie/bridge.js"></script>
|
||
<script src="applink.js" defer></script>
|
||
<script src="app.js" defer></script>
|
||
</head>
|
||
<body>
|
||
<main>
|
||
<h1 data-t="title">Feishu sidebar</h1>
|
||
<p data-t="setup">Enable Browser access in Magpie, or run magpie web.</p>
|
||
<label for="web-url" data-t="address">Magpie Web address</label>
|
||
<input id="web-url" type="text" inputmode="url" spellcheck="false" autocomplete="off"
|
||
placeholder="http://127.0.0.1:3430" aria-describedby="hint error">
|
||
<p id="hint" data-t="hint">Use the address without the sign-in key. Use HTTPS for another computer.</p>
|
||
<button id="generate" type="button" data-t="generate">Generate Feishu link</button>
|
||
<p id="error" role="alert"></p>
|
||
<section id="result" hidden>
|
||
<label for="applink" data-t="link">Feishu link</label>
|
||
<div class="link-row">
|
||
<input id="applink" type="text" readonly aria-describedby="steps">
|
||
<button id="select" type="button" data-t="select">Select link</button>
|
||
</div>
|
||
<p id="steps" data-t="steps">Copy the link to your own Feishu chat and open it in Feishu desktop. Sign in on Magpie’s page, then right-click the sidebar tab to pin it.</p>
|
||
</section>
|
||
</main>
|
||
</body>
|
||
</html>
|