Skip to content

Build your personal knowledge base with Trilium Notes

test

SiriusXT759ac4a4c87a
diff --git a/src/public/app/services/open.js b/src/public/app/services/open.js
index 9ecab753fd..f6847d384d 100644
--- a/src/public/app/services/open.js
+++ b/src/public/app/services/open.js
@@ -173,8 +173,6 @@ async function openDirectory(directory) {
const res = await electron.shell.openPath(directory);
if (res) {
console.error('Failed to open directory:', res);
- } else {
- console.log('Directory opened successfully.');
}
} else {
console.error('Not running in an Electron environment.');
@@ -185,6 +183,7 @@ async function openDirectory(directory) {
}
}
+const opendataDirectory = async (directory) => await openDirectory(directory);
export default {
download,
@@ -196,5 +195,5 @@ export default {
openAttachmentExternally,
openNoteCustom,
openAttachmentCustom,
- openDirectory
+ opendataDirectory
}
diff --git a/src/public/app/widgets/dialogs/about.js b/src/public/app/widgets/dialogs/about.js
index 6e08cf4029..979fb2cab5 100644
--- a/src/public/app/widgets/dialogs/about.js
+++ b/src/public/app/widgets/dialogs/about.js
@@ -76,10 +76,13 @@ export default class AboutDialog extends BasicWidget {
this.$buildRevision.attr('href', `https://github.com/TriliumNext/Notes/commit/${appInfo.buildRevision}`);
if (utils.isElectron()) {
this.$dataDirectory.html($('<a></a>', {
+ href: 'file:///' + appInfo.dataDirectory,
text: appInfo.dataDirectory,
+ target: '_blank'
}));
- this.$dataDirectory.find("a").on('click', () => {
- openService.openDirectory(appInfo.dataDirectory);
+ this.$dataDirectory.find("a").on('click', (event) => {
+ event.preventDefault();
+ openService.opendataDirectory(appInfo.dataDirectory);
})
} else {
this.$dataDirectory.text(appInfo.dataDirectory);