mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 01:09:43 +02:00
feat(mobile): pop a session or a file preview out beside the dashboard from a native wrapper
An Android WebView wrapper has no browser pop-ups, so a foldable could not show two sessions, or a session and a file, side by side. A wrapper that can open a window of its own now exposes window.CodemanHost.openWindow(url); detachSession, detachFilePreview and openWebviewExternal hand their URL to it, mobile.css keeps the pop-out icon under html.host-windows, and a solo window closes and raises itself through the host when it offers the calls. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
88e3faa456
commit
0720526b64
@@ -4203,6 +4203,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');
|
||||
|
||||
Reference in New Issue
Block a user