Add opening channel/guild settings window
This commit is contained in:
parent
4d5a403d6d
commit
ac22b14358
|
@ -36,6 +36,8 @@ export const Modules = {
|
||||||
get UserSettingsStore() { return this._getModule('UserSettingsStore'); },
|
get UserSettingsStore() { return this._getModule('UserSettingsStore'); },
|
||||||
get UserSettingsWindow() { return this._getModule('UserSettingsWindow'); },
|
get UserSettingsWindow() { return this._getModule('UserSettingsWindow'); },
|
||||||
get UserStatusStore() { return this._getModule('UserStatusStore'); },
|
get UserStatusStore() { return this._getModule('UserStatusStore'); },
|
||||||
|
get ChannelSettingsWindow() { return this._getModule('ChannelSettingsWindow'); },
|
||||||
|
get GuildSettingsWindow() { return this._getModule('GuildSettingsWindow'); },
|
||||||
|
|
||||||
get DiscordPermissions() { return this.DiscordConstants.Permissions; }
|
get DiscordPermissions() { return this.DiscordConstants.Permissions; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -181,8 +181,10 @@ const KnownModules = {
|
||||||
|
|
||||||
/* DOM/React Components */
|
/* DOM/React Components */
|
||||||
/* ==================== */
|
/* ==================== */
|
||||||
UserSettingsWindow: Filters.byProperties(['open', 'updateAccount']),
|
|
||||||
LayerManager: Filters.byProperties(['popLayer', 'pushLayer']),
|
LayerManager: Filters.byProperties(['popLayer', 'pushLayer']),
|
||||||
|
UserSettingsWindow: Filters.byProperties(['open', 'updateAccount']),
|
||||||
|
ChannelSettingsWindow: Filters.byProperties(['open', 'updateChannel']),
|
||||||
|
GuildSettingsWindow: Filters.byProperties(['open', 'updateGuild']),
|
||||||
|
|
||||||
/* Modals */
|
/* Modals */
|
||||||
ModalStack: Filters.byProperties(['push', 'update', 'pop', 'popWithKey']),
|
ModalStack: Filters.byProperties(['push', 'update', 'pop', 'popWithKey']),
|
||||||
|
@ -313,4 +315,7 @@ export class WebpackModules {
|
||||||
return Object.keys(KnownModules);
|
return Object.keys(KnownModules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get Filters() { return Filters }
|
||||||
|
static get KnownModules() { return KnownModules }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,15 @@ export class Channel {
|
||||||
Modules.NavigationUtils.transitionToGuild(this.guild_id ? this.guild_id : Modules.DiscordConstants.ME, this.id);
|
Modules.NavigationUtils.transitionToGuild(this.guild_id ? this.guild_id : Modules.DiscordConstants.ME, this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens this channel's settings window.
|
||||||
|
* @param {String} section The section to open (see DiscordConstants.ChannelSettingsSections)
|
||||||
|
*/
|
||||||
|
openSettings(section = 'OVERVIEW') {
|
||||||
|
Modules.ChannelSettingsWindow.open(this.id);
|
||||||
|
Modules.ChannelSettingsWindow.setSection(section);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PermissionOverwrite {
|
export class PermissionOverwrite {
|
||||||
|
|
|
@ -173,6 +173,15 @@ export class Guild {
|
||||||
Modules.GuildActions.selectGuild(this.id);
|
Modules.GuildActions.selectGuild(this.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens this guild's settings window.
|
||||||
|
* @param {String} section The section to open (see DiscordConstants.GuildSettingsSections)
|
||||||
|
*/
|
||||||
|
openSettings(section = 'OVERVIEW') {
|
||||||
|
Modules.GuildSettingsWindow.open(this.id);
|
||||||
|
Modules.GuildSettingsWindow.setSection(section);
|
||||||
|
}
|
||||||
|
|
||||||
nsfwAgree() {
|
nsfwAgree() {
|
||||||
Modules.GuildActions.nsfwAgree(this.id);
|
Modules.GuildActions.nsfwAgree(this.id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue