From 94bf19b4e68f09c5d5099a76775c3a9defa059f2 Mon Sep 17 00:00:00 2001 From: loroteber Date: Thu, 20 Aug 2026 18:32:39 +0500 Subject: [PATCH 1/2] feat(apps): enable fullscreen --- Web/Presenters/templates/Apps/Play.latte | 81 +++++++++++++++++++++++- Web/static/js/options.js | 6 ++ Web/static/js/router.js | 2 + locales/en.strings | 1 + locales/ru.strings | 1 + 5 files changed, 90 insertions(+), 1 deletion(-) diff --git a/Web/Presenters/templates/Apps/Play.latte b/Web/Presenters/templates/Apps/Play.latte index c268ddeb0..d452c793b 100644 --- a/Web/Presenters/templates/Apps/Play.latte +++ b/Web/Presenters/templates/Apps/Play.latte @@ -16,7 +16,7 @@ {block header} {$name} - {_report} + [{_report}] [{_menu_settings}] [πŸ——] {/block} {block content} @@ -43,6 +43,85 @@ window.appTitle = {$name}; window.appPerms = {$perms}; window.appOrigin = {$origin}; + window.fsApps = JSON.parse(localStorage.getItem("fullscreen_apps") || "[]"); + + + {script "js/al_games.js"} diff --git a/Web/static/js/options.js b/Web/static/js/options.js index 2e9e85df7..4da0d6a04 100644 --- a/Web/static/js/options.js +++ b/Web/static/js/options.js @@ -181,6 +181,12 @@ window.tweaks = [ `) u("#appFrame").closest("center").addClass("app_block") }), + new TweakOption("apps.fullscreen_show_notifications", function () { + this.customCSS(`html.app_fullscreen .notifications_global_wrap {z-index: 1022;}`) + }), + new TweakOption("apps.fullscreen_show_ajax_player", function () { + this.customCSS(`html.app_fullscreen #ajax_audio_player {z-index: 1025;}`) + }), new TweakOption("wall.hide_edit_mark", function () { this.customCSS(`.editedMark {display: none;}`) }), diff --git a/Web/static/js/router.js b/Web/static/js/router.js index 454b805b3..a95566ff3 100644 --- a/Web/static/js/router.js +++ b/Web/static/js/router.js @@ -160,6 +160,8 @@ window.router = new class { await window.player._handlePageTransition() } + if (u("html").hasClass("app_fullscreen")) { u("html").removeClass("app_fullscreen") } + this.applyTweaks() /*window.document.dispatchEvent(new Event("DOMContentLoaded", { diff --git a/locales/en.strings b/locales/en.strings index 2ec5d4533..2e3588034 100644 --- a/locales/en.strings +++ b/locales/en.strings @@ -1339,6 +1339,7 @@ "app_err_note_desc" = "Make sure the link is correct and the note belongs to you."; "app_delete_modal_desc" = "Are you sure you want to delete the app? This action cannot be undone."; "app_delete_succ" = "The app has been deleted"; +"app_start_fullscreen" = "Start app in fullscreen mode automatically"; "learn_more" = "Learn more"; diff --git a/locales/ru.strings b/locales/ru.strings index 5682b6954..46a16751b 100644 --- a/locales/ru.strings +++ b/locales/ru.strings @@ -1272,6 +1272,7 @@ "app_err_note_desc" = "Π£Π±Π΅Π΄ΠΈΡ‚Π΅ΡΡŒ, Ρ‡Ρ‚ΠΎ ссылка ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Π°Ρ ΠΈ Π·Π°ΠΌΠ΅Ρ‚ΠΊΠ° ΠΏΡ€ΠΈΠ½Π°Π΄Π»Π΅ΠΆΠΈΡ‚ Π’Π°ΠΌ."; "app_delete_modal_desc" = "Π’Ρ‹ ΡƒΠ²Π΅Ρ€Π΅Π½Ρ‹, Ρ‡Ρ‚ΠΎ Ρ…ΠΎΡ‚ΠΈΡ‚Π΅ ΡƒΠ΄Π°Π»ΠΈΡ‚ΡŒ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅? Π­Ρ‚ΠΎ дСйствиС нСльзя ΠΎΡ‚ΠΌΠ΅Π½ΠΈΡ‚ΡŒ."; "app_delete_succ" = "ΠŸΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ ΡƒΠ΄Π°Π»Π΅Π½ΠΎ"; +"app_start_fullscreen" = "АвтоматичСски Π·Π°ΠΏΡƒΡΠΊΠ°Ρ‚ΡŒ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π² полноэкранном Ρ€Π΅ΠΆΠΈΠΌΠ΅"; "learn_more" = "ΠŸΠΎΠ΄Ρ€ΠΎΠ±Π½Π΅Π΅"; From 7b489109f62b1f5a19db87defa7fad21cfbbbea2 Mon Sep 17 00:00:00 2001 From: loroteber Date: Sun, 30 Aug 2026 21:32:59 +0500 Subject: [PATCH 2/2] feat(apps): enable fullscreen --- Web/Presenters/templates/Apps/Play.latte | 42 +++--------------------- Web/static/css/main.css | 42 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/Web/Presenters/templates/Apps/Play.latte b/Web/Presenters/templates/Apps/Play.latte index d452c793b..d0143d231 100644 --- a/Web/Presenters/templates/Apps/Play.latte +++ b/Web/Presenters/templates/Apps/Play.latte @@ -16,7 +16,7 @@ {block header} {$name} - [{_report}] [{_menu_settings}] [πŸ——] + [{_report}] [{_menu_settings}] [πŸ——] {/block} {block content} @@ -47,42 +47,10 @@