fixed reset-password flow

This commit is contained in:
TemuulenBM
2024-01-26 14:50:27 +08:00
parent 2bc9745b95
commit fdcd3bb805
4 changed files with 13 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ Router.map(function () {
this.route('auth', function () {
this.route('login', { path: '/' });
this.route('forgot-password');
this.route('reset-password');
this.route('reset-password', { path: '/reset-password/:id' });
this.route('two-fa');
this.route('verification');
});
@@ -51,24 +51,9 @@ Router.map(function () {
this.route('virtual', { path: '/:slug/:view' });
});
this.mount('@fleetbase/dev-engine', {
as: 'developers',
path: 'developers'
});
this.mount('@fleetbase/fleetops-engine', {
as: 'fleet-ops',
path: 'fleet-ops'
});
this.mount('@fleetbase/iam-engine', {
as: 'iam',
path: 'iam'
});
this.mount('@fleetbase/storefront-engine', {
as: 'storefront',
path: 'storefront'
path: 'fleet-ops',
});
});
this.route('install');

View File

@@ -4,7 +4,14 @@ import { inject as service } from '@ember/service';
export default class AuthResetPasswordRoute extends Route {
@service store;
model() {
return this.store.findRecord('brand', 1);
async model(params) {
return params;
}
async setupController(controller) {
super.setupController(...arguments);
// set brand to controller
this.brand = await this.store.findRecord('brand', 1);
}
}

View File

@@ -1,6 +1,6 @@
<div class="bg-white dark:bg-gray-800 py-8 px-4 shadow rounded-lg">
<div class="mb-4">
<Image src={{@model.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} width="160" height="56" class="w-40 h-14 mx-auto" />
<Image src={{this.brand.logo_url}} @fallbackSrc="/images/fleetbase-logo-svg.svg" alt={{t "app.name"}} width="160" height="56" class="w-40 h-14 mx-auto" />
<h2 class="text-center text-lg font-extrabold text-gray-900 dark:text-white truncate">
{{t "auth.reset-password.title"}}
</h2>

View File

@@ -10,7 +10,7 @@ Router.map(function () {
this.route('auth', function () {
this.route('login', { path: '/' });
this.route('forgot-password');
this.route('reset-password');
this.route('reset-password', { path: '/reset-password/:id' });
this.route('two-fa');
this.route('verification');
});