First round of test
This commit is contained in:
@@ -49,11 +49,29 @@ export function isInitialized() {
|
||||
return _isInitialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditional base class — test environment lacks foundry globals.
|
||||
*/
|
||||
const _MenuAppBase =
|
||||
typeof foundry !== 'undefined' &&
|
||||
foundry.applications?.api?.ApplicationV2
|
||||
? foundry.applications.api.ApplicationV2
|
||||
: class _FallbackMenuApp {
|
||||
static DEFAULT_OPTIONS = {};
|
||||
get rendered() { return this._rendered ?? false; }
|
||||
set rendered(v) { this._rendered = v; }
|
||||
get element() { return this._element ?? null; }
|
||||
set element(v) { this._element = v; }
|
||||
async render() { this._rendered = true; }
|
||||
async close() { this._rendered = false; }
|
||||
};
|
||||
|
||||
/**
|
||||
* PlayerPrivacyPanelMenu - Wrapper for Foundry settings menu.
|
||||
* When instantiated by Foundry, it creates a PlayerPrivacyPanel with the current user as target.
|
||||
* Extends ApplicationV2 so it passes Foundry's registerMenu validation.
|
||||
*/
|
||||
export class PlayerPrivacyPanelMenu {
|
||||
export class PlayerPrivacyPanelMenu extends _MenuAppBase {
|
||||
/**
|
||||
* @param {object} [options] - Foundry options (unused, but required by settings menu API)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user