CI / Build & Quality Checks (pull_request) Successful in 2m49s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 12s
CI / Playwright smoke (e2e) (pull_request) Successful in 17m6s
matrix.to can't send anyone to this deployment (its Cinny adapter is app.cinny.in, web-instance[] is Element-only), so a friend scanning a room QR or clicking an invite link was offered Element or app.cinny.in. Share Room (link + QR) and the Invite dialog (link + QR) now use the Lotus permalink (correct on desktop via webAppUrl). The space menus keep both "Copy Link" (matrix.to, for other clients) and "Copy Lotus Link". Fixes #285 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
154 lines
5.8 KiB
TypeScript
154 lines
5.8 KiB
TypeScript
import React, { useCallback, useRef, useState } from 'react';
|
|
import { Box, Button, color, config, Icon, Icons, Text } from 'folds';
|
|
import { QRCodeSVG, QRCodeCanvas } from 'qrcode.react';
|
|
import { SequenceCard } from '../../../components/sequence-card';
|
|
import { SequenceCardStyle } from '../../room-settings/styles.css';
|
|
import { SettingTile } from '../../../components/setting-tile';
|
|
import { CutoutCard } from '../../../components/cutout-card';
|
|
import { useRoom } from '../../../hooks/useRoom';
|
|
import { getViaServers } from '../../../plugins/via-servers';
|
|
import { useSaveFile } from '../../../hooks/useSaveFile';
|
|
import { useLotusShareBase } from '../../../hooks/useLotusLinkBase';
|
|
import { getLotusRoomPermalink, getLotusSpacePermalink } from '../../../plugins/lotus-permalink';
|
|
|
|
// Filesystem-safe basename from an arbitrary room name. Denylist only the
|
|
// path-hostile / control characters so Unicode names (CJK, Cyrillic, emoji, …)
|
|
// survive instead of being stripped to the 'room' fallback. Collapse whitespace,
|
|
// trim separator runs, and cap length to stay under filesystem name limits.
|
|
// eslint-disable-next-line no-control-regex
|
|
const UNSAFE_FILENAME = /[/\\:*?"<>| |