feat(url,history): add shown file in the url

This commit is contained in:
Edouard Vanbelle
2026-04-06 10:59:46 +02:00
parent 4a4f38c418
commit c16e3c973e
8 changed files with 73 additions and 21 deletions
+3 -9
View File
@@ -27,15 +27,9 @@ class WopiEditor {
*/
async openInModal(fileId, fileName, action) {
action = action || 'edit';
try {
var data = await this._getEditorUrlWithFallback(fileId, fileName, action);
this._showModal(data, fileName);
} catch (error) {
console.error('Failed to open WOPI editor:', error);
if (window.showNotification) {
window.showNotification('Could not open the document editor.', 'error');
}
}
// Error is thrown, caller can handle a classic view as fallback
var data = await this._getEditorUrlWithFallback(fileId, fileName, action);
this._showModal(data, fileName);
}
/**