mirror of https://github.com/vector-im/riot-web
Ended poll tiles: add ended the poll message (#10193)
* add ended the poll message to ended poll tile * fussy import ordering --------- Co-authored-by: Andy Balaam <andy.balaam@matrix.org>pull/28788/head^2
parent
c29e5f18ff
commit
c07cd2462e
src
components/views/messages
i18n/strings
test/components/views/messages/__snapshots__
|
@ -21,7 +21,9 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||
|
||||
import { Icon as PollIcon } from "../../../../res/img/element-icons/room/composer/poll.svg";
|
||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { textForEvent } from "../../../TextForEvent";
|
||||
import { Caption } from "../typography/Caption";
|
||||
import { IBodyProps } from "./IBodyProps";
|
||||
import MPollBody from "./MPollBody";
|
||||
|
||||
|
@ -105,5 +107,10 @@ export const MPollEndBody = React.forwardRef<any, IBodyProps>(({ mxEvent, ...pro
|
|||
);
|
||||
}
|
||||
|
||||
return <MPollBody mxEvent={pollStartEvent} {...props} />;
|
||||
return (
|
||||
<div>
|
||||
<Caption>{_t("Ended a poll")}</Caption>
|
||||
<MPollBody mxEvent={pollStartEvent} {...props} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
|
|
@ -2415,6 +2415,7 @@
|
|||
"Based on %(count)s votes|other": "Based on %(count)s votes",
|
||||
"Based on %(count)s votes|one": "Based on %(count)s vote",
|
||||
"edited": "edited",
|
||||
"Ended a poll": "Ended a poll",
|
||||
"Error decrypting video": "Error decrypting video",
|
||||
"Error processing voice message": "Error processing voice message",
|
||||
"Add reaction": "Add reaction",
|
||||
|
|
|
@ -10,6 +10,12 @@ exports[`<MPollEndBody /> when poll start event does not exist in current timeli
|
|||
|
||||
exports[`<MPollEndBody /> when poll start event exists in current timeline renders an ended poll 1`] = `
|
||||
<div>
|
||||
<div>
|
||||
<span
|
||||
class="mx_Caption"
|
||||
>
|
||||
Ended a poll
|
||||
</span>
|
||||
<div
|
||||
class="mx_MPollBody"
|
||||
>
|
||||
|
@ -105,4 +111,5 @@ exports[`<MPollEndBody /> when poll start event exists in current timeline rende
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue