How to use the matrix-react-sdk/lib/settings/SettingsStore.getValue 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 / components / views / auth / VectorLoginFooter.js View on Github external
render: function() {
        // FIXME: replace this with a proper Status skin
        // ...except then we wouldn't be able to switch to the Status theme at runtime.
        if (SettingsStore.getValue("theme") === 'status') return <div>;

        return (
            <div>
                <a href="https://medium.com/@RiotChat">blog</a>&nbsp;&nbsp;·&nbsp;&nbsp;
                <a href="https://twitter.com/@RiotChat">twitter</a>&nbsp;&nbsp;·&nbsp;&nbsp;
                <a href="https://github.com/vector-im/riot-web">github</a>&nbsp;&nbsp;·&nbsp;&nbsp;
                <a href="https://matrix.org">{ _t('powered by Matrix') }</a>
            </div>
        );
    },
});</div>
github vector-im / riot-web / src / vector / index.js View on Github external
async function loadLanguage() {
    const prefLang = SettingsStore.getValue("language", null, /*excludeDefault=*/true);
    let langs = [];

    if (!prefLang) {
        languageHandler.getLanguagesFromBrowser().forEach((l) => {
            langs.push(...languageHandler.getNormalizedLanguageKeys(l));
        });
    } else {
        langs = [prefLang];
    }
    try {
        await languageHandler.setLanguage(langs);
        document.documentElement.setAttribute("lang", languageHandler.getCurrentLanguage());
    } catch (e) {
        console.error("Unable to set language", e);
    }
}
github vector-im / riot-web / src / components / structures / BottomLeftMenu.js View on Github external
render: function() {
        const HomeButton = sdk.getComponent('elements.HomeButton');
        const StartChatButton = sdk.getComponent('elements.StartChatButton');
        const RoomDirectoryButton = sdk.getComponent('elements.RoomDirectoryButton');
        const CreateRoomButton = sdk.getComponent('elements.CreateRoomButton');
        const SettingsButton = sdk.getComponent('elements.SettingsButton');
        const GroupsButton = sdk.getComponent('elements.GroupsButton');

        const groupsButton = SettingsStore.getValue("TagPanel.disableTagPanel") ?
             : null;

        return (
            <div>
                <div>
                    
                    <div>
                        
                    </div>
                    <div>
                        
                    </div>
                    <div>
                        
                    </div>
                    { groupsButton }</div></div>
github vector-im / riot-web / src / components / structures / LeftPanel.js View on Github external
topBox = ;
        } else {
            const SearchBox = sdk.getComponent('structures.SearchBox');
            topBox = ;
        }

        const classes = classNames(
            "mx_LeftPanel",
            {
                "collapsed": this.props.collapsed,
            },
        );

        const tagPanelEnabled =
            SettingsStore.isFeatureEnabled("feature_tag_panel") &amp;&amp;
            !SettingsStore.getValue("TagPanel.disableTagPanel");
        const tagPanel = tagPanelEnabled ?  : <div>;

        const containerClasses = classNames(
            "mx_LeftPanel_container", "mx_fadable",
            {
                "mx_LeftPanel_container_collapsed": this.props.collapsed,
                "mx_LeftPanel_container_hasTagPanel": tagPanelEnabled,
                "mx_fadable_faded": this.props.disabled,
            },
        );

        return (
            <div>
                { tagPanel }
                <aside>
                    { topBox }</aside></div></div>