1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Doc: Progressive enhancements on download page

This commit is contained in:
Laurent Cozic 2021-07-12 10:14:39 +01:00
parent 0f64c8d0fe
commit 9dc703c312
2 changed files with 13 additions and 1 deletions

View File

@ -509,6 +509,10 @@ p,
text-align: center;
}
.page-download .downloaded-filename {
font-weight: bold;
}
@media (min-width: 767px) {
.content-wrapper{
display: flex;

View File

@ -6,6 +6,12 @@ function getOs() {
return null;
}
function getFilename(path) {
if (!path) return '';
const s = path.split('/');
return s.pop();
}
function getMobileOs() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
@ -72,7 +78,9 @@ function setupDownloadPage() {
window.location = 'https://joplinapp.org/help/#desktop-applications';
} else {
// Otherwise, start the download
window.location = downloadLinks[os];
const downloadLink = downloadLinks[os];
$('.downloaded-filename').text(getFilename(downloadLink));
window.location = downloadLink;
}
}
}