From b6456a675d140d6d80eb0874a5b6a89008e28eaa Mon Sep 17 00:00:00 2001 From: David Meza Date: Fri, 1 Sep 2017 13:21:09 -0500 Subject: Add x to be able to leave public and private channels (#7145) * Add config value EnableXToLeaveChannelsFromLHS that if true displays x to the right of private and public channels on the LHS. * Displays x to the right of private and public channels on the LHS based on if EnableXToLeaveChannelsFromLHS=true. * change the tooltip for private and public channels to `Leave channel` * Add client-side event for when user clicks the "x" button. Different for public, private, DM. --- model/config.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'model') diff --git a/model/config.go b/model/config.go index 58b3da4d1..a801f7f99 100644 --- a/model/config.go +++ b/model/config.go @@ -350,6 +350,7 @@ type TeamSettings struct { RestrictPublicChannelDeletion *string RestrictPrivateChannelDeletion *string RestrictPrivateChannelManageMembers *string + EnableXToLeaveChannelsFromLHS *bool UserStatusAwayTimeout *int64 MaxChannelsPerTeam *int64 MaxNotificationsPerChannel *int64 @@ -810,6 +811,11 @@ func (o *Config) SetDefaults() { *o.TeamSettings.RestrictPrivateChannelManageMembers = PERMISSIONS_ALL } + if o.TeamSettings.EnableXToLeaveChannelsFromLHS == nil { + o.TeamSettings.EnableXToLeaveChannelsFromLHS = new(bool) + *o.TeamSettings.EnableXToLeaveChannelsFromLHS = false + } + if o.TeamSettings.UserStatusAwayTimeout == nil { o.TeamSettings.UserStatusAwayTimeout = new(int64) *o.TeamSettings.UserStatusAwayTimeout = TEAM_SETTINGS_DEFAULT_USER_STATUS_AWAY_TIMEOUT -- cgit v1.2.3-1-g7c22