2020-07-22 08:53:29 +03:00
|
|
|
import * as React from "react";
|
|
|
|
import * as System from "~/components/system";
|
|
|
|
import * as Actions from "~/common/actions";
|
2020-08-25 21:08:42 +03:00
|
|
|
import * as Strings from "~/common/strings";
|
2020-07-23 11:57:44 +03:00
|
|
|
import * as Validations from "~/common/validations";
|
2020-10-27 13:56:29 +03:00
|
|
|
import * as Window from "~/common/window";
|
2020-11-13 01:36:20 +03:00
|
|
|
import * as Constants from "~/common/constants";
|
2020-08-20 08:29:33 +03:00
|
|
|
import * as FileUtilities from "~/common/file-utilities";
|
2020-11-22 00:25:40 +03:00
|
|
|
import * as UserBehaviors from "~/common/user-behaviors";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-11-04 20:55:48 +03:00
|
|
|
import { css } from "@emotion/core";
|
2020-09-12 01:25:33 +03:00
|
|
|
import { dispatchCustomEvent } from "~/common/custom-events";
|
2020-10-27 11:40:52 +03:00
|
|
|
import { TabGroup } from "~/components/core/TabGroup";
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-07-22 08:53:29 +03:00
|
|
|
import ScenePage from "~/components/core/ScenePage";
|
2020-10-27 13:56:29 +03:00
|
|
|
import ScenePageHeader from "~/components/core/ScenePageHeader";
|
2020-07-22 08:53:29 +03:00
|
|
|
import Avatar from "~/components/core/Avatar";
|
2020-06-08 09:45:53 +03:00
|
|
|
|
|
|
|
const STYLES_FILE_HIDDEN = css`
|
|
|
|
height: 1px;
|
|
|
|
width: 1px;
|
|
|
|
opacity: 0;
|
|
|
|
visibility: hidden;
|
|
|
|
position: fixed;
|
|
|
|
top: -1px;
|
|
|
|
left: -1px;
|
|
|
|
`;
|
2020-04-09 00:29:13 +03:00
|
|
|
|
2020-10-27 11:40:52 +03:00
|
|
|
const STYLES_COPY_INPUT = css`
|
|
|
|
pointer-events: none;
|
|
|
|
position: absolute;
|
|
|
|
opacity: 0;
|
|
|
|
`;
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
const STYLES_HEADER = css`
|
|
|
|
font-family: ${Constants.font.semiBold};
|
|
|
|
margin-top: 32px;
|
|
|
|
margin-bottom: 16px;
|
|
|
|
`;
|
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
export default class SceneEditAccount extends React.Component {
|
2020-07-23 11:57:44 +03:00
|
|
|
state = {
|
|
|
|
username: this.props.viewer.username,
|
|
|
|
password: "",
|
|
|
|
confirm: "",
|
2020-08-22 08:45:50 +03:00
|
|
|
body: this.props.viewer.data.body,
|
|
|
|
photo: this.props.viewer.data.photo,
|
2020-08-25 08:00:32 +03:00
|
|
|
name: this.props.viewer.data.name,
|
2020-07-23 11:57:44 +03:00
|
|
|
deleting: false,
|
2020-10-23 13:34:31 +03:00
|
|
|
allow_filecoin_directory_listing: this.props.viewer.allow_filecoin_directory_listing,
|
|
|
|
allow_automatic_data_storage: this.props.viewer.allow_automatic_data_storage,
|
|
|
|
allow_encrypted_data_storage: this.props.viewer.allow_encrypted_data_storage,
|
2020-07-23 11:57:44 +03:00
|
|
|
changingPassword: false,
|
2020-11-13 01:36:20 +03:00
|
|
|
changingDetails: false,
|
2020-07-23 11:57:44 +03:00
|
|
|
changingAvatar: false,
|
2020-09-27 02:40:44 +03:00
|
|
|
changingFilecoin: false,
|
2020-10-27 11:40:52 +03:00
|
|
|
tab: 0,
|
2020-07-23 11:57:44 +03:00
|
|
|
};
|
2020-07-01 09:41:54 +03:00
|
|
|
|
2020-06-08 09:45:53 +03:00
|
|
|
_handleUpload = async (e) => {
|
2020-07-23 11:57:44 +03:00
|
|
|
this.setState({ changingAvatar: true });
|
2020-11-22 00:25:40 +03:00
|
|
|
let json = await UserBehaviors.uploadImage(e.target.files[0], this.props.resources);
|
|
|
|
if (!json) {
|
2020-07-24 10:45:21 +03:00
|
|
|
this.setState({ changingAvatar: false });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-11-28 04:19:30 +03:00
|
|
|
const cid = json.data.cid;
|
2020-09-03 03:58:56 +03:00
|
|
|
const url = Strings.getCIDGatewayURL(cid);
|
2020-11-13 01:36:20 +03:00
|
|
|
let updateResponse = await Actions.updateViewer({
|
2020-08-22 08:45:50 +03:00
|
|
|
data: {
|
2020-08-25 21:08:42 +03:00
|
|
|
photo: Strings.getCIDGatewayURL(cid),
|
2020-08-22 08:45:50 +03:00
|
|
|
},
|
2020-07-22 13:51:40 +03:00
|
|
|
});
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
if (!updateResponse) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
message: "We're having trouble connecting right now.",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2020-11-17 20:43:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
if (updateResponse.error) {
|
2020-11-13 01:36:20 +03:00
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
decorator: response.decorator,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2020-08-22 08:45:50 +03:00
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
this.setState({ changingAvatar: false, photo: url });
|
2020-08-22 08:45:50 +03:00
|
|
|
};
|
|
|
|
|
2020-09-27 02:40:44 +03:00
|
|
|
_handleSaveFilecoin = async (e) => {
|
|
|
|
this.setState({ changingFilecoin: true });
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
let response = await Actions.updateViewer({
|
2020-09-27 02:40:44 +03:00
|
|
|
data: {
|
2020-10-23 13:34:31 +03:00
|
|
|
allow_filecoin_directory_listing: this.state.allow_filecoin_directory_listing,
|
2020-09-27 02:40:44 +03:00
|
|
|
allow_automatic_data_storage: this.state.allow_automatic_data_storage,
|
|
|
|
allow_encrypted_data_storage: this.state.allow_encrypted_data_storage,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
if (!response) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
message: "We're having trouble connecting right now.",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
} else if (response.error) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
decorator: response.decorator,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-09-27 02:40:44 +03:00
|
|
|
this.setState({ changingFilecoin: false });
|
|
|
|
};
|
|
|
|
|
2020-07-01 09:41:54 +03:00
|
|
|
_handleSave = async (e) => {
|
2020-11-13 01:36:20 +03:00
|
|
|
this.setState({ changingDetails: true });
|
2020-07-23 11:57:44 +03:00
|
|
|
|
|
|
|
if (!Validations.username(this.state.username)) {
|
2020-09-12 01:25:33 +03:00
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
message: "Please include only letters and numbers in your username",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
2020-11-13 01:36:20 +03:00
|
|
|
this.setState({ changingDetails: false });
|
2020-07-23 11:57:44 +03:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
let response = await Actions.updateViewer({
|
2020-07-22 13:51:40 +03:00
|
|
|
username: this.state.username,
|
2020-08-22 08:45:50 +03:00
|
|
|
data: {
|
|
|
|
photo: this.state.photo,
|
|
|
|
body: this.state.body,
|
2020-08-25 08:00:32 +03:00
|
|
|
name: this.state.name,
|
2020-08-22 08:45:50 +03:00
|
|
|
},
|
2020-07-22 13:51:40 +03:00
|
|
|
});
|
2020-07-01 09:41:54 +03:00
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
if (!response) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
message: "We're having trouble connecting right now.",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
} else if (response.error) {
|
2020-11-24 19:29:40 +03:00
|
|
|
if (response.decorator === "SERVER_USERNAME_IS_TAKEN") {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
decorator: response.decorator,
|
|
|
|
message: "The username is taken.",
|
|
|
|
},
|
2020-11-13 01:36:20 +03:00
|
|
|
},
|
2020-11-24 19:29:40 +03:00
|
|
|
});
|
|
|
|
} else {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
decorator: response.decorator,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2020-11-13 01:36:20 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({ changingDetails: false });
|
2020-07-23 11:57:44 +03:00
|
|
|
};
|
|
|
|
|
2020-09-03 19:19:52 +03:00
|
|
|
_handleUsernameChange = (e) => {
|
|
|
|
e.persist();
|
|
|
|
this.setState({ [e.target.name]: e.target.value.toLowerCase() });
|
|
|
|
};
|
|
|
|
|
2020-07-23 11:57:44 +03:00
|
|
|
_handleChangePassword = async (e) => {
|
|
|
|
this.setState({ changingPassword: true });
|
|
|
|
if (this.state.password !== this.state.confirm) {
|
2020-09-12 01:25:33 +03:00
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: { alert: { message: "Passwords did not match" } },
|
|
|
|
});
|
2020-07-23 11:57:44 +03:00
|
|
|
this.setState({ changingPassword: false });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!Validations.password(this.state.password)) {
|
2020-09-12 01:25:33 +03:00
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: { message: "Password length must be more than 8 characters" },
|
|
|
|
},
|
|
|
|
});
|
2020-07-23 11:57:44 +03:00
|
|
|
this.setState({ changingPassword: false });
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
let response = await Actions.updateViewer({
|
2020-07-23 11:57:44 +03:00
|
|
|
type: "CHANGE_PASSWORD",
|
|
|
|
password: this.state.password,
|
|
|
|
});
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
if (!response) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
message: "We're having trouble connecting right now.",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
} else if (response.error) {
|
|
|
|
dispatchCustomEvent({
|
|
|
|
name: "create-alert",
|
|
|
|
detail: {
|
|
|
|
alert: {
|
|
|
|
decorator: response.decorator,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-07-23 11:57:44 +03:00
|
|
|
this.setState({ changingPassword: false, password: "", confirm: "" });
|
2020-07-01 09:41:54 +03:00
|
|
|
};
|
|
|
|
|
2020-07-22 08:53:29 +03:00
|
|
|
_handleDelete = async (e) => {
|
|
|
|
this.setState({ deleting: true });
|
|
|
|
|
2020-10-27 13:56:29 +03:00
|
|
|
await Window.delay(100);
|
2020-07-22 08:53:29 +03:00
|
|
|
|
2020-11-22 00:25:40 +03:00
|
|
|
await UserBehaviors.deleteMe();
|
2020-09-13 05:59:47 +03:00
|
|
|
this.setState({ deleting: false });
|
2020-07-22 08:53:29 +03:00
|
|
|
};
|
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
_handleChange = (e) => {
|
2020-09-27 02:40:44 +03:00
|
|
|
this.setState({ [e.target.name]: e.target.value });
|
|
|
|
};
|
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
render() {
|
2020-08-07 02:06:54 +03:00
|
|
|
const profileURL = `https://slate.host/${this.state.username}`;
|
2020-07-23 04:25:19 +03:00
|
|
|
|
2020-04-09 00:29:13 +03:00
|
|
|
return (
|
|
|
|
<ScenePage>
|
2020-10-27 13:56:29 +03:00
|
|
|
<ScenePageHeader title="Settings" />
|
2020-10-27 11:40:52 +03:00
|
|
|
<TabGroup
|
|
|
|
tabs={["Profile", "Data Storage", "Security", "Account"]}
|
|
|
|
value={this.state.tab}
|
|
|
|
onChange={(value) => this.setState({ tab: value })}
|
2020-11-13 01:36:20 +03:00
|
|
|
style={{ marginBottom: 48 }}
|
2020-07-23 11:57:44 +03:00
|
|
|
/>
|
2020-10-27 11:40:52 +03:00
|
|
|
{this.state.tab === 0 ? (
|
|
|
|
<div>
|
2020-11-13 01:36:20 +03:00
|
|
|
<div css={STYLES_HEADER}>Your Avatar</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
<Avatar size={256} url={this.props.viewer.data.photo} />
|
2020-10-27 11:40:52 +03:00
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
|
|
|
<input css={STYLES_FILE_HIDDEN} type="file" id="file" onChange={this._handleUpload} />
|
|
|
|
<System.ButtonPrimary
|
2020-11-13 01:36:20 +03:00
|
|
|
style={{ margin: "0 16px 16px 0", width: "200px" }}
|
2020-10-27 11:40:52 +03:00
|
|
|
type="label"
|
|
|
|
htmlFor="file"
|
|
|
|
loading={this.state.changingAvatar}
|
|
|
|
>
|
2020-10-27 11:43:00 +03:00
|
|
|
Upload avatar
|
2020-10-27 11:40:52 +03:00
|
|
|
</System.ButtonPrimary>
|
|
|
|
</div>
|
2020-11-13 01:36:20 +03:00
|
|
|
|
2020-11-23 08:05:48 +03:00
|
|
|
<div css={STYLES_HEADER}>Display name</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
<System.Input
|
|
|
|
name="name"
|
|
|
|
value={this.state.name}
|
2020-11-13 01:36:20 +03:00
|
|
|
placeholder="Your name..."
|
2020-10-27 11:40:52 +03:00
|
|
|
onChange={this._handleChange}
|
|
|
|
/>
|
|
|
|
|
2020-11-13 01:36:20 +03:00
|
|
|
<div css={STYLES_HEADER}>Bio</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
<System.Textarea
|
|
|
|
name="body"
|
|
|
|
value={this.state.body}
|
2020-11-13 01:36:20 +03:00
|
|
|
placeholder="A bit about yourself..."
|
2020-10-27 11:40:52 +03:00
|
|
|
onChange={this._handleChange}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
2020-11-13 01:36:20 +03:00
|
|
|
<System.ButtonPrimary
|
|
|
|
onClick={this._handleSave}
|
|
|
|
loading={this.state.changingDetails}
|
|
|
|
style={{ width: "200px" }}
|
|
|
|
>
|
2020-10-27 11:43:00 +03:00
|
|
|
Save
|
2020-10-27 11:40:52 +03:00
|
|
|
</System.ButtonPrimary>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : null}
|
|
|
|
{this.state.tab === 1 ? (
|
2020-11-13 01:36:20 +03:00
|
|
|
<div style={{ maxWidth: 800 }}>
|
|
|
|
<div css={STYLES_HEADER}>
|
|
|
|
Allow Slate to make Filecoin archive storage deals on your behalf
|
|
|
|
</div>
|
|
|
|
<div style={{ maxWidth: 800 }}>
|
|
|
|
If this box is checked, then we will make Filecoin archive storage deals on your
|
|
|
|
behalf. By default these storage deals are not encrypted and anyone can retrieve them
|
|
|
|
from the Filecoin Network.
|
|
|
|
</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
|
|
|
|
<System.CheckBox
|
|
|
|
style={{ marginTop: 48 }}
|
|
|
|
name="allow_filecoin_directory_listing"
|
|
|
|
value={this.state.allow_filecoin_directory_listing}
|
2020-11-22 00:25:40 +03:00
|
|
|
onChange={this._handleChange}
|
2020-10-27 11:40:52 +03:00
|
|
|
>
|
|
|
|
Show your successful deals on a directory page where others can retrieve them.
|
|
|
|
</System.CheckBox>
|
|
|
|
|
|
|
|
<System.CheckBox
|
|
|
|
style={{ marginTop: 24 }}
|
|
|
|
name="allow_automatic_data_storage"
|
|
|
|
value={this.state.allow_automatic_data_storage}
|
2020-11-22 00:25:40 +03:00
|
|
|
onChange={this._handleChange}
|
2020-10-27 11:40:52 +03:00
|
|
|
>
|
|
|
|
Allow Slate to make archive storage deals on your behalf to the Filecoin Network. You
|
|
|
|
will get a receipt in the Filecoin section.
|
|
|
|
</System.CheckBox>
|
|
|
|
|
|
|
|
<System.CheckBox
|
|
|
|
style={{ marginTop: 24 }}
|
|
|
|
name="allow_encrypted_data_storage"
|
|
|
|
value={this.state.allow_encrypted_data_storage}
|
2020-11-22 00:25:40 +03:00
|
|
|
onChange={this._handleChange}
|
2020-10-27 11:40:52 +03:00
|
|
|
>
|
|
|
|
Force encryption on archive storage deals (only you can see retrieved data from the
|
|
|
|
Filecoin network).
|
|
|
|
</System.CheckBox>
|
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
|
|
|
<System.ButtonPrimary
|
|
|
|
onClick={this._handleSaveFilecoin}
|
|
|
|
loading={this.state.changingFilecoin}
|
2020-11-13 01:36:20 +03:00
|
|
|
style={{ width: "200px" }}
|
2020-10-27 11:40:52 +03:00
|
|
|
>
|
2020-10-27 11:43:00 +03:00
|
|
|
Save
|
2020-10-27 11:40:52 +03:00
|
|
|
</System.ButtonPrimary>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : null}
|
|
|
|
{this.state.tab === 2 ? (
|
|
|
|
<div>
|
2020-11-13 01:36:20 +03:00
|
|
|
<div css={STYLES_HEADER}>Change password</div>
|
|
|
|
<div>Passwords must be a minimum of eight characters.</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
|
|
|
|
<System.Input
|
|
|
|
containerStyle={{ marginTop: 24 }}
|
|
|
|
name="password"
|
|
|
|
type="password"
|
|
|
|
value={this.state.password}
|
|
|
|
placeholder="Your new password"
|
|
|
|
onChange={this._handleChange}
|
|
|
|
/>
|
|
|
|
<System.Input
|
2020-11-13 01:36:20 +03:00
|
|
|
containerStyle={{ marginTop: 12 }}
|
2020-10-27 11:40:52 +03:00
|
|
|
name="confirm"
|
|
|
|
type="password"
|
|
|
|
value={this.state.confirm}
|
2020-11-13 01:36:20 +03:00
|
|
|
placeholder="Confirm password"
|
2020-10-27 11:40:52 +03:00
|
|
|
onChange={this._handleChange}
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
|
|
|
<System.ButtonPrimary
|
|
|
|
onClick={this._handleChangePassword}
|
|
|
|
loading={this.state.changingPassword}
|
2020-11-13 01:36:20 +03:00
|
|
|
style={{ width: "200px" }}
|
2020-10-27 11:40:52 +03:00
|
|
|
>
|
|
|
|
Change password
|
|
|
|
</System.ButtonPrimary>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : null}
|
|
|
|
{this.state.tab === 3 ? (
|
|
|
|
<div>
|
2020-11-23 08:05:48 +03:00
|
|
|
<div css={STYLES_HEADER}>Change username</div>
|
|
|
|
<div style={{ maxWidth: 800 }}>
|
|
|
|
Username must be unique. <br />
|
|
|
|
Changing your username will make any links to your profile or slates that you
|
|
|
|
previously shared invalid.
|
|
|
|
</div>
|
|
|
|
<System.Input
|
|
|
|
containerStyle={{ marginTop: 12 }}
|
|
|
|
name="username"
|
|
|
|
value={this.state.username}
|
|
|
|
placeholder="Username"
|
|
|
|
onChange={this._handleUsernameChange}
|
|
|
|
/>
|
|
|
|
<div style={{ marginTop: 24 }}>
|
|
|
|
<System.ButtonPrimary
|
|
|
|
onClick={this._handleSave}
|
|
|
|
loading={this.state.changingDetails}
|
|
|
|
style={{ width: "200px" }}
|
|
|
|
>
|
|
|
|
Change my username
|
|
|
|
</System.ButtonPrimary>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div css={STYLES_HEADER} style={{ marginTop: 64 }}>
|
|
|
|
Delete your account
|
|
|
|
</div>
|
2020-11-13 01:36:20 +03:00
|
|
|
<div style={{ maxWidth: 800 }}>
|
|
|
|
If you choose to delete your account you will lose your Textile Hub and Powergate key.
|
|
|
|
</div>
|
2020-10-27 11:40:52 +03:00
|
|
|
|
|
|
|
<div style={{ marginTop: 24 }}>
|
2020-11-23 08:05:48 +03:00
|
|
|
<System.ButtonWarning
|
2020-11-13 01:36:20 +03:00
|
|
|
onClick={this._handleDelete}
|
|
|
|
loading={this.state.deleting}
|
|
|
|
style={{ width: "200px" }}
|
|
|
|
>
|
2020-10-27 11:40:52 +03:00
|
|
|
Delete my account
|
2020-11-23 08:05:48 +03:00
|
|
|
</System.ButtonWarning>
|
2020-10-27 11:40:52 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : null}
|
|
|
|
<input
|
|
|
|
readOnly
|
|
|
|
ref={(c) => {
|
|
|
|
this._ref = c;
|
|
|
|
}}
|
|
|
|
value={this.state.copyValue}
|
|
|
|
tabIndex="-1"
|
|
|
|
css={STYLES_COPY_INPUT}
|
|
|
|
/>{" "}
|
2020-04-09 00:29:13 +03:00
|
|
|
</ScenePage>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|