ข้ามไปยังเนื้อหา

หน้าตัวอย่าง

เข้าสู่ระบบ

หน้าแรกที่ทุกคนเห็นก่อนใช้ BSRU ERP หรือคอนโซล ตาม ADR 0024 ผู้ใช้พิมพ์รหัสผ่านในหน้าของเซิร์ฟเวอร์เข้าสู่ระบบ bsru-erp-auth เท่านั้น เว็บและคอนโซลส่งผู้ใช้ไปที่นั่น หน้าของ bsru-erp-auth ใช้ markup และคลาสเดียวกับ SignInLayout และคอมโพเนนต์ในหน้านี้ ตัวอย่างด้านล่างจึงเป็นต้นแบบของหน้านั้น และหน้าก่อนเข้าสู่ระบบอื่น ๆ ใช้โครงเดียวกัน

คอมโพเนนต์ที่ใช้

import { SignInLayout, TextInput, PasswordInput, Button, Alert, Segmented } from "@bsru/ui";

กฎของหน้านี้

ถ้อยคำ

  • หัวข้อคือ เข้าสู่ระบบ บอกในบรรทัดรองว่าใช้บัญชีอะไร
  • เมื่อเข้าสู่ระบบไม่สำเร็จ ใช้ข้อความเดียวกันเสมอ ไม่ว่าอีเมลผิด รหัสผ่านผิด หรือบัญชีถูกล็อก เพื่อไม่ให้รู้ว่ามีอีเมลใดในระบบ (ADR 0024)
  • ลืมรหัสผ่าน: ยังไม่มีการตั้งรหัสใหม่ทางอีเมล บอกให้ติดต่อผู้ดูแลระบบของหน่วยงาน

ปุ่มและช่องกรอก

  • อีเมลและรหัสผ่านเท่านั้น ปุ่มหลักเต็มความกว้างหนึ่งปุ่ม ใส่ autoComplete username และ current-password ให้ตัวจัดการรหัสผ่านเติมได้
  • ไม่มีช่องจำฉันไว้ เพราะการเข้าสู่ระบบมีอายุไม่เกิน 8 ชั่วโมงสำหรับผู้ใช้ ERP และ 4 ชั่วโมงสำหรับผู้ดูแลระบบ (ADR 0024)
  • ไม่มีลิงก์สมัครสมาชิก ผู้ดูแลระบบเป็นผู้สร้างบัญชี
  • เข้าสู่ระบบครั้งแรกด้วยรหัสชั่วคราว ต้องตั้งรหัสผ่านของตัวเองในหน้าเดียวกันนี้ก่อนใช้งาน อย่างน้อย 12 ตัวอักษร
  • ปุ่มบัญชีมหาวิทยาลัย (SSO) เป็นทางเลือกในอนาคต ใช้ alternatives และเป็นปุ่มรองเสมอ

ห้ามแสดง

  • รหัสผ่านที่พิมพ์ไว้หลังส่งฟอร์มไม่สำเร็จ เก็บไว้เฉพาะอีเมล
  • ข้อความที่บอกว่าอีเมลนี้ไม่มีในระบบ หรือเหลือจำนวนครั้งที่ลองได้กี่ครั้ง
  • ปุ่ม Google Facebook หรือบริการภายนอกอื่น

หน้าตา

  • แผงซ้ายใช้สีไล่ --g-rail แบบเดียวกับเมนู ตราอยู่บนแผ่นสีขาว ใช้ภาพมหาวิทยาลัยได้ทาง image เมื่อได้รับอนุญาตแล้ว
  • บนโทรศัพท์แผงสีหลักของแอปย่อเป็นหัวหน้าเล็ก ๆ มีตรา ชื่อ และหัวข้อ ไม่มีจุดสลับข้อความ
  • แสดงแถบระบบจำลองด้วย notice ทุกครั้งในระบบทดสอบ

ตัวอย่างทั้งหน้า

แต่ละตัวอย่างเป็นหน้าเต็ม แสดงในกรอบจอคอมพิวเตอร์ เลือกโทรศัพท์หรือแท็บเล็ตที่แถบบนเพื่อดูบนจอนั้น ข้อมูลทั้งหมดเป็นข้อมูลสมมติ

ERP: เข้าสู่ระบบ

หน้าเข้าสู่ระบบของ BSRU ERP แผงซ้ายมีสามข้อความสลับกันด้วยจุด ปุ่มภาษาอยู่มุมขวาบน

จอคอมพิวเตอร์ 1280 × 800 px
const t = useTranslations();

<SignInLayout
  brand={{ name: "BSRU ERP", caption: t("brand.university"), logo: "/bsru-logo.png", alt: t("brand.seal") }}
  slides={[
    { headline: t("signIn.slide1"), description: t("signIn.slide1Text") },
    { headline: t("signIn.slide2"), description: t("signIn.slide2Text") },
    { headline: t("signIn.slide3"), description: t("signIn.slide3Text") },
  ]}
  title={t("signIn.title")}
  subtitle={t("signIn.subtitle")}
  topAction={<LanguageSwitch />}
  footer={t("signIn.forgot")}
  notice={demo ? t("shell.demo") : undefined}
>
  <form method="post" className="flex flex-col gap-4">
    <TextInput label={t("signIn.email")} name="email" type="email" icon={Mail} autoComplete="username" required />
    <PasswordInput label={t("signIn.password")} name="password" autoComplete="current-password" required />
    <Button tone="primary" type="submit" icon={LogIn} label={t("signIn.submit")} wide />
  </form>
</SignInLayout>

เข้าสู่ระบบไม่สำเร็จ

Alert สีแดงอยู่เหนือช่องกรอก ข้อความเดียวกันสำหรับทุกสาเหตุ อีเมลยังอยู่ ช่องรหัสผ่านว่าง

จอคอมพิวเตอร์ 1280 × 800 px
<SignInLayout brand={brand} slides={slides} title={t("signIn.title")} subtitle={t("signIn.subtitle")} topAction={<LanguageSwitch />} footer={t("signIn.forgot")} notice={notice}>
  {failed ? (
    <Alert tone="danger" title={t("signIn.failed")}>
      {t("signIn.failedBody")}
    </Alert>
  ) : null}
  <form method="post" className="flex flex-col gap-4">
    {/* Keep the email address. Never send the password back. */}
    <TextInput label={t("signIn.email")} name="email" type="email" icon={Mail} autoComplete="username" defaultValue={email} required />
    <PasswordInput label={t("signIn.password")} name="password" autoComplete="current-password" required />
    <Button tone="primary" type="submit" icon={LogIn} label={t("signIn.submit")} wide />
  </form>
</SignInLayout>

ตั้งรหัสผ่านใหม่เมื่อเข้าสู่ระบบครั้งแรก

โครงเดียวกัน หลังเข้าสู่ระบบด้วยรหัสชั่วคราว ช่องตรวจความยาวและความตรงกันขณะพิมพ์ ลองพิมพ์ในช่องได้

จอคอมพิวเตอร์ 1280 × 800 px
const [password, setPassword] = useState("");
const [again, setAgain] = useState("");

<SignInLayout brand={brand} slides={slides} title={t("newPassword.title")} subtitle={t("newPassword.subtitle")} topAction={<LanguageSwitch />} footer={t("newPassword.footer")} notice={notice}>
  <form method="post" className="flex flex-col gap-4">
    {/* For password managers: the account the new password belongs to. */}
    <TextInput label={t("signIn.email")} name="email" type="email" icon={Mail} autoComplete="username" value={email} readOnly />
    <PasswordInput
      label={t("newPassword.new")}
      name="newPassword"
      hint={t("newPassword.rules")}
      icon={KeyRound}
      autoComplete="new-password"
      value={password}
      onValueChange={setPassword}
      error={password.length > 0 && password.length < 12 ? t("newPassword.short") : undefined}
      required
    />
    <PasswordInput
      label={t("newPassword.again")}
      name="confirmPassword"
      icon={KeyRound}
      autoComplete="new-password"
      value={again}
      onValueChange={setAgain}
      error={again.length > 0 && again !== password ? t("newPassword.mismatch") : undefined}
      required
    />
    <Button tone="primary" type="submit" label={t("newPassword.submit")} wide />
  </form>
</SignInLayout>

คอนโซล: เข้าสู่ระบบ

หน้าเดียวกันสำหรับคอนโซลผู้ดูแลระบบ ชื่อระบบ ข้อความในแผง และบรรทัดรองเปลี่ยนไป ส่วนอื่นเหมือนเดิม

จอคอมพิวเตอร์ 1280 × 800 px
<SignInLayout
  brand={{ name: t("brand.console"), caption: t("brand.university"), logo: "/bsru-logo.png", alt: t("brand.seal") }}
  slides={[
    { headline: t("console.slide1"), description: t("console.slide1Text") },
    { headline: t("console.slide2"), description: t("console.slide2Text") },
  ]}
  title={t("console.signInTitle")}
  subtitle={t("console.signInSubtitle")}
  topAction={<LanguageSwitch />}
  footer={t("signIn.forgot")}
  notice={demo ? t("shell.demo") : undefined}
>
  <form method="post" className="flex flex-col gap-4">…</form>
</SignInLayout>

ทางเลือกในอนาคต: บัญชีมหาวิทยาลัย (SSO)

ยังไม่ได้ใช้ เมื่อเชื่อมผู้ให้บริการยืนยันตัวตนของมหาวิทยาลัยแล้ว alternatives แสดงปุ่มรองใต้เส้น หรือ ปุ่มหลักยังเป็นการเข้าสู่ระบบด้วยอีเมล

จอคอมพิวเตอร์ 1280 × 800 px
<SignInLayout
  brand={brand}
  slides={slides}
  title={t("signIn.title")}
  footer={t("signIn.forgot")}
  alternatives={<Button icon={Building2} label={t("signIn.university")} href="/auth/sso" wide />}
>
  <form method="post" className="flex flex-col gap-4">…</form>
</SignInLayout>