mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
migrated all remaining dialogs to bootstrap modals, #203
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
const sql = require('../../services/sql');
|
||||
const protectedSessionService = require('../../services/protected_session');
|
||||
|
||||
async function getRecentChanges() {
|
||||
const recentChanges = await sql.getRows(
|
||||
`SELECT
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
note_revisions.*
|
||||
FROM
|
||||
note_revisions
|
||||
@@ -15,6 +17,14 @@ async function getRecentChanges() {
|
||||
dateModifiedTo DESC
|
||||
LIMIT 1000`);
|
||||
|
||||
if (!protectedSessionService.isProtectedSessionAvailable()) {
|
||||
for (const change of recentChanges) {
|
||||
if (change.current_isProtected) {
|
||||
change.title = change.current_title = "[Protected]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return recentChanges;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user