1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Server: Improve installation instructions

This commit is contained in:
Laurent Cozic 2021-07-25 12:03:23 +01:00
parent 3a3aa701ac
commit 53b4d7af68
4 changed files with 14 additions and 1 deletions

View File

@ -143,6 +143,7 @@ export async function initConfig(envType: Env, env: EnvVariables, overrides: any
config_ = {
appVersion: packageJson.version,
appName: env.APP_NAME || 'Joplin Server',
isJoplinCloud: env.API_BASE_URL.includes('.joplincloud.com'),
env: envType,
rootDir: rootDir,
viewDir: viewDir,

View File

@ -8,9 +8,19 @@ import defaultView from '../../utils/defaultView';
import { AccountType, accountTypeToString } from '../../models/UserModel';
import { formatMaxItemSize, formatMaxTotalSize, formatTotalSize, formatTotalSizePercent, yesOrNo } from '../../utils/strings';
import { getCanShareFolder, totalSizeClass } from '../../models/utils/user';
import config from '../../config';
import { escapeHtml } from '../../utils/htmlUtils';
const router: Router = new Router(RouteType.Web);
function setupMessageHtml() {
if (config().isJoplinCloud) {
return `In this screen, select "<strong>${escapeHtml(config().appName)}</strong>" as a synchronisation target and enter your username and password`;
} else {
return `In this screen, select "<strong>Joplin Server</strong>" as a synchronisation target, then enter the URL <strong>${config().apiBaseUrl}</strong> and your username and password`;
}
}
router.get('home', async (_path: SubPath, ctx: AppContext) => {
contextSessionId(ctx);
@ -59,6 +69,7 @@ router.get('home', async (_path: SubPath, ctx: AppContext) => {
},
],
showUpgradeProButton: subscription && user.account_type === AccountType.Basic,
setupMessageHtml: setupMessageHtml(),
};
view.cssFiles = ['index/home'];

View File

@ -111,6 +111,7 @@ export interface Config {
stripe: StripeConfig;
supportEmail: string;
businessEmail: string;
isJoplinCloud: boolean;
}
export enum HttpMethod {

View File

@ -1,7 +1,7 @@
<h2 class="title">Welcome to {{global.appName}}</h2>
<div class="block readable-block">
<p class="block">To start using {{global.appName}}, make sure to <a href="https://joplinapp.org/download">download one of the Joplin applications</a>, either for desktop or for your mobile phone.</p>
<p class="block">Once the app is installed, open the <strong>configuration</strong> screen, then the <strong>Synchronisation</strong> section. In this screen, select "<strong>{{global.appName}}</strong>" as a synchronisation target and enter your username and password<p>
<p class="block">Once the app is installed, open the <strong>Configuration</strong> screen, then the <strong>Synchronisation</strong> section. {{{setupMessageHtml}}}<p>
<p class="block">Once it is setup {{global.appName}} allows you to synchronise your devices, to publish notes, or to collaborate on notebooks with other {{global.appName}} users.</p>
</div>