mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
add mobile responsiveness for otp, login, and password recovery
This commit is contained in:
parent
66bcf8a296
commit
949f97eb2e
@ -86,11 +86,14 @@ async function UIWindow(options) {
|
||||
options.is_maximized = options.is_maximized ?? false;
|
||||
options.is_openFileDialog = options.is_openFileDialog ?? false;
|
||||
options.is_resizable = options.is_resizable ?? true;
|
||||
// if this is a fullpage window, it won't be resizable
|
||||
if(options.is_fullpage)
|
||||
options.is_resizable = false;
|
||||
|
||||
// in the embedded/fullpage mode every window is on top since there is no taskbar to switch between windows
|
||||
// if this is a fullpage window, it won't be resizable
|
||||
if(options.is_fullpage){
|
||||
options.is_maximized = false;
|
||||
options.is_resizable = false;
|
||||
}
|
||||
|
||||
// In the embedded/fullpage mode every window is on top since there is no taskbar to switch between windows
|
||||
// if user has specifically asked for this window to NOT stay on top, honor it.
|
||||
if((window.is_embedded || window.is_fullpage_mode) && !options.parent_uuid && options.stay_on_top !== false)
|
||||
options.stay_on_top = true;
|
||||
|
@ -124,6 +124,7 @@ async function UIWindowLogin(options){
|
||||
UIWindowRecoverPassword({
|
||||
window_options: {
|
||||
backdrop: true,
|
||||
stay_on_top: isMobile.phone,
|
||||
close_on_backdrop_click: false,
|
||||
}
|
||||
});
|
||||
@ -308,6 +309,10 @@ async function UIWindowLogin(options){
|
||||
height: 410,
|
||||
backdrop: true,
|
||||
is_resizable: false,
|
||||
is_draggable: true,
|
||||
stay_on_top: true,
|
||||
center: true,
|
||||
window_class: 'window-login-2fa',
|
||||
body_css: {
|
||||
width: 'initial',
|
||||
height: '100%',
|
||||
|
@ -4488,6 +4488,13 @@ fieldset[name=number-code] {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.device-phone .window.window-login-2fa{
|
||||
left: 50% !important;
|
||||
transform: translate(-50%) !important;
|
||||
height: initial !important;
|
||||
max-width: calc(100% - 30px);
|
||||
}
|
||||
|
||||
.device-phone .window.window-explorer{
|
||||
transform: none;
|
||||
width: 100%;
|
||||
|
@ -77,9 +77,9 @@ const launch_app = async (options)=>{
|
||||
//-----------------------------------
|
||||
// maximize on start
|
||||
//-----------------------------------
|
||||
if(app_info.maximize_on_start)
|
||||
if(app_info.maximize_on_start){
|
||||
options.maximized = 1;
|
||||
|
||||
}
|
||||
//-----------------------------------
|
||||
// if opened a file, sign it
|
||||
//-----------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user