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

Doc: Fixed download page on mobile and other tweaks

This commit is contained in:
Laurent Cozic 2021-07-10 12:40:48 +01:00
parent ca01eb35aa
commit 54130bb4af
6 changed files with 38 additions and 13 deletions

View File

@ -164,9 +164,6 @@ h1 {
font-size: 2em;
margin-bottom: 0.7em;
margin-top: 1.2em;
/* line-height: 70.4px;
font-weight: 700;
margin-bottom: 20px; */
}
h2 {
font-size: 1.5em;
@ -174,9 +171,7 @@ h2 {
margin-top: 1.1em;
border-bottom: 1px solid #ddd;
line-height: 1.3em;
/* line-height: 57.6px;
font-weight: 600;
margin-bottom: 20px; */
padding-bottom: 0.5em;
}
.front-page h1 {

View File

@ -6,6 +6,27 @@ function getOs() {
return null;
}
function getMobileOs() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return "windowsPhone";
}
if (/android/i.test(userAgent)) {
return "android";
}
// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "ios";
}
return "";
}
function setupMobileMenu() {
$("#open-menu-mobile").click(function () {
$("#menu-mobile").animate({ "margin-right": "0px" }, 300);
@ -36,11 +57,17 @@ function setupDownloadPage() {
$('.page-download .get-it-desktop').show(500);
});
const os = getOs();
if (!os || !downloadLinks[os]) {
$('.page-download .get-it-desktop').show();
const mobileOs = getMobileOs();
if (mobileOs) {
$('.page-download .intro').hide();
} else {
window.location = downloadLinks[os];
const os = getOs();
if (!os || !downloadLinks[os]) {
$('.page-download .get-it-desktop').show();
} else {
window.location = downloadLinks[os];
}
}
}

View File

@ -31,7 +31,7 @@ export default class SubscriptionModel extends BaseModel<Subscription> {
await this.models().email().push({
subject: `${this.appName} subscription payment failed`,
body: `Your invoice payment has failed. Please follow this URL to update your payment details: \n\n[Manage your subscription](${this.baseUrl}/portal)`,
body: `Hello,\n\nWe were not able to process your last payment. Please follow this URL to update your payment details: \n\n[Manage your subscription](${this.baseUrl}/portal)\n\nPlease answer this email if you have any question.\n\nThank you,\n\nJoplin Cloud Team`,
recipient_email: user.email,
sender_id: EmailSender.Support,
});

View File

@ -237,7 +237,7 @@ const getHandlers: Record<string, StripeRouteHandler> = {
success: async (_stripe: Stripe, _path: SubPath, _ctx: AppContext) => {
return `
<p>Thank you for signing up for ${globalConfig().appName} Pro! You should receive an email shortly with instructions on how to connect to your account.</p>
<p>Thank you for signing up for ${globalConfig().appName}! You should receive an email shortly with instructions on how to connect to your account.</p>
<p><a href="https://joplinapp.org">Go back to JoplinApp.org</a></p>
`;
},

View File

@ -16,7 +16,7 @@ If so please let us know the following details and we will get back to you as so
export function getPlans(stripeConfig: StripePublicConfig): Record<string, Plan> {
const features = {
publishNote: 'Publish a note to the internet',
publishNote: 'Publish notes to the internet',
sync: 'Sync as many devices as you want',
clipper: 'Web Clipper',
collaborate: 'Share and collaborate on a notebook',

View File

@ -1,9 +1,12 @@
# Download Joplin
<div class="intro">
Thank you for downloading the Joplin desktop app!
If you download didn't start, <a href="#" class="download-click-here">click here</a>.
</div>
<div class="get-it-desktop">
## Get it on desktop