Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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> ·
<a href="https://twitter.com/@RiotChat">twitter</a> ·
<a href="https://github.com/vector-im/riot-web">github</a> ·
<a href="https://matrix.org">{ _t('powered by Matrix') }</a>
</div>
);
},
});</div>
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);
}
}
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>
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") &&
!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>