Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redesigned app settings and switch to rust crypto #1988

Merged
merged 58 commits into from
Feb 10, 2025
Merged

Conversation

ajbura
Copy link
Member

@ajbura ajbura commented Oct 1, 2024

Description

Fixes #1869 #1399 #792 #1979 #1877 #1130 #940 #1308 #1755 #2034 #1535

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

github-actions bot commented Oct 1, 2024

Preview: https://1988--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

@ajbura ajbura mentioned this pull request Dec 22, 2024
9 tasks
LevitatingBusinessMan added a commit to LevitatingBusinessMan/cinny that referenced this pull request Jan 29, 2025
This didn't work correctly, instead we will wait for cinnyapp#1988

This reverts commit 47e48e2, reversing
changes made to 62f4c2b.
@LevitatingBusinessMan
Copy link
Contributor

Could this be an opportunity to add a setting for full body web notifications?

Adding the functionality would look something like this:

diff --git a/src/app/pages/client/ClientNonUIFeatures.tsx b/src/app/pages/client/ClientNonUIFeatures.tsx
index b257d7a..8678e61 100644
--- a/src/app/pages/client/ClientNonUIFeatures.tsx
+++ b/src/app/pages/client/ClientNonUIFeatures.tsx
@@ -146,19 +146,17 @@ function MessageNotifications() {
       roomName,
       roomAvatar,
       username,
-      message,
     }: {
       roomName: string;
       roomAvatar?: string;
       username: string;
       roomId: string;
       eventId: string;
-      message: string;
     }) => {
-      const noti = new window.Notification(`${username} in ${roomName}`, {
+      const noti = new window.Notification(roomName, {
         icon: roomAvatar,
         badge: roomAvatar,
-        body: message,
+        body: `New inbox notification from ${username}`,
         silent: true,
       });

@@ -180,7 +178,7 @@ function MessageNotifications() {
   }, []);

   useEffect(() => {
-    const handleTimelineEvent: RoomEventHandlerMap[RoomEvent.Timeline] = async (
+    const handleTimelineEvent: RoomEventHandlerMap[RoomEvent.Timeline] = (
       mEvent,
       room,
       toStartOfTimeline,
@@ -217,8 +215,6 @@ function MessageNotifications() {
       if (showNotifications && Notification.permission === 'granted') {
         const avatarMxc =
           room.getAvatarFallbackMember()?.getMxcAvatarUrl() ?? room.getMxcAvatarUrl();
-        if (mEvent.isEncrypted()) await mEvent.getDecryptionPromise();
-        let content = mEvent.getContent();
         notify({
           roomName: room.name ?? 'Unknown',
           roomAvatar: avatarMxc
@@ -227,7 +223,6 @@ function MessageNotifications() {
           username: getMemberDisplayName(room, sender) ?? getMxIdLocalPart(sender) ?? sender,
           roomId: room.roomId,
           eventId,
-          message: content.body,
         });
       }

This would fix #1883, various people have shown interest in re-enabling the message body in notifications.

* update matrix js sdk

* remove dead code

* use rust crypto

* update setPowerLevel usage

* fix types

* fix deprecated isRoomEncrypted method uses

* fix deprecated room.currentState uses

* fix deprecated import/export room keys func

* fix merge issues in image pack file

* fix remaining issues in image pack file

* start indexedDBStore

* update package lock and vite-plugin-top-level-await

* user session settings - WIP

* add useAsync hook

* add password stage uia

* add uia flow matrix error hook

* add UIA action component

* add options to delete sessions

* add sso uia stage

* fix SSO stage complete error

* encryption - WIP

* update user settings encryption terminology

* add default variant to password input

* use password input in uia password stage

* add options for local backup in user settings

* remove typo in import local backup password input label

* online backup - WIP

* fix uia sso action

* move access token settings from about to developer tools

* merge encryption tab into sessions and rename it to devices

* add device placeholder tile

* add logout dialog

* add logout button for current device

* move other devices in component

* render unverified device verification tile

* add learn more section for current device verification

* add device verification status badge

* add info card component

* add index file for password input component

* add types for secret storage

* add component to access secret storage key

* manual verification - WIP

* update matrix-js-sdk to v35

* add manual verification

* use react query for device list

* show unverified tab on sidebar

* fix device list updates

* add session key details to current device

* render restore encryption backup

* fix loading state of restore backup

* fix unverified tab settings closes after verification

* key backup tile - WIP

* fix unverified tab badge

* rename session key to device key in device tile

* improve backup restore functionality

* fix restore button enabled after layout reload during restoring backup

* update backup info on status change

* add backup disconnection failures

* add device verification using sas

* restore backup after verification

* show option to logout on startup error screen

* fix key backup hook update on decryption key cached

* add option to enable device verification

* add device verification reset dialog

* add logout button in settings drawer

* add encrypted message lost on logout

* fix backup restore never finish with 0 keys

* fix setup dialog hides when enabling device verification

* show backup details in menu

* update setup device verification body copy

* replace deprecated method

* fix displayname appear as mxid in settings

* remove old refactored codes

* fix types
@ajbura ajbura marked this pull request as ready for review February 10, 2025 03:20
@kfiven kfiven changed the title Rework User Settings redesigned app settings and switch to rust crypto Feb 10, 2025
@kfiven kfiven merged commit 56b7541 into dev Feb 10, 2025
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move from libolm to vodozemac due to deprecation
3 participants