Skip to content

Commit

Permalink
Merge pull request #1938 from oxen-io/clearnet
Browse files Browse the repository at this point in the history
Session v1.7.3
  • Loading branch information
Bilb authored Sep 22, 2021
2 parents 6286ac8 + 6de594b commit 6593011
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 7 deletions.
4 changes: 3 additions & 1 deletion _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,5 +441,7 @@
"deletionTypeTitle": "Deletion Type",
"deleteJustForMe": "Delete just for me",
"messageDeletedPlaceholder": "This message has been deleted",
"messageDeleted": "Message deleted"
"messageDeleted": "Message deleted",
"surveyTitle": "Take our Session Survey",
"goToOurSurvey": "Go to our survey"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "session-desktop",
"productName": "Session",
"description": "Private messaging from your desktop",
"version": "1.7.2",
"version": "1.7.3",
"license": "GPL-3.0",
"author": {
"name": "Loki Project",
Expand Down
4 changes: 3 additions & 1 deletion stylesheets/_session.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,8 @@ input {
display: flex;
flex-direction: column;
margin: $session-margin-sm;
align-items: flex-start;
align-items: center;
min-width: 10vw;
position: relative;

.onion__node {
Expand All @@ -1121,6 +1122,7 @@ input {
}
.onion__node__country {
margin: $session-margin-sm;
min-width: 150px;
}

.onion__growing-icon {
Expand Down
27 changes: 23 additions & 4 deletions ts/components/dialog/OnionStatusPathDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,34 @@ import { Flex } from '../basic/Flex';
import { SessionIcon, SessionIconButton } from '../session/icon';
import { SessionSpinner } from '../session/SessionSpinner';
import { SessionWrapperModal } from '../session/SessionWrapperModal';
// tslint:disable-next-line: no-submodule-imports
import useHover from 'react-use/lib/useHover';

export type StatusLightType = {
glowStartDelay: number;
glowDuration: number;
color?: string;
};

const OnionCountryDisplay = ({
index,
labelText,
snodeIp,
}: {
snodeIp?: string;
labelText: string;
index: number;
}) => {
const element = (hovered: boolean) => (
<div className="onion__node__country" key={`country-${index}`}>
{hovered && snodeIp ? snodeIp : labelText}
</div>
);
const [hoverable] = useHover(element);

return hoverable;
};

const OnionPathModalInner = () => {
const onionPath = useSelector(getFirstOnionPath);
const isOnline = useSelector(getIsOnline);
Expand Down Expand Up @@ -69,14 +90,12 @@ const OnionPathModalInner = () => {
{nodes.map((snode: Snode | any, index: number) => {
let labelText = snode.label
? snode.label
: countryLookup.byIso(ip2country(snode.ip))?.country;
: `${countryLookup.byIso(ip2country(snode.ip))?.country}`;
if (!labelText) {
labelText = window.i18n('unknownCountry');
}
return labelText ? (
<div className="onion__node__country" key={`country-${index}`}>
{labelText}
</div>
<OnionCountryDisplay index={index} labelText={labelText} snodeIp={snode.ip} />
) : null;
})}
</Flex>
Expand Down
17 changes: 17 additions & 0 deletions ts/components/session/settings/SessionSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,23 @@ class SettingsViewInner extends React.Component<SettingsViewProps, State> {
info: (value: number) => `${value}%`,
},
},
{
id: 'session-survey',
title: window.i18n('surveyTitle'),
description: undefined,
hidden: false,
type: SessionSettingType.Button,
category: SessionSettingCategory.Appearance,
setFn: undefined,
comparisonValue: undefined,
onClick: () => {
void shell.openExternal('https://getsession.org/survey');
},
content: {
buttonText: window.i18n('goToOurSurvey'),
buttonColor: SessionButtonColor.Primary,
},
},
{
id: 'help-translation',
title: window.i18n('translation'),
Expand Down

0 comments on commit 6593011

Please sign in to comment.