Remove feature_many_integration_managers
Rationale: If we want this feature, design will do it properly.
This commit is contained in:
parent
aa664b88a4
commit
2aec197354
13 changed files with 16 additions and 358 deletions
|
@ -126,7 +126,6 @@
|
||||||
@import "./views/dialogs/_SpacePreferencesDialog.scss";
|
@import "./views/dialogs/_SpacePreferencesDialog.scss";
|
||||||
@import "./views/dialogs/_SpaceSettingsDialog.scss";
|
@import "./views/dialogs/_SpaceSettingsDialog.scss";
|
||||||
@import "./views/dialogs/_SpotlightDialog.scss";
|
@import "./views/dialogs/_SpotlightDialog.scss";
|
||||||
@import "./views/dialogs/_TabbedIntegrationManagerDialog.scss";
|
|
||||||
@import "./views/dialogs/_TermsDialog.scss";
|
@import "./views/dialogs/_TermsDialog.scss";
|
||||||
@import "./views/dialogs/_UntrustedDeviceDialog.scss";
|
@import "./views/dialogs/_UntrustedDeviceDialog.scss";
|
||||||
@import "./views/dialogs/_UploadConfirmDialog.scss";
|
@import "./views/dialogs/_UploadConfirmDialog.scss";
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
.mx_TabbedIntegrationManagerDialog .mx_Dialog {
|
|
||||||
width: 60%;
|
|
||||||
height: 70%;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
|
||||||
max-width: initial;
|
|
||||||
max-height: initial;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_TabbedIntegrationManagerDialog_container {
|
|
||||||
// Full size of the dialog, whatever it is
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
.mx_TabbedIntegrationManagerDialog_currentManager {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-top: 1px solid $accent;
|
|
||||||
|
|
||||||
iframe {
|
|
||||||
background-color: #fff;
|
|
||||||
border: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_TabbedIntegrationManagerDialog_tab {
|
|
||||||
display: inline-block;
|
|
||||||
border: 1px solid $accent;
|
|
||||||
border-bottom: 0;
|
|
||||||
border-top-left-radius: 3px;
|
|
||||||
border-top-right-radius: 3px;
|
|
||||||
padding: 10px 8px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_TabbedIntegrationManagerDialog_currentTab {
|
|
||||||
background-color: $accent;
|
|
||||||
color: $accent-fg-color;
|
|
||||||
}
|
|
|
@ -1,176 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2019 The Matrix.org Foundation C.I.C.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { Room } from "matrix-js-sdk/src/models/room";
|
|
||||||
import classNames from 'classnames';
|
|
||||||
import { logger } from "matrix-js-sdk/src/logger";
|
|
||||||
|
|
||||||
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
|
|
||||||
import { dialogTermsInteractionCallback, TermsNotSignedError } from "../../../Terms";
|
|
||||||
import * as ScalarMessaging from "../../../ScalarMessaging";
|
|
||||||
import { IntegrationManagerInstance } from "../../../integrations/IntegrationManagerInstance";
|
|
||||||
import ScalarAuthClient from "../../../ScalarAuthClient";
|
|
||||||
import AccessibleButton from "../elements/AccessibleButton";
|
|
||||||
import IntegrationManager from "../settings/IntegrationManager";
|
|
||||||
import { IDialogProps } from "./IDialogProps";
|
|
||||||
|
|
||||||
interface IProps extends IDialogProps {
|
|
||||||
/**
|
|
||||||
* Optional room where the integration manager should be open to
|
|
||||||
*/
|
|
||||||
room?: Room;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional screen to open on the integration manager
|
|
||||||
*/
|
|
||||||
screen?: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional integration ID to open in the integration manager
|
|
||||||
*/
|
|
||||||
integrationId?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IState {
|
|
||||||
managers: IntegrationManagerInstance[];
|
|
||||||
busy: boolean;
|
|
||||||
currentIndex: number;
|
|
||||||
currentConnected: boolean;
|
|
||||||
currentLoading: boolean;
|
|
||||||
currentScalarClient: ScalarAuthClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class TabbedIntegrationManagerDialog extends React.Component<IProps, IState> {
|
|
||||||
constructor(props: IProps) {
|
|
||||||
super(props);
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
managers: IntegrationManagers.sharedInstance().getOrderedManagers(),
|
|
||||||
busy: true,
|
|
||||||
currentIndex: 0,
|
|
||||||
currentConnected: false,
|
|
||||||
currentLoading: true,
|
|
||||||
currentScalarClient: null,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public componentDidMount(): void {
|
|
||||||
this.openManager(0, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private openManager = async (i: number, force = false): Promise<void> => {
|
|
||||||
if (i === this.state.currentIndex && !force) return;
|
|
||||||
|
|
||||||
const manager = this.state.managers[i];
|
|
||||||
const client = manager.getScalarClient();
|
|
||||||
this.setState({
|
|
||||||
busy: true,
|
|
||||||
currentIndex: i,
|
|
||||||
currentLoading: true,
|
|
||||||
currentConnected: false,
|
|
||||||
currentScalarClient: client,
|
|
||||||
});
|
|
||||||
|
|
||||||
ScalarMessaging.setOpenManagerUrl(manager.uiUrl);
|
|
||||||
|
|
||||||
client.setTermsInteractionCallback((policyInfo, agreedUrls) => {
|
|
||||||
// To avoid visual glitching of two modals stacking briefly, we customise the
|
|
||||||
// terms dialog sizing when it will appear for the integration manager so that
|
|
||||||
// it gets the same basic size as the IM's own modal.
|
|
||||||
return dialogTermsInteractionCallback(
|
|
||||||
policyInfo, agreedUrls, 'mx_TermsDialog_forIntegrationManager',
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
try {
|
|
||||||
await client.connect();
|
|
||||||
if (!client.hasCredentials()) {
|
|
||||||
this.setState({
|
|
||||||
busy: false,
|
|
||||||
currentLoading: false,
|
|
||||||
currentConnected: false,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.setState({
|
|
||||||
busy: false,
|
|
||||||
currentLoading: false,
|
|
||||||
currentConnected: true,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (e instanceof TermsNotSignedError) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.error(e);
|
|
||||||
this.setState({
|
|
||||||
busy: false,
|
|
||||||
currentLoading: false,
|
|
||||||
currentConnected: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private renderTabs(): JSX.Element[] {
|
|
||||||
return this.state.managers.map((m, i) => {
|
|
||||||
const classes = classNames({
|
|
||||||
'mx_TabbedIntegrationManagerDialog_tab': true,
|
|
||||||
'mx_TabbedIntegrationManagerDialog_currentTab': this.state.currentIndex === i,
|
|
||||||
});
|
|
||||||
return (
|
|
||||||
<AccessibleButton
|
|
||||||
className={classes}
|
|
||||||
onClick={() => this.openManager(i)}
|
|
||||||
key={`tab_${i}`}
|
|
||||||
disabled={this.state.busy}
|
|
||||||
>
|
|
||||||
{ m.name }
|
|
||||||
</AccessibleButton>
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public renderTab(): JSX.Element {
|
|
||||||
let uiUrl = null;
|
|
||||||
if (this.state.currentScalarClient) {
|
|
||||||
uiUrl = this.state.currentScalarClient.getScalarInterfaceUrlForRoom(
|
|
||||||
this.props.room,
|
|
||||||
this.props.screen,
|
|
||||||
this.props.integrationId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return <IntegrationManager
|
|
||||||
loading={this.state.currentLoading}
|
|
||||||
connected={this.state.currentConnected}
|
|
||||||
url={uiUrl}
|
|
||||||
onFinished={() => {/* no-op */}}
|
|
||||||
/>;
|
|
||||||
}
|
|
||||||
|
|
||||||
public render(): JSX.Element {
|
|
||||||
return (
|
|
||||||
<div className='mx_TabbedIntegrationManagerDialog_container'>
|
|
||||||
<div className='mx_TabbedIntegrationManagerDialog_tabs'>
|
|
||||||
{ this.renderTabs() }
|
|
||||||
</div>
|
|
||||||
<div className='mx_TabbedIntegrationManagerDialog_currentManager'>
|
|
||||||
{ this.renderTab() }
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -207,11 +207,8 @@ const AppsSection: React.FC<IAppsSectionProps> = ({ room }) => {
|
||||||
if (!managers.hasManager()) {
|
if (!managers.hasManager()) {
|
||||||
managers.openNoManagerDialog();
|
managers.openNoManagerDialog();
|
||||||
} else {
|
} else {
|
||||||
if (SettingsStore.getValue("feature_many_integration_managers")) {
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
managers.openAll(room);
|
managers.getPrimaryManager().open(room);
|
||||||
} else {
|
|
||||||
managers.getPrimaryManager().open(room);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ import AccessibleButton from '../elements/AccessibleButton';
|
||||||
import WidgetUtils, { IWidgetEvent } from '../../../utils/WidgetUtils';
|
import WidgetUtils, { IWidgetEvent } from '../../../utils/WidgetUtils';
|
||||||
import PersistedElement from "../elements/PersistedElement";
|
import PersistedElement from "../elements/PersistedElement";
|
||||||
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
|
import { IntegrationManagers } from "../../../integrations/IntegrationManagers";
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
|
||||||
import ContextMenu, { ChevronFace } from "../../structures/ContextMenu";
|
import ContextMenu, { ChevronFace } from "../../structures/ContextMenu";
|
||||||
import { WidgetType } from "../../../widgets/WidgetType";
|
import { WidgetType } from "../../../widgets/WidgetType";
|
||||||
import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingStore";
|
import { WidgetMessagingStore } from "../../../stores/widgets/WidgetMessagingStore";
|
||||||
|
@ -339,20 +338,12 @@ export default class Stickerpicker extends React.PureComponent<IProps, IState> {
|
||||||
* Launch the integration manager on the stickers integration page
|
* Launch the integration manager on the stickers integration page
|
||||||
*/
|
*/
|
||||||
private launchManageIntegrations = (): void => {
|
private launchManageIntegrations = (): void => {
|
||||||
// TODO: Open the right integration manager for the widget
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
if (SettingsStore.getValue("feature_many_integration_managers")) {
|
IntegrationManagers.sharedInstance().getPrimaryManager().open(
|
||||||
IntegrationManagers.sharedInstance().openAll(
|
this.props.room,
|
||||||
this.props.room,
|
`type_${WidgetType.STICKERPICKER.preferred}`,
|
||||||
`type_${WidgetType.STICKERPICKER.preferred}`,
|
this.state.widgetId,
|
||||||
this.state.widgetId,
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
IntegrationManagers.sharedInstance().getPrimaryManager().open(
|
|
||||||
this.props.room,
|
|
||||||
`type_${WidgetType.STICKERPICKER.preferred}`,
|
|
||||||
this.state.widgetId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
|
|
|
@ -278,12 +278,6 @@ export enum Action {
|
||||||
*/
|
*/
|
||||||
OpenReportEventDialog = "open_report_event_dialog",
|
OpenReportEventDialog = "open_report_event_dialog",
|
||||||
|
|
||||||
/**
|
|
||||||
* Fired when the tabbed integration manager dialog needs to be opened.
|
|
||||||
* Payload: OpenTabbedIntegrationManagerDialogPayload
|
|
||||||
*/
|
|
||||||
OpenTabbedIntegrationManagerDialog = "open_tabbed_imanager_dialog",
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fired when something within the application has determined that a logout,
|
* Fired when something within the application has determined that a logout,
|
||||||
* or logout-like behaviour, needs to happen. Specifically meant to target
|
* or logout-like behaviour, needs to happen. Specifically meant to target
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Room } from "matrix-js-sdk/src/models/room";
|
|
||||||
import { Optional } from "matrix-events-sdk";
|
|
||||||
|
|
||||||
import { ActionPayload } from "../payloads";
|
|
||||||
import { Action } from "../actions";
|
|
||||||
|
|
||||||
export interface OpenTabbedIntegrationManagerDialogPayload extends ActionPayload {
|
|
||||||
action: Action.OpenTabbedIntegrationManagerDialog;
|
|
||||||
|
|
||||||
room: Optional<Room>;
|
|
||||||
screen: Optional<string>;
|
|
||||||
integrationId: Optional<string>;
|
|
||||||
}
|
|
|
@ -883,7 +883,6 @@
|
||||||
"Thank you for trying the beta, please go into as much detail as you can so we can improve it.": "Thank you for trying the beta, please go into as much detail as you can so we can improve it.",
|
"Thank you for trying the beta, please go into as much detail as you can so we can improve it.": "Thank you for trying the beta, please go into as much detail as you can so we can improve it.",
|
||||||
"Video rooms (under active development)": "Video rooms (under active development)",
|
"Video rooms (under active development)": "Video rooms (under active development)",
|
||||||
"Render simple counters in room header": "Render simple counters in room header",
|
"Render simple counters in room header": "Render simple counters in room header",
|
||||||
"Multiple integration managers (requires manual setup)": "Multiple integration managers (requires manual setup)",
|
|
||||||
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
|
"Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)",
|
||||||
"Support adding custom themes": "Support adding custom themes",
|
"Support adding custom themes": "Support adding custom themes",
|
||||||
"Show message previews for reactions in DMs": "Show message previews for reactions in DMs",
|
"Show message previews for reactions in DMs": "Show message previews for reactions in DMs",
|
||||||
|
|
|
@ -19,7 +19,6 @@ import { logger } from "matrix-js-sdk/src/logger";
|
||||||
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
|
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
|
||||||
|
|
||||||
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
import type { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||||
import type { Room } from "matrix-js-sdk/src/models/room";
|
|
||||||
import SdkConfig from '../SdkConfig';
|
import SdkConfig from '../SdkConfig';
|
||||||
import Modal from '../Modal';
|
import Modal from '../Modal';
|
||||||
import { IntegrationManagerInstance, Kind } from "./IntegrationManagerInstance";
|
import { IntegrationManagerInstance, Kind } from "./IntegrationManagerInstance";
|
||||||
|
@ -27,13 +26,7 @@ import IntegrationsImpossibleDialog from "../components/views/dialogs/Integratio
|
||||||
import IntegrationsDisabledDialog from "../components/views/dialogs/IntegrationsDisabledDialog";
|
import IntegrationsDisabledDialog from "../components/views/dialogs/IntegrationsDisabledDialog";
|
||||||
import WidgetUtils from "../utils/WidgetUtils";
|
import WidgetUtils from "../utils/WidgetUtils";
|
||||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||||
import SettingsStore from "../settings/SettingsStore";
|
|
||||||
import { compare } from "../utils/strings";
|
import { compare } from "../utils/strings";
|
||||||
import defaultDispatcher from "../dispatcher/dispatcher";
|
|
||||||
import {
|
|
||||||
OpenTabbedIntegrationManagerDialogPayload,
|
|
||||||
} from "../dispatcher/payloads/OpenTabbedIntegrationManagerDialogPayload";
|
|
||||||
import { Action } from "../dispatcher/actions";
|
|
||||||
|
|
||||||
const KIND_PREFERENCE = [
|
const KIND_PREFERENCE = [
|
||||||
// Ordered: first is most preferred, last is least preferred.
|
// Ordered: first is most preferred, last is least preferred.
|
||||||
|
@ -181,23 +174,6 @@ export class IntegrationManagers {
|
||||||
Modal.createTrackedDialog('Integrations impossible', '', IntegrationsImpossibleDialog);
|
Modal.createTrackedDialog('Integrations impossible', '', IntegrationsImpossibleDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
openAll(room: Room = null, screen: string = null, integrationId: string = null): void {
|
|
||||||
if (!SettingsStore.getValue("integrationProvisioning")) {
|
|
||||||
return this.showDisabledDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.managers.length === 0) {
|
|
||||||
return this.openNoManagerDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultDispatcher.dispatch(<OpenTabbedIntegrationManagerDialogPayload>{
|
|
||||||
action: Action.OpenTabbedIntegrationManagerDialog,
|
|
||||||
room,
|
|
||||||
screen,
|
|
||||||
integrationId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
showDisabledDialog(): void {
|
showDisabledDialog(): void {
|
||||||
Modal.createTrackedDialog('Integrations disabled', '', IntegrationsDisabledDialog);
|
Modal.createTrackedDialog('Integrations disabled', '', IntegrationsDisabledDialog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,13 +270,6 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
supportedLevels: LEVELS_FEATURE,
|
supportedLevels: LEVELS_FEATURE,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
"feature_many_integration_managers": {
|
|
||||||
isFeature: true,
|
|
||||||
labsGroup: LabGroup.Experimental,
|
|
||||||
displayName: _td("Multiple integration managers (requires manual setup)"),
|
|
||||||
supportedLevels: LEVELS_FEATURE,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
"feature_mjolnir": {
|
"feature_mjolnir": {
|
||||||
isFeature: true,
|
isFeature: true,
|
||||||
labsGroup: LabGroup.Moderation,
|
labsGroup: LabGroup.Moderation,
|
||||||
|
|
|
@ -358,20 +358,12 @@ export class StopGapWidget extends EventEmitter {
|
||||||
const integType = data?.integType;
|
const integType = data?.integType;
|
||||||
const integId = <string>data?.integId;
|
const integId = <string>data?.integId;
|
||||||
|
|
||||||
// TODO: Open the right integration manager for the widget
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
if (SettingsStore.getValue("feature_many_integration_managers")) {
|
IntegrationManagers.sharedInstance().getPrimaryManager().open(
|
||||||
IntegrationManagers.sharedInstance().openAll(
|
MatrixClientPeg.get().getRoom(RoomViewStore.instance.getRoomId()),
|
||||||
MatrixClientPeg.get().getRoom(RoomViewStore.instance.getRoomId()),
|
`type_${integType}`,
|
||||||
`type_${integType}`,
|
integId,
|
||||||
integId,
|
);
|
||||||
);
|
|
||||||
} else {
|
|
||||||
IntegrationManagers.sharedInstance().getPrimaryManager().open(
|
|
||||||
MatrixClientPeg.get().getRoom(RoomViewStore.instance.getRoomId()),
|
|
||||||
`type_${integType}`,
|
|
||||||
integId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import ForwardDialog from "../components/views/dialogs/ForwardDialog";
|
||||||
import { MatrixClientPeg } from "../MatrixClientPeg";
|
import { MatrixClientPeg } from "../MatrixClientPeg";
|
||||||
import { Action } from "../dispatcher/actions";
|
import { Action } from "../dispatcher/actions";
|
||||||
import ReportEventDialog from "../components/views/dialogs/ReportEventDialog";
|
import ReportEventDialog from "../components/views/dialogs/ReportEventDialog";
|
||||||
import TabbedIntegrationManagerDialog from "../components/views/dialogs/TabbedIntegrationManagerDialog";
|
|
||||||
import SpacePreferencesDialog from "../components/views/dialogs/SpacePreferencesDialog";
|
import SpacePreferencesDialog from "../components/views/dialogs/SpacePreferencesDialog";
|
||||||
import SpaceSettingsDialog from "../components/views/dialogs/SpaceSettingsDialog";
|
import SpaceSettingsDialog from "../components/views/dialogs/SpaceSettingsDialog";
|
||||||
import InviteDialog from "../components/views/dialogs/InviteDialog";
|
import InviteDialog from "../components/views/dialogs/InviteDialog";
|
||||||
|
@ -73,17 +72,6 @@ export class DialogOpener {
|
||||||
mxEvent: payload.event,
|
mxEvent: payload.event,
|
||||||
}, 'mx_Dialog_reportEvent');
|
}, 'mx_Dialog_reportEvent');
|
||||||
break;
|
break;
|
||||||
case Action.OpenTabbedIntegrationManagerDialog:
|
|
||||||
Modal.createTrackedDialog(
|
|
||||||
'Tabbed Integration Manager', '', TabbedIntegrationManagerDialog,
|
|
||||||
{
|
|
||||||
room: payload.room,
|
|
||||||
screen: payload.screen,
|
|
||||||
integrationId: payload.integrationId,
|
|
||||||
},
|
|
||||||
'mx_TabbedIntegrationManagerDialog',
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case Action.OpenSpacePreferences:
|
case Action.OpenSpacePreferences:
|
||||||
Modal.createTrackedDialog("Space preferences", "", SpacePreferencesDialog, {
|
Modal.createTrackedDialog("Space preferences", "", SpacePreferencesDialog, {
|
||||||
initialTabId: payload.initalTabId,
|
initialTabId: payload.initalTabId,
|
||||||
|
|
|
@ -560,12 +560,8 @@ export default class WidgetUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
static editWidget(room: Room, app: IApp): void {
|
static editWidget(room: Room, app: IApp): void {
|
||||||
// TODO: Open the right manager for the widget
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
if (SettingsStore.getValue("feature_many_integration_managers")) {
|
IntegrationManagers.sharedInstance().getPrimaryManager().open(room, 'type_' + app.type, app.id);
|
||||||
IntegrationManagers.sharedInstance().openAll(room, 'type_' + app.type, app.id);
|
|
||||||
} else {
|
|
||||||
IntegrationManagers.sharedInstance().getPrimaryManager().open(room, 'type_' + app.type, app.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static isManagedByManager(app) {
|
static isManagedByManager(app) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue