You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/components/settings/section/CategoryHelp.tsx

38 lines
1.3 KiB
TypeScript

import { ipcRenderer, shell } from 'electron';
import React from 'react';
import { SessionButtonColor, SessionButtonType } from '../../basic/SessionButton';
import { SessionSettingButtonItem } from '../SessionSettingListItem';
export const SettingsCategoryHelp = (props: { hasPassword: boolean | null }) => {
if (props.hasPassword !== null) {
return (
<>
<SessionSettingButtonItem
title={window.i18n('surveyTitle')}
onClick={() => void shell.openExternal('https://getsession.org/survey')}
buttonColor={SessionButtonColor.Primary}
buttonType={SessionButtonType.Square}
buttonText={window.i18n('goToOurSurvey')}
/>
<SessionSettingButtonItem
title={window.i18n('helpUsTranslateSession')}
onClick={() => void shell.openExternal('https://crowdin.com/project/session-desktop/')}
buttonColor={SessionButtonColor.Primary}
buttonType={SessionButtonType.Square}
buttonText={window.i18n('translation')}
/>
<SessionSettingButtonItem
onClick={() => {
ipcRenderer.send('show-debug-log');
}}
buttonColor={SessionButtonColor.Primary}
buttonType={SessionButtonType.Square}
buttonText={window.i18n('showDebugLog')}
/>
</>
);
}
return null;
};