@coda-console/friends 0.6.0 → 0.8.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/README.md +67 -7
- package/lib/friends.mjs +7 -4
- package/lib/gateway.mjs +72 -9
- package/lib/outbox.mjs +10 -5
- package/lib/rpc-caller.mjs +474 -0
- package/lib/rpc-format.mjs +288 -0
- package/lib/rpc-holder.mjs +723 -0
- package/lib/rpc-store.mjs +556 -0
- package/main.mjs +62 -4
- package/package.json +15 -2
- package/view/app.mjs +517 -39
- package/view/style.css +59 -0
package/view/style.css
CHANGED
|
@@ -145,6 +145,65 @@ details[open] > summary { margin-bottom: 10px; }
|
|
|
145
145
|
.key-full { overflow-wrap: anywhere; word-break: break-all; }
|
|
146
146
|
.warn-box { margin: 0 0 8px; padding: 9px 11px; border-radius: 11px; background: color-mix(in srgb, var(--red) 11%, transparent); color: var(--red); font-size: .92em; }
|
|
147
147
|
|
|
148
|
+
/* 添加好友:「邀请对方」与「接受对方的邀请」各一块,结果区高度固定,状态变化只换里面的内容 */
|
|
149
|
+
.blk { display: flex; flex-direction: column; gap: 10px; }
|
|
150
|
+
.blk + .blk { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
|
|
151
|
+
.blk .sec { margin: 0; }
|
|
152
|
+
.result { height: 208px; display: flex; flex-direction: column; gap: 8px; }
|
|
153
|
+
.res-box { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; color: var(--fg2); font-size: .92em; overflow: auto; }
|
|
154
|
+
.res-box.code { display: block; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--fg); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: .86em; line-height: 1.5; -webkit-user-select: text; user-select: text; }
|
|
155
|
+
.res-box.err { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
|
|
156
|
+
.copyrow { flex: none; display: flex; align-items: center; gap: 10px; min-height: 28px; }
|
|
157
|
+
|
|
158
|
+
/* 好友详情里的「共享」 */
|
|
159
|
+
.share { padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
|
|
160
|
+
.share > h4 { margin: 0; font-size: 1.12em; font-weight: 700; }
|
|
161
|
+
.sub-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 650; color: var(--fg2); }
|
|
162
|
+
.glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
163
|
+
.g-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 8px 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
|
|
164
|
+
.g-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
|
|
165
|
+
.g-name { font-weight: 650; }
|
|
166
|
+
.g-sub { font-size: .85em; color: var(--fg3); }
|
|
167
|
+
.g-sub.error { color: var(--red); }
|
|
168
|
+
.badge.busy { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
|
|
169
|
+
.badge.busy::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; animation: pulse 1s ease-in-out infinite; }
|
|
170
|
+
@keyframes pulse { 50% { opacity: .25; } }
|
|
171
|
+
.kebab, .kebab-slot { flex: none; width: 32px; height: 32px; }
|
|
172
|
+
.kebab { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--fg2); }
|
|
173
|
+
.kebab:not(:disabled):hover { background: var(--fill); }
|
|
174
|
+
.kebab svg { pointer-events: none; }
|
|
175
|
+
.g-empty { min-height: 56px; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
|
|
176
|
+
.menu { position: absolute; top: 44px; right: 8px; z-index: 5; min-width: 150px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
|
|
177
|
+
.menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; text-align: left; font-weight: 600; }
|
|
178
|
+
.menu button.danger { color: var(--red); }
|
|
179
|
+
.menu button:hover { background: var(--fill); }
|
|
180
|
+
.menu button.danger:hover { background: color-mix(in srgb, var(--red) 10%, transparent); }
|
|
181
|
+
.menu-note { font-size: .85em; font-weight: 400; color: var(--fg2); }
|
|
182
|
+
.ops-list { display: flex; flex-direction: column; gap: 6px; }
|
|
183
|
+
.op { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 3px; }
|
|
184
|
+
.op-top { display: flex; align-items: center; gap: 8px; font-size: .88em; }
|
|
185
|
+
.op-time { color: var(--fg3); }
|
|
186
|
+
.op-cmd { font-family: var(--mono); font-size: .86em; }
|
|
187
|
+
.dur { color: var(--fg2); font-variant-numeric: tabular-nums; min-width: 4.2em; text-align: right; }
|
|
188
|
+
.pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-align: left; }
|
|
189
|
+
.pick .why { font-size: .85em; color: var(--orange); }
|
|
190
|
+
|
|
191
|
+
/* 网络节点:分节标题行右端的图标按钮、抽屉里的分组与行、待移除块 */
|
|
192
|
+
.sec .kebab { margin: -6px -6px -6px 0; }
|
|
193
|
+
.page > section > .netblock { margin-top: 16px; }
|
|
194
|
+
h3.sub-head, h4.sub-head { font-size: 1em; }
|
|
195
|
+
.sub-head .count { font-weight: 400; }
|
|
196
|
+
.sub-head .dot { margin-right: 1px; }
|
|
197
|
+
.g-sub.meta { display: flex; align-items: center; gap: 5px; }
|
|
198
|
+
.g-row.stripe { padding-left: 14px; }
|
|
199
|
+
.g-row.stripe::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--s); opacity: .8; }
|
|
200
|
+
.g-row.attr { --s: var(--green); }
|
|
201
|
+
.g-row.unk { --s: var(--orange); }
|
|
202
|
+
.g-row .btn.danger { align-self: center; }
|
|
203
|
+
.note-box { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 9px 11px; border-radius: 11px; background: color-mix(in srgb, var(--orange) 13%, transparent); color: var(--orange); font-size: .92em; }
|
|
204
|
+
.group + .group { margin-top: 16px; }
|
|
205
|
+
.dlg-body .group > .glist { margin-top: 0; }
|
|
206
|
+
|
|
148
207
|
@media (min-width: 680px) {
|
|
149
208
|
.page { padding: 18px 24px 28px; gap: 20px; }
|
|
150
209
|
.hero-body { padding: 14px 20px 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: end; column-gap: 18px; }
|