Merge #432: pop a session, a file preview or a web tab out into a native wrapper's own window

# Conflicts:
#	src/web/public/app.js
#	src/web/public/settings-ui.js
This commit is contained in:
Codeman maintainer
2026-10-09 05:55:08 +02:00
9 changed files with 253 additions and 8 deletions
+6
View File
@@ -4334,6 +4334,12 @@ Object.assign(CodemanApp.prototype, {
*/
detachFilePreview() {
if (!this.filePreviewDetachUrl) return;
const hosted = this.openInHostWindow?.(this.filePreviewDetachUrl) ?? null;
if (hosted !== null) {
if (hosted) this.closeFilePreview();
else this.showToast('Could not open a new window for this preview', 'error');
return;
}
const win = window.open(this.filePreviewDetachUrl, '_blank');
if (!win) {
this.showToast('Pop-up blocked: allow pop-ups for this site to detach previews', 'error');