mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-04 20:42:52 +00:00
refactor: move SettingsProvider into package 'settings'
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 StApps
|
* Copyright (C) 2018, 2019 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -21,7 +21,7 @@ import {Platform} from '@ionic/angular';
|
|||||||
|
|
||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {SettingsProvider} from './modules/settingsProvider/settings.provider';
|
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 StApps
|
* Copyright (C) 2018, 2019 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -19,7 +19,7 @@ import {Platform} from '@ionic/angular';
|
|||||||
import {TranslateService} from '@ngx-translate/core';
|
import {TranslateService} from '@ngx-translate/core';
|
||||||
import {SCLanguageCode} from '@openstapps/core';
|
import {SCLanguageCode} from '@openstapps/core';
|
||||||
|
|
||||||
import {SettingsProvider} from './modules/settingsProvider/settings.provider';
|
import {SettingsProvider} from './modules/settings/settings.provider';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 StApps
|
* Copyright (C) 2018, 2019 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -29,7 +29,6 @@ import {AppComponent} from './app.component';
|
|||||||
import {DataModule} from './modules/data/data.module';
|
import {DataModule} from './modules/data/data.module';
|
||||||
import {MenuModule} from './modules/menu/menu.module';
|
import {MenuModule} from './modules/menu/menu.module';
|
||||||
import {SettingsModule} from './modules/settings/settings.module';
|
import {SettingsModule} from './modules/settings/settings.module';
|
||||||
import {SettingsProviderModule} from './modules/settingsProvider/settingsProvider.module';
|
|
||||||
import {StorageModule} from './modules/storage/storage.module';
|
import {StorageModule} from './modules/storage/storage.module';
|
||||||
|
|
||||||
export function createTranslateLoader(http: HttpClient) {
|
export function createTranslateLoader(http: HttpClient) {
|
||||||
@@ -44,7 +43,6 @@ export function createTranslateLoader(http: HttpClient) {
|
|||||||
DataModule,
|
DataModule,
|
||||||
MenuModule,
|
MenuModule,
|
||||||
SettingsModule,
|
SettingsModule,
|
||||||
SettingsProviderModule,
|
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
deps: [HttpClient],
|
deps: [HttpClient],
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import {
|
|||||||
SCSetting,
|
SCSetting,
|
||||||
SCSettingMeta,
|
SCSettingMeta,
|
||||||
} from '@openstapps/core';
|
} from '@openstapps/core';
|
||||||
import {SettingsProvider} from '../../settingsProvider/settings.provider';
|
import {SettingsProvider} from '../settings.provider';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stapps-settings-item',
|
selector: 'stapps-settings-item',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2018 StApps
|
* Copyright (C) 2018, 2019 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
import {Component, OnInit} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||||
import {SCLanguageName, SCSettingMeta} from '@openstapps/core';
|
import {SCLanguageName, SCSettingMeta} from '@openstapps/core';
|
||||||
import {SettingsCache, SettingsProvider} from '../../settingsProvider/settings.provider';
|
import {SettingsCache, SettingsProvider} from '../settings.provider';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'stapps-settings-page',
|
selector: 'stapps-settings-page',
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {TranslateModule} from '@ngx-translate/core';
|
|||||||
|
|
||||||
import {SettingsItemComponent} from './item/settings-item.component';
|
import {SettingsItemComponent} from './item/settings-item.component';
|
||||||
import {SettingsPageComponent} from './page/settings-page.component';
|
import {SettingsPageComponent} from './page/settings-page.component';
|
||||||
|
import {SettingsProvider} from './settings.provider';
|
||||||
|
|
||||||
const settingsRoutes: Routes = [
|
const settingsRoutes: Routes = [
|
||||||
{ path: 'settings', component: SettingsPageComponent },
|
{ path: 'settings', component: SettingsPageComponent },
|
||||||
@@ -41,6 +42,7 @@ const settingsRoutes: Routes = [
|
|||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
Geolocation,
|
Geolocation,
|
||||||
|
SettingsProvider,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class SettingsModule {}
|
export class SettingsModule {}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2018 StApps
|
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
|
||||||
* Software Foundation, version 3.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
* more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along with
|
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { IonicStorageModule } from '@ionic/storage';
|
|
||||||
import { SettingsProvider } from './settings.provider';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
IonicStorageModule.forRoot(),
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
SettingsProvider,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SettingsProviderModule {}
|
|
||||||
Reference in New Issue
Block a user