Skip to content

Commit

Permalink
Forget password page
Browse files Browse the repository at this point in the history
Fixes #126
  • Loading branch information
doroudi committed Jan 6, 2025
1 parent c9442f8 commit 6648396
Show file tree
Hide file tree
Showing 19 changed files with 214 additions and 268 deletions.
114 changes: 1 addition & 113 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="mask-icon" href="/favicon/safari-pinned-tab.svg" color="#00a300">
<link rel="shortcut icon" href="/favicon/favicon.ico">
<script src="assets/js/snap.svg-min.js"></script>

<meta name="msapplication-TileColor" content="#00a300">
<meta name="msapplication-config" content="/favicon/browserconfig.xml">
Expand Down Expand Up @@ -128,96 +127,6 @@
}
</style>

<style>
.container {
display: none;
}

.container.show {
display: block;
}

.pageload-overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
visibility: hidden;
}

.pageload-overlay.show {
visibility: visible;
}

.pageload-overlay svg {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}

.pageload-overlay svg path {
fill: #fff;
}

.pageload-overlay::after,
.pageload-overlay::before {
content: '';
position: fixed;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
margin: -10px 0 0 -10px;
border-radius: 50%;
visibility: hidden;
opacity: 0;
z-index: 1000;
-webkit-transition: opacity 0.15s, visibility 0s 0.15s;
transition: opacity 0.15s, visibility 0s 0.15s;
}

.pageload-overlay::after {
background: #6cc88a;
-webkit-transform: translateX(-20px);
transform: translateX(-20px);
-webkit-animation: moveRight 0.6s linear infinite alternate;
animation: moveRight 0.6s linear infinite alternate;
}

.pageload-overlay::before {
background: #4fc3f7;
-webkit-transform: translateX(20px);
transform: translateX(20px);
-webkit-animation: moveLeft 0.6s linear infinite alternate;
animation: moveLeft 0.6s linear infinite alternate;
}

@-webkit-keyframes moveRight {
to { -webkit-transform: translateX(20px); }
}

@keyframes moveRight {
to { transform: translateX(20px); }
}

@-webkit-keyframes moveLeft {
to { -webkit-transform: translateX(-20px); }
}

@keyframes moveLeft {
to { transform: translateX(-20px); }
}

.pageload-loading.pageload-overlay::after,
.pageload-loading.pageload-overlay::before {
opacity: 1;
visibility: visible;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
}
</style>

<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
Expand Down Expand Up @@ -246,28 +155,7 @@ <h1>Yummy Admin</h1>
<h2>Free Vue 3 Dashboard</h2>
</div>
</div>
<script src="assets/js/svgLoader.js"></script>
<script>
(function () {
const loading = document.querySelector('.preloader')
const mainContent = document.querySelector('.main-content')
const loader = new SVGLoader(loading, { speedIn: 300, easingIn: mina.easeinout })
function init() {
loader.show()
// after some time hide loader
setTimeout(() => {
loader.hide()

loading.classList.remove('show')

// update..
mainContent.classList.add('show')
}, 2000)
}

init()
})()
</script>

<script type="module" src="/src/main.ts"></script>
<noscript>This website requires JavaScript to function properly. Please enable JavaScript to continue.</noscript>
</body>
Expand Down
6 changes: 6 additions & 0 deletions locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ forgot:
button: استعادة
haveNotAccount: ليس لديك حساب؟
register: أنشئ واحداً!
email: البريد الإلكتروني
resetPassword: إعادة تعيين كلمة المرور
login: تسجيل الدخول
rememberInfo: هل تذكرت كلمة المرور؟
sendEmailSuccess: تم إرسال البريد الإلكتروني بنجاح، يرجى التحقق من بريدك الإلكتروني
emailValidation: البريد الإلكتروني غير صالح
dashboard:
summary: الملخص
transactions: المعاملات
Expand Down
6 changes: 6 additions & 0 deletions locales/ch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ forgot:
button: 恢复
haveNotAccount: 没有账户?
register: 创建一个!
email: 电子邮件
resetPassword: 重置密码
login: 登录
rememberInfo: 记住密码?
sendEmailSuccess: 电子邮件发送成功,请检查您的电子邮件
emailValidation: 电子邮件无效
dashboard:
summary: 概要
transactions: 交易
Expand Down
7 changes: 7 additions & 0 deletions locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ forgot:
button: Wiederherstellen
haveNotAccount: Kein Konto?
register: Erstellen Sie eins!
email: E-Mail
resetPassword: Passwort zurücksetzen
login: Anmelden
rememberInfo: Passwort merken?
sendEmailSuccess: E-Mail erfolgreich gesendet, bitte überprüfen Sie Ihre E-Mail
emailValidation: Ungültige E-Mail

dashboard:
summary: Zusammenfassung
transactions: Transaktionen
Expand Down
6 changes: 6 additions & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ forgot:
button: Recover
haveNotAccount: Haven't Account?
register: Create One!
email: Email
resetPassword: Reset Password
login: Login
rememberInfo: Remembered Password?
sendEmailSuccess: Email Sent Successfully, Please Check Your Email
emailValidation: Email is not valid
dashboard:
summary: Summary
transactions: Transactions
Expand Down
6 changes: 6 additions & 0 deletions locales/fa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ forgot:
register: یکی بسازید
title: فراموشی رمز عبور
username: نام کاربری
email: ایمیل
resetPassword: بازنشانی رمز عبور
login: ورود
rememberInfo: رمز عبور را به خاطر دارید؟
sendEmailSuccess: ایمیل با موفقیت ارسال شد، لطفا ایمیل خود را بررسی کنید
emailValidation: ایمیل معتبر نیست
login:
createAccount: یکی بسازید
failedMessage: خطا در ورود
Expand Down
6 changes: 6 additions & 0 deletions locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ forgot:
register: Hesap Oluştur!
title: Şifremi Unuttum
username: Kullanıcı Adı
email: Email
resetPassword: Şifreyi Sıfırla
login: Giriş
rememberInfo: Şifreyi Hatırladınız mı?
sendEmailSuccess: Email Başarıyla Gönderildi, Lütfen E-postanızı Kontrol Edin
emailValidation: Email geçerli değil

login:
createAccount: Hesap Oluştur!
Expand Down
31 changes: 0 additions & 31 deletions public/assets/js/snap.svg-min.js

This file was deleted.

108 changes: 0 additions & 108 deletions public/assets/js/svgLoader.js

This file was deleted.

40 changes: 40 additions & 0 deletions src/common/validations/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import type { FormItemRule } from 'naive-ui/es/form/src/interface'

const validations = {
telephone(rule: FormItemRule, value: string) {
if (/\d{11}/g.test(value))
return true

return new Error('phone number is not valid')
},
captcha(rule: FormItemRule, value: string) {
if (/\d{4}\b/.test(value))
return true

return new Error('captcha must be 4 digits')
},
email(rule: FormItemRule, value: string) {
const emailRegex = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/
if (emailRegex.test(value))
return true
return new Error('email is not valid')
},
verification(rule: FormItemRule, value: string) {
const pattern = /\d{5}\b/
if (pattern.test(value))
return true

return new Error('verification code must be 5 digits')
},
password(rule: FormItemRule, value: string) {
if (!value)
return new Error('password is required')

if (value.length < 5)
return new Error('password must be at least 5 characters')

return true
},
}

export default validations
17 changes: 7 additions & 10 deletions src/components/Dahboard/DashboardPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ function random(min: number, max: number): number {
}
onMounted(() => {
// notify.notify('Hello', 'warning')
// if (!layout.isWelcomeShown) {
setTimeout(() => {
notify.notify({ body: t('notify.welcome'), type: 'success', duration: 10000 })
layout.showWelcome()
}, 2000)
// }
if (!layout.isWelcomeShown) {
setTimeout(() => {
notify.notify({ body: t('notify.welcome'), type: 'success', duration: 10000 })
layout.showWelcome()
}, 2000)
}
})
</script>

Expand Down Expand Up @@ -81,6 +80,4 @@ onMounted(() => {
</div>
</template>

<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>
Loading

0 comments on commit 6648396

Please sign in to comment.