Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1074-settings-friends.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Settings → Bot Social now lists friends and links each of your Bots to People with access, so sharing and revoke are findable without opening each Bot first. Add friend stays on the + menu, and the same panel is also on that page ([#1074](https://github.com/ThinkFlowLab/FlyBot/issues/1074)).
10 changes: 10 additions & 0 deletions core/client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Generated from src/client by `npm run build` (scripts/build-client.mjs). Do not edit by hand.
window.__ModuleLoader__.load({
id: 'ds-bot',
Expand Down Expand Up @@ -272,6 +272,16 @@
"You get a new identity on this server. The friends and sharing you have now stay on the current server; they do not move.": "你会在这台服务器上得到一个新身份。现在的好友和分享留在当前服务器上,不会搬过去。",
"Your current sign-in is kept as a backup on this computer and is never deleted. Switch back any time.": "当前的登录凭据会作为备份保留在这台电脑上,不会被删除。随时可以切换回来。",
"Your Bots stop being shared with friends until you share them again on the new server.": "在新服务器上重新分享之前,你的 Bot 不再与好友共享。",
// Settings → Bot Social friends and sharing (#1074)
"Friends": "好友",
"No friends yet.": "还没有好友。",
"Could not load friends.": "好友没有加载出来。",
"Accept them in Add friend.": "到「添加好友」里接受。",
"Waiting for them to accept": "等待对方接受",
"Same panel as the + menu.": "和侧栏的 + 菜单是同一个面板。",
"People with access": "可访问的人",
"People with access to {name}": "可访问 {name} 的人",
"No Bots to share yet.": "还没有可分享的 Bot。",
"This is the server you already use.": "这就是你正在用的服务器。",
"Switching…": "正在切换…",
"Switch to this server": "切换到这台服务器",
Expand Down
10 changes: 10 additions & 0 deletions core/src/client/i18n.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Interface copy follows the DSH language. Keys are the English text; `zh` maps them.
// Copy is looked up at render time and every slot outlet re-renders on a language
// switch, so nothing caches a translated string.
Expand Down Expand Up @@ -236,6 +236,16 @@
'You get a new identity on this server. The friends and sharing you have now stay on the current server; they do not move.': '你会在这台服务器上得到一个新身份。现在的好友和分享留在当前服务器上,不会搬过去。',
'Your current sign-in is kept as a backup on this computer and is never deleted. Switch back any time.': '当前的登录凭据会作为备份保留在这台电脑上,不会被删除。随时可以切换回来。',
'Your Bots stop being shared with friends until you share them again on the new server.': '在新服务器上重新分享之前,你的 Bot 不再与好友共享。',
// Settings → Bot Social friends and sharing (#1074)
'Friends': '好友',
'No friends yet.': '还没有好友。',
'Could not load friends.': '好友没有加载出来。',
'Accept them in Add friend.': '到「添加好友」里接受。',
'Waiting for them to accept': '等待对方接受',
'Same panel as the + menu.': '和侧栏的 + 菜单是同一个面板。',
'People with access': '可访问的人',
'People with access to {name}': '可访问 {name} 的人',
'No Bots to share yet.': '还没有可分享的 Bot。',
'This is the server you already use.': '这就是你正在用的服务器。',
'Switching…': '正在切换…',
'Switch to this server': '切换到这台服务器',
Expand Down
1 change: 1 addition & 0 deletions docs/subsystems/core-client.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
subsystem: core-client
owned_paths:
Expand All @@ -24,6 +24,7 @@
| File | Role |
| --- | --- |
| `core/src/client/` | Client sources → build to `core/client.js`. |
| `core/src/client/i18n.js` | The zh map the host `t()` reads. A plugin Settings page that calls `t('…')` adds the English key here (Settings → Bot Social friends and sharing, #1074); `npm run build` in `core/` copies the same map into `core/client.js`. |
| `core/src/client/new-chat.js` | Sidebar **+** picker. Plugin rows via `flybot.new-chat.action` (`newChatActionRows` in `flybot-registry.js`); social adds Face-to-face room and Add friend (copy actions live inside Add friend, #181). The DSH Agent row reads **Add coding agent** (hint "A plain DSH session, not a Bot") so it is not mistaken for **Create new Bot** (#181). The short + menu does not list individual Bots. A group the host refuses because one of my Bots is not shared with the friend whose Bot is in it (`error.details.reason === 'ungranted-local'`, put on the error by `client/api.js`) is drawn as a card, not a red line: it names the Bot(s) and friend(s), and offers **Copy invite link for {Bot}** (`__flybot__.social.createInvite`; shown only when social is loaded and can invite that Bot, nothing is granted by the click; it says *copied* only when `copiedToClipboard` in `shared/remote-label.js` reports the write took, else it shows the link in a read-only, select-on-focus field to copy by hand) and **Leave {Bot} out** (`ungrantedLocalFix`, `shared/remote-label.js`). |
| `core/src/client/stats-dock.js` | The shell's run-stats footer under the composer (`conversation.composer.dock`) re-registered one priority lower with the shell's own component, inject and `chat` locale, so the English counts read **1 turn** / **1 step** instead of `1 turns 1 steps` (`pluralStats` rewrites only the exact English template, #419). The shell ids differ by version — one `stats` footer in 0.2.0-rc.2, the counts split into an `activity` pill next to `usage` in 0.2.1-alpha.1 — so `statsDocks` registers one wrapper per id and the wrapper whose id the shell does not publish draws nothing (#659); `usage` stays hidden. Still hidden in a friend's Bot chat by CSS (#419). Tests: `core/test/stats-dock.test.js`. |
| `core/src/client/room-invite-preview.js` | The one room-invite preview card (#876). `invitePreviewOf` says only what a server reply can honestly say (a name cleaned at fixed point, the lead, `n / m in the room`, the deadline), `inviteCountdown` words the deadline, `RoomInvitePreview` draws the card from a caller-supplied `h`; `kind` renames the `data-flybot` hooks, so the face-room paste flow (`face-link-preview`) and the member-invite dialog (`room-invite-preview`) render the same tree instead of two copies of the markup. Registered on `__flybot__` in `flybot-slots.js`, because a classic-script plugin cannot import it. Tests: `core/test/room-invite-preview.test.js`. |
Expand Down
Loading
Loading