How to use the matrix-react-sdk/lib/index.getComponent function in matrix-react-sdk

To help you get started, we’ve selected a few matrix-react-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vector-im / riot-web / src / controllers / organisms / RoomView.js View on Github external
getEventTiles: function() {
        var DateSeparator = sdk.getComponent('molecules.DateSeparator');
        var cli = MatrixClientPeg.get();

        var ret = [];
        var count = 0;

        var EventTile = sdk.getComponent('rooms.EventTile');
        var self = this;

        if (this.state.searchResults &&
            this.state.searchResults.search_categories.room_events.results &&
            this.state.searchResults.search_categories.room_events.groups)
        {
            // XXX: this dance is foul, due to the results API not directly returning sorted results
            var results = this.state.searchResults.search_categories.room_events.results;
            var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;
github vector-im / riot-web / src / controllers / organisms / RoomView.js View on Github external
getEventTiles: function() {
        var DateSeparator = sdk.getComponent('molecules.DateSeparator');
        var cli = MatrixClientPeg.get();

        var ret = [];
        var count = 0;

        var EventTile = sdk.getComponent('rooms.EventTile');
        var self = this;

        if (this.state.searchResults &&
            this.state.searchResults.search_categories.room_events.results &&
            this.state.searchResults.search_categories.room_events.groups)
        {
            // XXX: this dance is foul, due to the results API not directly returning sorted results
            var results = this.state.searchResults.search_categories.room_events.results;
            var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;

            Object.keys(roomIdGroups)
                  .sort(function(a, b) { roomIdGroups[a].order - roomIdGroups[b].order }) // WHY NOT RETURN AN ORDERED ARRAY?!?!?!
                  .forEach(function(roomId)
            {
                // XXX: todo: merge overlapping results somehow?
                // XXX: why doesn't searching on name work?
github vector-im / riot-web / src / components / views / auth / VectorAuthPage.js View on Github external
render() {
        const AuthFooter = sdk.getComponent('auth.AuthFooter');

        const brandingConfig = SdkConfig.get().branding;
        let backgroundUrl = "themes/riot/img/backgrounds/valley.jpg";
        if (brandingConfig && brandingConfig.welcomeBackgroundUrl) {
            backgroundUrl = brandingConfig.welcomeBackgroundUrl;
        }

        const pageStyle = {
            background: `center/cover fixed url(${backgroundUrl})`,
        };

        const modalStyle = {
            position: 'relative',
            background: 'initial',
        };
github vector-im / riot-web / src / controllers / organisms / RoomView.js View on Github external
q.all(deferreds).fail(function(err) {
                var ErrorDialog = sdk.getComponent("organisms.ErrorDialog");
                Modal.createDialog(ErrorDialog, {
                    title: "Failed to set state",
                    description: err.toString()
                });
            }).finally(function() {
                self.setState({
github vector-im / riot-web / src / components / views / context_menus / TagTileContextMenu.js View on Github external
render() {
        const TintableSvg = sdk.getComponent("elements.TintableSvg");
        return <div>
            <div>
                
                { _t('View Community') }
            </div>
            <hr>
            <div>
                <img height="15" width="15" src="img/icon_context_delete.svg">
                { _t('Remove') }
            </div>
        </div>;