Make dev settings show in the config when in localhost
This commit is contained in:
parent
d46d727a70
commit
713ab3fa00
1 changed files with 12 additions and 3 deletions
|
|
@ -1,16 +1,25 @@
|
|||
export function registerDevSettings() {
|
||||
const isLocalhost = window.location.hostname === `localhost`;
|
||||
|
||||
game.settings.register(game.system.id, `devMode`, {
|
||||
name: `Dev Mode?`,
|
||||
scope: `client`,
|
||||
type: Boolean,
|
||||
config: false,
|
||||
config: isLocalhost,
|
||||
default: false,
|
||||
requiresReload: true,
|
||||
requiresReload: false,
|
||||
});
|
||||
|
||||
game.settings.register(game.system.id, `defaultTab`, {
|
||||
name: `Default Sidebar Tab`,
|
||||
scope: `client`,
|
||||
type: String,
|
||||
config: false,
|
||||
config: isLocalhost,
|
||||
requiresReload: false,
|
||||
onChange(value) {
|
||||
if (!ui.sidebar.tabs[value]) {
|
||||
ui.notifications.warn(`"${value}" cannot be found in the sidebar tabs, it may not work at reload.`);
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue