[MM-59060] Remove pre release features section from advanced section of user settings (#27608)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eaa3c86a6a
Коммит
e2d7d2d23c
@@ -60,10 +60,6 @@ describe('Verify Accessibility Support in different sections in Settings and Pro
|
||||
{key: 'advancedCtrlSend', label: `Send Messages on ${isMac() ? '⌘+ENTER' : 'CTRL+ENTER'}`, type: 'radio'},
|
||||
{key: 'formatting', label: 'Enable Post Formatting', type: 'radio'},
|
||||
{key: 'joinLeave', label: 'Enable Join/Leave Messages', type: 'radio'},
|
||||
|
||||
// As only setting in advancedPreviewFeatures was related to editor preview this isn't required at the moment,
|
||||
// may later on we can add it if we add more settings inside it
|
||||
// {key: 'advancedPreviewFeatures', label: 'Preview Pre-release Features', type: 'checkbox'},
|
||||
],
|
||||
};
|
||||
let url;
|
||||
|
||||
@@ -14,7 +14,6 @@ describe('Messaging', () => {
|
||||
before(() => {
|
||||
// # Login as test user and visit off-topic
|
||||
cy.apiInitSetup({loginAfter: true}).then(({offTopicUrl}) => {
|
||||
cy.apiSaveShowMarkdownPreviewPreference();
|
||||
cy.visit(offTopicUrl);
|
||||
cy.postMessage('hello');
|
||||
});
|
||||
|
||||
@@ -143,8 +143,6 @@ describe('Message', () => {
|
||||
});
|
||||
|
||||
it('MM-T3307 Focus remains in the RHS text box', () => {
|
||||
cy.apiSaveShowMarkdownPreviewPreference();
|
||||
|
||||
cy.postMessage(MESSAGES.MEDIUM);
|
||||
|
||||
// # Open reply thread (RHS)
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
"EnableUserStatuses": true,
|
||||
"ExperimentalEnableAuthenticationTransfer": true,
|
||||
"ClusterLogTimeoutMilliseconds": 2000,
|
||||
"EnablePreviewFeatures": true,
|
||||
"EnableTutorial": true,
|
||||
"EnableOnboardingFlow": false,
|
||||
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
"EnableUserStatuses": true,
|
||||
"ExperimentalEnableAuthenticationTransfer": true,
|
||||
"ClusterLogTimeoutMilliseconds": 2000,
|
||||
"EnablePreviewFeatures": true,
|
||||
"EnableTutorial": true,
|
||||
"EnableOnboardingFlow": false,
|
||||
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
|
||||
|
||||
@@ -76,24 +76,6 @@ Cypress.Commands.add('apiSaveMessageDisplayPreference', (value = 'clean') => {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Saves show markdown preview option preference of a user directly via API
|
||||
* This API assume that the user is logged in and has cookie to access
|
||||
* @param {String} value - Either "true" to show the options (default) or "false"
|
||||
*/
|
||||
Cypress.Commands.add('apiSaveShowMarkdownPreviewPreference', (value = 'true') => {
|
||||
return cy.getCookie('MMUSERID').then((cookie) => {
|
||||
const preference = {
|
||||
user_id: cookie.value,
|
||||
category: 'advanced_settings',
|
||||
name: 'feature_enabled_markdown_preview',
|
||||
value,
|
||||
};
|
||||
|
||||
return cy.apiSaveUserPreference([preference]);
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Saves teammate name display preference of a user directly via API
|
||||
* This API assume that the user is logged in and has cookie to access
|
||||
|
||||
@@ -159,7 +159,6 @@ const defaultServerConfig: AdminConfig = {
|
||||
EnableUserStatuses: true,
|
||||
ExperimentalEnableAuthenticationTransfer: true,
|
||||
ClusterLogTimeoutMilliseconds: 2000,
|
||||
EnablePreviewFeatures: true,
|
||||
EnableTutorial: true,
|
||||
EnableOnboardingFlow: true,
|
||||
ExperimentalEnableDefaultChannelLeaveJoinMessages: true,
|
||||
|
||||
@@ -41,7 +41,6 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
|
||||
props["EnableClientPerformanceDebugging"] = strconv.FormatBool(*c.ServiceSettings.EnableClientPerformanceDebugging)
|
||||
props["PostEditTimeLimit"] = strconv.Itoa(*c.ServiceSettings.PostEditTimeLimit)
|
||||
props["MinimumHashtagLength"] = strconv.Itoa(*c.ServiceSettings.MinimumHashtagLength)
|
||||
props["EnablePreviewFeatures"] = strconv.FormatBool(*c.ServiceSettings.EnablePreviewFeatures)
|
||||
props["EnableTutorial"] = strconv.FormatBool(*c.ServiceSettings.EnableTutorial)
|
||||
props["EnableOnboardingFlow"] = strconv.FormatBool(*c.ServiceSettings.EnableOnboardingFlow)
|
||||
props["ExperimentalEnableDefaultChannelLeaveJoinMessages"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages)
|
||||
|
||||
@@ -456,7 +456,6 @@ func (ts *TelemetryService) trackConfig() {
|
||||
"enable_post_search": *cfg.ServiceSettings.EnablePostSearch,
|
||||
"minimum_hashtag_length": *cfg.ServiceSettings.MinimumHashtagLength,
|
||||
"enable_user_statuses": *cfg.ServiceSettings.EnableUserStatuses,
|
||||
"enable_preview_features": *cfg.ServiceSettings.EnablePreviewFeatures,
|
||||
"enable_tutorial": *cfg.ServiceSettings.EnableTutorial,
|
||||
"enable_onboarding_flow": *cfg.ServiceSettings.EnableOnboardingFlow,
|
||||
"experimental_enable_default_channel_leave_join_messages": *cfg.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages,
|
||||
|
||||
@@ -374,7 +374,6 @@ type ServiceSettings struct {
|
||||
EnableUserStatuses *bool `access:"write_restrictable,cloud_restrictable"`
|
||||
ExperimentalEnableAuthenticationTransfer *bool `access:"experimental_features"`
|
||||
ClusterLogTimeoutMilliseconds *int `access:"write_restrictable,cloud_restrictable"`
|
||||
EnablePreviewFeatures *bool `access:"experimental_features"`
|
||||
EnableTutorial *bool `access:"experimental_features"`
|
||||
EnableOnboardingFlow *bool `access:"experimental_features"`
|
||||
ExperimentalEnableDefaultChannelLeaveJoinMessages *bool `access:"experimental_features"`
|
||||
@@ -775,10 +774,6 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
s.PostEditTimeLimit = NewInt(-1)
|
||||
}
|
||||
|
||||
if s.EnablePreviewFeatures == nil {
|
||||
s.EnablePreviewFeatures = NewBool(true)
|
||||
}
|
||||
|
||||
if s.ExperimentalEnableDefaultChannelLeaveJoinMessages == nil {
|
||||
s.ExperimentalEnableDefaultChannelLeaveJoinMessages = NewBool(true)
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
"EnableUserStatuses": true,
|
||||
"ExperimentalEnableAuthenticationTransfer": true,
|
||||
"ClusterLogTimeoutMilliseconds": 2000,
|
||||
"EnablePreviewFeatures": true,
|
||||
"EnableTutorial": true,
|
||||
"EnableOnboardingFlow": true,
|
||||
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
|
||||
|
||||
@@ -6054,14 +6054,6 @@ const AdminDefinition: AdminDefinitionType = {
|
||||
help_text_markdown: false,
|
||||
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
|
||||
},
|
||||
{
|
||||
type: 'bool',
|
||||
key: 'ServiceSettings.EnablePreviewFeatures',
|
||||
label: defineMessage({id: 'admin.experimental.enablePreviewFeatures.title', defaultMessage: 'Enable Preview Features:'}),
|
||||
help_text: defineMessage({id: 'admin.experimental.enablePreviewFeatures.desc', defaultMessage: 'When true, preview features can be enabled from **Settings > Advanced > Preview pre-release features**. When false, disables and hides preview features from **Settings > Advanced > Preview pre-release features**.'}),
|
||||
help_text_markdown: true,
|
||||
isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)),
|
||||
},
|
||||
{
|
||||
type: 'bool',
|
||||
key: 'ThemeSettings.EnableThemeSelection',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import type {ConnectedProps} from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import type {Dispatch} from 'redux';
|
||||
@@ -20,8 +21,8 @@ import {Preferences} from 'utils/constants';
|
||||
|
||||
import type {GlobalState} from 'types/store';
|
||||
|
||||
import type {OwnProps} from './user_settings_advanced';
|
||||
import AdvancedSettingsDisplay from './user_settings_advanced';
|
||||
import type {OwnProps} from './user_settings_advanced';
|
||||
|
||||
function makeMapStateToProps(state: GlobalState, props: OwnProps) {
|
||||
const getAdvancedSettingsCategory = props.adminMode ? makeGetUserCategory(props.user.id) : makeGetCategory();
|
||||
@@ -29,7 +30,6 @@ function makeMapStateToProps(state: GlobalState, props: OwnProps) {
|
||||
return (state: GlobalState, props: OwnProps) => {
|
||||
const config = getConfig(state);
|
||||
|
||||
const enablePreviewFeatures = config.EnablePreviewFeatures === 'true';
|
||||
const enableUserDeactivation = config.EnableUserDeactivation === 'true';
|
||||
const enableJoinLeaveMessage = config.EnableJoinLeaveMessageByDefault === 'true';
|
||||
|
||||
@@ -44,7 +44,6 @@ function makeMapStateToProps(state: GlobalState, props: OwnProps) {
|
||||
syncDrafts: get(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'sync_drafts', 'true', userPreferences),
|
||||
user: props.adminMode && props.user ? props.user : getCurrentUser(state),
|
||||
unreadScrollPosition: getUnreadScrollPositionPreference(state, userPreferences),
|
||||
enablePreviewFeatures,
|
||||
enableUserDeactivation,
|
||||
syncedDraftsAreAllowed: syncedDraftsAreAllowed(state),
|
||||
};
|
||||
@@ -61,4 +60,8 @@ function mapDispatchToProps(dispatch: Dispatch) {
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(makeMapStateToProps, mapDispatchToProps)(AdvancedSettingsDisplay);
|
||||
const connector = connect(makeMapStateToProps, mapDispatchToProps);
|
||||
|
||||
export type PropsFromRedux = ConnectedProps<typeof connector>;
|
||||
|
||||
export default connector(AdvancedSettingsDisplay);
|
||||
|
||||
@@ -44,7 +44,6 @@ describe('components/user_settings/display/UserSettingsDisplay', () => {
|
||||
syncDrafts: '',
|
||||
unreadScrollPosition: Preferences.UNREAD_SCROLL_POSITION_START_FROM_LEFT,
|
||||
codeBlockOnCtrlEnter: 'false',
|
||||
enablePreviewFeatures: false,
|
||||
enableUserDeactivation: false,
|
||||
syncedDraftsAreAllowed: true,
|
||||
};
|
||||
|
||||
@@ -10,8 +10,6 @@ import {FormattedMessage, defineMessages} from 'react-intl';
|
||||
import type {PreferencesType, PreferenceType} from '@mattermost/types/preferences';
|
||||
import type {UserProfile} from '@mattermost/types/users';
|
||||
|
||||
import type {ActionResult} from 'mattermost-redux/types/actions';
|
||||
|
||||
import {emitUserLoggedOutEvent} from 'actions/global_actions';
|
||||
|
||||
import ConfirmModal from 'components/confirm_modal';
|
||||
@@ -20,7 +18,7 @@ import SettingItemMax from 'components/setting_item_max';
|
||||
|
||||
import Constants, {AdvancedSections, Preferences} from 'utils/constants';
|
||||
import {isMac} from 'utils/user_agent';
|
||||
import {a11yFocus, localizeMessage} from 'utils/utils';
|
||||
import {a11yFocus} from 'utils/utils';
|
||||
|
||||
import JoinLeaveSection from './join_leave_section';
|
||||
import PerformanceDebuggingSection from './performance_debugging_section';
|
||||
@@ -28,8 +26,7 @@ import PerformanceDebuggingSection from './performance_debugging_section';
|
||||
import SettingDesktopHeader from '../headers/setting_desktop_header';
|
||||
import SettingMobileHeader from '../headers/setting_mobile_header';
|
||||
|
||||
type PreReleaseFeaturesType = Record<string, {label: string; description: string}>;
|
||||
const PreReleaseFeatures: PreReleaseFeaturesType = Constants.PRE_RELEASE_FEATURES;
|
||||
import type {PropsFromRedux} from './index';
|
||||
|
||||
type Settings = {
|
||||
[key: string]: string | undefined;
|
||||
@@ -44,39 +41,19 @@ export type OwnProps = {
|
||||
adminMode?: boolean;
|
||||
user: UserProfile;
|
||||
userPreferences?: PreferencesType;
|
||||
}
|
||||
|
||||
export type Props = OwnProps & {
|
||||
advancedSettingsCategory: PreferenceType[];
|
||||
sendOnCtrlEnter: string;
|
||||
codeBlockOnCtrlEnter: string;
|
||||
formatting: string;
|
||||
joinLeave: string;
|
||||
unreadScrollPosition: string;
|
||||
syncDrafts: string;
|
||||
updateSection: (section?: string) => void;
|
||||
activeSection: string;
|
||||
closeModal: () => void;
|
||||
collapseModal: () => void;
|
||||
enablePreviewFeatures: boolean;
|
||||
enableUserDeactivation: boolean;
|
||||
syncedDraftsAreAllowed: boolean;
|
||||
actions: {
|
||||
savePreferences: (userId: string, preferences: PreferenceType[]) => Promise<ActionResult>;
|
||||
updateUserActive: (userId: string, active: boolean) => Promise<ActionResult>;
|
||||
revokeAllSessionsForUser: (userId: string) => Promise<ActionResult>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type Props = OwnProps & PropsFromRedux;
|
||||
|
||||
type State = {
|
||||
preReleaseFeatures: PreReleaseFeaturesType;
|
||||
settings: Settings;
|
||||
enabledFeatures: number;
|
||||
isSaving: boolean;
|
||||
previewFeaturesEnabled: boolean;
|
||||
showDeactivateAccountModal: boolean;
|
||||
serverError: string;
|
||||
preReleaseFeaturesKeys: string[];
|
||||
}
|
||||
|
||||
export default class AdvancedSettingsDisplay extends React.PureComponent<Props, State> {
|
||||
@@ -87,7 +64,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
}
|
||||
|
||||
getStateFromProps = (): State => {
|
||||
const advancedSettings = this.props.advancedSettingsCategory;
|
||||
const settings: Settings = {
|
||||
send_on_ctrl_enter: this.props.sendOnCtrlEnter,
|
||||
code_block_ctrl_enter: this.props.codeBlockOnCtrlEnter,
|
||||
@@ -97,36 +73,13 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
[Preferences.UNREAD_SCROLL_POSITION]: this.props.unreadScrollPosition,
|
||||
};
|
||||
|
||||
const PreReleaseFeaturesLocal = JSON.parse(JSON.stringify(PreReleaseFeatures));
|
||||
const preReleaseFeaturesKeys = Object.keys(PreReleaseFeaturesLocal);
|
||||
|
||||
let enabledFeatures = 0;
|
||||
for (const as of advancedSettings) {
|
||||
for (const key of preReleaseFeaturesKeys) {
|
||||
const feature = PreReleaseFeaturesLocal[key];
|
||||
|
||||
if (as.name === Constants.FeatureTogglePrefix + feature.label) {
|
||||
settings[as.name] = as.value;
|
||||
|
||||
if (as.value === 'true') {
|
||||
enabledFeatures += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const isSaving = false;
|
||||
|
||||
const previewFeaturesEnabled = this.props.enablePreviewFeatures;
|
||||
const showDeactivateAccountModal = false;
|
||||
|
||||
return {
|
||||
preReleaseFeatures: PreReleaseFeaturesLocal,
|
||||
settings,
|
||||
preReleaseFeaturesKeys,
|
||||
enabledFeatures,
|
||||
isSaving,
|
||||
previewFeaturesEnabled,
|
||||
showDeactivateAccountModal,
|
||||
serverError: '',
|
||||
};
|
||||
@@ -140,31 +93,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
a11yFocus(e?.currentTarget as HTMLElement);
|
||||
};
|
||||
|
||||
toggleFeature = (feature: string, checked: boolean): void => {
|
||||
const {settings} = this.state;
|
||||
settings[Constants.FeatureTogglePrefix + feature] = String(checked);
|
||||
|
||||
let enabledFeatures = 0;
|
||||
Object.keys(this.state.settings).forEach((setting) => {
|
||||
if (setting.lastIndexOf(Constants.FeatureTogglePrefix) === 0 && this.state.settings[setting] === 'true') {
|
||||
enabledFeatures++;
|
||||
}
|
||||
});
|
||||
|
||||
this.setState({settings, enabledFeatures});
|
||||
};
|
||||
|
||||
saveEnabledFeatures = (): void => {
|
||||
const features: string[] = [];
|
||||
Object.keys(this.state.settings).forEach((setting) => {
|
||||
if (setting.lastIndexOf(Constants.FeatureTogglePrefix) === 0) {
|
||||
features.push(setting);
|
||||
}
|
||||
});
|
||||
|
||||
this.handleSubmit(features);
|
||||
};
|
||||
|
||||
handleSubmit = async (settings: string[]): Promise<void> => {
|
||||
if (!this.props.user) {
|
||||
return;
|
||||
@@ -585,20 +513,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
);
|
||||
};
|
||||
|
||||
renderFeatureLabel(feature: string): ReactNode {
|
||||
switch (feature) {
|
||||
case 'MARKDOWN_PREVIEW':
|
||||
return (
|
||||
<FormattedMessage
|
||||
id='user.settings.advance.markdown_preview'
|
||||
defaultMessage='Show markdown preview option in message input box'
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
renderCtrlSendSection = () => {
|
||||
const active = this.props.activeSection === 'advancedCtrlSend';
|
||||
const serverError = this.state.serverError || null;
|
||||
@@ -710,79 +624,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
);
|
||||
};
|
||||
|
||||
renderPreviewFeaturesSection = () => {
|
||||
const serverError = this.state.serverError || null;
|
||||
const active = this.props.activeSection === 'advancedPreviewFeatures';
|
||||
let max = null;
|
||||
if (active) {
|
||||
const inputs = [];
|
||||
|
||||
this.state.preReleaseFeaturesKeys.forEach((key) => {
|
||||
const feature = this.state.preReleaseFeatures[key as keyof PreReleaseFeaturesType];
|
||||
inputs.push(
|
||||
<div key={'advancedPreviewFeatures_' + feature.label}>
|
||||
<div className='checkbox'>
|
||||
<label>
|
||||
<input
|
||||
id={'advancedPreviewFeatures' + feature.label}
|
||||
type='checkbox'
|
||||
checked={this.state.settings[Constants.FeatureTogglePrefix + feature.label] === 'true'}
|
||||
onChange={(e) => {
|
||||
this.toggleFeature(feature.label, e.target.checked);
|
||||
}}
|
||||
/>
|
||||
{this.renderFeatureLabel(key)}
|
||||
</label>
|
||||
</div>
|
||||
</div>,
|
||||
);
|
||||
});
|
||||
|
||||
inputs.push(
|
||||
<div key='advancedPreviewFeatures_helptext'>
|
||||
<br/>
|
||||
<FormattedMessage
|
||||
id='user.settings.advance.preReleaseDesc'
|
||||
defaultMessage="Check any pre-released features you'd like to preview. You may also need to refresh the page before the setting will take effect."
|
||||
/>
|
||||
</div>,
|
||||
);
|
||||
|
||||
max = (
|
||||
<SettingItemMax
|
||||
title={
|
||||
<FormattedMessage
|
||||
id='user.settings.advance.preReleaseTitle'
|
||||
defaultMessage='Preview Pre-release Features'
|
||||
/>
|
||||
}
|
||||
inputs={inputs}
|
||||
submit={this.saveEnabledFeatures}
|
||||
saving={this.state.isSaving}
|
||||
serverError={serverError}
|
||||
updateSection={this.handleUpdateSection}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<SettingItem
|
||||
active={active}
|
||||
areAllSectionsInactive={this.props.activeSection === ''}
|
||||
title={localizeMessage('user.settings.advance.preReleaseTitle', 'Preview Pre-release Features')}
|
||||
describe={
|
||||
<FormattedMessage
|
||||
id='user.settings.advance.enabledFeatures'
|
||||
defaultMessage='{count, number} {count, plural, one {feature} other {features}} enabled'
|
||||
values={{count: this.state.enabledFeatures}}
|
||||
/>
|
||||
}
|
||||
section={'advancedPreviewFeatures'}
|
||||
updateSection={this.handleUpdateSection}
|
||||
max={max}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
const ctrlSendSection = this.renderCtrlSendSection();
|
||||
|
||||
@@ -792,15 +633,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
formattingSectionDivider = <div className='divider-light'/>;
|
||||
}
|
||||
|
||||
let previewFeaturesSection;
|
||||
let previewFeaturesSectionDivider;
|
||||
if (this.state.previewFeaturesEnabled && this.state.preReleaseFeaturesKeys.length > 0) {
|
||||
previewFeaturesSectionDivider = (
|
||||
<div className='divider-light'/>
|
||||
);
|
||||
previewFeaturesSection = this.renderPreviewFeaturesSection();
|
||||
}
|
||||
|
||||
let deactivateAccountSection: ReactNode = '';
|
||||
let makeConfirmationModal: ReactNode = '';
|
||||
|
||||
@@ -940,8 +772,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent<Props,
|
||||
userPreferences={this.props.userPreferences}
|
||||
userId={this.props.user.id}
|
||||
/>
|
||||
{previewFeaturesSectionDivider}
|
||||
{previewFeaturesSection}
|
||||
<PerformanceDebuggingSection
|
||||
active={this.props.activeSection === AdvancedSections.PERFORMANCE_DEBUGGING}
|
||||
onUpdateSection={this.handleUpdateSection}
|
||||
|
||||
@@ -934,8 +934,6 @@
|
||||
"admin.experimental.enableChannelViewedMessages.title": "Enable Channel Viewed WebSocket Messages:",
|
||||
"admin.experimental.enableOnboardingFlow.desc": "When true, new users are shown steps to complete as part of an onboarding process",
|
||||
"admin.experimental.enableOnboardingFlow.title": "Enable Onboarding:",
|
||||
"admin.experimental.enablePreviewFeatures.desc": "When true, preview features can be enabled from **Settings > Advanced > Preview pre-release features**. When false, disables and hides preview features from **Settings > Advanced > Preview pre-release features**.",
|
||||
"admin.experimental.enablePreviewFeatures.title": "Enable Preview Features:",
|
||||
"admin.experimental.enableSharedChannels.desc": "When true, users who have permission to manage shared channels can configure another Mattermost server to synchronize and share a channel. Disabling shared channels stops synchronizing the channel with the other Mattermost server, however the channel continues to function for local users per normal channel behavior.",
|
||||
"admin.experimental.enableSharedChannels.title": "Enable Shared Channels:",
|
||||
"admin.experimental.enableThemeSelection.desc": "Enables the **Display > Theme** tab in Settings so users can select their theme.",
|
||||
@@ -5317,13 +5315,11 @@
|
||||
"user.settings.advance.deactivateAccountTitle": "Deactivate Account",
|
||||
"user.settings.advance.deactivateDesc": "Deactivating your account removes your ability to log in to this server and disables all email and mobile notifications. To reactivate your account, contact your System Administrator.",
|
||||
"user.settings.advance.deactivateDescShort": "Click 'Edit' to deactivate your account",
|
||||
"user.settings.advance.enabledFeatures": "{count, number} {count, plural, one {feature} other {features}} enabled",
|
||||
"user.settings.advance.formattingDesc": "If enabled, posts will be formatted to create links, show emoji, style the text, and add line breaks. By default, this setting is enabled.",
|
||||
"user.settings.advance.formattingTitle": "Enable Post Formatting",
|
||||
"user.settings.advance.icon": "Advanced Settings Icon",
|
||||
"user.settings.advance.joinLeaveDesc": "When \"On\", System Messages saying a user has joined or left a channel will be visible. When \"Off\", the System Messages about joining or leaving a channel will be hidden. A message will still show up when you are added to a channel, so you can receive a notification.",
|
||||
"user.settings.advance.joinLeaveTitle": "Enable Join/Leave Messages",
|
||||
"user.settings.advance.markdown_preview": "Show markdown preview option in message input box",
|
||||
"user.settings.advance.off": "Off",
|
||||
"user.settings.advance.on": "On",
|
||||
"user.settings.advance.onForAllMessages": "On for all messages",
|
||||
@@ -5336,8 +5332,6 @@
|
||||
"user.settings.advance.performance.noneEnabled": "No settings enabled",
|
||||
"user.settings.advance.performance.settingsEnabled": "{count, number} {count, plural, one {setting} other {settings}} enabled",
|
||||
"user.settings.advance.performance.title": "Performance Debugging",
|
||||
"user.settings.advance.preReleaseDesc": "Check any pre-released features you'd like to preview. You may also need to refresh the page before the setting will take effect.",
|
||||
"user.settings.advance.preReleaseTitle": "Preview Pre-release Features",
|
||||
"user.settings.advance.sendDesc": "When enabled, CTRL + ENTER will send the message and ENTER inserts a new line.",
|
||||
"user.settings.advance.sendDesc.mac": "When enabled, ⌘ + ENTER will send the message and ENTER inserts a new line.",
|
||||
"user.settings.advance.sendTitle": "Send Messages on CTRL+ENTER",
|
||||
|
||||
@@ -1025,7 +1025,6 @@ export const AdvancedSections = {
|
||||
CONTROL_SEND: 'advancedCtrlSend',
|
||||
FORMATTING: 'formatting',
|
||||
JOIN_LEAVE: 'joinLeave',
|
||||
PREVIEW_FEATURES: 'advancedPreviewFeatures',
|
||||
PERFORMANCE_DEBUGGING: 'performanceDebugging',
|
||||
SYNC_DRAFTS: 'syncDrafts',
|
||||
};
|
||||
@@ -1980,8 +1979,6 @@ export const Constants = {
|
||||
COMMAND_SUGGESTION_CHANNEL: 'channel',
|
||||
COMMAND_SUGGESTION_USER: 'user',
|
||||
},
|
||||
FeatureTogglePrefix: 'feature_enabled_',
|
||||
PRE_RELEASE_FEATURES: {},
|
||||
OVERLAY_TIME_DELAY_SMALL: 100,
|
||||
OVERLAY_TIME_DELAY: 400,
|
||||
OVERLAY_DEFAULT_TRIGGER: ['hover', 'focus'],
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
getMyChannelMemberships,
|
||||
} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getPost} from 'mattermost-redux/selectors/entities/posts';
|
||||
import {getBool, getTeammateNameDisplaySetting, isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import {getTeammateNameDisplaySetting, isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import type {Theme} from 'mattermost-redux/selectors/entities/preferences';
|
||||
import {
|
||||
getTeamByName,
|
||||
@@ -1123,11 +1123,6 @@ export function getUserIdFromChannelId(channelId: Channel['id'], currentUserId =
|
||||
return otherUserId;
|
||||
}
|
||||
|
||||
// Should be refactored, seems to make most sense to wrap TextboxLinks in a connect(). To discuss
|
||||
export function isFeatureEnabled(feature: {label: string}, state: GlobalState) {
|
||||
return getBool(state, Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, Constants.FeatureTogglePrefix + feature.label);
|
||||
}
|
||||
|
||||
export function fillRecord<T>(value: T, length: number): Record<number, T> {
|
||||
const arr: Record<number, T> = {};
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@ export type ClientConfig = {
|
||||
EnableOutgoingWebhooks: string;
|
||||
EnablePostIconOverride: string;
|
||||
EnablePostUsernameOverride: string;
|
||||
EnablePreviewFeatures: string;
|
||||
EnablePreviewModeBanner: string;
|
||||
EnablePublicLink: string;
|
||||
EnableReliableWebSockets: string;
|
||||
@@ -357,7 +356,6 @@ export type ServiceSettings = {
|
||||
EnableUserStatuses: boolean;
|
||||
ExperimentalEnableAuthenticationTransfer: boolean;
|
||||
ClusterLogTimeoutMilliseconds: number;
|
||||
EnablePreviewFeatures: boolean;
|
||||
EnableTutorial: boolean;
|
||||
EnableOnboardingFlow: boolean;
|
||||
ExperimentalEnableDefaultChannelLeaveJoinMessages: boolean;
|
||||
|
||||
Ссылка в новой задаче
Block a user