Skip to content

Commit 822b72e

Browse files
authored
Merge pull request #1861 from session-foundation/dev
Session 1.17.12
2 parents 9d3fe9e + 44ffed9 commit 822b72e

File tree

6 files changed

+31
-28
lines changed

6 files changed

+31
-28
lines changed

.github/workflows/build-binaries.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
makeLatest: false
7979
omitBodyDuringUpdate: true
8080
omitNameDuringUpdate: true
81+
commit: master # needed so that the "target" of the release is correct on github
8182

8283
lint:
8384
runs-on: ubuntu-22.04

dynamic_assets

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "session-desktop",
55
"productName": "Session",
66
"description": "Private messaging from your desktop",
7-
"version": "1.17.11",
7+
"version": "1.17.12",
88
"license": "GPL-3.0",
99
"author": {
1010
"name": "Session Foundation",

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ onlyBuiltDependencies:
66
- libsession_util_nodejs
77
- protobufjs
88
- sharp
9+
publicHoistPattern:
10+
- '@img/*'

ts/components/dialog/user-settings/pages/DefaultSettingsPage.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import {
4646
} from '../../../../state/selectors/proBackendData';
4747
import { focusVisibleBoxShadowOutsetStr } from '../../../../styles/focusVisible';
4848
import { createButtonOnKeyDownForClickEventHandler } from '../../../../util/keyboardShortcuts';
49+
import { useDebugMode } from '../../../../state/selectors/debug';
4950

5051
function SessionIconForSettings(props: Omit<SessionIconProps, 'iconSize' | 'style'>) {
5152
return (
@@ -272,33 +273,40 @@ const StyledButtonSessionInfo = styled.span<{ opacity?: number }>`
272273
`;
273274

274275
const SessionInfo = () => {
275-
const [clickCount, setClickCount] = useState(0);
276-
276+
const [, setClickCount] = useState(0);
277277
const dispatch = getAppDispatch();
278+
const inDebugMode = useDebugMode();
279+
280+
const onClickLogo = () => showLinkVisitWarningDialog('https://token.getsession.org/', dispatch);
278281

279-
const openVersion = createButtonOnKeyDownForClickEventHandler(() =>
282+
const onClickVersion = () =>
280283
showLinkVisitWarningDialog(
281284
`https://github.com/session-foundation/session-desktop/releases/tag/v${window.versionInfo.version}`,
282285
dispatch
283-
)
284-
);
286+
);
285287

286-
const openCommit = createButtonOnKeyDownForClickEventHandler(() => {
287-
setClickCount(clickCount + 1);
288-
if (clickCount === 10) {
289-
dispatch(setDebugMode(true));
290-
setClickCount(0);
291-
}
292-
});
288+
const onClickCommit = () =>
289+
setClickCount(n => {
290+
if (n === 9) {
291+
dispatch(setDebugMode(!inDebugMode));
292+
ToastUtils.pushToastSuccess(
293+
'toggle-debug-mode',
294+
tr(inDebugMode ? 'debugModeDisabledToastDev' : 'debugModeEnabledToastDev')
295+
);
296+
return 0;
297+
}
298+
return n + 1;
299+
});
300+
301+
const onKeyDownVersion = createButtonOnKeyDownForClickEventHandler(onClickVersion);
302+
const onKeyDownCommit = createButtonOnKeyDownForClickEventHandler(onClickCommit);
293303

294304
return (
295305
<StyledVersionInfo>
296306
<SessionIconButton
297307
iconSize="medium"
298308
iconType="sessionTokenLogoWithText"
299-
onClick={() => {
300-
showLinkVisitWarningDialog('https://token.getsession.org/', dispatch);
301-
}}
309+
onClick={onClickLogo}
302310
// disable transition here as the transition does the opposite that usual (hovering makes it more opaque/bright)
303311
style={{ transition: 'none' }}
304312
/>
@@ -308,18 +316,10 @@ const SessionInfo = () => {
308316
$alignItems="center"
309317
$flexGap="var(--margins-sm)"
310318
>
311-
<StyledButtonSessionInfo
312-
onKeyDown={openVersion}
313-
onClick={() => void openVersion(null as any)}
314-
tabIndex={0}
315-
>
319+
<StyledButtonSessionInfo onKeyDown={onKeyDownVersion} onClick={onClickVersion} tabIndex={0}>
316320
v{window.versionInfo.version}
317321
</StyledButtonSessionInfo>
318-
<StyledButtonSessionInfo
319-
onKeyDown={openCommit}
320-
onClick={() => void openCommit(null as any)}
321-
tabIndex={0}
322-
>
322+
<StyledButtonSessionInfo onKeyDown={onKeyDownCommit} onClick={onClickCommit} tabIndex={0}>
323323
{window.versionInfo.commitHash?.slice(0, 8)}
324324
</StyledButtonSessionInfo>
325325
</Flex>

ts/localization

0 commit comments

Comments
 (0)