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:
parent
0f64c8d0fe
commit
9dc703c312
@ -509,6 +509,10 @@ p,
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-download .downloaded-filename {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media (min-width: 767px) {
|
||||
.content-wrapper{
|
||||
display: flex;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user