mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 03:11:25 +00:00
Fixing user page, issue with matrix button. Fixes #239
This commit is contained in:
parent
c5750d62d1
commit
756a811b1d
1 changed files with 23 additions and 20 deletions
|
@ -437,26 +437,12 @@ export class Person extends Component<any, PersonState> {
|
||||||
{i18n.t("logout")}
|
{i18n.t("logout")}
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<Link
|
||||||
{/* TODO matrix ids aren't currently federated, so don't come back with GetPersonDetails
|
className={"d-flex align-self-start btn btn-secondary"}
|
||||||
<a
|
to={`/create_private_message/recipient/${pv.person.id}`}
|
||||||
className={`d-flex align-self-start btn btn-secondary mr-2 ${
|
>
|
||||||
!pv.local_user.matrix_user_id && "invisible"
|
{i18n.t("send_message")}
|
||||||
}`}
|
</Link>
|
||||||
rel="noopener"
|
|
||||||
href={`https://matrix.to/#/${pv.local_user.matrix_user_id}`}
|
|
||||||
>
|
|
||||||
{i18n.t("send_secure_message")}
|
|
||||||
</a>
|
|
||||||
*/}
|
|
||||||
|
|
||||||
<Link
|
|
||||||
className={"d-flex align-self-start btn btn-secondary"}
|
|
||||||
to={`/create_private_message/recipient/${pv.person.id}`}
|
|
||||||
>
|
|
||||||
{i18n.t("send_message")}
|
|
||||||
</Link>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{pv.person.bio && (
|
{pv.person.bio && (
|
||||||
|
@ -496,6 +482,21 @@ export class Person extends Component<any, PersonState> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO this isn't used currently
|
||||||
|
// matrixButton() {
|
||||||
|
// return (
|
||||||
|
// <a
|
||||||
|
// className={`d-flex align-self-start btn btn-secondary mr-2 ${
|
||||||
|
// !pv.local_user.matrix_user_id && "invisible"
|
||||||
|
// }`}
|
||||||
|
// rel="noopener"
|
||||||
|
// href={`https://matrix.to/#/${pv.local_user.matrix_user_id}`}
|
||||||
|
// >
|
||||||
|
// {i18n.t("send_secure_message")}
|
||||||
|
// </a>
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
userSettings() {
|
userSettings() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -1111,6 +1112,7 @@ export class Person extends Component<any, PersonState> {
|
||||||
|
|
||||||
parseMessage(msg: any) {
|
parseMessage(msg: any) {
|
||||||
let op = wsUserOp(msg);
|
let op = wsUserOp(msg);
|
||||||
|
console.log(msg);
|
||||||
if (msg.error) {
|
if (msg.error) {
|
||||||
toast(i18n.t(msg.error), "danger");
|
toast(i18n.t(msg.error), "danger");
|
||||||
if (msg.error == "couldnt_find_that_username_or_email") {
|
if (msg.error == "couldnt_find_that_username_or_email") {
|
||||||
|
@ -1129,6 +1131,7 @@ export class Person extends Component<any, PersonState> {
|
||||||
// TODO this might need to get abstracted
|
// TODO this might need to get abstracted
|
||||||
let data = wsJsonToRes<GetPersonDetailsResponse>(msg).data;
|
let data = wsJsonToRes<GetPersonDetailsResponse>(msg).data;
|
||||||
this.state.personRes = data;
|
this.state.personRes = data;
|
||||||
|
console.log(data);
|
||||||
this.setUserInfo();
|
this.setUserInfo();
|
||||||
this.state.loading = false;
|
this.state.loading = false;
|
||||||
this.setState(this.state);
|
this.setState(this.state);
|
||||||
|
|
Loading…
Reference in a new issue