Skip to content

Commit

Permalink
MM-58570 - Removing create a board button (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
asaadmahmood authored Jul 18, 2024
1 parent d6a516a commit e2844a2
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ const MainApp = (props: Props) => {
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<div id='focalboard-app'>
<App history={browserHistory}/>
<App history={browserHistory} />
</div>
<div id='focalboard-root-portal'/>
<div id='focalboard-root-portal' />
</WithWebSockets>
</ReduxProvider>
</ErrorBoundary>
Expand All @@ -160,7 +160,7 @@ const MainApp = (props: Props) => {
const HeaderComponent = () => {
return (
<ErrorBoundary>
<GlobalHeader history={browserHistory}/>
<GlobalHeader history={browserHistory} />
</ErrorBoundary>
)
}
Expand Down Expand Up @@ -218,7 +218,7 @@ export default class Plugin {
setMattermostTheme(JSON.parse(preference.value))
theme = preference.value
}
if(preference.category === 'display_settings' && preference.name === 'name_format'){
if (preference.category === 'display_settings' && preference.name === 'name_format') {
UserSettings.nameFormat = preference.value
}
}
Expand Down Expand Up @@ -287,20 +287,20 @@ export default class Plugin {
(props: {webSocketClient: MMWebSocketClient}) => (
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<RHSChannelBoards/>
<RHSChannelBoards />
</WithWebSockets>
</ReduxProvider>
),
<ErrorBoundary>
<ReduxProvider store={store}>
<RHSChannelBoardsHeader/>
<RHSChannelBoardsHeader />
</ReduxProvider>
</ErrorBoundary>
,
)
this.rhsId = rhsId

this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon/>, () => mmStore.dispatch(toggleRHSPlugin), 'Boards', 'Boards')
this.channelHeaderButtonId = registry.registerChannelHeaderButtonAction(<FocalboardIcon />, () => mmStore.dispatch(toggleRHSPlugin), 'Boards', 'Boards')

this.registry.registerProduct(
'/boards',
Expand All @@ -313,17 +313,6 @@ export default class Plugin {
true,
)

const goToFocalboardTemplate = () => {
const currentTeam = mmStore.getState().entities.teams.currentTeamId
const currentChannel = mmStore.getState().entities.channels.currentChannelId
TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ClickChannelIntro, {teamID: currentTeam})
window.open(`${windowAny.frontendBaseURL}/team/${currentTeam}/new/${currentChannel}`, '_blank', 'noopener')
}

if (registry.registerChannelIntroButtonAction) {
this.channelHeaderButtonId = registry.registerChannelIntroButtonAction(<FocalboardIcon/>, goToFocalboardTemplate, intl.formatMessage({id: 'ChannelIntro.CreateBoard', defaultMessage: 'Create a board'}))
}

if (this.registry.registerAppBarComponent) {
this.registry.registerAppBarComponent(Utils.buildURL(appBarIcon, true), () => mmStore.dispatch(toggleRHSPlugin), intl.formatMessage({id: 'AppBar.Tooltip', defaultMessage: 'Toggle Linked Boards'}))
}
Expand Down Expand Up @@ -361,7 +350,7 @@ export default class Plugin {
if (registry.registerSiteStatisticsHandler) {
registry.registerSiteStatisticsHandler(async () => {
const siteStats = await octoClient.getSiteStatistics()
if(siteStats){
if (siteStats) {
return {
boards_count: {
name: intl.formatMessage({id: 'SiteStats.total_boards', defaultMessage: 'Total Boards'}),
Expand All @@ -385,7 +374,7 @@ export default class Plugin {
this.boardSelectorId = this.registry.registerRootComponent((props: {webSocketClient: MMWebSocketClient}) => (
<ReduxProvider store={store}>
<WithWebSockets manifest={manifest} webSocketClient={props.webSocketClient}>
<BoardSelector/>
<BoardSelector />
</WithWebSockets>
</ReduxProvider>
))
Expand All @@ -406,7 +395,7 @@ export default class Plugin {
try {
rudderCfg.setCookieDomain = new URL(siteURL).hostname
// eslint-disable-next-line no-empty
} catch (_) {}
} catch (_) { }
}
rudderAnalytics.load(rudderKey, rudderUrl, rudderCfg)

Expand Down

0 comments on commit e2844a2

Please sign in to comment.