Complete workbench P0 resource tab cutover

This commit is contained in:
lix-2026
2026-05-20 20:13:24 +08:00
parent acf1305a7e
commit e0b0e70fb8
12 changed files with 1159 additions and 3 deletions
@@ -2043,7 +2043,13 @@ const SIDEBAR_TREE_JS: &str = r##"
function buildOnlyOfficeOpenUrl(input) {
var target = new URL('/onlyoffice', window.location.origin);
target.searchParams.set('fileUrl', input.fileUrl || '');
var fileUrl = String(input.fileUrl || '').trim();
if (fileUrl) {
try {
fileUrl = new URL(fileUrl, window.location.origin).toString();
} catch (_error) {}
}
target.searchParams.set('fileUrl', fileUrl);
target.searchParams.set('fileName', input.fileName || '');
target.searchParams.set('fileType', input.fileType || 'docx');
if (input.assetId) target.searchParams.set('assetId', input.assetId);