mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
test
This commit is contained in:
parent
e66b865cd6
commit
759ac4a4c8
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user