Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
Merge branch 'development' into bugfix/emoji-picker-in-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm authored Feb 14, 2024
2 parents 393faad + 321ce2d commit 9d14e0d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
21 changes: 13 additions & 8 deletions src/common/components/follow-controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,19 @@ export default class FollowControls extends BaseComponent<Props, State> {
const muteMsg = _t("follow-controls.mute");
const unMuteMsg = _t("follow-controls.unMute");

const btnFollow = LoginRequired({
...this.props,
children: (
<Button style={{ marginRight: "5px" }} disabled={inProgress} onClick={this.follow}>
{followMsg}
</Button>
)
});
const btnFollow =
this.props.activeUser?.username !== this.props.targetUsername ? (
LoginRequired({
...this.props,
children: (
<Button style={{ marginRight: "5px" }} disabled={inProgress} onClick={this.follow}>
{followMsg}
</Button>
)
})
) : (
<></>
);

const btnUnfollow = LoginRequired({
...this.props,
Expand Down
15 changes: 7 additions & 8 deletions src/common/pages/sign-up.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@
}
}

.bottom-description,
.form-faq {
opacity: 0.7;
text-align: center;
margin-bottom: 10px;
}

.form-done {
margin: 20px auto;
text-align: center;
Expand Down Expand Up @@ -134,14 +141,6 @@
form {
margin-bottom: 30px;
}

.form-do-login,
.form-bottom-description,
.form-faq {
opacity: 0.7;
text-align: center;
margin-bottom: 10px;
}
}
}
}
Expand Down
26 changes: 17 additions & 9 deletions src/common/pages/sign-up.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export const SignUp = (props: PageProps) => {
} else {
setDone(true);
setLsReferral(undefined);
setStage(Stage.FORM);
}
} catch (e) {
if (axios.isAxiosError(e) && e.response?.data?.message) {
Expand Down Expand Up @@ -226,7 +227,7 @@ export const SignUp = (props: PageProps) => {
<img src={signupSvg} alt="Signup" />
</div>
<div className="the-form">
{!done && stage === Stage.FORM ? (
{stage === Stage.FORM ? (
<>
<div className="form-title">{_t("sign-up.header")}</div>
<div className="form-sub-title">{_t("sign-up.description")}</div>
Expand All @@ -238,6 +239,15 @@ export const SignUp = (props: PageProps) => {
<div className="flex items-center justify-center form-image">
<img src={signupSvg} alt="Signup" />
</div>

<div className="bottom-description text-center">
{_t("sign-up.bottom-description")}
</div>

<Tsx k="sign-up.learn-more">
<div className="form-faq" />
</Tsx>

{done ? (
<div className="form-done">
<div className="done-icon">{checkSvg}</div>
Expand All @@ -255,14 +265,8 @@ export const SignUp = (props: PageProps) => {
)}
{!done && stage === Stage.FORM ? (
<div className="form-content">
<div className="form-bottom-description text-center">
{_t("sign-up.bottom-description")}
</div>
<Tsx k="sign-up.learn-more">
<div className="form-faq" />
</Tsx>

<Form
className="form-content"
ref={form}
onSubmit={async (e: React.FormEvent) => {
e.preventDefault();
Expand Down Expand Up @@ -383,7 +387,11 @@ export const SignUp = (props: PageProps) => {
<div>{_t("sign-up.free-account-desc")}</div>
</div>
<div className="bg-gray-100 dark:bg-gray-800 border-t border-[--border-color] py-2 px-3">
<Button className="w-full" onClick={regularRegister}>
<Button
className="w-full"
onClick={regularRegister}
icon={inProgress && <Spinner className="w-3.5 h-3.5" />}
>
{_t("sign-up.register-free")}
</Button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/style/_bootstrap_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ $list-group-action-active-bg-d: $gray-200;
$border-color-d: $gray-300;

// App variables
$box-shadow-alt: 0 .1rem 1rem rgba($black, .10);
$box-shadow-alt: 0 .1rem 1rem rgba($black, .10);

0 comments on commit 9d14e0d

Please sign in to comment.