Files
dragonroll/frontend/app/services/WindowDefinitions.js
Gitea OpenCode Agent abcec4d2ff
All checks were successful
Test / test (push) Successful in 2s
Fix issue #95: Make documentation a resizable window
2026-10-15 22:33:31 +00:00

135 lines
4.3 KiB
JavaScript

import { ClearWindow, CreateWindow, GetFirstWindowId } from './Windows'
/*
Put here all dragonroll windows
*/
const defWindows = {
example: {
title: 'windows.example',
component: () => import('~/components/windows/ExampleWindow.vue'),
},
login: {
title: 'windows.login',
movable: false,
component: () => import('~/components/windows/LoginWindow.vue'),
},
register: {
title: 'windows.register',
movable: false,
component: () => import('~/components/windows/RegisterWindow.vue'),
},
main_menu: {
title: 'windows.main-menu',
component: () => import('~/components/windows/MainMenuWindow.vue'),
movable: true
},
settings: {
title: "windows.settings",
component: () => import('~/components/windows/SettingsWindow.vue'),
// The settings window is only opened from the main menu, so closing it goes back
// there: CreateWindow leaves a window that is already open alone.
close: () => {
ClearWindow({ type: 'settings' });
CreateWindow('main_menu');
},
movable: true
},
account_management: {
title: 'windows.account-management',
component: () => import('~/components/windows/AccountManagementWindow.vue'),
close: () => ClearWindow({type: 'account_management'}),
movable: true
},
create_campaign: {
title: "windows.create-campaign",
component: () => import('~/components/windows/CreateCampaignWindow.vue'),
close: () => ClearWindow({type: 'create_campaign'}),
movable: true
},
campaign_settings: {
title: 'campaigns.settings.title',
component: () => import('~/components/windows/CampaignSettingsWindow.vue'),
close: () => ClearWindow({type: 'campaign_settings'}),
movable: true
},
rename_note: {
title: "Rename Note",
component: () => import('~/components/windows/RenameNoteWindow.vue'),
close: () => ClearWindow({type: 'rename_note'}),
movable: true
},
new_folder: {
title: "New Folder",
component: () => import('~/components/windows/NewFolderWindow.vue'),
close: () => ClearWindow({type: 'new_folder'}),
movable: true
},
new_note: {
title: "New Note",
component: () => import('~/components/windows/NewNoteWindow.vue'),
close: () => ClearWindow({type: 'new_note'}),
movable: true
},
create_campaign_entry: {
title: 'campaigns.create-entry',
component: () => import('~/components/windows/CreateCampaignEntryWindow.vue'),
close: () => ClearWindow({type: 'create_campaign_entry'}),
movable: true
},
character_sheet: {
title: 'campaigns.character-sheet.title',
component: () => import('~/components/windows/CharacterSheetWindow.vue'),
close: () => ClearWindow({type: 'character_sheet'}),
movable: true
},
item_sheet: {
title: 'windows.item-sheet',
component: () => import('~/components/windows/ItemSheetWindow.vue'),
close: () => ClearWindow({type: 'item_sheet'}),
movable: true
},
item_icon_source: {
title: 'windows.icon-source',
component: () => import('~/components/windows/ItemIconSourceWindow.vue'),
close: () => ClearWindow({ type: 'item_icon_source' }),
movable: true
},
foundry_icons: {
title: 'windows.foundry-icons',
component: () => import('~/components/windows/FoundryIconPickerWindow.vue'),
// Back closes the icon browser and leaves the chooser it was opened from,
// which is still open behind it.
back: () => ClearWindow({ type: 'foundry_icons' }),
close: () => ClearWindow({ type: 'foundry_icons' }),
movable: true
},
create_map: {
title: 'windows.create-map',
component: () => import('~/components/windows/CreateMapWindow.vue'),
close: () => ClearWindow({type: 'create_map'}),
movable: true
},
map_viewer: {
title: 'windows.map-viewer',
component: () => import('~/components/windows/MapViewerWindow.vue'),
close: () => ClearWindow({type: 'map_viewer'}),
movable: true
},
pinned_note: {
title: 'windows.pinned-note',
component: () => import('~/components/windows/PinnedNoteWindow.vue'),
close: () => ClearWindow({type: 'pinned_note'}),
movable: true
},
documentation: {
title: 'windows.documentation',
component: () => import('~/components/windows/DocumentationWindow.vue'),
close: () => ClearWindow({type: 'documentation'}),
movable: true
}
}
export {
defWindows
}