responsive setup page

This commit is contained in:
azivner 2019-01-05 21:49:40 +01:00
parent 373408e401
commit a103886ea5
4 changed files with 99 additions and 91 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "trilium",
"version": "0.27.1-beta",
"version": "0.27.2-beta",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,4 +1,5 @@
const sql = require('./sql');
const sqlInit = require('./sql_init');
const optionService = require('./options');
const dateUtils = require('./date_utils');
const syncTableService = require('./sync_table');
@ -408,10 +409,12 @@ async function cleanupDeletedNotes() {
await sql.execute("UPDATE note_revisions SET content = NULL WHERE note_revisions.content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.dateModified <= ?)", [dateUtils.dateStr(cutoffDate)]);
}
// first cleanup kickoff 5 minutes after startup
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
sqlInit.dbReady.then(() => {
// first cleanup kickoff 5 minutes after startup
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
setInterval(cls.wrap(cleanupDeletedNotes), 4 * 3600 * 1000);
setInterval(cls.wrap(cleanupDeletedNotes), 4 * 3600 * 1000);
});
module.exports = {
createNewNote,

View File

@ -7,7 +7,7 @@
</head>
<body>
<div class="container">
<div class="col-md-5 offset-md-3" style="padding-top: 25px;">
<div class="col-xs-12 col-sm-10 col-md-6 col-lg-4 col-xl-4 mx-auto" style="padding-top: 25px;">
<h1>Trilium login</h1>
<% if (failedAuth) { %>
@ -60,6 +60,8 @@
device = /Mobi/.test(navigator.userAgent) ? "mobile" : "desktop";
}
console.log("Setting device cookie to:", device);
setCookie("trilium-device", device);
function setCookie(name, value) {

View File

@ -2,10 +2,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Setup</title>
</head>
<body>
<div id="setup-dialog" style="width: 700px; margin: auto; padding-top: 50px; display:none; font-size: larger;">
<div class="container">
<div id="setup-dialog" class="col-md-12 col-lg-8 col-xl-6 mx-auto" style="padding-top: 25px;">
<h1>Trilium Notes setup</h1>
<div class="alert alert-warning" id="alert" style="display: none;">
@ -111,6 +113,7 @@
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
</div>
</div>
</div>
</div>
<script type="text/javascript">