// Only fetch the data if coming from another route
if (this.isoData.path == this.context.router.route.match.url) {
this.state.siteConfigRes = this.isoData.routeData[0];
- this.state.siteConfigForm.config_hjson = this.state.siteConfigRes.config_hjson;
+ this.state.siteConfigForm.config_hjson =
+ this.state.siteConfigRes.config_hjson;
this.state.siteConfigLoading = false;
this.state.loading = false;
} else {
/>
{this.state.loading ? (
<h5>
- <Spinner />
+ <Spinner large />
</h5>
) : (
<div class="row">
let data = wsJsonToRes<GetSiteConfigResponse>(msg).data;
this.state.siteConfigRes = data;
this.state.loading = false;
- this.state.siteConfigForm.config_hjson = this.state.siteConfigRes.config_hjson;
+ this.state.siteConfigForm.config_hjson =
+ this.state.siteConfigRes.config_hjson;
this.setState(this.state);
var textarea: any = document.getElementById(this.siteConfigTextAreaId);
autosize(textarea);
} else if (op == UserOperation.SaveSiteConfig) {
let data = wsJsonToRes<GetSiteConfigResponse>(msg).data;
this.state.siteConfigRes = data;
- this.state.siteConfigForm.config_hjson = this.state.siteConfigRes.config_hjson;
+ this.state.siteConfigForm.config_hjson =
+ this.state.siteConfigRes.config_hjson;
this.state.siteConfigLoading = false;
toast(i18n.t("site_saved"));
this.setState(this.state);
this.state = this.emptyState;
this.handleSortChange = this.handleSortChange.bind(this);
- this.handleUserSettingsSortTypeChange = this.handleUserSettingsSortTypeChange.bind(
- this
- );
- this.handleUserSettingsListingTypeChange = this.handleUserSettingsListingTypeChange.bind(
- this
- );
+ this.handleUserSettingsSortTypeChange =
+ this.handleUserSettingsSortTypeChange.bind(this);
+ this.handleUserSettingsListingTypeChange =
+ this.handleUserSettingsListingTypeChange.bind(this);
this.handlePageChange = this.handlePageChange.bind(this);
- this.handleUserSettingsBioChange = this.handleUserSettingsBioChange.bind(
- this
- );
+ this.handleUserSettingsBioChange =
+ this.handleUserSettingsBioChange.bind(this);
this.handleAvatarUpload = this.handleAvatarUpload.bind(this);
this.handleAvatarRemove = this.handleAvatarRemove.bind(this);
<div class="container">
{this.state.loading ? (
<h5>
- <Spinner />
+ <Spinner large />
</h5>
) : (
<div class="row">
}
handleUserSettingsSortTypeChange(val: SortType) {
- this.state.saveUserSettingsForm.default_sort_type = Object.keys(
- SortType
- ).indexOf(val);
+ this.state.saveUserSettingsForm.default_sort_type =
+ Object.keys(SortType).indexOf(val);
this.setState(this.state);
}
handleUserSettingsListingTypeChange(val: ListingType) {
- this.state.saveUserSettingsForm.default_listing_type = Object.keys(
- ListingType
- ).indexOf(val);
+ this.state.saveUserSettingsForm.default_listing_type =
+ Object.keys(ListingType).indexOf(val);
this.setState(this.state);
}
} else if (op == UserOperation.SaveUserSettings) {
let data = wsJsonToRes<LoginResponse>(msg).data;
UserService.Instance.login(data);
- this.state.personRes.person_view.person.bio = this.state.saveUserSettingsForm.bio;
- this.state.personRes.person_view.person.display_name = this.state.saveUserSettingsForm.display_name;
- this.state.personRes.person_view.person.banner = this.state.saveUserSettingsForm.banner;
- this.state.personRes.person_view.person.avatar = this.state.saveUserSettingsForm.avatar;
+ this.state.personRes.person_view.person.bio =
+ this.state.saveUserSettingsForm.bio;
+ this.state.personRes.person_view.person.display_name =
+ this.state.saveUserSettingsForm.display_name;
+ this.state.personRes.person_view.person.banner =
+ this.state.saveUserSettingsForm.banner;
+ this.state.personRes.person_view.person.avatar =
+ this.state.saveUserSettingsForm.avatar;
this.state.saveUserSettingsLoading = false;
this.setState(this.state);