Skip to content

Conversation

@Kosei805
Copy link
Contributor

@Kosei805 Kosei805 commented Nov 18, 2024

やったこと

  • やったこと (コミットのハッシュ)
  • actionでログイン処理を行なっているので、ブラウザ側でのログイン処理部分を消した ba8d2c4
  • ユーザー追加ページのurlを書き換えた 0833515
  • ユーザー追加ページの実装をした 805555e
  • パスワード生成時のnotificationの追加 10234ac
  • パスワードの有効時間をボタンのラベルとして表示 b1fb4ee
  • mantineのアップデート(RingProgressをなめらかに動かすため) ae81245
  • パスワードコピーボタンの実装 d6c83b4
  • actionの実装 f306d0a

確認した方法

  • pnpm iでアップデート
  • pnpm run devで実行した
  • ユーザーを追加した

スクリーンショット

状態 画面
デフォルト image
パスワード生成後 image

自動生成したコード

  • ファイル名

@Kosei805 Kosei805 added the frontend frontend development label Nov 18, 2024
@Kosei805 Kosei805 requested a review from kimurash November 18, 2024 09:22
@Kosei805 Kosei805 self-assigned this Nov 18, 2024
Comment on lines -28 to +26
<LoginSubmitButton isPending={isPending} />
<LoginSubmitButton />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消さなくてもよかったのでは?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これはクライアント側でログインのフック動かしてた時にそのフックを使った通信が通信中かどうかみるものやからactionの通信には反応せんはず

それにactionの通信はオーバーレイかかるようにしたしね

Copy link
Member

@kimurash kimurash Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作成するユーザは1人だから user-create/UserCreateComponent.tsx の方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更した

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

home.users.create の方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更した

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate: {
name: (value) => {
if (value.length < 1) {
return '名前は必須です';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ユーザー名は必須ですの方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更した

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,11 @@
export const passwordGen = () => {
let password = '';
const passwordCheck = (element: string) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

関数名は動詞から始めた方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なんと言うか関数というよりフラグのような認識で作ってたからミスったわ
描き直します

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更した

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kimurash kimurash changed the title ユーザー追加ページの実装 ユーザー作成ページの実装 Nov 18, 2024
@Kosei805 Kosei805 marked this pull request as ready for review November 19, 2024 06:20
Comment on lines 31 to 32
successNotification('パスワードをコピーしました');
copy();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

順番逆の方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +19 to +25
<Tooltip
label={
copied ? 'パスワードをコピーしました' : 'パスワードをコピーする'
}
withArrow
position="right"
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
};

const UserAddPage = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserCreatePage にしておこう

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 11 to 17
return (
<Button
disabled
leftSection={<PasswordValidProgress counts={counts} />}
>{`パスワードの有効時間:${counts}秒`}</Button>
);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return (
<Button
disabled
leftSection={<PasswordValidProgress counts={counts} />}
>{`パスワードの有効時間:${counts}秒`}</Button>
);
};
const fmtedCounts = counts.toString().padStart(2, ' ');
return (
<Button
disabled
leftSection={<PasswordValidProgress counts={counts} />}
>{`パスワードの有効時間:${fmtedCounts}秒`}</Button>
);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,11 @@
export const passwordGen = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

関数名は動詞から始めた方がいいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const handlePasswordGenButtonClick = () => {
const password = passwordGen();
clipborad.copy(password);
// カウントダウンを正常に動かすために、29秒に設定
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「コールバック関数の実行時間を考慮して」の方が分かりやすいと思った

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setCounts(counts - 1);
}
}, 1000);
return () => clearInterval(countDown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ページが閉じられた時に実行されることをコメントで書いておきたい

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Kosei805 Kosei805 merged commit bddebba into main Nov 19, 2024
3 checks passed
@Kosei805 Kosei805 deleted the 71-users-add-page branch November 19, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend frontend development

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ユーザ追加ページの実装

3 participants