in desktop/src/app/components/layout/main-navigation/profile-button/profile-button.component.ts [88:152]
public openSettingsContextMenu() {
const items = [
new ContextMenuSeparator(),
new ContextMenuItem({
label: this.i18n.t("profile-button.settings"),
click: () => this._goToSettings()
}),
new ContextMenuItem({
label: this.i18n.t("profile-button.authentication"),
click: () => this._goToAuthSettings()
}),
new ContextMenuItem({
label: this.i18n.t("profile-button.keybindings"), click: () => this._goToKeyBindings(),
}),
new MultiContextMenuItem({
label: "Language (Preview)", subitems: Object.entries(TranslatedLocales).map(([key, value]) => {
return new ContextMenuItem({ label: value, click: () => this._changeLanguage(key as Locale) });
}),
}),
new ContextMenuItem({
label: this.i18n.t("profile-button.thirdPartyNotices"),
click: () => this._openThirdPartyNotices(),
}),
new ContextMenuItem({ label: this.i18n.t("profile-button.viewLogs"), click: () => this._openLogFolder() }),
new ContextMenuItem({ label: this.i18n.t("profile-button.report"), click: () => this._openGithubIssues() }),
new ContextMenuItem({ label: this.i18n.t("profile-button.about"), click: () => this._showAboutPage() }),
];
// Add the playground and theme menu items only in dev mode
if (isDevMode()) {
items.push(
new ContextMenuSeparator(),
new MultiContextMenuItem({
label: "Developer",
subitems: [
new ContextMenuItem({
label: this.i18n.t("profile-button.viewTheme"),
click: () => this._gotoThemeColors()
}),
new ContextMenuItem({
label: this.i18n.t("profile-button.playground"),
click: () => this._gotoPlayground()
}),
],
})
);
}
items.push(new ContextMenuSeparator());
if (this.currentUserName === "") {
items.push(new ContextMenuItem({
label: this.i18n.t("profile-button.sign-in"),
click: () => this._login()
}));
} else {
items.push(new ContextMenuItem({
label: this.i18n.t("profile-button.sign-out"),
click: () => this._logout()
}));
}
items.unshift(this._getAutoUpdateMenuItem());
this.contextMenuService.openMenu(new ContextMenu(items));
}