[MM-59483] Remove legacy preload and custom login code (#3174)

* Remove legacy preload script code

* Remove custom login code

* FIx i18n
This commit is contained in:
Devin Binnie
2024-10-25 10:02:56 -04:00
committed by GitHub
parent 14bb75eaed
commit 6d37cc2dbb
26 changed files with 72 additions and 1040 deletions

View File

@@ -1,53 +0,0 @@
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {Row, Button} from 'react-bootstrap';
import {FormattedMessage} from 'react-intl';
type Props = {
darkMode?: boolean;
goBack?: () => void;
show?: boolean;
};
export default class ExtraBar extends React.PureComponent<Props> {
handleBack = () => {
if (this.props.goBack) {
this.props.goBack();
}
};
render() {
let barClass = 'clear-mode';
if (!this.props.show) {
barClass = 'hidden';
} else if (this.props.darkMode) {
barClass = 'dark-mode';
}
return (
<Row
id={'extra-bar'}
className={barClass}
>
<div
className={'container-fluid'}
onClick={this.handleBack}
>
<Button
variant={'link'}
size={'sm'}
>
<span className={'backIcon icon-arrow-left'}/>
<span className={'backLabel'}>
<FormattedMessage
id='renderer.components.extraBar.back'
defaultMessage='Back'
/>
</span>
</Button>
</div>
</Row>
);
}
}

View File

@@ -15,7 +15,6 @@ import type {DownloadedItems} from 'types/downloads';
import DeveloperModeIndicator from './DeveloperModeIndicator';
import DownloadsDropdownButton from './DownloadsDropdown/DownloadsDropdownButton';
import ErrorView from './ErrorView';
import ExtraBar from './ExtraBar';
import ServerDropdownButton from './ServerDropdownButton';
import TabBar from './TabBar';
@@ -50,7 +49,6 @@ type State = {
tabViewStatus: Map<string, TabViewStatus>;
modalOpen?: boolean;
fullScreen?: boolean;
showExtraBar?: boolean;
isMenuOpen: boolean;
isDownloadsDropdownOpen: boolean;
showDownloadsBadge: boolean;
@@ -210,10 +208,6 @@ class MainPage extends React.PureComponent<Props, State> {
this.setState({modalOpen: false});
});
window.desktop.onToggleBackButton((showExtraBar) => {
this.setState({showExtraBar});
});
window.desktop.onUpdateMentions((view, mentions, unreads, isExpired) => {
const {unreadCounts, mentionCounts, sessionsExpired} = this.state;
@@ -532,13 +526,6 @@ class MainPage extends React.PureComponent<Props, State> {
const viewsRow = (
<Fragment>
<ExtraBar
darkMode={this.props.darkMode}
show={this.state.showExtraBar}
goBack={() => {
window.desktop.goBack();
}}
/>
<Row>
{views()}
</Row>