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);
|
const res = await electron.shell.openPath(directory);
|
||||||
if (res) {
|
if (res) {
|
||||||
console.error('Failed to open directory:', res);
|
console.error('Failed to open directory:', res);
|
||||||
} else {
|
|
||||||
console.log('Directory opened successfully.');
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error('Not running in an Electron environment.');
|
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 {
|
export default {
|
||||||
download,
|
download,
|
||||||
@ -196,5 +195,5 @@ export default {
|
|||||||
openAttachmentExternally,
|
openAttachmentExternally,
|
||||||
openNoteCustom,
|
openNoteCustom,
|
||||||
openAttachmentCustom,
|
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}`);
|
this.$buildRevision.attr('href', `https://github.com/TriliumNext/Notes/commit/${appInfo.buildRevision}`);
|
||||||
if (utils.isElectron()) {
|
if (utils.isElectron()) {
|
||||||
this.$dataDirectory.html($('<a></a>', {
|
this.$dataDirectory.html($('<a></a>', {
|
||||||
|
href: 'file:///' + appInfo.dataDirectory,
|
||||||
text: appInfo.dataDirectory,
|
text: appInfo.dataDirectory,
|
||||||
|
target: '_blank'
|
||||||
}));
|
}));
|
||||||
this.$dataDirectory.find("a").on('click', () => {
|
this.$dataDirectory.find("a").on('click', (event) => {
|
||||||
openService.openDirectory(appInfo.dataDirectory);
|
event.preventDefault();
|
||||||
|
openService.opendataDirectory(appInfo.dataDirectory);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$dataDirectory.text(appInfo.dataDirectory);
|
this.$dataDirectory.text(appInfo.dataDirectory);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user