-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync button; auto sync; example image
- Loading branch information
Showing
6 changed files
with
73 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// this is handled as a setting menu but only uses that as a hack to do its work | ||
export class Sync extends FormApplication { | ||
constructor(object = {}, options) { | ||
super(object, options); | ||
|
||
// no idea how this would happen, but CYA | ||
if (!game.JournalLink) { | ||
ui.notifications.warn('JournalLink object not found; cannot sync') | ||
} else { | ||
ui.notifications.info('Syncing journal links'); | ||
game.JournalLink.sync(); | ||
ui.notifications.info('Journal link sync completed'); | ||
} | ||
|
||
// there shouldn't be anything to close, but just in case! | ||
this.close(); | ||
} | ||
|
||
// not overriding this causes it to try to actually render, throwing an error | ||
render = () => {}; | ||
} |