Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
makeLatest: false
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
commit: master # needed so that the "target" of the release is correct on github

lint:
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion dynamic_assets
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "session-desktop",
"productName": "Session",
"description": "Private messaging from your desktop",
"version": "1.17.11",
"version": "1.17.12",
"license": "GPL-3.0",
"author": {
"name": "Session Foundation",
Expand Down
2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ onlyBuiltDependencies:
- libsession_util_nodejs
- protobufjs
- sharp
publicHoistPattern:
- '@img/*'
50 changes: 25 additions & 25 deletions ts/components/dialog/user-settings/pages/DefaultSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
} from '../../../../state/selectors/proBackendData';
import { focusVisibleBoxShadowOutsetStr } from '../../../../styles/focusVisible';
import { createButtonOnKeyDownForClickEventHandler } from '../../../../util/keyboardShortcuts';
import { useDebugMode } from '../../../../state/selectors/debug';

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

const SessionInfo = () => {
const [clickCount, setClickCount] = useState(0);

const [, setClickCount] = useState(0);
const dispatch = getAppDispatch();
const inDebugMode = useDebugMode();

const onClickLogo = () => showLinkVisitWarningDialog('https://token.getsession.org/', dispatch);

const openVersion = createButtonOnKeyDownForClickEventHandler(() =>
const onClickVersion = () =>
showLinkVisitWarningDialog(
`https://github.com/session-foundation/session-desktop/releases/tag/v${window.versionInfo.version}`,
dispatch
)
);
);

const openCommit = createButtonOnKeyDownForClickEventHandler(() => {
setClickCount(clickCount + 1);
if (clickCount === 10) {
dispatch(setDebugMode(true));
setClickCount(0);
}
});
const onClickCommit = () =>
setClickCount(n => {
if (n === 9) {
dispatch(setDebugMode(!inDebugMode));
ToastUtils.pushToastSuccess(
'toggle-debug-mode',
tr(inDebugMode ? 'debugModeDisabledToastDev' : 'debugModeEnabledToastDev')
);
return 0;
}
return n + 1;
});

const onKeyDownVersion = createButtonOnKeyDownForClickEventHandler(onClickVersion);
const onKeyDownCommit = createButtonOnKeyDownForClickEventHandler(onClickCommit);

return (
<StyledVersionInfo>
<SessionIconButton
iconSize="medium"
iconType="sessionTokenLogoWithText"
onClick={() => {
showLinkVisitWarningDialog('https://token.getsession.org/', dispatch);
}}
onClick={onClickLogo}
// disable transition here as the transition does the opposite that usual (hovering makes it more opaque/bright)
style={{ transition: 'none' }}
/>
Expand All @@ -308,18 +316,10 @@ const SessionInfo = () => {
$alignItems="center"
$flexGap="var(--margins-sm)"
>
<StyledButtonSessionInfo
onKeyDown={openVersion}
onClick={() => void openVersion(null as any)}
tabIndex={0}
>
<StyledButtonSessionInfo onKeyDown={onKeyDownVersion} onClick={onClickVersion} tabIndex={0}>
v{window.versionInfo.version}
</StyledButtonSessionInfo>
<StyledButtonSessionInfo
onKeyDown={openCommit}
onClick={() => void openCommit(null as any)}
tabIndex={0}
>
<StyledButtonSessionInfo onKeyDown={onKeyDownCommit} onClick={onClickCommit} tabIndex={0}>
{window.versionInfo.commitHash?.slice(0, 8)}
</StyledButtonSessionInfo>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion ts/localization
Submodule localization updated 1 files
+2 −0 devStrings.ts
Loading