mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
chore(prettier): fix all files
This commit is contained in:
@@ -19,7 +19,7 @@ const TPL = `
|
||||
|
||||
export default class SharedInfoWidget extends NoteContextAwareWidget {
|
||||
isEnabled() {
|
||||
return super.isEnabled() && this.noteId !== '_share' && this.note.hasAncestor('_share');
|
||||
return super.isEnabled() && this.noteId !== "_share" && this.note.hasAncestor("_share");
|
||||
}
|
||||
|
||||
doRender() {
|
||||
@@ -38,10 +38,9 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {
|
||||
if (syncServerHost) {
|
||||
link = `${syncServerHost}/share/${shareId}`;
|
||||
this.$sharedText.text(t("shared_info.shared_publicly"));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
let host = location.host;
|
||||
if (host.endsWith('/')) {
|
||||
if (host.endsWith("/")) {
|
||||
// seems like IE has trailing slash
|
||||
// https://github.com/zadam/trilium/issues/3782
|
||||
host = host.substr(0, host.length - 1);
|
||||
@@ -55,18 +54,17 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
getShareId(note) {
|
||||
if (note.hasOwnedLabel('shareRoot')) {
|
||||
return '';
|
||||
if (note.hasOwnedLabel("shareRoot")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return note.getOwnedLabelValue('shareAlias') || note.noteId;
|
||||
return note.getOwnedLabelValue("shareAlias") || note.noteId;
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.getAttributeRows().find(attr => attr.name.startsWith('_share') && attributeService.isAffecting(attr, this.note))) {
|
||||
entitiesReloadedEvent({ loadResults }) {
|
||||
if (loadResults.getAttributeRows().find((attr) => attr.name.startsWith("_share") && attributeService.isAffecting(attr, this.note))) {
|
||||
this.refresh();
|
||||
}
|
||||
else if (loadResults.getBranchRows().find(branch => branch.noteId === this.noteId)) {
|
||||
} else if (loadResults.getBranchRows().find((branch) => branch.noteId === this.noteId)) {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user