File tree Expand file tree Collapse file tree
src/app/features/room/message Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ default : minor
3+ ---
4+
5+ Add a "Dismiss" button to command response messages.
Original file line number Diff line number Diff line change @@ -679,6 +679,7 @@ function MessageInternal(
679679 ) ;
680680
681681 const MSG_CONTENT_STYLE = { maxWidth : '100%' } ;
682+ const isSableFeedback = mEvent . getId ( ) ?. startsWith ( '~sable-feedback-' ) ;
682683
683684 const msgContentJSX = (
684685 < Box
@@ -757,6 +758,31 @@ function MessageInternal(
757758 ) }
758759 </ Box >
759760 ) }
761+ { isSableFeedback && (
762+ < Box className = { css . SendStatusRow } alignItems = "Center" gap = "100" >
763+ < Icon src = { Icons . Info } size = "100" />
764+ < Text size = "T200" priority = "300" as = "span" >
765+ Only you can see this.
766+ </ Text >
767+ < Chip
768+ type = "button"
769+ variant = "SurfaceVariant"
770+ radii = "Pill"
771+ outlined
772+ onClick = { ( evt : any ) => {
773+ evt . preventDefault ( ) ;
774+ evt . stopPropagation ( ) ;
775+ const eventId = mEvent . getId ( ) ;
776+ if ( eventId ) {
777+ room . removeEvent ( eventId ) ;
778+ room . emit ( RoomEvent . LocalEchoUpdated , mEvent , room ) ;
779+ }
780+ } }
781+ >
782+ < Text size = "B300" > Dismiss</ Text >
783+ </ Chip >
784+ </ Box >
785+ ) }
760786 </ Box >
761787 ) ;
762788
You can’t perform that action at this time.
0 commit comments