WEB-560 Fix version information below to the login button (#2974)

This commit is contained in:
Soni Jay
2026-01-09 07:21:43 -06:00
committed by GitHub
parent b58b16c2df
commit ea60446c03
3 changed files with 130 additions and 73 deletions
+22 -1
View File
@@ -36,7 +36,6 @@
</a> </a>
</div> </div>
</div> </div>
<mifosx-footer variant="compact"></mifosx-footer>
</div> </div>
</div> </div>
@@ -89,6 +88,28 @@
} }
</div> </div>
<!-- Version Info Table -->
<div class="login-version-info">
<table class="login-version-table">
<tr>
<td class="version-label">Tenant</td>
<td class="version-value">{{ versions?.tenant || 'Default' }}</td>
</tr>
<tr>
<td class="version-label">Mifos® WebApp</td>
<td class="version-value">{{ versions?.mifos }}</td>
</tr>
<tr>
<td class="version-label">Apache Fineract®</td>
<td class="version-value">{{ versions?.fineract?.version }}</td>
</tr>
<tr>
<td class="version-label">Server</td>
<td class="version-value">{{ server }}</td>
</tr>
</table>
</div>
<!-- Resources Links --> <!-- Resources Links -->
<div class="resources-section"> <div class="resources-section">
<div class="resources-divider"> <div class="resources-divider">
+58 -70
View File
@@ -1,3 +1,44 @@
// Version Info Table
.login-version-table {
width: 100%;
max-width: 350px;
margin: 0 auto;
border-collapse: collapse;
font-size: 0.95rem;
background: none;
}
.login-version-table td {
padding: 0.4rem 0.7rem;
text-align: left;
vertical-align: middle;
}
.version-label {
font-weight: 500;
color: var(--md-sys-color-on-surface-variant, #44474e);
width: 50%;
}
.version-value {
font-weight: 400;
color: var(--md-sys-color-on-surface, #1a1c1e);
width: 50%;
word-break: break-all;
}
// Responsive
@media (width <= 768px) {
.login-version-table {
font-size: 0.85rem;
max-width: 100%;
}
.login-version-table td {
padding: 0.3rem 0.4rem;
}
}
/** /**
* Modern Material Design 3 Login Component Styles * Modern Material Design 3 Login Component Styles
*/ */
@@ -358,6 +399,15 @@
flex-shrink: 0; flex-shrink: 0;
} }
// ===== Version Info Section =====
.login-version-info {
margin-bottom: 1rem;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
// ===== Resources Section ===== // ===== Resources Section =====
.resources-section { .resources-section {
margin-top: auto; margin-top: auto;
@@ -511,76 +561,6 @@
} }
} }
// ===== Dark Theme Support =====
:host-context(.dark-theme) {
.login-wrapper {
background: #1a1c1e;
}
.login-panel {
background: #1a1c1e;
}
.login-card {
background: #1a1c1e;
box-shadow:
0 1px 2px #0000004d,
0 2px 6px #0003,
0 8px 24px #0000004d;
}
.logo-image {
max-width: 20rem;
padding: 0;
margin: 0;
height: 63px;
content: url('../../assets/images/white-mifos.png');
}
.welcome-text {
color: var(--md-sys-color-on-surface, #e2e2e5);
}
.welcome-subtitle {
color: var(--md-sys-color-on-surface-variant, #c4c6d0);
}
.resources-divider {
&::before {
background: var(--md-sys-color-outline-variant, #44474e);
}
.divider-text {
background: var(--md-sys-color-surface-container-low, #2c2f36);
color: var(--md-sys-color-on-surface, #e2e2e5);
}
}
.resource-button {
color: var(--md-sys-color-primary, #5ba2ec);
&:hover {
background: #5ba2ec1f;
}
}
// Header controls dark theme
.login-header {
::ng-deep mifosx-theme-toggle {
button {
color: var(--md-sys-color-on-surface, #e2e2e5);
&:hover {
background: #5ba2ec1f;
color: var(--md-sys-color-primary, #5ba2ec);
}
}
}
// Language selector and server selector dark theme styles are handled by the components themselves
}
}
// ===== Responsive Design ===== // ===== Responsive Design =====
// Tablet // Tablet
@@ -709,6 +689,14 @@
margin-bottom: 0.75rem; margin-bottom: 0.75rem;
} }
.login-version-info {
margin-bottom: 0.75rem;
width: 100%;
justify-content: center;
align-items: center;
font-size: 0.85rem;
}
.login-footer { .login-footer {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
+50 -2
View File
@@ -3,7 +3,19 @@ import { Component, OnInit, OnDestroy, inject } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
/** rxjs Imports */ /** rxjs Imports */
import { Subscription } from 'rxjs'; import { Subscription } from 'rxjs';
import { take } from 'rxjs/operators';
/**
* Interface for version information.
*/
export interface VersionInfo {
tenant?: string;
mifos?: string;
fineract?: {
version?: string;
};
}
/** Custom Models */ /** Custom Models */
import { Alert } from '../core/alert/alert.model'; import { Alert } from '../core/alert/alert.model';
@@ -23,11 +35,12 @@ import { LoginFormComponent } from './login-form/login-form.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component'; import { ResetPasswordComponent } from './reset-password/reset-password.component';
import { TwoFactorAuthenticationComponent } from './two-factor-authentication/two-factor-authentication.component'; import { TwoFactorAuthenticationComponent } from './two-factor-authentication/two-factor-authentication.component';
import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu'; import { MatMenuTrigger, MatMenu, MatMenuItem } from '@angular/material/menu';
import { FooterComponent } from '../shared/footer/footer.component';
import { FaIconComponent } from '@fortawesome/angular-fontawesome'; import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
import { M3IconComponent } from '../shared/m3-ui/m3-icon/m3-icon.component'; import { M3IconComponent } from '../shared/m3-ui/m3-icon/m3-icon.component';
import { VersionService } from '../system/version.service';
/** /**
* Login component. * Login component.
*/ */
@@ -45,7 +58,6 @@ import { M3IconComponent } from '../shared/m3-ui/m3-icon/m3-icon.component';
ResetPasswordComponent, ResetPasswordComponent,
TwoFactorAuthenticationComponent, TwoFactorAuthenticationComponent,
MatMenuTrigger, MatMenuTrigger,
FooterComponent,
FaIconComponent, FaIconComponent,
MatMenu, MatMenu,
MatMenuItem, MatMenuItem,
@@ -58,8 +70,15 @@ export class LoginComponent implements OnInit, OnDestroy {
private themingService = inject(ThemingService); private themingService = inject(ThemingService);
private router = inject(Router); private router = inject(Router);
private versionService = inject(VersionService);
public environment = environment; public environment = environment;
/** Version info for display */
versions: VersionInfo = {};
/** Server info for display */
server: string = '';
/** True if password requires a reset. */ /** True if password requires a reset. */
resetPassword = false; resetPassword = false;
/** True if user requires two factor authentication. */ /** True if user requires two factor authentication. */
@@ -103,6 +122,35 @@ export class LoginComponent implements OnInit, OnDestroy {
this.updateLogo(); this.updateLogo();
} }
}); });
// Load version info for table
this.versionService
.getBackendInfo()
.pipe(take(1))
.subscribe(
(info: any) => {
this.versions = {
tenant: this.settingsService.tenantIdentifier,
mifos: info?.mifos || info?.mifosX || info?.mifos_x || info?.version || environment.version,
fineract:
typeof info?.fineract === 'object' && info?.fineract !== null
? { version: info.fineract.version }
: typeof info?.fineract === 'string'
? { version: info.fineract }
: info?.fineractX || info?.fineract_x
? { version: info.fineractX || info.fineract_x }
: { version: info?.git?.build?.version }
};
},
() => {
this.versions = {
tenant: this.settingsService.tenantIdentifier,
mifos: environment.version,
fineract: { version: '' }
};
}
);
this.server = this.settingsService.server;
} }
/** /**