<form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}>
{!this.props.community_view && (
<div class="form-group row">
- <label class="col-12 col-form-label" htmlFor="community-name">
+ <label
+ class="col-12 col-sm-2 col-form-label"
+ htmlFor="community-name"
+ >
{i18n.t("name")}
<span
- class="pointer unselectable ml-2 text-muted"
+ class="position-absolute pointer unselectable ml-2 text-muted"
data-tippy-content={i18n.t("name_explain")}
>
<Icon icon="help-circle" classes="icon-inline" />
</span>
</label>
- <div class="col-12">
+ <div class="col-12 col-sm-10">
<input
type="text"
id="community-name"
</div>
)}
<div class="form-group row">
- <label class="col-12 col-form-label" htmlFor="community-title">
+ <label
+ class="col-12 col-sm-2 col-form-label"
+ htmlFor="community-title"
+ >
{i18n.t("display_name")}
<span
- class="pointer unselectable ml-2 text-muted"
+ class="position-absolute pointer unselectable ml-2 text-muted"
data-tippy-content={i18n.t("display_name_explain")}
>
<Icon icon="help-circle" classes="icon-inline" />
</span>
</label>
- <div class="col-12">
+ <div class="col-12 col-sm-10">
<input
type="text"
id="community-title"
/>
</div>
</div>
- <div class="form-group">
- <label>{i18n.t("icon")}</label>
- <ImageUploadForm
- uploadTitle={i18n.t("upload_icon")}
- imageSrc={this.state.communityForm.icon}
- onUpload={this.handleIconUpload}
- onRemove={this.handleIconRemove}
- rounded
- />
+ <div class="form-group row">
+ <label class="col-12 col-sm-2">{i18n.t("icon")}</label>
+ <div class="col-12 col-sm-10">
+ <ImageUploadForm
+ uploadTitle={i18n.t("upload_icon")}
+ imageSrc={this.state.communityForm.icon}
+ onUpload={this.handleIconUpload}
+ onRemove={this.handleIconRemove}
+ rounded
+ />
+ </div>
</div>
- <div class="form-group">
- <label>{i18n.t("banner")}</label>
- <ImageUploadForm
- uploadTitle={i18n.t("upload_banner")}
- imageSrc={this.state.communityForm.banner}
- onUpload={this.handleBannerUpload}
- onRemove={this.handleBannerRemove}
- />
+ <div class="form-group row">
+ <label class="col-12 col-sm-2">{i18n.t("banner")}</label>
+ <div class="col-12 col-sm-10">
+ <ImageUploadForm
+ uploadTitle={i18n.t("upload_banner")}
+ imageSrc={this.state.communityForm.banner}
+ onUpload={this.handleBannerUpload}
+ onRemove={this.handleBannerRemove}
+ />
+ </div>
</div>
<div class="form-group row">
- <label class="col-12 col-form-label" htmlFor={this.id}>
+ <label class="col-12 col-sm-2 col-form-label" htmlFor={this.id}>
{i18n.t("sidebar")}
</label>
- <div class="col-12">
+ <div class="col-12 col-sm-10">
<MarkdownTextArea
initialContent={this.state.communityForm.description}
onContentChange={this.handleCommunityDescriptionChange}
{this.props.enableNsfw && (
<div class="form-group row">
- <div class="col-12">
+ <legend class="col-form-label col-sm-2 pt-0">
+ {i18n.t("nsfw")}
+ </legend>
+ <div class="col-10">
<div class="form-check">
<input
- class="form-check-input"
+ class="form-check-input position-static"
id="community-nsfw"
type="checkbox"
checked={this.state.communityForm.nsfw}
onChange={linkEvent(this, this.handleCommunityNsfwChange)}
/>
- <label class="form-check-label" htmlFor="community-nsfw">
- {i18n.t("nsfw")}
- </label>
</div>
</div>
</div>
<h5>{i18n.t("change_password")}</h5>
<form onSubmit={linkEvent(this, this.handleChangePasswordSubmit)}>
<div class="form-group row">
- <label class="col-lg-5 col-form-label" htmlFor="user-password">
+ <label class="col-sm-5 col-form-label" htmlFor="user-password">
{i18n.t("new_password")}
</label>
- <div class="col-lg-7">
+ <div class="col-sm-7">
<input
type="password"
id="user-password"
</div>
<div class="form-group row">
<label
- class="col-lg-5 col-form-label"
+ class="col-sm-5 col-form-label"
htmlFor="user-verify-password"
>
{i18n.t("verify_password")}
</label>
- <div class="col-lg-7">
+ <div class="col-sm-7">
<input
type="password"
id="user-verify-password"
</div>
</div>
<div class="form-group row">
- <label class="col-lg-5 col-form-label" htmlFor="user-old-password">
+ <label class="col-sm-5 col-form-label" htmlFor="user-old-password">
{i18n.t("old_password")}
</label>
- <div class="col-lg-7">
+ <div class="col-sm-7">
<input
type="password"
id="user-old-password"
<h5>{i18n.t("settings")}</h5>
<form onSubmit={linkEvent(this, this.handleSaveSettingsSubmit)}>
<div class="form-group row">
- <label class="col-lg-5 col-form-label" htmlFor="display-name">
+ <label class="col-sm-5 col-form-label" htmlFor="display-name">
{i18n.t("display_name")}
</label>
- <div class="col-lg-7">
+ <div class="col-sm-7">
<input
id="display-name"
type="text"
</div>
</div>
<div class="form-group row">
- <label class="col-lg-3 col-form-label" htmlFor="user-bio">
+ <label class="col-sm-3 col-form-label" htmlFor="user-bio">
{i18n.t("bio")}
</label>
- <div class="col-lg-9">
+ <div class="col-sm-9">
<MarkdownTextArea
initialContent={this.state.saveUserSettingsForm.bio}
onContentChange={this.handleBioChange}
</div>
</div>
<div class="form-group row">
- <label class="col-lg-3 col-form-label" htmlFor="user-email">
+ <label class="col-sm-3 col-form-label" htmlFor="user-email">
{i18n.t("email")}
</label>
- <div class="col-lg-9">
+ <div class="col-sm-9">
<input
type="email"
id="user-email"
</div>
</div>
<div class="form-group row">
- <label class="col-lg-5 col-form-label" htmlFor="matrix-user-id">
+ <label class="col-sm-5 col-form-label" htmlFor="matrix-user-id">
<a href={elementUrl} rel="noopener">
{i18n.t("matrix_user_id")}
</a>
</label>
- <div class="col-lg-7">
+ <div class="col-sm-7">
<input
id="matrix-user-id"
type="text"
/>
</div>
</div>
- <div class="form-group">
- <label>{i18n.t("avatar")}</label>
- <ImageUploadForm
- uploadTitle={i18n.t("upload_avatar")}
- imageSrc={this.state.saveUserSettingsForm.avatar}
- onUpload={this.handleAvatarUpload}
- onRemove={this.handleAvatarRemove}
- rounded
- />
+ <div class="form-group row">
+ <label class="col-sm-3">{i18n.t("avatar")}</label>
+ <div class="col-sm-9">
+ <ImageUploadForm
+ uploadTitle={i18n.t("upload_avatar")}
+ imageSrc={this.state.saveUserSettingsForm.avatar}
+ onUpload={this.handleAvatarUpload}
+ onRemove={this.handleAvatarRemove}
+ rounded
+ />
+ </div>
</div>
- <div class="form-group">
- <label>{i18n.t("banner")}</label>
- <ImageUploadForm
- uploadTitle={i18n.t("upload_banner")}
- imageSrc={this.state.saveUserSettingsForm.banner}
- onUpload={this.handleBannerUpload}
- onRemove={this.handleBannerRemove}
- />
+ <div class="form-group row">
+ <label class="col-sm-3">{i18n.t("banner")}</label>
+ <div class="col-sm-9">
+ <ImageUploadForm
+ uploadTitle={i18n.t("upload_banner")}
+ imageSrc={this.state.saveUserSettingsForm.banner}
+ onUpload={this.handleBannerUpload}
+ onRemove={this.handleBannerRemove}
+ />
+ </div>
</div>
- <div class="form-group">
- <label htmlFor="user-language">{i18n.t("language")}</label>
- <select
- id="user-language"
- value={this.state.saveUserSettingsForm.lang}
- onChange={linkEvent(this, this.handleLangChange)}
- class="ml-2 custom-select w-auto"
- >
- <option disabled aria-hidden="true">
- {i18n.t("language")}
- </option>
- <option value="browser">{i18n.t("browser_default")}</option>
- <option disabled aria-hidden="true">
- ──
- </option>
- {languages.sort().map(lang => (
- <option value={lang.code}>
- {ISO6391.getNativeName(lang.code) || lang.code}
+ <div class="form-group row">
+ <label class="col-sm-3" htmlFor="user-language">
+ {i18n.t("language")}
+ </label>
+ <div class="col-sm-9">
+ <select
+ id="user-language"
+ value={this.state.saveUserSettingsForm.lang}
+ onChange={linkEvent(this, this.handleLangChange)}
+ class="custom-select w-auto"
+ >
+ <option disabled aria-hidden="true">
+ {i18n.t("language")}
</option>
- ))}
- </select>
- </div>
- <div class="form-group">
- <label htmlFor="user-theme">{i18n.t("theme")}</label>
- <select
- id="user-theme"
- value={this.state.saveUserSettingsForm.theme}
- onChange={linkEvent(this, this.handleThemeChange)}
- class="ml-2 custom-select w-auto"
- >
- <option disabled aria-hidden="true">
- {i18n.t("theme")}
- </option>
- <option value="browser">{i18n.t("browser_default")}</option>
- {themes.map(theme => (
- <option value={theme}>{theme}</option>
- ))}
- </select>
+ <option value="browser">{i18n.t("browser_default")}</option>
+ <option disabled aria-hidden="true">
+ ──
+ </option>
+ {languages.sort().map(lang => (
+ <option value={lang.code}>
+ {ISO6391.getNativeName(lang.code) || lang.code}
+ </option>
+ ))}
+ </select>
+ </div>
</div>
- <form className="form-group">
- <label>
- <div class="mr-2">{i18n.t("type")}</div>
+ <div class="form-group row">
+ <label class="col-sm-3" htmlFor="user-theme">
+ {i18n.t("theme")}
</label>
- <ListingTypeSelect
- type_={
- Object.values(ListingType)[
- this.state.saveUserSettingsForm.default_listing_type
- ]
- }
- showLocal={showLocal(this.isoData)}
- onChange={this.handleListingTypeChange}
- />
+ <div class="col-sm-9">
+ <select
+ id="user-theme"
+ value={this.state.saveUserSettingsForm.theme}
+ onChange={linkEvent(this, this.handleThemeChange)}
+ class="custom-select w-auto"
+ >
+ <option disabled aria-hidden="true">
+ {i18n.t("theme")}
+ </option>
+ <option value="browser">{i18n.t("browser_default")}</option>
+ {themes.map(theme => (
+ <option value={theme}>{theme}</option>
+ ))}
+ </select>
+ </div>
+ </div>
+ <form className="form-group row">
+ <label class="col-sm-3">{i18n.t("type")}</label>
+ <div class="col-sm-9">
+ <ListingTypeSelect
+ type_={
+ Object.values(ListingType)[
+ this.state.saveUserSettingsForm.default_listing_type
+ ]
+ }
+ showLocal={showLocal(this.isoData)}
+ onChange={this.handleListingTypeChange}
+ />
+ </div>
</form>
- <form className="form-group">
- <label>
- <div class="mr-2">{i18n.t("sort_type")}</div>
- </label>
- <SortSelect
- sort={
- Object.values(SortType)[
- this.state.saveUserSettingsForm.default_sort_type
- ]
- }
- onChange={this.handleSortTypeChange}
- />
+ <form className="form-group row">
+ <label class="col-sm-3">{i18n.t("sort_type")}</label>
+ <div class="col-sm-9">
+ <SortSelect
+ sort={
+ Object.values(SortType)[
+ this.state.saveUserSettingsForm.default_sort_type
+ ]
+ }
+ onChange={this.handleSortTypeChange}
+ />
+ </div>
</form>
{this.state.siteRes.site_view.site.enable_nsfw && (
<div class="form-group">