mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
responsive setup page
This commit is contained in:
parent
373408e401
commit
a103886ea5
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "trilium",
|
"name": "trilium",
|
||||||
"version": "0.27.1-beta",
|
"version": "0.27.2-beta",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const sql = require('./sql');
|
const sql = require('./sql');
|
||||||
|
const sqlInit = require('./sql_init');
|
||||||
const optionService = require('./options');
|
const optionService = require('./options');
|
||||||
const dateUtils = require('./date_utils');
|
const dateUtils = require('./date_utils');
|
||||||
const syncTableService = require('./sync_table');
|
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)]);
|
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
|
sqlInit.dbReady.then(() => {
|
||||||
setTimeout(cls.wrap(cleanupDeletedNotes), 5 * 60 * 1000);
|
// 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 = {
|
module.exports = {
|
||||||
createNewNote,
|
createNewNote,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<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>
|
<h1>Trilium login</h1>
|
||||||
|
|
||||||
<% if (failedAuth) { %>
|
<% if (failedAuth) { %>
|
||||||
@ -60,6 +60,8 @@
|
|||||||
device = /Mobi/.test(navigator.userAgent) ? "mobile" : "desktop";
|
device = /Mobi/.test(navigator.userAgent) ? "mobile" : "desktop";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Setting device cookie to:", device);
|
||||||
|
|
||||||
setCookie("trilium-device", device);
|
setCookie("trilium-device", device);
|
||||||
|
|
||||||
function setCookie(name, value) {
|
function setCookie(name, value) {
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
<title>Setup</title>
|
<title>Setup</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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>
|
<h1>Trilium Notes setup</h1>
|
||||||
|
|
||||||
<div class="alert alert-warning" id="alert" style="display: none;">
|
<div class="alert alert-warning" id="alert" style="display: none;">
|
||||||
@ -111,6 +113,7 @@
|
|||||||
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
|
Outstanding sync items: <strong id="outstanding-syncs">N/A</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user