dsh-folia 4.26.0-pre.71 → 4.26.0-pre.72
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/lib/client.js +30 -29
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -917,6 +917,7 @@ window.__ModuleLoader__.load({
|
|
|
917
917
|
"对话": "Chat",
|
|
918
918
|
"可选工作能力(已安装才可用)": "Optional work capabilities (installed only)",
|
|
919
919
|
"能力": "Capabilities",
|
|
920
|
+
"工作": "Work",
|
|
920
921
|
"麦克风测试": "Microphone test",
|
|
921
922
|
"测试麦克风": "Test microphone",
|
|
922
923
|
"录音中…": "Recording…",
|
|
@@ -964,7 +965,6 @@ window.__ModuleLoader__.load({
|
|
|
964
965
|
"工作能力": "Work",
|
|
965
966
|
"娱乐": "Fun",
|
|
966
967
|
"详情": "Details",
|
|
967
|
-
"预览图来自作者仓库": "Preview from the author's repository",
|
|
968
968
|
"收起": "Collapse",
|
|
969
969
|
"复制安装命令": "Copy install command",
|
|
970
970
|
"已复制": "Copied",
|
|
@@ -21849,26 +21849,24 @@ window.__ModuleLoader__.load({
|
|
|
21849
21849
|
borderRadius: '8px',
|
|
21850
21850
|
background: 'rgba(255,255,255,0.06)',
|
|
21851
21851
|
};
|
|
21852
|
-
const CAP_PREVIEW_IMG = { width: '100%', height: '120px', objectFit: 'cover', display: 'block' };
|
|
21853
21852
|
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
return '
|
|
21853
|
+
|
|
21854
|
+
/** 本地封面:按名字做确定性色相,永不依赖网络(离线也好看)。 */
|
|
21855
|
+
function capCoverHue(item) {
|
|
21856
|
+
const text = String((item && (item.pkg || item.name)) || '');
|
|
21857
|
+
let h = 0;
|
|
21858
|
+
for (let i = 0; i < text.length; i += 1) h = (h * 31 + text.charCodeAt(i)) % 360;
|
|
21859
|
+
return h;
|
|
21860
|
+
}
|
|
21861
|
+
|
|
21862
|
+
function capCoverBg(item) {
|
|
21863
|
+
const h = capCoverHue(item);
|
|
21864
|
+
return 'linear-gradient(135deg, hsl(' + h + ' 45% 26%) 0%, hsl(' + ((h + 42) % 360) + ' 50% 15%) 100%)';
|
|
21866
21865
|
}
|
|
21867
21866
|
|
|
21868
21867
|
function CapabilityCard({ item }) {
|
|
21869
21868
|
const [open, setOpen] = React.useState(false);
|
|
21870
21869
|
const [copied, setCopied] = React.useState(false);
|
|
21871
|
-
const [previewFailed, setPreviewFailed] = React.useState(false);
|
|
21872
21870
|
const copy = () => {
|
|
21873
21871
|
const text = String(item.command || '');
|
|
21874
21872
|
try {
|
|
@@ -21908,21 +21906,24 @@ window.__ModuleLoader__.load({
|
|
|
21908
21906
|
const body = [head];
|
|
21909
21907
|
if (open) {
|
|
21910
21908
|
const line = (k, v) => React.createElement('div', { key: k, className: 'we-picker__hint', style: { marginTop: '4px' } }, v);
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21914
|
-
|
|
21915
|
-
|
|
21916
|
-
|
|
21917
|
-
|
|
21918
|
-
|
|
21919
|
-
|
|
21920
|
-
|
|
21921
|
-
|
|
21909
|
+
// 本地生成的封面(图标 + 名称 + 分类),不依赖任何外部图片,离线也好看。
|
|
21910
|
+
const sectionLabel = item.section === 'fun' ? weT('娱乐') : weT('工作');
|
|
21911
|
+
body.push(React.createElement('div', { key: 'cover', style: { marginTop: '8px' } },
|
|
21912
|
+
React.createElement('div', {
|
|
21913
|
+
style: {
|
|
21914
|
+
height: '120px', borderRadius: '8px', overflow: 'hidden',
|
|
21915
|
+
display: 'flex', alignItems: 'center', gap: '12px', padding: '0 16px',
|
|
21916
|
+
background: capCoverBg(item),
|
|
21917
|
+
},
|
|
21918
|
+
}),
|
|
21919
|
+
React.createElement('span', { style: { fontSize: '40px', lineHeight: 1 } }, item.icon || '🧩'),
|
|
21920
|
+
React.createElement('div', { style: { minWidth: 0 } },
|
|
21922
21921
|
React.createElement('div', {
|
|
21923
|
-
|
|
21924
|
-
},
|
|
21925
|
-
|
|
21922
|
+
style: { fontWeight: 600, fontSize: '14px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },
|
|
21923
|
+
}, item.name),
|
|
21924
|
+
React.createElement('div', {
|
|
21925
|
+
style: { marginTop: '4px', fontSize: '11px', opacity: 0.78, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' },
|
|
21926
|
+
}, sectionLabel + ' · ' + (item.pkg || '')))));
|
|
21926
21927
|
body.push(React.createElement('div', { key: 'd-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('详情')));
|
|
21927
21928
|
body.push(line('desc', item.authorDesc || item.summary || ''));
|
|
21928
21929
|
body.push(React.createElement('div', { key: 'u-title', style: { marginTop: '8px', fontSize: '12px', fontWeight: 600 } }, weT('如何使用')));
|
package/package.json
CHANGED