parent
ad3bd312e9
commit
6aaf838451
@ -4,6 +4,7 @@
|
|||||||
import { MeService } from "@odit/lfk-client-js";
|
import { MeService } from "@odit/lfk-client-js";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
import ConfirmProfileDeletion from "./ConfirmProfileDeletion.svelte";
|
import ConfirmProfileDeletion from "./ConfirmProfileDeletion.svelte";
|
||||||
|
import PasswordStrength from "../auth/PasswordStrength.svelte";
|
||||||
$: data_loaded = false;
|
$: data_loaded = false;
|
||||||
$: delete_triggered = false;
|
$: delete_triggered = false;
|
||||||
$: original_data = {};
|
$: original_data = {};
|
||||||
@ -45,7 +46,7 @@
|
|||||||
function changePassword() {
|
function changePassword() {
|
||||||
if (data_loaded === true && update_password_enabled) {
|
if (data_loaded === true && update_password_enabled) {
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('changing-your-password'),
|
text: $_("changing-your-password"),
|
||||||
duration: 2500,
|
duration: 2500,
|
||||||
}).showToast();
|
}).showToast();
|
||||||
let postdata = Object.assign({}, original_data);
|
let postdata = Object.assign({}, original_data);
|
||||||
@ -56,7 +57,7 @@
|
|||||||
password_change = "";
|
password_change = "";
|
||||||
postdata = {};
|
postdata = {};
|
||||||
Toastify({
|
Toastify({
|
||||||
text: $_('password-changed'),
|
text: $_("password-changed"),
|
||||||
duration: 2500,
|
duration: 2500,
|
||||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||||
}).showToast();
|
}).showToast();
|
||||||
@ -242,10 +243,7 @@
|
|||||||
class="border-gray-300 placeholder-gray-500 appearance-none rounded-md relative block w-full px-3 py-2 border focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
class="border-gray-300 placeholder-gray-500 appearance-none rounded-md relative block w-full px-3 py-2 border focus:outline-none focus:shadow-outline-blue focus:border-blue-300 focus:z-10 sm:text-sm"
|
||||||
placeholder={$_('password')} />
|
placeholder={$_('password')} />
|
||||||
</div>
|
</div>
|
||||||
{#if password_change != password_confirm && password_change.length > 0}
|
<PasswordStrength bind:password_change bind:password_confirm />
|
||||||
<span
|
|
||||||
class="flex items-center font-medium tracking-wide text-red-500 text-xs mt-1 ml-1">{$_('passwords-dont-match')}</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
|
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6">
|
||||||
<button
|
<button
|
||||||
@ -257,9 +255,9 @@
|
|||||||
{$_('update-password')}
|
{$_('update-password')}
|
||||||
</button>
|
</button>
|
||||||
{#if update_password_enabled}
|
{#if update_password_enabled}
|
||||||
<p>
|
<p>
|
||||||
{$_('after-the-update-youll-get-logged-out-please-login-with-your-new-password-after-that')}
|
{$_('after-the-update-youll-get-logged-out-please-login-with-your-new-password-after-that')}
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user