Skip to content

Commit

Permalink
Improve desktop app warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mborik committed Nov 18, 2022
1 parent 3032d4c commit 9622743
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 34 deletions.
19 changes: 1 addition & 18 deletions styles/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,6 @@
-ms-interpolation-mode: nearest-neighbor;
}

//---------------------------------------------------------------------------------------
@media not screen and (any-pointer: fine), (max-width: 1129px) or (max-height: 679px) {
.desktop-app-warning {
display: block;
background: @body-bg;

.modal-dialog {
margin-top: @dialog-top-margin;

> .modal-content {
border-radius: 0;
font-size: 16px;
.confirm-gradient(@modal-content-bg, lighten(@brand-danger, 50%));
}
}
}
}
//---------------------------------------------------------------------------------------
.btn-half {
float: left;
Expand Down Expand Up @@ -488,7 +471,7 @@

// modal windows ------------------------------------------------------------------------
#documodal .modal-body {
.user-select(initial);
.user-select(text);

height: 50ex;
min-height: 50ex;
Expand Down
47 changes: 47 additions & 0 deletions styles/loader.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,53 @@ body {
}
}

@media not screen and (any-pointer: fine), (max-width: 1129px), (max-height: 679px) {
body > #overlay {
display: block;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 16384;
background: #fff !important;
overflow: hidden;

.wrapper {
display: block;
position: absolute;
left: 50%;
top: 50%;

.loader { display: none !important; }
.desktop-app-warning {
color: #000;
display: block;
position: relative;
left: -50%;
width: 30rem;
margin-top: -15ex;
font-size: 15px;

&:before {
display: block;
content: "\A0";
width: 50px;
height: 64px;
margin: 0 auto;
margin-bottom: 15px;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABAAgMAAAAlu8zoAAAACVBMVEUAAAAAAAD///+D3c/SAAAAAXRSTlMAQObYZgAAAGxJREFUKM+90rEOwCAIBFAW/8+F5f7vlvtKh7aaqpC0Scv2Bg8MmHmvanZXUS/OwpDqoisEq9hDnoqUyL0ESdgrfZd2B2MRsZJMuiMSJCLQkRFr2y/bQ7q/D0RI54cX/TxLGVfuNiu5+deK+zXIR8kiPqrOmAAAAABJRU5ErkJggg==');
}

ul {
padding-inline-start: 3rem;
}
}
}
}
}
//---------------------------------------------------------------------------------------

@font-face {
font-family: 'Droid Sans';
src: url('../assets/fonts/droidsans-regular-webfont.eot');
Expand Down
15 changes: 0 additions & 15 deletions templates/dlg-commons.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,4 @@ <h4 class="modal-title"></h4>
<div class="modal-footer"></div>
</div>
</div>
</div>
<div class="modal in desktop-app-warning" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-body">
<p>☝️ <b>This is the desktop application.</b></p>
<p>You will need:<ul>
<li>computer</li>
<li>mouse with scroll-wheel</li>
<li>keyboard with function keys (and numpad for better XP)</li>
<li>monitor with HD resolution at least</li>
</ul></p>
</div>
</div>
</div>
</div>
17 changes: 16 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@
<link rel="manifest" href="manifest.json">
</head>
<body class="loading">
<div hidden id="overlay"><div class="wrapper"><span class="loader">loading</span></div></div>
<div hidden id="overlay">
<div class="wrapper">
<span class="loader">loading</span>
<span hidden class="desktop-app-warning">
<b>This tracker is a desktop application!</b>
<br><br>Requirements:<ul>
<li>desktop computer</li>
<li>latest &amp; modern browser</li>
<li>mouse with scroll-wheel</li>
<li>keyboard with all function keys</li>
<li>numpad for better function control</li>
<li>display with HD resolution (at least)</li>
</ul>
</span>
</div>
</div>
<nav class="navbar navbar-default">
@require('menu.html')
</nav>
Expand Down

0 comments on commit 9622743

Please sign in to comment.