Add better status indicators, and a setting to prevent movement history recording
This commit is contained in:
parent
344e9c55ab
commit
c2601ba69c
18 changed files with 183 additions and 79 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { SettingStatusEnum, status } from "../utils/SettingStatus.mjs";
|
||||
import { __ID__ } from "../consts.mjs";
|
||||
import { Logger } from "../utils/Logger.mjs";
|
||||
|
||||
|
|
@ -13,11 +14,13 @@ const IMAGE_TYPES = [
|
|||
];
|
||||
|
||||
export function chatImageLinks() {
|
||||
status[key] = SettingStatusEnum.Unknown;
|
||||
|
||||
const prevented = Hooks.call(`${__ID__}.preventSetting`, key);
|
||||
if (!prevented) {
|
||||
Logger.log(`Preventing setting "${key}" from being registered`);
|
||||
return false;
|
||||
status[key] = SettingStatusEnum.Blocked;
|
||||
return;
|
||||
};
|
||||
|
||||
// #region Registration
|
||||
|
|
@ -103,7 +106,7 @@ export function chatImageLinks() {
|
|||
}
|
||||
// #endregion Implementation
|
||||
|
||||
return true;
|
||||
status[key] = SettingStatusEnum.Registered;
|
||||
};
|
||||
|
||||
// #region Helpers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue