mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* start consolidating * add start-cli flash-os * combine install and setup and refactor all * use http * undo mock * fix translation * translations * use dialogservice wrapper * better ST messaging on setup * only warn on update if breakages (#3097) * finish setup wizard and ui language-keyboard feature * fix typo * wip: localization * remove start-tunnel readme * switch to posix strings for language internal * revert mock * translate backend strings * fix missing about text * help text for args * feat: add "Add new gateway" option (#3098) * feat: add "Add new gateway" option * Update web/projects/ui/src/app/routes/portal/components/form/controls/select.component.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add translation --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix dns selection * keyboard keymap also * ability to shutdown after install * revert mock * working setup flow + manifest localization * (mostly) redundant localization on frontend * version bump * omit live medium from disk list and better space management * ignore missing package archive on 035 migration * fix device migration * add i18n helper to sdk * fix install over 0.3.5.1 * fix grub config --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
71 lines
2.0 KiB
TypeScript
71 lines
2.0 KiB
TypeScript
import {
|
|
provideHttpClient,
|
|
withFetch,
|
|
withInterceptorsFromDi,
|
|
} from '@angular/common/http'
|
|
import { inject, NgModule, provideAppInitializer } from '@angular/core'
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
|
import { PreloadAllModules, RouterModule } from '@angular/router'
|
|
import { WA_LOCATION } from '@ng-web-apis/common'
|
|
import initArgon from '@start9labs/argon2'
|
|
import {
|
|
I18N_PROVIDERS,
|
|
provideSetupLogsService,
|
|
RELATIVE_URL,
|
|
VERSION,
|
|
WorkspaceConfig,
|
|
} from '@start9labs/shared'
|
|
import { tuiButtonOptionsProvider, TuiRoot } from '@taiga-ui/core'
|
|
import { NG_EVENT_PLUGINS } from '@taiga-ui/event-plugins'
|
|
import { ApiService } from './services/api.service'
|
|
import { LiveApiService } from './services/live-api.service'
|
|
import { MockApiService } from './services/mock-api.service'
|
|
import { AppComponent } from './app.component'
|
|
import { ROUTES } from './app.routes'
|
|
|
|
const {
|
|
useMocks,
|
|
ui: { api },
|
|
} = require('../../../../config.json') as WorkspaceConfig
|
|
|
|
const version = require('../../../../package.json').version
|
|
|
|
@NgModule({
|
|
declarations: [AppComponent],
|
|
imports: [
|
|
BrowserAnimationsModule,
|
|
RouterModule.forRoot(ROUTES, {
|
|
preloadingStrategy: PreloadAllModules,
|
|
initialNavigation: 'disabled',
|
|
}),
|
|
TuiRoot,
|
|
],
|
|
providers: [
|
|
NG_EVENT_PLUGINS,
|
|
I18N_PROVIDERS,
|
|
provideSetupLogsService(ApiService),
|
|
tuiButtonOptionsProvider({ size: 'm' }),
|
|
{
|
|
provide: ApiService,
|
|
useClass: useMocks ? MockApiService : LiveApiService,
|
|
},
|
|
{
|
|
provide: RELATIVE_URL,
|
|
useValue: `/${api.url}/${api.version}`,
|
|
},
|
|
{
|
|
provide: VERSION,
|
|
useValue: version,
|
|
},
|
|
provideHttpClient(withInterceptorsFromDi(), withFetch()),
|
|
provideAppInitializer(() => {
|
|
const origin = inject(WA_LOCATION).origin
|
|
const module_or_path = new URL('/assets/argon2_bg.wasm', origin)
|
|
|
|
initArgon({ module_or_path })
|
|
}),
|
|
],
|
|
bootstrap: [AppComponent],
|
|
})
|
|
export class AppModule {}
|