Story 4.1 completed

This commit is contained in:
2026-05-23 23:00:07 +02:00
parent fd0a7868f3
commit de1b33c453
10 changed files with 574 additions and 25 deletions
+13 -4
View File
@@ -31,7 +31,8 @@ import { NotificationBus } from './src/notifications/NotificationBus.js';
import { DirectorsBoard } from './src/ui/gm/DirectorsBoard.js';
import { ConfirmationBar } from './src/ui/gm/ConfirmationBar.js';
import { StripOverlayLayer } from './src/ui/shared/StripOverlayLayer.js';
import { PlayerPrivacyPanel } from './src/ui/player/PlayerPrivacyPanel.js';
import { PlayerPrivacyPanelMenu, initPlayerPrivacyPanelMenu } from './src/ui/player/PlayerPrivacyPanelMenu.js';
import { initGMPlayerPrivacySelector } from './src/ui/gm/GMPlayerPrivacySelector.js';
import { SOCKET_EVENTS } from './src/contracts/socket-message.js';
// Module-level references — constructed in init hook, used across hooks
@@ -271,13 +272,21 @@ Hooks.once("ready", () => {
directorsBoard.init();
}
// Story 4.1: Register PlayerPrivacyPanel in module settings
game.settings.registerMenu('video-view-manager', 'playerPrivacyPanel', {
// Story 4.1: Initialize PlayerPrivacyPanelMenu with DI dependencies
initPlayerPrivacyPanelMenu(adapter, playerPrivacyManager);
// Story 4.1: Register GM-only Player Privacy Selector (Task 5.2)
// Allows GM to select any player and view their privacy settings in read-only mode
initGMPlayerPrivacySelector(adapter, playerPrivacyManager);
// Story 4.1: Register PlayerPrivacyPanel in module settings (Task 5.1)
// Note: Must be registered AFTER init calls to avoid race conditions
game.settings.registerMenu('scrying-pool', 'playerPrivacyPanel', {
name: 'SCRYING_POOL.Settings.PlayerPrivacyPanel',
label: 'SCRYING_POOL.Settings.PlayerPrivacyPanelLabel',
hint: 'SCRYING_POOL.Settings.PlayerPrivacyPanelHint',
icon: 'fa-solid fa-user-shield',
type: PlayerPrivacyPanel,
type: PlayerPrivacyPanelMenu,
restricted: false,
});
} catch (err) {