@celljs/ta-share 4.24.1 → 4.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/index.js CHANGED
@@ -96,10 +96,106 @@ var EN = {
96
96
  selfOnly: "opens only in your own Ta",
97
97
  qr: "QR code of the link",
98
98
  linkReady: "Scan with the Ta app or a phone camera, or send the link. A browser shows it; the Ta app can import it.",
99
+ linkReadyFile: "Scan with the Ta app or a phone camera, or send the link. A browser shows it or downloads it.",
99
100
  emptyTitle: "Nothing shared yet",
100
101
  emptyHint: "Choose Share conversation… in the + of a message box, or ask Ta to make a link of a file.",
102
+ linksTitle: "Shared links",
103
+ servicesTitle: "Services of this computer",
104
+ servicesSwitch: "Allow public links",
105
+ servicesHint: "Lets Ta open a web page or an API on a port of this computer to anyone with its link, for a while, asking you each time. Company networks usually forbid it.",
106
+ servicesNone: "Ask Ta to “make port 3000 public”: its link shows here.",
107
+ serviceLine: "localhost:{port} · until {time}",
108
+ serviceStop: "Stop",
109
+ serviceStopTitle: "Stop “{title}”?",
110
+ serviceStopHint: "Its link stops working at once.",
111
+ reportsTitle: "Reports",
112
+ reportsRowLine: "{n} waiting",
113
+ operatorHint: "With the token of the operator of the relay, the reports of shares show here, to look at, block or dismiss.",
114
+ operatorSet: "Enter the token",
115
+ operatorToken: "Token of the operator",
116
+ operatorForget: "Remove the token",
117
+ operatorError: "The relay did not answer: {error}",
118
+ reportsNone: "No report waiting",
119
+ reportView: "See it",
120
+ reportNoLink: "Sent without its link",
121
+ reportLine: "{count}× · {time}",
122
+ blockShare: "Block this link",
123
+ blockHost: "Block all of this computer",
124
+ dismiss: "Dismiss",
125
+ unblock: "Unblock",
126
+ blockedTitle: "Blocked",
127
+ blockedShare: "Link {id}",
128
+ blockedHost: "Computer {id}",
129
+ blockShareTitle: "Block this link?",
130
+ blockShareHint: "It stops working at once, and its copy on the relay is no longer given.",
131
+ blockHostTitle: "Block everything this computer shares?",
132
+ blockHostHint: "All its links stop working at once, until you unblock it.",
133
+ reasonPhishing: "Phishing or scam",
134
+ reasonMalware: "Virus or malware",
135
+ reasonSexual: "Sexual content",
136
+ reasonIllegal: "Illegal content",
137
+ reasonHarassment: "Harassment or infringement",
138
+ reasonOther: "Other",
139
+ waitingTitle: "Waiting",
140
+ fromAccount: "from {name}",
141
+ fromComputer: "a computer not signed in",
142
+ limitAccount: "Limit {days} days",
143
+ banAccount: "Ban",
144
+ banTitle: "Ban {name}?",
145
+ banHint: "What reaches others is taken away, as the rules below say, until you lift it. Their own devices still reach each other.",
146
+ limitTitle: "Limit {name} for {days} days?",
147
+ limitHint: "Their links do not open for others until then.",
148
+ appealFrom: "Appeal of {name}",
149
+ restore: "Restore",
150
+ keep: "Keep",
151
+ sanctionsTitle: "In force",
152
+ sanctionLimit: "Public links limited",
153
+ sanctionBan: "Banned",
154
+ sanctionUntil: "until {date}",
155
+ sanctionForever: "until lifted",
156
+ byRule: "by the rules",
157
+ byOperator: "by you",
158
+ lift: "Lift",
159
+ undo: "Undo",
160
+ autoMark: "Auto",
161
+ rulesTitle: "Rules",
162
+ rulesAuto: "Act by the rules",
163
+ rulesAutoHint: "They stop a link, and limit its owner at most; banning stays yours. What you undo they leave be.",
164
+ newTitle: "New accounts",
165
+ newHint: "For their first days on the relay, an account makes only a few public links a day: one made to spam stops soon.",
166
+ newDays: "Days an account is new (0: no limit)",
167
+ newDaily: "Public links a day",
168
+ doubtful: "{n} doubtful reporters not counted",
169
+ ruleTrustHint: "Reporters you keep dismissing (3 times or more, twice as often as upheld) no longer count.",
170
+ rulePeople: "People reporting a link",
171
+ ruleSevere: "For phishing or malware",
172
+ ruleHostAfter: "Links stopped, to limit their owner",
173
+ ruleLimitDays: "Days a limit lasts",
174
+ needsAccount: "Public links need an account",
175
+ needsAccountHint: "Links open in a browser only of one who signed in, so that a ban reaches the person.",
176
+ banCoversTitle: "A ban takes away",
177
+ featureShare: "Public links",
178
+ featureRooms: "Group chats",
179
+ featureMoments: "Friends and Moments",
180
+ featureNearby: "Nearby",
181
+ needsFor: "Needs an account",
182
+ needsForHint: "Without it, those not signed in can still use it, and a ban does not reach them there.",
183
+ logTitle: "Record",
184
+ logLine: "{who} · {action} · {target}",
185
+ whoRule: "Rules",
186
+ whoOperator: "You",
187
+ whoUser: "User",
188
+ standingLimit: "Your public links are limited {until}",
189
+ standingBan: "Your account is banned {until}",
190
+ standingBlocked: "{n} of your links were stopped by the operator of the relay",
191
+ standingWhy: "Why: {reason}",
192
+ appeal: "Appeal",
193
+ appealTitle: "Appeal to the operator",
194
+ appealHint: "Say in a few words why it should be lifted",
195
+ appealSent: "Appealed, waiting for an answer",
101
196
  kindConversation: "Conversation",
102
197
  kindFile: "File",
198
+ fileLarge: "Larger than {max} MB: too large to share by a link.",
103
199
  open: "Open",
104
200
  opening: "Opening…",
105
201
  passwordTitle: "This share needs a password",
@@ -107,7 +203,7 @@ var EN = {
107
203
  wrong: "That password is wrong.",
108
204
  busy: "Too many wrong passwords. Try again in a few minutes.",
109
205
  gone: "This link no longer works: the share was stopped or ran out.",
110
- offlineHost: "The computer that shared it is not running Ta now. Try again later.",
206
+ offlineHost: "The computer that shared it is not running Ta now. Try again once it is, or ask them to share it again with “Opens while this computer is off”.",
111
207
  self: "Only the one who shared this opens it, in their own Ta.",
112
208
  invalid: "This is not a whole link of Ta.",
113
209
  failed: "Cannot open it: {message}",
@@ -192,10 +288,106 @@ var ZH = {
192
288
  selfOnly: "只能在你自己的 Ta 里打开",
193
289
  qr: "链接的二维码",
194
290
  linkReady: "用 Ta 应用或手机相机扫码,或者把链接发给对方。浏览器里能直接看,Ta 应用里还能导入。",
291
+ linkReadyFile: "用 Ta 应用或手机相机扫码,或者把链接发给对方。浏览器里能直接看或下载。",
195
292
  emptyTitle: "还没有分享",
196
293
  emptyHint: "在输入框的 + 里选“分享对话…”,或者让 Ta 帮你把文件生成分享链接。",
294
+ linksTitle: "分享的链接",
295
+ servicesTitle: "本机服务",
296
+ servicesSwitch: "允许生成公开链接",
297
+ servicesHint: "让 Ta 把本机端口上的网页或接口临时公开给拿到链接的人,每次都会先问你。公司网络通常禁止这样做。",
298
+ servicesNone: "对 Ta 说“把 3000 端口公开出去”,链接会出现在这里。",
299
+ serviceLine: "localhost:{port} · {time} 前有效",
300
+ serviceStop: "停止公开",
301
+ serviceStopTitle: "停止公开“{title}”?",
302
+ serviceStopHint: "链接立即失效。",
303
+ reportsTitle: "举报处理",
304
+ reportsRowLine: "{n} 条待处理",
305
+ operatorHint: "填入中继的运营令牌后,这里会列出别人对分享的举报,可以查看、封禁或驳回。",
306
+ operatorSet: "填入运营令牌",
307
+ operatorToken: "运营令牌",
308
+ operatorForget: "移除运营令牌",
309
+ operatorError: "中继没有响应:{error}",
310
+ reportsNone: "没有待处理的举报",
311
+ reportView: "查看内容",
312
+ reportNoLink: "举报人没有附上链接",
313
+ reportLine: "{count} 次 · {time}",
314
+ blockShare: "封禁这条链接",
315
+ blockHost: "封禁这台电脑的全部分享",
316
+ dismiss: "驳回",
317
+ unblock: "解封",
318
+ blockedTitle: "已封禁",
319
+ blockedShare: "链接 {id}",
320
+ blockedHost: "电脑 {id}",
321
+ blockShareTitle: "封禁这条链接?",
322
+ blockShareHint: "链接立即失效,中继上的副本也不再提供。",
323
+ blockHostTitle: "封禁这台电脑分享的全部内容?",
324
+ blockHostHint: "它的所有分享链接立即失效,直到你解封。",
325
+ reasonPhishing: "钓鱼或诈骗",
326
+ reasonMalware: "病毒或恶意软件",
327
+ reasonSexual: "色情内容",
328
+ reasonIllegal: "违法内容",
329
+ reasonHarassment: "骚扰或侵权",
330
+ reasonOther: "其他",
331
+ waitingTitle: "待处理",
332
+ fromAccount: "来自 {name}",
333
+ fromComputer: "来自未登录的电脑",
334
+ limitAccount: "限制 {days} 天",
335
+ banAccount: "封号",
336
+ banTitle: "封禁 {name}?",
337
+ banHint: "按下方规则停用对外功能,直到你解封;他自己的设备之间照常互连。",
338
+ limitTitle: "限制 {name} {days} 天?",
339
+ limitHint: "在此之前,他的链接别人都打不开。",
340
+ appealFrom: "{name} 的申诉",
341
+ restore: "恢复",
342
+ keep: "维持",
343
+ sanctionsTitle: "处罚中",
344
+ sanctionLimit: "公开分享受限",
345
+ sanctionBan: "已封号",
346
+ sanctionUntil: "{date} 前",
347
+ sanctionForever: "直到解除",
348
+ byRule: "自动规则",
349
+ byOperator: "你",
350
+ lift: "解除",
351
+ undo: "撤销",
352
+ autoMark: "自动",
353
+ rulesTitle: "规则",
354
+ rulesAuto: "按规则自动处理",
355
+ rulesAutoHint: "最多停链接、限制公开分享,封号只能你来;你撤销过的不会再自动处理。",
356
+ newTitle: "新账号",
357
+ newHint: "账号在中继上的头几天,每天只能发几条公开链接,注册来刷的账号很快就停住。",
358
+ newDays: "新账号期(天,0 为不限制)",
359
+ newDaily: "每天最多公开链接",
360
+ doubtful: "另有 {n} 位存疑举报人未计入",
361
+ ruleTrustHint: "举报常被你驳回的人(3 次以上,且是被采纳次数的两倍多)不再计入人数。",
362
+ rulePeople: "多少人举报就停这条链接",
363
+ ruleSevere: "钓鱼或恶意软件",
364
+ ruleHostAfter: "停了几条链接就限制发布者",
365
+ ruleLimitDays: "限制多少天",
366
+ needsAccount: "公开分享须登录账号",
367
+ needsAccountHint: "只有登录了账号的人发的链接,浏览器里才能打开,封号才能封到人。",
368
+ banCoversTitle: "封号后不能用",
369
+ featureShare: "公开分享",
370
+ featureRooms: "群聊",
371
+ featureMoments: "加好友与动态",
372
+ featureNearby: "附近",
373
+ needsFor: "须登录账号",
374
+ needsForHint: "不要求登录时,没登录的人仍能使用,封号也拦不住他们。",
375
+ logTitle: "记录",
376
+ logLine: "{who} · {action} · {target}",
377
+ whoRule: "规则",
378
+ whoOperator: "你",
379
+ whoUser: "用户",
380
+ standingLimit: "你的公开分享已被限制{until}",
381
+ standingBan: "你的账号已被封禁{until}",
382
+ standingBlocked: "你有 {n} 条链接被中继运营方停止",
383
+ standingWhy: "原因:{reason}",
384
+ appeal: "申诉",
385
+ appealTitle: "向运营方申诉",
386
+ appealHint: "用一句话说明为什么应该恢复",
387
+ appealSent: "已申诉,等待处理",
197
388
  kindConversation: "对话",
198
389
  kindFile: "文件",
390
+ fileLarge: "超过 {max} MB,太大了,不能用链接分享",
199
391
  open: "打开",
200
392
  opening: "正在打开…",
201
393
  passwordTitle: "这个分享需要口令",
@@ -203,7 +395,7 @@ var ZH = {
203
395
  wrong: "口令不对。",
204
396
  busy: "口令错得太多了,请过几分钟再试。",
205
397
  gone: "这个链接已经失效:分享已停止或已过期。",
206
- offlineHost: "分享的人的电脑现在没有运行 Ta,请稍后再试。",
398
+ offlineHost: "分享的人的电脑现在没有运行 Ta:请对方打开 Ta 后再试,或重新分享并勾选“电脑关机也能打开”。",
207
399
  self: "这是仅自己可见的分享,只有分享的人能在自己的 Ta 里打开。",
208
400
  invalid: "这不是一个完整的 Ta 分享链接。",
209
401
  failed: "打不开:{message}",
@@ -288,10 +480,106 @@ var ZH_TW = {
288
480
  selfOnly: "只能在你自己的 Ta 裡開啟",
289
481
  qr: "連結的QR 碼",
290
482
  linkReady: "用 Ta 應用或手機相機掃碼,或者把連結發給對方。瀏覽器裡能直接看,Ta 應用裡還能匯入。",
483
+ linkReadyFile: "用 Ta 應用或手機相機掃碼,或者把連結發給對方。瀏覽器裡能直接看或下載。",
291
484
  emptyTitle: "還沒有分享",
292
485
  emptyHint: "在輸入框的 + 裡選「分享對話…」,或者讓 Ta 幫你把檔案生成分享連結。",
486
+ linksTitle: "分享的連結",
487
+ servicesTitle: "本機服務",
488
+ servicesSwitch: "允許產生公開連結",
489
+ servicesHint: "讓 Ta 把本機連接埠上的網頁或介面暫時公開給拿到連結的人,每次都會先問你。公司網路通常禁止這樣做。",
490
+ servicesNone: "對 Ta 說「把 3000 連接埠公開出去」,連結會出現在這裡。",
491
+ serviceLine: "localhost:{port} · {time} 前有效",
492
+ serviceStop: "停止公開",
493
+ serviceStopTitle: "停止公開「{title}」?",
494
+ serviceStopHint: "連結立即失效。",
495
+ reportsTitle: "檢舉處理",
496
+ reportsRowLine: "{n} 則待處理",
497
+ operatorHint: "填入中繼的營運權杖後,這裡會列出別人對分享的檢舉,可以檢視、封鎖或駁回。",
498
+ operatorSet: "填入營運權杖",
499
+ operatorToken: "營運權杖",
500
+ operatorForget: "移除營運權杖",
501
+ operatorError: "中繼沒有回應:{error}",
502
+ reportsNone: "沒有待處理的檢舉",
503
+ reportView: "檢視內容",
504
+ reportNoLink: "檢舉人沒有附上連結",
505
+ reportLine: "{count} 次 · {time}",
506
+ blockShare: "封鎖這條連結",
507
+ blockHost: "封鎖這台電腦的全部分享",
508
+ dismiss: "駁回",
509
+ unblock: "解除封鎖",
510
+ blockedTitle: "已封鎖",
511
+ blockedShare: "連結 {id}",
512
+ blockedHost: "電腦 {id}",
513
+ blockShareTitle: "封鎖這條連結?",
514
+ blockShareHint: "連結立即失效,中繼上的副本也不再提供。",
515
+ blockHostTitle: "封鎖這台電腦分享的全部內容?",
516
+ blockHostHint: "它的所有分享連結立即失效,直到你解除封鎖。",
517
+ reasonPhishing: "釣魚或詐騙",
518
+ reasonMalware: "病毒或惡意軟體",
519
+ reasonSexual: "色情內容",
520
+ reasonIllegal: "違法內容",
521
+ reasonHarassment: "騷擾或侵權",
522
+ reasonOther: "其他",
523
+ waitingTitle: "待處理",
524
+ fromAccount: "來自 {name}",
525
+ fromComputer: "來自未登入的電腦",
526
+ limitAccount: "限制 {days} 天",
527
+ banAccount: "封號",
528
+ banTitle: "封鎖 {name}?",
529
+ banHint: "依下方規則停用對外功能,直到你解除;他自己的裝置之間照常互連。",
530
+ limitTitle: "限制 {name} {days} 天?",
531
+ limitHint: "在此之前,他的連結別人都打不開。",
532
+ appealFrom: "{name} 的申訴",
533
+ restore: "恢復",
534
+ keep: "維持",
535
+ sanctionsTitle: "處罰中",
536
+ sanctionLimit: "公開分享受限",
537
+ sanctionBan: "已封號",
538
+ sanctionUntil: "{date} 前",
539
+ sanctionForever: "直到解除",
540
+ byRule: "自動規則",
541
+ byOperator: "你",
542
+ lift: "解除",
543
+ undo: "撤銷",
544
+ autoMark: "自動",
545
+ rulesTitle: "規則",
546
+ rulesAuto: "依規則自動處理",
547
+ rulesAutoHint: "最多停連結、限制公開分享,封號只能你來;你撤銷過的不會再自動處理。",
548
+ newTitle: "新帳號",
549
+ newHint: "帳號在中繼上的頭幾天,每天只能發幾條公開連結,註冊來洗版的帳號很快就停住。",
550
+ newDays: "新帳號期(天,0 為不限制)",
551
+ newDaily: "每天最多公開連結",
552
+ doubtful: "另有 {n} 位存疑檢舉人未計入",
553
+ ruleTrustHint: "檢舉常被你駁回的人(3 次以上,且是被採納次數的兩倍多)不再計入人數。",
554
+ rulePeople: "多少人檢舉就停這條連結",
555
+ ruleSevere: "釣魚或惡意軟體",
556
+ ruleHostAfter: "停了幾條連結就限制發布者",
557
+ ruleLimitDays: "限制多少天",
558
+ needsAccount: "公開分享須登入帳號",
559
+ needsAccountHint: "只有登入了帳號的人發的連結,瀏覽器裡才能開啟,封號才能封到人。",
560
+ banCoversTitle: "封號後不能用",
561
+ featureShare: "公開分享",
562
+ featureRooms: "群聊",
563
+ featureMoments: "加好友與動態",
564
+ featureNearby: "附近",
565
+ needsFor: "須登入帳號",
566
+ needsForHint: "不要求登入時,沒登入的人仍能使用,封號也攔不住他們。",
567
+ logTitle: "記錄",
568
+ logLine: "{who} · {action} · {target}",
569
+ whoRule: "規則",
570
+ whoOperator: "你",
571
+ whoUser: "使用者",
572
+ standingLimit: "你的公開分享已被限制{until}",
573
+ standingBan: "你的帳號已被封鎖{until}",
574
+ standingBlocked: "你有 {n} 條連結被中繼營運方停止",
575
+ standingWhy: "原因:{reason}",
576
+ appeal: "申訴",
577
+ appealTitle: "向營運方申訴",
578
+ appealHint: "用一句話說明為什麼應該恢復",
579
+ appealSent: "已申訴,等待處理",
293
580
  kindConversation: "對話",
294
581
  kindFile: "檔案",
582
+ fileLarge: "超過 {max} MB,太大了,不能用連結分享",
295
583
  open: "開啟",
296
584
  opening: "正在開啟…",
297
585
  passwordTitle: "這個分享需要口令",
@@ -299,7 +587,7 @@ var ZH_TW = {
299
587
  wrong: "口令不對。",
300
588
  busy: "口令錯得太多了,請過幾分鐘再試。",
301
589
  gone: "這個連結已經失效:分享已停止或已過期。",
302
- offlineHost: "分享的人的電腦現在沒有執行 Ta,請稍後再試。",
590
+ offlineHost: "分享的人的電腦現在沒有執行 Ta:請對方開啟 Ta 後再試,或重新分享並勾選「電腦關機也能開啟」。",
303
591
  self: "這是僅自己可見的分享,只有分享的人能在自己的 Ta 裡開啟。",
304
592
  invalid: "這不是一個完整的 Ta 分享連結。",
305
593
  failed: "打不開:{message}",
@@ -383,11 +671,107 @@ var JA = {
383
671
  offlineToo: "コンピューターがオフの場合でも開く",
384
672
  selfOnly: "自身の Ta でのみ開く",
385
673
  qr: "リンクの QR コード",
674
+ linkReadyFile: "Ta アプリやスマホのカメラで読み取るか、リンクを送ってください。ブラウザで表示またはダウンロードできます。",
386
675
  linkReady: "Ta アプリまたはスマートフォンのカメラで QR コードをスキャンするか、リンクを送信してください。ブラウザで直接表示でき、Ta アプリにインポートできます。",
387
676
  emptyTitle: "まだ共有がありません",
388
677
  emptyHint: "入力欄の「+」から「会話を共有…」を選択するか、Ta にファイルの共有リンクを作成させてください。",
678
+ linksTitle: "共有したリンク",
679
+ servicesTitle: "このコンピュータのサービス",
680
+ servicesSwitch: "公開リンクを許可",
681
+ servicesHint: "このコンピュータのポートで動く Web ページや API を、リンクを持つ人にしばらく公開できます。毎回確認します。会社のネットワークでは通常禁止されています。",
682
+ servicesNone: "Ta に「3000 番ポートを公開して」と頼むと、リンクがここに表示されます。",
683
+ serviceLine: "localhost:{port} · {time} まで",
684
+ serviceStop: "公開を停止",
685
+ serviceStopTitle: "「{title}」の公開を停止しますか?",
686
+ serviceStopHint: "リンクはすぐに使えなくなります。",
687
+ reportsTitle: "報告の対応",
688
+ reportsRowLine: "{n} 件が未対応",
689
+ operatorHint: "リレーの運営トークンを入れると、共有への報告がここに並び、確認・ブロック・却下ができます。",
690
+ operatorSet: "トークンを入力",
691
+ operatorToken: "運営トークン",
692
+ operatorForget: "トークンを削除",
693
+ operatorError: "リレーが応答しません:{error}",
694
+ reportsNone: "未対応の報告はありません",
695
+ reportView: "内容を見る",
696
+ reportNoLink: "リンクは添付されていません",
697
+ reportLine: "{count} 回 · {time}",
698
+ blockShare: "このリンクをブロック",
699
+ blockHost: "このコンピュータの共有をすべてブロック",
700
+ dismiss: "却下",
701
+ unblock: "ブロック解除",
702
+ blockedTitle: "ブロック中",
703
+ blockedShare: "リンク {id}",
704
+ blockedHost: "コンピュータ {id}",
705
+ blockShareTitle: "このリンクをブロックしますか?",
706
+ blockShareHint: "リンクはすぐに使えなくなり、リレー上のコピーも提供されなくなります。",
707
+ blockHostTitle: "このコンピュータの共有をすべてブロックしますか?",
708
+ blockHostHint: "すべての共有リンクがすぐに使えなくなります。解除するまで続きます。",
709
+ reasonPhishing: "フィッシング・詐欺",
710
+ reasonMalware: "ウイルス・マルウェア",
711
+ reasonSexual: "性的なコンテンツ",
712
+ reasonIllegal: "違法なコンテンツ",
713
+ reasonHarassment: "嫌がらせ・権利侵害",
714
+ reasonOther: "その他",
715
+ waitingTitle: "未対応",
716
+ fromAccount: "{name} から",
717
+ fromComputer: "サインインしていないコンピュータから",
718
+ limitAccount: "{days} 日制限",
719
+ banAccount: "アカウント停止",
720
+ banTitle: "{name} を停止しますか?",
721
+ banHint: "下のルールのとおり外向きの機能を止めます。解除するまで続きます。本人の端末同士は今までどおりつながります。",
722
+ limitTitle: "{name} を {days} 日制限しますか?",
723
+ limitHint: "それまで、その人のリンクは他の人が開けません。",
724
+ appealFrom: "{name} の異議",
725
+ restore: "元に戻す",
726
+ keep: "維持",
727
+ sanctionsTitle: "措置中",
728
+ sanctionLimit: "公開共有を制限中",
729
+ sanctionBan: "停止中",
730
+ sanctionUntil: "{date} まで",
731
+ sanctionForever: "解除するまで",
732
+ byRule: "自動ルール",
733
+ byOperator: "あなた",
734
+ lift: "解除",
735
+ undo: "取り消す",
736
+ autoMark: "自動",
737
+ rulesTitle: "ルール",
738
+ rulesAuto: "ルールで自動対応",
739
+ rulesAutoHint: "できるのはリンクの停止と公開共有の制限までで、アカウント停止はあなただけです。取り消したものは再び自動対応しません。",
740
+ newTitle: "新しいアカウント",
741
+ newHint: "リレーでの最初の数日間、アカウントは 1 日に数件しか公開リンクを作れません。スパム用のアカウントはすぐに止まります。",
742
+ newDays: "新規とみなす日数(0 で制限なし)",
743
+ newDaily: "1 日の公開リンクの上限",
744
+ doubtful: "疑わしい報告者 {n} 人は数えていません",
745
+ ruleTrustHint: "あなたがよく却下する報告者(3 回以上、採用の 2 倍を超える)は人数に数えません。",
746
+ rulePeople: "何人が報告したらリンクを止めるか",
747
+ ruleSevere: "フィッシング・マルウェア",
748
+ ruleHostAfter: "何件止めたら投稿者を制限するか",
749
+ ruleLimitDays: "制限する日数",
750
+ needsAccount: "公開共有にはアカウントが必要",
751
+ needsAccountHint: "サインインした人のリンクだけがブラウザで開くので、停止が本人に届きます。",
752
+ banCoversTitle: "停止すると使えないもの",
753
+ featureShare: "公開共有",
754
+ featureRooms: "グループチャット",
755
+ featureMoments: "友だちとモーメンツ",
756
+ featureNearby: "近く",
757
+ needsFor: "アカウント必須",
758
+ needsForHint: "必須にしないと、サインインしていない人は使い続けられ、停止も届きません。",
759
+ logTitle: "記録",
760
+ logLine: "{who} · {action} · {target}",
761
+ whoRule: "ルール",
762
+ whoOperator: "あなた",
763
+ whoUser: "ユーザー",
764
+ standingLimit: "あなたの公開共有は制限されています{until}",
765
+ standingBan: "あなたのアカウントは停止されています{until}",
766
+ standingBlocked: "あなたのリンク {n} 件がリレーの運営者により停止されました",
767
+ standingWhy: "理由:{reason}",
768
+ appeal: "異議を申し立てる",
769
+ appealTitle: "運営者に異議を申し立てる",
770
+ appealHint: "元に戻すべき理由をひとことで",
771
+ appealSent: "申し立て済み、対応待ち",
389
772
  kindConversation: "会話",
390
773
  kindFile: "ファイル",
774
+ fileLarge: "{max} MB を超えるため、リンクで共有できません",
391
775
  open: "開く",
392
776
  opening: "開いています…",
393
777
  passwordTitle: "この共有にはパスワードが必要です",
@@ -395,7 +779,7 @@ var JA = {
395
779
  wrong: "パスワードが正しくありません。",
396
780
  busy: "パスワードの入力が多すぎました。数分後に再度お試しください。",
397
781
  gone: "このリンクは無効です。共有が停止されたか、期限切れです。",
398
- offlineHost: "共有したコンピューターは現在 Ta を実行していません。後でもう一度お試しください。",
782
+ offlineHost: "共有したコンピューターは現在 Ta を実行していません。相手に Ta を開いてもらってから再度お試しいただくか、「コンピューターがオフの場合でも開く」を選んで共有し直してもらってください。",
399
783
  self: "これは自分のみが見える共有です。共有した人だけが自身の Ta で開くことができます。",
400
784
  invalid: "これは完全な Ta 共有リンクではありません。",
401
785
  failed: "開くことができません。{message}",
@@ -467,6 +851,14 @@ var Host = {
467
851
  shareFile: (title, type, data, options) => pi.callHost("shareFile", title, type, data, options),
468
852
  list: () => pi.callHost("list"),
469
853
  remove: (id) => pi.callHost("remove", id),
854
+ tunnelState: () => pi.callHost("tunnelState"),
855
+ setTunnelsEnabled: (enabled) => pi.callHost("setTunnelsEnabled", enabled),
856
+ stopTunnel: (id) => pi.callHost("stopTunnel", id),
857
+ operatorState: () => pi.callHost("operatorState"),
858
+ setOperatorToken: (token) => pi.callHost("setOperatorToken", token),
859
+ moderate: (action) => pi.callHost("moderate", action),
860
+ standing: () => pi.callHost("standing"),
861
+ appeal: (text) => pi.callHost("appeal", text),
470
862
  open: (link, password) => pi.callHost("open", link, password),
471
863
  importConversation: (link, password, cwd) => pi.callHost("importConversation", link, password, cwd)
472
864
  };
@@ -517,6 +909,457 @@ function shareLine(share) {
517
909
  return [access, until, where].join(" · ");
518
910
  }
519
911
 
912
+ // ../ta-relay/esm/common/relay-moderation-policy.js
913
+ var RELAY_OUTWARD_FEATURES = ["share", "rooms", "moments", "nearby"];
914
+ var RELAY_MODERATION_POLICY = {
915
+ auto: false,
916
+ people: 3,
917
+ severe: 2,
918
+ hostAfter: 3,
919
+ limitDays: 7,
920
+ needsAccount: [],
921
+ banCovers: ["share", "rooms", "moments", "nearby"],
922
+ newDays: 7,
923
+ newDaily: 5
924
+ };
925
+ var RELAY_TICKET_MS = 60 * 60 * 1000;
926
+ var RelayModerationPolicyUtil;
927
+ (function(RelayModerationPolicyUtil2) {
928
+ function count(value, fallback, min, max = 100) {
929
+ const n = Math.round(Number(value));
930
+ return Number.isFinite(n) && n >= min ? Math.min(n, max) : fallback;
931
+ }
932
+ function features(value, fallback) {
933
+ return Array.isArray(value) ? RELAY_OUTWARD_FEATURES.filter((feature) => value.includes(feature)) : fallback;
934
+ }
935
+ function of(given) {
936
+ const base = RELAY_MODERATION_POLICY;
937
+ return {
938
+ auto: (given === null || given === undefined ? undefined : given.auto) === true,
939
+ people: count(given === null || given === undefined ? undefined : given.people, base.people, 1),
940
+ severe: count(given === null || given === undefined ? undefined : given.severe, base.severe, 1),
941
+ hostAfter: count(given === null || given === undefined ? undefined : given.hostAfter, base.hostAfter, 0),
942
+ limitDays: count(given === null || given === undefined ? undefined : given.limitDays, base.limitDays, 1, 30),
943
+ needsAccount: features(given === null || given === undefined ? undefined : given.needsAccount, base.needsAccount),
944
+ banCovers: features(given === null || given === undefined ? undefined : given.banCovers, base.banCovers),
945
+ newDays: count(given === null || given === undefined ? undefined : given.newDays, base.newDays, 0, 90),
946
+ newDaily: count(given === null || given === undefined ? undefined : given.newDaily, base.newDaily, 1, 1000)
947
+ };
948
+ }
949
+ RelayModerationPolicyUtil2.of = of;
950
+ function active(sanction, now) {
951
+ return !!sanction && (sanction.until === undefined || sanction.until > now);
952
+ }
953
+ RelayModerationPolicyUtil2.active = active;
954
+ function takes(sanction, feature, policy, now) {
955
+ if (!active(sanction, now)) {
956
+ return false;
957
+ }
958
+ return sanction.level === "limit" ? feature === "share" : policy.banCovers.includes(feature);
959
+ }
960
+ RelayModerationPolicyUtil2.takes = takes;
961
+ })(RelayModerationPolicyUtil || (RelayModerationPolicyUtil = {}));
962
+
963
+ // web-src/moderation-rules.tsx
964
+ var FEATURES = { share: "featureShare", rooms: "featureRooms", moments: "featureMoments", nearby: "featureNearby" };
965
+ function Stepper({ label, value, min, max, onChange }) {
966
+ return /* @__PURE__ */ React.createElement("div", {
967
+ className: "tsh-rule"
968
+ }, /* @__PURE__ */ React.createElement("span", {
969
+ className: "tsh-rule-label"
970
+ }, label), /* @__PURE__ */ React.createElement("span", {
971
+ className: "tsh-stepper"
972
+ }, /* @__PURE__ */ React.createElement("button", {
973
+ type: "button",
974
+ className: "tsh-icon",
975
+ "aria-label": "−",
976
+ disabled: value <= min,
977
+ onClick: () => onChange(value - 1)
978
+ }, "−"), /* @__PURE__ */ React.createElement("span", {
979
+ className: "tsh-stepper-value"
980
+ }, value), /* @__PURE__ */ React.createElement("button", {
981
+ type: "button",
982
+ className: "tsh-icon",
983
+ "aria-label": "+",
984
+ disabled: value >= max,
985
+ onClick: () => onChange(value + 1)
986
+ }, "+")));
987
+ }
988
+ function Toggle({ label, hint, checked, onChange }) {
989
+ const Switch = pi.ui.Switch;
990
+ return /* @__PURE__ */ React.createElement("div", {
991
+ className: "tsh-rule"
992
+ }, /* @__PURE__ */ React.createElement("span", {
993
+ className: "tsh-rule-text"
994
+ }, /* @__PURE__ */ React.createElement("span", {
995
+ className: "tsh-rule-label"
996
+ }, label), hint && /* @__PURE__ */ React.createElement("span", {
997
+ className: "tsh-row-line tsh-wrap"
998
+ }, hint)), Switch && /* @__PURE__ */ React.createElement(Switch, {
999
+ checked,
1000
+ label,
1001
+ onChange
1002
+ }));
1003
+ }
1004
+ function ModerationRules({ policy, change }) {
1005
+ const covers = (feature, on) => change({ banCovers: on ? [...policy.banCovers, feature] : policy.banCovers.filter((each) => each !== feature) });
1006
+ return /* @__PURE__ */ React.createElement("section", {
1007
+ className: "tsh-rules"
1008
+ }, /* @__PURE__ */ React.createElement("h3", {
1009
+ className: "tsh-section"
1010
+ }, t("rulesTitle")), /* @__PURE__ */ React.createElement(Toggle, {
1011
+ label: t("rulesAuto"),
1012
+ hint: t("rulesAutoHint"),
1013
+ checked: policy.auto,
1014
+ onChange: (auto) => change({ auto })
1015
+ }), policy.auto && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
1016
+ className: "tsh-row-line tsh-wrap tsh-rule-note"
1017
+ }, t("ruleTrustHint")), /* @__PURE__ */ React.createElement(Stepper, {
1018
+ label: t("rulePeople"),
1019
+ value: policy.people,
1020
+ min: 1,
1021
+ max: 100,
1022
+ onChange: (people) => void change({ people })
1023
+ }), /* @__PURE__ */ React.createElement(Stepper, {
1024
+ label: t("ruleSevere"),
1025
+ value: policy.severe,
1026
+ min: 1,
1027
+ max: 100,
1028
+ onChange: (severe) => void change({ severe })
1029
+ }), /* @__PURE__ */ React.createElement(Stepper, {
1030
+ label: t("ruleHostAfter"),
1031
+ value: policy.hostAfter,
1032
+ min: 0,
1033
+ max: 100,
1034
+ onChange: (hostAfter) => void change({ hostAfter })
1035
+ }), /* @__PURE__ */ React.createElement(Stepper, {
1036
+ label: t("ruleLimitDays"),
1037
+ value: policy.limitDays,
1038
+ min: 1,
1039
+ max: 30,
1040
+ onChange: (limitDays) => void change({ limitDays })
1041
+ })), /* @__PURE__ */ React.createElement("h3", {
1042
+ className: "tsh-section"
1043
+ }, t("newTitle")), /* @__PURE__ */ React.createElement("p", {
1044
+ className: "tsh-row-line tsh-wrap tsh-rule-note"
1045
+ }, t("newHint")), /* @__PURE__ */ React.createElement(Stepper, {
1046
+ label: t("newDays"),
1047
+ value: policy.newDays,
1048
+ min: 0,
1049
+ max: 90,
1050
+ onChange: (newDays) => void change({ newDays })
1051
+ }), policy.newDays > 0 && /* @__PURE__ */ React.createElement(Stepper, {
1052
+ label: t("newDaily"),
1053
+ value: policy.newDaily,
1054
+ min: 1,
1055
+ max: 100,
1056
+ onChange: (newDaily) => void change({ newDaily })
1057
+ }), /* @__PURE__ */ React.createElement("h3", {
1058
+ className: "tsh-section"
1059
+ }, t("needsFor")), /* @__PURE__ */ React.createElement("p", {
1060
+ className: "tsh-row-line tsh-wrap tsh-rule-note"
1061
+ }, t("needsForHint")), RELAY_OUTWARD_FEATURES.map((feature) => /* @__PURE__ */ React.createElement(Toggle, {
1062
+ key: feature,
1063
+ label: t(FEATURES[feature]),
1064
+ hint: feature === "share" ? t("needsAccountHint") : undefined,
1065
+ checked: policy.needsAccount.includes(feature),
1066
+ onChange: (on) => change({ needsAccount: on ? [...policy.needsAccount, feature] : policy.needsAccount.filter((each) => each !== feature) })
1067
+ })), /* @__PURE__ */ React.createElement("h3", {
1068
+ className: "tsh-section"
1069
+ }, t("banCoversTitle")), RELAY_OUTWARD_FEATURES.map((feature) => /* @__PURE__ */ React.createElement(Toggle, {
1070
+ key: feature,
1071
+ label: t(FEATURES[feature]),
1072
+ checked: policy.banCovers.includes(feature),
1073
+ onChange: (on) => covers(feature, on)
1074
+ })));
1075
+ }
1076
+
1077
+ // web-src/reports-page.tsx
1078
+ var REASONS = {
1079
+ phishing: "reasonPhishing",
1080
+ malware: "reasonMalware",
1081
+ sexual: "reasonSexual",
1082
+ illegal: "reasonIllegal",
1083
+ harassment: "reasonHarassment",
1084
+ other: "reasonOther"
1085
+ };
1086
+ function useOperator() {
1087
+ const [state, setState] = React.useState();
1088
+ React.useEffect(() => {
1089
+ let live = true;
1090
+ const read = () => void Host.operatorState().then((next) => live && setState(next), () => {
1091
+ return;
1092
+ });
1093
+ read();
1094
+ const timer = setInterval(read, 60000);
1095
+ return () => {
1096
+ live = false;
1097
+ clearInterval(timer);
1098
+ };
1099
+ }, []);
1100
+ return [state, setState];
1101
+ }
1102
+ function waiting(state) {
1103
+ const blocks = state?.blocks ?? { hosts: [], shares: [] };
1104
+ const sanctioned = new Set(Object.keys(state?.sanctions ?? {}));
1105
+ return (state?.reports ?? []).filter((report) => !blocks.shares.includes(report.share) && !blocks.hosts.includes(report.host) && !sanctioned.has(state?.owners?.[report.host]?.account ?? ""));
1106
+ }
1107
+ var short = (id) => id.slice(0, 6);
1108
+ function ReportRow({ report, state, act }) {
1109
+ const Mark = icon("Shield");
1110
+ const time = new Date(report.last).toLocaleString(pi.ui.language, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
1111
+ const owner = state.owners?.[report.host];
1112
+ const days = state.policy?.limitDays ?? 7;
1113
+ const name = owner?.name ?? short(owner?.account ?? "");
1114
+ return /* @__PURE__ */ React.createElement("li", {
1115
+ className: "tsh-report"
1116
+ }, /* @__PURE__ */ React.createElement("div", {
1117
+ className: "tsh-report-head"
1118
+ }, /* @__PURE__ */ React.createElement("span", {
1119
+ className: "tsh-tile tsh-tile-report",
1120
+ "aria-hidden": "true"
1121
+ }, /* @__PURE__ */ React.createElement(Mark, {
1122
+ size: 18
1123
+ })), /* @__PURE__ */ React.createElement("span", {
1124
+ className: "tsh-row-text"
1125
+ }, /* @__PURE__ */ React.createElement("span", {
1126
+ className: "tsh-row-title"
1127
+ }, t(REASONS[report.reason] ?? "reasonOther")), /* @__PURE__ */ React.createElement("span", {
1128
+ className: "tsh-row-line"
1129
+ }, t("reportLine", { count: report.count, time }), " · ", owner ? t("fromAccount", { name }) : t("fromComputer"), report.doubtful ? ` · ${t("doubtful", { n: report.doubtful })}` : ""))), report.note && /* @__PURE__ */ React.createElement("p", {
1130
+ className: "tsh-report-note"
1131
+ }, report.note), /* @__PURE__ */ React.createElement("div", {
1132
+ className: "tsh-report-actions"
1133
+ }, report.link ? /* @__PURE__ */ React.createElement("button", {
1134
+ type: "button",
1135
+ className: "ta-button",
1136
+ onClick: () => void pi.openLink?.(report.link)
1137
+ }, t("reportView")) : /* @__PURE__ */ React.createElement("span", {
1138
+ className: "tsh-row-line"
1139
+ }, t("reportNoLink")), /* @__PURE__ */ React.createElement("span", {
1140
+ className: "tsh-grow"
1141
+ }), /* @__PURE__ */ React.createElement("button", {
1142
+ type: "button",
1143
+ className: "ta-button",
1144
+ onClick: () => act(() => Host.moderate({ action: "dismiss", share: report.share }))
1145
+ }, t("dismiss")), /* @__PURE__ */ React.createElement("button", {
1146
+ type: "button",
1147
+ className: "ta-button tsh-danger",
1148
+ onClick: () => act(() => Host.moderate({ action: "block", share: report.share }), [t("blockShareTitle"), t("blockShareHint")])
1149
+ }, t("blockShare")), owner ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("button", {
1150
+ type: "button",
1151
+ className: "ta-button tsh-danger",
1152
+ onClick: () => act(() => Host.moderate({ action: "limit", account: owner.account, days, reason: t(REASONS[report.reason] ?? "reasonOther") }), [t("limitTitle", { name, days }), t("limitHint")])
1153
+ }, t("limitAccount", { days })), /* @__PURE__ */ React.createElement("button", {
1154
+ type: "button",
1155
+ className: "ta-button tsh-danger",
1156
+ onClick: () => act(() => Host.moderate({ action: "ban", account: owner.account, reason: t(REASONS[report.reason] ?? "reasonOther") }), [t("banTitle", { name }), t("banHint")])
1157
+ }, t("banAccount"))) : /* @__PURE__ */ React.createElement("button", {
1158
+ type: "button",
1159
+ className: "ta-button tsh-danger",
1160
+ onClick: () => act(() => Host.moderate({ action: "block", host: report.host }), [t("blockHostTitle"), t("blockHostHint")])
1161
+ }, t("blockHost"))));
1162
+ }
1163
+ function AppealRow({ appeal, act }) {
1164
+ return /* @__PURE__ */ React.createElement("li", {
1165
+ className: "tsh-report"
1166
+ }, /* @__PURE__ */ React.createElement("span", {
1167
+ className: "tsh-row-title"
1168
+ }, t("appealFrom", { name: appeal.name ?? short(appeal.account) })), /* @__PURE__ */ React.createElement("p", {
1169
+ className: "tsh-report-note tsh-flush"
1170
+ }, appeal.text), /* @__PURE__ */ React.createElement("div", {
1171
+ className: "tsh-report-actions tsh-flush"
1172
+ }, /* @__PURE__ */ React.createElement("span", {
1173
+ className: "tsh-grow"
1174
+ }), /* @__PURE__ */ React.createElement("button", {
1175
+ type: "button",
1176
+ className: "ta-button",
1177
+ onClick: () => act(() => Host.moderate({ action: "answer", account: appeal.account, restore: false }))
1178
+ }, t("keep")), /* @__PURE__ */ React.createElement("button", {
1179
+ type: "button",
1180
+ className: "ta-button ta-primary",
1181
+ onClick: () => act(() => Host.moderate({ action: "answer", account: appeal.account, restore: true }))
1182
+ }, t("restore"))));
1183
+ }
1184
+ function InForce({ state, act }) {
1185
+ const blocks = state.blocks ?? { hosts: [], shares: [] };
1186
+ const sanctions = Object.values(state.sanctions ?? {});
1187
+ const items = [
1188
+ ...sanctions.map((sanction) => ({
1189
+ key: `account:${sanction.account}`,
1190
+ line: `${sanction.name ?? short(sanction.account)} · ${t(sanction.level === "ban" ? "sanctionBan" : "sanctionLimit")} · ${sanction.until ? t("sanctionUntil", { date: date(sanction.until) }) : t("sanctionForever")}`,
1191
+ auto: sanction.by === "rule",
1192
+ lift: () => Host.moderate({ action: "lift", account: sanction.account })
1193
+ })),
1194
+ ...blocks.hosts.map((id) => ({
1195
+ key: `host:${id}`,
1196
+ line: t("blockedHost", { id: short(id) }),
1197
+ auto: !!blocks.auto?.[`host:${id}`],
1198
+ lift: () => Host.moderate({ action: "unblock", host: id })
1199
+ })),
1200
+ ...blocks.shares.map((id) => ({
1201
+ key: `share:${id}`,
1202
+ line: t("blockedShare", { id: short(id) }),
1203
+ auto: !!blocks.auto?.[`share:${id}`],
1204
+ lift: () => Host.moderate({ action: "unblock", share: id })
1205
+ }))
1206
+ ];
1207
+ if (items.length === 0) {
1208
+ return null;
1209
+ }
1210
+ return /* @__PURE__ */ React.createElement("section", {
1211
+ className: "tsh-blocked"
1212
+ }, /* @__PURE__ */ React.createElement("h3", {
1213
+ className: "tsh-section"
1214
+ }, t("sanctionsTitle")), /* @__PURE__ */ React.createElement("ul", {
1215
+ className: "tsh-rows"
1216
+ }, items.map((item) => /* @__PURE__ */ React.createElement("li", {
1217
+ key: item.key,
1218
+ className: "tsh-blocked-row"
1219
+ }, /* @__PURE__ */ React.createElement("span", {
1220
+ className: "tsh-row-line"
1221
+ }, item.auto && /* @__PURE__ */ React.createElement("span", {
1222
+ className: "tsh-auto"
1223
+ }, t("autoMark")), item.line), /* @__PURE__ */ React.createElement("button", {
1224
+ type: "button",
1225
+ className: "ta-button",
1226
+ onClick: () => act(item.lift)
1227
+ }, item.auto ? t("undo") : t("lift"))))));
1228
+ }
1229
+ function Record({ log }) {
1230
+ if (log.length === 0) {
1231
+ return null;
1232
+ }
1233
+ const who = { rule: t("whoRule"), operator: t("whoOperator"), user: t("whoUser") };
1234
+ return /* @__PURE__ */ React.createElement("details", {
1235
+ className: "tsh-log"
1236
+ }, /* @__PURE__ */ React.createElement("summary", {
1237
+ className: "tsh-section"
1238
+ }, t("logTitle")), /* @__PURE__ */ React.createElement("ul", {
1239
+ className: "tsh-rows"
1240
+ }, log.slice(0, 30).map((entry) => /* @__PURE__ */ React.createElement("li", {
1241
+ key: `${entry.at}:${entry.target}:${entry.action}`,
1242
+ className: "tsh-row-line tsh-log-line"
1243
+ }, date(entry.at), " · ", t("logLine", { who: who[entry.by], action: entry.action, target: entry.target.replace(/:(.{6}).*/, ":$1") }), entry.reason ? ` · ${entry.reason}` : ""))));
1244
+ }
1245
+ function ReportsPage() {
1246
+ const Loading = pi.ui.Loading ?? pi.ui.Skeleton;
1247
+ const [state, setState] = useOperator();
1248
+ const [busy, setBusy] = React.useState(false);
1249
+ const act = (run, ask) => void (async () => {
1250
+ if (ask && !await pi.ui.confirm(ask[0], ask[1], { confirmLabel: ask[0].replace(/[??]$/, ""), danger: true })) {
1251
+ return;
1252
+ }
1253
+ setBusy(true);
1254
+ try {
1255
+ setState(await run());
1256
+ } catch (error) {
1257
+ pi.ui.notify(message(error), "error");
1258
+ } finally {
1259
+ setBusy(false);
1260
+ }
1261
+ })();
1262
+ const setToken = () => void (async () => {
1263
+ const token = await pi.ui.input(t("operatorSet"), t("operatorToken"));
1264
+ if (token?.trim()) {
1265
+ act(() => Host.setOperatorToken(token.trim()));
1266
+ }
1267
+ })();
1268
+ if (!state) {
1269
+ return /* @__PURE__ */ React.createElement("div", {
1270
+ className: "tsh-page"
1271
+ }, Loading ? /* @__PURE__ */ React.createElement(Loading, null) : null);
1272
+ }
1273
+ if (!state.operator) {
1274
+ return /* @__PURE__ */ React.createElement("div", {
1275
+ className: "tsh-page"
1276
+ }, /* @__PURE__ */ React.createElement(pi.ui.Empty, {
1277
+ title: t("reportsTitle"),
1278
+ hint: t("operatorHint")
1279
+ }), /* @__PURE__ */ React.createElement("div", {
1280
+ className: "tsh-actions tsh-center"
1281
+ }, /* @__PURE__ */ React.createElement("button", {
1282
+ type: "button",
1283
+ className: "ta-button ta-primary",
1284
+ disabled: busy,
1285
+ onClick: setToken
1286
+ }, t("operatorSet"))));
1287
+ }
1288
+ const list = waiting(state);
1289
+ const appeals = state.appeals ?? [];
1290
+ return /* @__PURE__ */ React.createElement("div", {
1291
+ className: `tsh-page${busy ? " ta-pending" : ""}`,
1292
+ "aria-busy": busy || undefined
1293
+ }, state.error && /* @__PURE__ */ React.createElement("p", {
1294
+ className: "tsh-error"
1295
+ }, t("operatorError", { error: state.error })), list.length + appeals.length === 0 && !state.error ? /* @__PURE__ */ React.createElement(pi.ui.Empty, {
1296
+ title: t("reportsNone")
1297
+ }) : /* @__PURE__ */ React.createElement("ul", {
1298
+ className: "tsh-rows"
1299
+ }, appeals.map((appeal) => /* @__PURE__ */ React.createElement(AppealRow, {
1300
+ key: appeal.account,
1301
+ appeal,
1302
+ act
1303
+ })), list.map((report) => /* @__PURE__ */ React.createElement(ReportRow, {
1304
+ key: `${report.host}:${report.share}`,
1305
+ report,
1306
+ state,
1307
+ act
1308
+ }))), /* @__PURE__ */ React.createElement(InForce, {
1309
+ state,
1310
+ act
1311
+ }), state.policy && /* @__PURE__ */ React.createElement(ModerationRules, {
1312
+ policy: state.policy,
1313
+ change: (policy) => Promise.resolve(act(() => Host.moderate({ action: "policy", policy })))
1314
+ }), /* @__PURE__ */ React.createElement(Record, {
1315
+ log: state.log ?? []
1316
+ }), /* @__PURE__ */ React.createElement("div", {
1317
+ className: "tsh-actions tsh-center"
1318
+ }, /* @__PURE__ */ React.createElement("button", {
1319
+ type: "button",
1320
+ className: "ta-button tsh-quiet",
1321
+ onClick: () => act(() => Host.setOperatorToken(null), [t("operatorForget"), state.relay])
1322
+ }, t("operatorForget"))));
1323
+ }
1324
+ function ReportsRow() {
1325
+ const [state] = useOperator();
1326
+ if (!state?.operator) {
1327
+ return null;
1328
+ }
1329
+ const Mark = icon("Shield");
1330
+ const count = waiting(state).length + (state.appeals?.length ?? 0);
1331
+ const More = icon("ChevronRight");
1332
+ return /* @__PURE__ */ React.createElement("ul", {
1333
+ className: "tsh-rows tsh-group"
1334
+ }, /* @__PURE__ */ React.createElement("li", {
1335
+ className: "tsh-item"
1336
+ }, /* @__PURE__ */ React.createElement("div", {
1337
+ className: "tsh-row"
1338
+ }, /* @__PURE__ */ React.createElement("button", {
1339
+ type: "button",
1340
+ className: "tsh-row-main",
1341
+ onClick: () => pi.ui.showView("@celljs/ta-share/reports")
1342
+ }, /* @__PURE__ */ React.createElement("span", {
1343
+ className: "tsh-tile tsh-tile-report",
1344
+ "aria-hidden": "true"
1345
+ }, /* @__PURE__ */ React.createElement(Mark, {
1346
+ size: 18
1347
+ })), /* @__PURE__ */ React.createElement("span", {
1348
+ className: "tsh-row-text"
1349
+ }, /* @__PURE__ */ React.createElement("span", {
1350
+ className: "tsh-row-title"
1351
+ }, t("reportsTitle")), /* @__PURE__ */ React.createElement("span", {
1352
+ className: "tsh-row-line"
1353
+ }, count ? t("reportsRowLine", { n: count }) : t("reportsNone"))), count > 0 && /* @__PURE__ */ React.createElement("span", {
1354
+ className: "tsh-count"
1355
+ }, count), /* @__PURE__ */ React.createElement("span", {
1356
+ className: "tsh-chevron",
1357
+ "aria-hidden": "true"
1358
+ }, /* @__PURE__ */ React.createElement(More, {
1359
+ size: 16
1360
+ }))))));
1361
+ }
1362
+
520
1363
  // ../ta-protocol/esm/common/message-protocol.js
521
1364
  var TaMessageContext;
522
1365
  (function(TaMessageContext2) {
@@ -1041,6 +1884,7 @@ function ShareSheetCompat({ pi: pi2, ...props }) {
1041
1884
  var SHARE_TOOL = "share_link";
1042
1885
  var CONVERSATION_KIND = "ta-conversation";
1043
1886
  var FILE_KIND = "file";
1887
+ var MAX_FILE_BYTES = 8 * 1024 * 1024;
1044
1888
  var ShareLink;
1045
1889
  ((ShareLink) => {
1046
1890
  const LINK = /^https?:\/\/[^/\s#?]+\/s#v=1&\S+$/i;
@@ -1079,7 +1923,7 @@ function Choice({
1079
1923
  onClick: () => onChange(option.value)
1080
1924
  }, option.label)));
1081
1925
  }
1082
- function Toggle({
1926
+ function Toggle2({
1083
1927
  checked,
1084
1928
  onChange,
1085
1929
  label,
@@ -1138,6 +1982,37 @@ function PreviewBox({ preview, outputs }) {
1138
1982
  className: "tsh-notes"
1139
1983
  }, notes.join(" · ")));
1140
1984
  }
1985
+ function sizeOf(bytes) {
1986
+ return bytes < 1024 ? `${bytes} B` : bytes < 1024 * 1024 ? `${Math.round(bytes / 1024)} KB` : `${(bytes / 1024 / 1024).toFixed(1)} MB`;
1987
+ }
1988
+ function FileBox({ target }) {
1989
+ const Kind = icon("FileText");
1990
+ return /* @__PURE__ */ React.createElement("div", {
1991
+ className: "tsh-preview"
1992
+ }, /* @__PURE__ */ React.createElement("div", {
1993
+ className: "tsh-preview-head"
1994
+ }, /* @__PURE__ */ React.createElement("span", null, t("preview")), target.size !== undefined && /* @__PURE__ */ React.createElement("span", {
1995
+ className: "tsh-muted"
1996
+ }, sizeOf(target.size))), /* @__PURE__ */ React.createElement("p", {
1997
+ className: "tsh-file"
1998
+ }, /* @__PURE__ */ React.createElement(Kind, {
1999
+ size: 16
2000
+ }), /* @__PURE__ */ React.createElement("span", null, target.name)));
2001
+ }
2002
+ function base64url(bytes) {
2003
+ let binary = "";
2004
+ for (let at = 0;at < bytes.length; at += 32768) {
2005
+ binary += String.fromCharCode(...bytes.subarray(at, at + 32768));
2006
+ }
2007
+ return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
2008
+ }
2009
+ async function shareFile(target, options) {
2010
+ const file = await pi.files.read(await pi.workspace.fileUrl(target.path, target.cwd));
2011
+ if (file.data.length > MAX_FILE_BYTES) {
2012
+ throw new Error(t("fileLarge", { max: MAX_FILE_BYTES / 1024 / 1024 }));
2013
+ }
2014
+ return Host.shareFile(target.name, file.type || "application/octet-stream", base64url(file.data), options);
2015
+ }
1141
2016
  function randomPassword() {
1142
2017
  const letters = "abcdefghjkmnpqrstuvwxyz23456789";
1143
2018
  const bytes = crypto.getRandomValues(new Uint8Array(8));
@@ -1162,7 +2037,7 @@ function Made({ share, password, close }) {
1162
2037
  size: 22
1163
2038
  }),
1164
2039
  name: share.title,
1165
- gets: share.access === "self" ? t("accessSelfHint") : share.access === "people" ? t("accessPeopleHint") : t("linkReady"),
2040
+ gets: share.access === "self" ? t("accessSelfHint") : share.access === "people" ? t("accessPeopleHint") : t(share.kind === CONVERSATION_KIND ? "linkReady" : "linkReadyFile"),
1166
2041
  notes: [shareLine(share)],
1167
2042
  password,
1168
2043
  own: share.access === "self",
@@ -1216,14 +2091,19 @@ function Options({ target, onMade }) {
1216
2091
  const [preview, setPreview] = React.useState();
1217
2092
  const [busy, setBusy] = React.useState(false);
1218
2093
  const [error, setError] = React.useState();
2094
+ const sessionFile = target.kind === "conversation" ? target.sessionFile : undefined;
2095
+ const title = target.kind === "conversation" ? target.title : target.name;
1219
2096
  React.useEffect(() => {
2097
+ if (!sessionFile) {
2098
+ return;
2099
+ }
1220
2100
  let live = true;
1221
2101
  setPreview(undefined);
1222
- Host.preview(target.sessionFile, { outputs, title: target.title }).then((result) => live && setPreview({ conversation: JSON.parse(result.json), stats: result.stats }), () => live && setPreview({}));
2102
+ Host.preview(sessionFile, { outputs, title }).then((result) => live && setPreview({ conversation: JSON.parse(result.json), stats: result.stats }), () => live && setPreview({}));
1223
2103
  return () => {
1224
2104
  live = false;
1225
2105
  };
1226
- }, [target.sessionFile, target.title, outputs]);
2106
+ }, [sessionFile, title, outputs]);
1227
2107
  const self = access === "self";
1228
2108
  const only = self || access === "people";
1229
2109
  const make = async () => {
@@ -1238,15 +2118,14 @@ function Options({ target, onMade }) {
1238
2118
  setBusy(true);
1239
2119
  setError(undefined);
1240
2120
  try {
1241
- const result = await Host.shareConversation(target.sessionFile, {
2121
+ const options = {
1242
2122
  access,
1243
2123
  ...access === "password" ? { password } : {},
1244
2124
  ...access === "people" ? { people } : {},
1245
2125
  days: offline && days === 0 ? 30 : days,
1246
- offline: offline && !only,
1247
- outputs,
1248
- title: target.title
1249
- });
2126
+ offline: offline && !only
2127
+ };
2128
+ const result = target.kind === "conversation" ? await Host.shareConversation(target.sessionFile, { ...options, outputs, title: target.title }) : await shareFile(target, options);
1250
2129
  shares.added(result.share);
1251
2130
  onMade(result, access === "password" ? password : undefined);
1252
2131
  } catch (failure) {
@@ -1254,12 +2133,15 @@ function Options({ target, onMade }) {
1254
2133
  setBusy(false);
1255
2134
  }
1256
2135
  };
1257
- const empty = preview?.stats?.messages === 0;
2136
+ const empty = target.kind === "conversation" && preview?.stats?.messages === 0;
2137
+ const large = target.kind === "file" && (target.size ?? 0) > MAX_FILE_BYTES;
1258
2138
  return /* @__PURE__ */ React.createElement("div", {
1259
2139
  className: "tsh-options"
1260
- }, /* @__PURE__ */ React.createElement(PreviewBox, {
2140
+ }, target.kind === "conversation" ? /* @__PURE__ */ React.createElement(PreviewBox, {
1261
2141
  preview,
1262
2142
  outputs
2143
+ }) : /* @__PURE__ */ React.createElement(FileBox, {
2144
+ target
1263
2145
  }), /* @__PURE__ */ React.createElement("div", {
1264
2146
  className: "tsh-field"
1265
2147
  }, /* @__PURE__ */ React.createElement("span", {
@@ -1304,25 +2186,25 @@ function Options({ target, onMade }) {
1304
2186
  value: offline && days === 0 ? 30 : days,
1305
2187
  onChange: setDays,
1306
2188
  options: DAYS.map((value) => ({ value, label: value === 0 ? t("forever") : t(`day${value}`), disabled: value === 0 && offline }))
1307
- })), /* @__PURE__ */ React.createElement(Toggle, {
2189
+ })), target.kind === "conversation" && /* @__PURE__ */ React.createElement(Toggle2, {
1308
2190
  checked: outputs,
1309
2191
  onChange: setOutputs,
1310
2192
  label: t("outputs"),
1311
2193
  hint: t("outputsHint")
1312
- }), /* @__PURE__ */ React.createElement(Toggle, {
2194
+ }), /* @__PURE__ */ React.createElement(Toggle2, {
1313
2195
  checked: offline && !only,
1314
2196
  onChange: setOffline,
1315
2197
  disabled: only,
1316
2198
  label: t("offline"),
1317
2199
  hint: access === "password" ? t("offlinePassword") : t("offlineHint")
1318
- }), (error || empty) && /* @__PURE__ */ React.createElement("p", {
2200
+ }), (error || empty || large) && /* @__PURE__ */ React.createElement("p", {
1319
2201
  className: "tsh-error"
1320
- }, error ?? t("nothing")), /* @__PURE__ */ React.createElement("div", {
2202
+ }, error ?? (large ? t("fileLarge", { max: MAX_FILE_BYTES / 1024 / 1024 }) : t("nothing"))), /* @__PURE__ */ React.createElement("div", {
1321
2203
  className: "tsh-actions"
1322
2204
  }, /* @__PURE__ */ React.createElement("button", {
1323
2205
  type: "button",
1324
2206
  className: `ta-button ta-primary${busy ? " ta-busy" : ""}`,
1325
- disabled: busy || empty,
2207
+ disabled: busy || empty || large,
1326
2208
  onClick: () => void make()
1327
2209
  }, busy ? t("making") : t("makeLink"))));
1328
2210
  }
@@ -1336,11 +2218,11 @@ function ShareDialog({ target, close }) {
1336
2218
  });
1337
2219
  }
1338
2220
  return /* @__PURE__ */ React.createElement(pi.ui.Dialog, {
1339
- title: t("shareTitle", { title: target.kind === "made" ? target.share.title : target.title }),
2221
+ title: t("shareTitle", { title: target.kind === "made" ? target.share.title : target.kind === "file" ? target.name : target.title }),
1340
2222
  onClose: close
1341
2223
  }, /* @__PURE__ */ React.createElement("div", {
1342
2224
  className: "tsh-dialog"
1343
- }, target.kind === "conversation" && /* @__PURE__ */ React.createElement(Options, {
2225
+ }, target.kind !== "made" && /* @__PURE__ */ React.createElement(Options, {
1344
2226
  target,
1345
2227
  onMade: (result, password) => setMade({ share: result.share, password })
1346
2228
  })));
@@ -1656,6 +2538,48 @@ function SharedView({ link }) {
1656
2538
  }));
1657
2539
  }
1658
2540
 
2541
+ // web-src/standing-notice.tsx
2542
+ function StandingNotice() {
2543
+ const [standing, setStanding] = React.useState(null);
2544
+ React.useEffect(() => {
2545
+ let live = true;
2546
+ Host.standing().then((next) => live && setStanding(next), () => {
2547
+ return;
2548
+ });
2549
+ return () => {
2550
+ live = false;
2551
+ };
2552
+ }, []);
2553
+ if (!standing || !standing.sanction && standing.blocked.length === 0) {
2554
+ return null;
2555
+ }
2556
+ const sanction = standing.sanction;
2557
+ const until = sanction ? sanction.until ? t("sanctionUntil", { date: date(sanction.until) }) : "" : "";
2558
+ const line = sanction ? t(sanction.level === "ban" ? "standingBan" : "standingLimit", { until: until ? ` · ${until}` : "" }) : t("standingBlocked", { n: standing.blocked.length });
2559
+ const appeal = () => void (async () => {
2560
+ const text = await pi.ui.input(t("appealTitle"), t("appealHint"));
2561
+ if (text?.trim()) {
2562
+ await Host.appeal(text.trim()).then(setStanding, (error) => pi.ui.notify(message(error), "error"));
2563
+ }
2564
+ })();
2565
+ return /* @__PURE__ */ React.createElement("div", {
2566
+ className: "tsh-standing",
2567
+ role: "status"
2568
+ }, /* @__PURE__ */ React.createElement("span", {
2569
+ className: "tsh-row-text"
2570
+ }, /* @__PURE__ */ React.createElement("span", {
2571
+ className: "tsh-row-title"
2572
+ }, line), sanction?.reason && /* @__PURE__ */ React.createElement("span", {
2573
+ className: "tsh-row-line tsh-wrap"
2574
+ }, t("standingWhy", { reason: sanction.reason })), standing.appeal && /* @__PURE__ */ React.createElement("span", {
2575
+ className: "tsh-row-line"
2576
+ }, t("appealSent"))), !standing.appeal && /* @__PURE__ */ React.createElement("button", {
2577
+ type: "button",
2578
+ className: "ta-button",
2579
+ onClick: appeal
2580
+ }, t("appeal")));
2581
+ }
2582
+
1659
2583
  // web-src/shares-page.tsx
1660
2584
  function ShareRow({ share }) {
1661
2585
  const [copied, setCopied] = React.useState(false);
@@ -1736,17 +2660,119 @@ function ShareRow({ share }) {
1736
2660
  actions: [{ key: "stop", label: t("stop"), danger: true, run: () => void stop() }]
1737
2661
  }, content) : content, menu);
1738
2662
  }
2663
+ function TunnelRow({ tunnel, onStop }) {
2664
+ const touch = pi.ui.useDevice().touch;
2665
+ const Globe = icon("Globe");
2666
+ const Stop = icon("Power");
2667
+ const time = new Date(tunnel.expiresAt).toLocaleTimeString(pi.ui.language, { hour: "2-digit", minute: "2-digit" });
2668
+ const copy = () => void navigator.clipboard?.writeText(tunnel.url).then(() => pi.ui.notify(t("copied"))).catch((error) => pi.ui.notify(message(error), "error"));
2669
+ const content = /* @__PURE__ */ React.createElement("div", {
2670
+ className: "tsh-row"
2671
+ }, /* @__PURE__ */ React.createElement("button", {
2672
+ type: "button",
2673
+ className: "tsh-row-main",
2674
+ title: t("copy"),
2675
+ onClick: copy
2676
+ }, /* @__PURE__ */ React.createElement("span", {
2677
+ className: "tsh-tile tsh-tile-service",
2678
+ "aria-hidden": "true"
2679
+ }, /* @__PURE__ */ React.createElement(Globe, {
2680
+ size: 18
2681
+ })), /* @__PURE__ */ React.createElement("span", {
2682
+ className: "tsh-row-text"
2683
+ }, /* @__PURE__ */ React.createElement("span", {
2684
+ className: "tsh-row-title"
2685
+ }, tunnel.title), /* @__PURE__ */ React.createElement("span", {
2686
+ className: "tsh-row-line"
2687
+ }, t("serviceLine", { port: tunnel.port, time })))), !touch && /* @__PURE__ */ React.createElement("div", {
2688
+ className: "tsh-row-actions"
2689
+ }, /* @__PURE__ */ React.createElement("button", {
2690
+ type: "button",
2691
+ className: "tsh-icon tsh-danger",
2692
+ title: t("serviceStop"),
2693
+ "aria-label": t("serviceStop"),
2694
+ onClick: () => onStop(tunnel)
2695
+ }, /* @__PURE__ */ React.createElement(Stop, {
2696
+ size: 15
2697
+ }))));
2698
+ const SwipeRow = pi.ui.SwipeRow;
2699
+ return /* @__PURE__ */ React.createElement("li", {
2700
+ className: "tsh-item"
2701
+ }, SwipeRow ? /* @__PURE__ */ React.createElement(SwipeRow, {
2702
+ actions: [{ key: "stop", label: t("serviceStop"), danger: true, run: () => onStop(tunnel) }]
2703
+ }, content) : content);
2704
+ }
2705
+ function Services() {
2706
+ const [state, setState] = React.useState();
2707
+ React.useEffect(() => {
2708
+ let live = true;
2709
+ const read = () => void Host.tunnelState().then((next) => live && setState(next), () => {
2710
+ return;
2711
+ });
2712
+ read();
2713
+ const timer = setInterval(read, 1e4);
2714
+ return () => {
2715
+ live = false;
2716
+ clearInterval(timer);
2717
+ };
2718
+ }, []);
2719
+ if (!state?.allowed) {
2720
+ return null;
2721
+ }
2722
+ const Switch = pi.ui.Switch;
2723
+ const toggle = (enabled) => Host.setTunnelsEnabled(enabled).then(setState, (error) => {
2724
+ pi.ui.notify(message(error), "error");
2725
+ throw error;
2726
+ });
2727
+ const stop = async (tunnel) => {
2728
+ if (await pi.ui.confirm(t("serviceStopTitle", { title: tunnel.title }), t("serviceStopHint"), { confirmLabel: t("serviceStop"), danger: true })) {
2729
+ await Host.stopTunnel(tunnel.id).catch((error) => pi.ui.notify(message(error), "error"));
2730
+ setState({ ...state, tunnels: state.tunnels.filter((each) => each.id !== tunnel.id) });
2731
+ }
2732
+ };
2733
+ const Globe = icon("Globe");
2734
+ return /* @__PURE__ */ React.createElement("ul", {
2735
+ className: "tsh-rows tsh-group"
2736
+ }, /* @__PURE__ */ React.createElement("li", {
2737
+ className: "tsh-item"
2738
+ }, /* @__PURE__ */ React.createElement("div", {
2739
+ className: "tsh-row tsh-static"
2740
+ }, /* @__PURE__ */ React.createElement("span", {
2741
+ className: "tsh-row-main"
2742
+ }, /* @__PURE__ */ React.createElement("span", {
2743
+ className: "tsh-tile tsh-tile-service",
2744
+ "aria-hidden": "true"
2745
+ }, /* @__PURE__ */ React.createElement(Globe, {
2746
+ size: 18
2747
+ })), /* @__PURE__ */ React.createElement("span", {
2748
+ className: "tsh-row-text"
2749
+ }, /* @__PURE__ */ React.createElement("span", {
2750
+ className: "tsh-row-title"
2751
+ }, t("servicesTitle")), /* @__PURE__ */ React.createElement("span", {
2752
+ className: "tsh-row-line tsh-two"
2753
+ }, state.enabled && state.tunnels.length === 0 ? t("servicesNone") : t("servicesHint")))), Switch && /* @__PURE__ */ React.createElement(Switch, {
2754
+ checked: state.enabled,
2755
+ label: t("servicesSwitch"),
2756
+ onChange: (checked) => toggle(checked)
2757
+ }))), state.tunnels.map((tunnel) => /* @__PURE__ */ React.createElement(TunnelRow, {
2758
+ key: tunnel.id,
2759
+ tunnel,
2760
+ onStop: (each) => void stop(each)
2761
+ })));
2762
+ }
1739
2763
  function SharesPage() {
1740
2764
  const Loading = pi.ui.Loading ?? pi.ui.Skeleton;
1741
2765
  const list = useShares();
1742
2766
  return /* @__PURE__ */ React.createElement("div", {
1743
2767
  className: "tsh-page"
1744
- }, list === undefined ? Loading ? /* @__PURE__ */ React.createElement(Loading, null) : null : list.length === 0 ? /* @__PURE__ */ React.createElement(pi.ui.Empty, {
2768
+ }, /* @__PURE__ */ React.createElement(StandingNotice, null), /* @__PURE__ */ React.createElement(ReportsRow, null), /* @__PURE__ */ React.createElement(Services, null), list === undefined ? Loading ? /* @__PURE__ */ React.createElement(Loading, null) : null : list.length === 0 ? /* @__PURE__ */ React.createElement(pi.ui.Empty, {
1745
2769
  title: t("emptyTitle"),
1746
2770
  hint: t("emptyHint")
1747
2771
  }) : /* @__PURE__ */ React.createElement("ul", {
1748
2772
  className: "tsh-rows"
1749
- }, list.map((share) => /* @__PURE__ */ React.createElement(ShareRow, {
2773
+ }, /* @__PURE__ */ React.createElement("li", {
2774
+ className: "tsh-section tsh-links"
2775
+ }, t("linksTitle")), list.map((share) => /* @__PURE__ */ React.createElement(ShareRow, {
1750
2776
  key: share.id,
1751
2777
  share
1752
2778
  }))));
@@ -1769,6 +2795,9 @@ var STYLE = `
1769
2795
  .tsh-lines b { flex: none; width: 2.2em; font-weight: 500; color: var(--ta-muted); }
1770
2796
  .tsh-lines span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1771
2797
  .tsh-line-user span { color: var(--ta-text); }
2798
+ .tsh-file { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: calc(13px * var(--ta-font-scale)); color: var(--ta-secondary); }
2799
+ .tsh-file svg { flex: none; color: var(--ta-muted); }
2800
+ .tsh-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1772
2801
  .tsh-notes { margin: 8px 0 0; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }
1773
2802
  .tsh-field { display: flex; flex-direction: column; gap: 6px; }
1774
2803
  .tsh-label { font-size: calc(12.5px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-secondary); }
@@ -1794,13 +2823,52 @@ var STYLE = `
1794
2823
  .tsh-item { --ta-swipe-bg: var(--ta-main); min-width: 0; border-radius: 10px; overflow: hidden; }
1795
2824
  .tsh-row { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 6px; border-radius: 10px; transition: background 120ms, opacity 200ms; }
1796
2825
  .tsh-row:hover { background: var(--ta-hover); }
1797
- .tsh-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
2826
+ .tsh-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
1798
2827
  .tsh-tile { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: var(--ta-green); }
1799
2828
  .tsh-tile-password { background: var(--ta-yellow); }
1800
2829
  .tsh-tile-self { background: var(--ta-blue); }
2830
+ .tsh-tile-service { background: #8b5cf6; }
2831
+ .tsh-tile-report { background: var(--ta-red); }
2832
+ .tsh-report { list-style: none; padding: 12px 8px; border-bottom: 1px solid var(--ta-border-muted); display: flex; flex-direction: column; gap: 8px; }
2833
+ .tsh-report-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
2834
+ .tsh-report-note { margin: 0 0 0 50px; font-size: calc(13px * var(--ta-font-scale)); line-height: 1.5; color: var(--ta-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
2835
+ .tsh-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 50px; }
2836
+ .tsh-report-actions .tsh-danger, .tsh-blocked .tsh-danger { color: var(--ta-red); }
2837
+ .ta-button.tsh-danger { color: var(--ta-red); }
2838
+ .tsh-grow { flex: 1; }
2839
+ .tsh-section { margin: 20px 8px 4px; font-size: calc(12px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-muted); }
2840
+ .tsh-blocked { width: 100%; max-width: var(--ta-page-width); margin: 0 auto; }
2841
+ .tsh-blocked-row { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; }
2842
+ .tsh-center { justify-content: center; margin-top: 20px; }
2843
+ .tsh-quiet { border-color: transparent; color: var(--ta-muted); }
2844
+ .tsh-count { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ta-red); color: #fff; font-size: calc(12px * var(--ta-font-scale)); line-height: 20px; text-align: center; box-sizing: border-box; }
2845
+ .tsh-flush { margin-left: 0; }
2846
+ .tsh-auto { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: var(--ta-hover-strong); color: var(--ta-secondary); font-size: calc(11px * var(--ta-font-scale)); line-height: 18px; }
2847
+ .tsh-rules { width: 100%; max-width: var(--ta-page-width); margin: 0 auto; }
2848
+ .tsh-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; }
2849
+ .tsh-rule-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
2850
+ .tsh-rule-note { margin: 0 8px 4px; }
2851
+ .tsh-rule-label { font-size: calc(14px * var(--ta-font-scale)); }
2852
+ .tsh-stepper { flex: none; display: inline-flex; align-items: center; gap: 4px; }
2853
+ .tsh-stepper-value { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-size: calc(14px * var(--ta-font-scale)); }
2854
+ .tsh-log { width: 100%; max-width: var(--ta-page-width); margin: 8px auto 0; }
2855
+ .tsh-log summary { cursor: pointer; }
2856
+ .tsh-log-line { list-style: none; padding: 3px 8px; white-space: normal; }
2857
+ .tsh-standing { width: 100%; max-width: var(--ta-page-width); margin: 0 auto 12px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--ta-red) 10%, transparent); }
2858
+ :root[data-handheld] .tsh-report-note, :root[data-handheld] .tsh-report-actions { margin-left: 0; }
2859
+ /* The rows above the links (Reports, Services of this computer): each a group of its own, as the list rows are. */
2860
+ .tsh-group { margin-bottom: 4px; }
2861
+ .tsh-static, .tsh-static:hover { background: none; padding-right: 12px; }
2862
+ .tsh-static .tsh-row-main { cursor: default; }
2863
+ :root[data-touch] .tsh-static .tsh-row-main:active { background: none; }
2864
+ .tsh-chevron { flex: none; display: inline-flex; color: var(--ta-muted); opacity: .7; }
2865
+ .tsh-section.tsh-links { margin: 16px 8px 4px; list-style: none; }
2866
+ .tsh-wrap { white-space: normal; line-height: 1.45; }
1801
2867
  .tsh-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
1802
2868
  .tsh-row-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1803
2869
  .tsh-row-line { color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2870
+ .tsh-row-line.tsh-wrap { white-space: normal; line-height: 1.45; }
2871
+ .tsh-row-line.tsh-two { white-space: normal; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
1804
2872
  .tsh-row-actions { flex: none; display: flex; gap: 2px; opacity: .75; }
1805
2873
  .tsh-row:hover .tsh-row-actions, .tsh-row:focus-within .tsh-row-actions { opacity: 1; }
1806
2874
  :root[data-touch] .tsh-row:hover { background: none; }
@@ -1886,6 +2954,14 @@ function activate(pi2) {
1886
2954
  run: () => openShareDialog({ kind: "conversation", sessionFile: session.sessionFile, title: session.title })
1887
2955
  }
1888
2956
  ] : []);
2957
+ pi2.registerFileMenu?.((file) => file.kind === "file" ? [
2958
+ {
2959
+ key: "share",
2960
+ label: t("share"),
2961
+ icon: Share,
2962
+ run: () => openShareDialog({ kind: "file", cwd: file.cwd, path: file.path, name: file.name, size: file.size })
2963
+ }
2964
+ ] : []);
1889
2965
  pi2.registerOpener((link) => {
1890
2966
  if (link.type !== "url" || !ShareLink.is(link.url)) {
1891
2967
  return false;
@@ -1894,6 +2970,7 @@ function activate(pi2) {
1894
2970
  return true;
1895
2971
  }, { specific: true });
1896
2972
  pi2.registerView("shares", { title: () => t("sharesTitle"), icon: Share, render: SharesPage, group: "share", order: 80 });
2973
+ pi2.registerView("reports", { title: () => t("reportsTitle"), icon: pi2.ui.icons.Shield ?? Share, render: ReportsPage, navigation: false });
1897
2974
  pi2.registerToolRenderer((name, next) => name === SHARE_TOOL ? next() ?? {
1898
2975
  renderCall: (args) => ({
1899
2976
  verb: t("toolShare"),