MOBILE-3565 settings: Fix licenses navigation
parent
d906c39e0b
commit
a9e8213026
|
@ -21,7 +21,7 @@
|
||||||
<ion-icon name="fa-user-shield" slot="start"></ion-icon>
|
<ion-icon name="fa-user-shield" slot="start"></ion-icon>
|
||||||
<ion-label>{{ 'core.settings.privacypolicy' | translate }}</ion-label>
|
<ion-label>{{ 'core.settings.privacypolicy' | translate }}</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item button class="ion-text-wrap" router-direction="forward" routerLink="deviceinfo" detail>
|
<ion-item button class="ion-text-wrap" (click)="openPage('deviceinfo')" detail>
|
||||||
<ion-icon name="fa-mobile" slot="start"></ion-icon>
|
<ion-icon name="fa-mobile" slot="start"></ion-icon>
|
||||||
<ion-label>{{ 'core.settings.deviceinfo' | translate }}</ion-label>
|
<ion-label>{{ 'core.settings.deviceinfo' | translate }}</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
|
@ -34,6 +34,12 @@ const routes: Routes = [
|
||||||
import('@core/settings/pages/deviceinfo/deviceinfo.page.module')
|
import('@core/settings/pages/deviceinfo/deviceinfo.page.module')
|
||||||
.then(m => m.CoreSettingsDeviceInfoPageModule),
|
.then(m => m.CoreSettingsDeviceInfoPageModule),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'licenses',
|
||||||
|
loadChildren: () =>
|
||||||
|
import('@core/settings/pages/licenses/licenses.page.module')
|
||||||
|
.then(m => m.CoreSettingsLicensesPageModule),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -12,13 +12,17 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { CoreSites } from '@services/sites';
|
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { CoreConstants } from '@core/constants';
|
|
||||||
|
|
||||||
|
import { CoreConstants } from '@core/constants';
|
||||||
|
import { CoreSites } from '@services/sites';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App settings about menu page.
|
||||||
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'settings-about',
|
selector: 'page-core-app-settings-about',
|
||||||
templateUrl: 'about.html',
|
templateUrl: 'about.html',
|
||||||
})
|
})
|
||||||
export class CoreSettingsAboutPage {
|
export class CoreSettingsAboutPage {
|
||||||
|
@ -29,6 +33,7 @@ export class CoreSettingsAboutPage {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected router: Router,
|
protected router: Router,
|
||||||
|
protected route: ActivatedRoute,
|
||||||
) {
|
) {
|
||||||
const currentSite = CoreSites.instance.getCurrentSite();
|
const currentSite = CoreSites.instance.getCurrentSite();
|
||||||
|
|
||||||
|
@ -48,7 +53,7 @@ export class CoreSettingsAboutPage {
|
||||||
openPage(page: string): void {
|
openPage(page: string): void {
|
||||||
// const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
|
// const navCtrl = this.svComponent ? this.svComponent.getMasterNav() : this.navCtrl;
|
||||||
// navCtrl.push(page);
|
// navCtrl.push(page);
|
||||||
this.router.navigate(['/settings/' + page]);
|
this.router.navigate([page], { relativeTo: this.route });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,11 @@ import { CoreApp } from '@services/app';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App settings menu page.
|
||||||
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-settings',
|
selector: 'page-core-app-settings',
|
||||||
templateUrl: 'app.html',
|
templateUrl: 'app.html',
|
||||||
})
|
})
|
||||||
export class CoreSettingsAppPage implements OnInit {
|
export class CoreSettingsAppPage implements OnInit {
|
||||||
|
|
|
@ -54,9 +54,11 @@ interface CoreSettingsDeviceInfo {
|
||||||
localNotifAvailable: string;
|
localNotifAvailable: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page that displays the device information.
|
||||||
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'settings-deviceinfo',
|
selector: 'page-core-app-settings-deviceinfo',
|
||||||
templateUrl: 'deviceinfo.html',
|
templateUrl: 'deviceinfo.html',
|
||||||
styleUrls: ['deviceinfo.scss'],
|
styleUrls: ['deviceinfo.scss'],
|
||||||
})
|
})
|
||||||
|
|
|
@ -32,17 +32,19 @@ const routes: Routes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
|
||||||
CoreSettingsGeneralPage,
|
|
||||||
],
|
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild(routes),
|
RouterModule.forChild(routes),
|
||||||
CommonModule,
|
CommonModule,
|
||||||
IonicModule,
|
IonicModule,
|
||||||
|
FormsModule,
|
||||||
TranslateModule.forChild(),
|
TranslateModule.forChild(),
|
||||||
CoreComponentsModule,
|
CoreComponentsModule,
|
||||||
CoreDirectivesModule,
|
CoreDirectivesModule,
|
||||||
FormsModule,
|
|
||||||
],
|
],
|
||||||
|
declarations: [
|
||||||
|
CoreSettingsGeneralPage,
|
||||||
|
],
|
||||||
|
exports: [RouterModule],
|
||||||
|
|
||||||
})
|
})
|
||||||
export class CoreSettingsGeneralPageModule {}
|
export class CoreSettingsGeneralPageModule {}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { CoreSettingsHelper, CoreColorScheme } from '../../services/settings.hel
|
||||||
* Page that displays the general settings.
|
* Page that displays the general settings.
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-core-settings-general',
|
selector: 'page-core-app-settings-general',
|
||||||
templateUrl: 'general.html',
|
templateUrl: 'general.html',
|
||||||
styleUrls: ['general.scss'],
|
styleUrls: ['general.scss'],
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,6 @@ import { IonicModule } from '@ionic/angular';
|
||||||
|
|
||||||
import { CoreComponentsModule } from '@components/components.module';
|
import { CoreComponentsModule } from '@components/components.module';
|
||||||
import { CoreDirectivesModule } from '@directives/directives.module';
|
import { CoreDirectivesModule } from '@directives/directives.module';
|
||||||
import { CorePipesModule } from '@pipes/pipes.module';
|
|
||||||
|
|
||||||
import { CoreSettingsLicensesPage } from './licenses.page';
|
import { CoreSettingsLicensesPage } from './licenses.page';
|
||||||
|
|
||||||
|
@ -32,9 +31,6 @@ const routes: Routes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
|
||||||
CoreSettingsLicensesPage,
|
|
||||||
],
|
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forChild(routes),
|
RouterModule.forChild(routes),
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -42,7 +38,10 @@ const routes: Routes = [
|
||||||
TranslateModule.forChild(),
|
TranslateModule.forChild(),
|
||||||
CoreComponentsModule,
|
CoreComponentsModule,
|
||||||
CoreDirectivesModule,
|
CoreDirectivesModule,
|
||||||
CorePipesModule,
|
|
||||||
],
|
],
|
||||||
|
declarations: [
|
||||||
|
CoreSettingsLicensesPage,
|
||||||
|
],
|
||||||
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class CoreSettingsLicensesPageModule {}
|
export class CoreSettingsLicensesPageModule {}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { CoreConstants } from '@core/constants';
|
import { CoreConstants } from '@core/constants';
|
||||||
import { Http } from '@/app/singletons/core.singletons';
|
import { Http } from '@singletons/core.singletons';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines license info
|
* Defines license info
|
||||||
|
@ -35,7 +35,7 @@ interface CoreSettingsLicense {
|
||||||
* Page that displays the open source licenses information.
|
* Page that displays the open source licenses information.
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-core-settings-licenses',
|
selector: 'page-core-app-settings-licenses',
|
||||||
templateUrl: 'licenses.html',
|
templateUrl: 'licenses.html',
|
||||||
})
|
})
|
||||||
export class CoreSettingsLicensesPage implements OnInit {
|
export class CoreSettingsLicensesPage implements OnInit {
|
||||||
|
|
|
@ -24,10 +24,6 @@ const routes: Routes = [
|
||||||
path: 'general',
|
path: 'general',
|
||||||
loadChildren: () => import('./pages/general/general.page.module').then( m => m.CoreSettingsGeneralPageModule),
|
loadChildren: () => import('./pages/general/general.page.module').then( m => m.CoreSettingsGeneralPageModule),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'licenses',
|
|
||||||
loadChildren: () => import('./pages/licenses/licenses.page.module').then( m => m.CoreSettingsLicensesPageModule),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
loadChildren: () => import('./pages/app/app.page.module').then( m => m.CoreSettingsAppPageModule),
|
loadChildren: () => import('./pages/app/app.page.module').then( m => m.CoreSettingsAppPageModule),
|
||||||
|
|
|
@ -126,8 +126,8 @@
|
||||||
--background: var(--custom-tab-background, var(--white));
|
--background: var(--custom-tab-background, var(--white));
|
||||||
--color: var(--custom-tab-background, var(--gray-dark));
|
--color: var(--custom-tab-background, var(--gray-dark));
|
||||||
--border-color: var(--custom-tab-border-color, var(--gray));
|
--border-color: var(--custom-tab-border-color, var(--gray));
|
||||||
--color-active: var(--custom-tab-color-active, var(--core-color));
|
--color-active: var(--custom-tab-color-active, var(--color));
|
||||||
--border-color-active: var(--custom-tab-border-color-active, var(--color-active));
|
--border-color-active: var(--custom-tab-border-color-active, var(--core-color));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue