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>
This commit is contained in:
parent
c29e5f18ff
commit
c07cd2462e
3 changed files with 78 additions and 63 deletions
|
@ -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 { Icon as PollIcon } from "../../../../res/img/element-icons/room/composer/poll.svg";
|
||||||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||||
|
import { _t } from "../../../languageHandler";
|
||||||
import { textForEvent } from "../../../TextForEvent";
|
import { textForEvent } from "../../../TextForEvent";
|
||||||
|
import { Caption } from "../typography/Caption";
|
||||||
import { IBodyProps } from "./IBodyProps";
|
import { IBodyProps } from "./IBodyProps";
|
||||||
import MPollBody from "./MPollBody";
|
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|other": "Based on %(count)s votes",
|
||||||
"Based on %(count)s votes|one": "Based on %(count)s vote",
|
"Based on %(count)s votes|one": "Based on %(count)s vote",
|
||||||
"edited": "edited",
|
"edited": "edited",
|
||||||
|
"Ended a poll": "Ended a poll",
|
||||||
"Error decrypting video": "Error decrypting video",
|
"Error decrypting video": "Error decrypting video",
|
||||||
"Error processing voice message": "Error processing voice message",
|
"Error processing voice message": "Error processing voice message",
|
||||||
"Add reaction": "Add reaction",
|
"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`] = `
|
exports[`<MPollEndBody /> when poll start event exists in current timeline renders an ended poll 1`] = `
|
||||||
<div>
|
<div>
|
||||||
|
<div>
|
||||||
|
<span
|
||||||
|
class="mx_Caption"
|
||||||
|
>
|
||||||
|
Ended a poll
|
||||||
|
</span>
|
||||||
<div
|
<div
|
||||||
class="mx_MPollBody"
|
class="mx_MPollBody"
|
||||||
>
|
>
|
||||||
|
@ -105,4 +111,5 @@ exports[`<MPollEndBody /> when poll start event exists in current timeline rende
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Reference in a new issue