[DEV] Run but does not realy start

This commit is contained in:
Edouard DUPIN 2024-04-05 23:51:48 +02:00
parent 04633240b3
commit e4246750c7
18 changed files with 60 additions and 42 deletions

View File

@ -16,6 +16,7 @@
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"preserveSymlinks": true,
"polyfills": [ "polyfills": [
"zone.js" "zone.js"
], ],
@ -54,7 +55,7 @@
"outputHashing": "none", "outputHashing": "none",
"sourceMap": true, "sourceMap": true,
"namedChunks": true, "namedChunks": true,
"aot": true, "aot": false,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": true, "vendorChunk": true,
"buildOptimizer": false "buildOptimizer": false

View File

@ -6,11 +6,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ArianeService } from './service'; import { ArianeService } from './service';
import { MenuItem } from '@kangaroo-and-rabbit/kar-cw/model'; import { MenuItem, SSOService, SessionService, UserService, UserRoles222, EventOnMenu, MenuPosition, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { SSOService, SessionService, UserService } from '@kangaroo-and-rabbit/kar-cw/service';
import { EventOnMenu } from '@kangaroo-and-rabbit/kar-cw/component/top-menu/top-menu';
import { MenuPosition, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { UserRoles222 } from '@kangaroo-and-rabbit/kar-cw/service/session';
enum MenuEventType { enum MenuEventType {
SSO_LOGIN = "SSO_CALL_LOGIN", SSO_LOGIN = "SSO_CALL_LOGIN",

View File

@ -23,7 +23,12 @@ import {
import { GenderService, DataService, PlaylistService, ArtistService, AlbumService, TrackService, ArianeService, PlayerService } from './service'; import { GenderService, DataService, PlaylistService, ArtistService, AlbumService, TrackService, ArianeService, PlayerService } from './service';
import { UploadScene } from './scene/upload/upload'; import { UploadScene } from './scene/upload/upload';
import { ElementSeriesComponent, ElementTrackComponent, ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent, DescriptionAreaComponent } from './component'; import { ElementSeriesComponent, ElementTrackComponent, ElementSeasonComponent, ElementVideoComponent, ElementPlayerAudioComponent, DescriptionAreaComponent } from './component';
import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw'; import { ALL_COMPONENTS, ALL_SCENES, ALL_SERVICES, ALL_GUARDS, KarCWModule, UserService } from '@kangaroo-and-rabbit/kar-cw';
import { KarusicEnvironmentService, environment } from 'environments/environment';
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
@NgModule({ @NgModule({
declarations: [ declarations: [
@ -37,7 +42,6 @@ import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
ElementPlayerAudioComponent, ElementPlayerAudioComponent,
DescriptionAreaComponent, DescriptionAreaComponent,
PopInCreateType, PopInCreateType,
HomeScene, HomeScene,
HelpScene, HelpScene,
GenderScene, GenderScene,
@ -53,15 +57,25 @@ import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
AlbumEditScene, AlbumEditScene,
ArtistEditScene, ArtistEditScene,
UploadScene, UploadScene,
//...ALL_COMPONENTS,
//...ALL_SCENES,
], ],
imports: [ imports: [
KarCWModule,
FormsModule,
ReactiveFormsModule,
CommonModule,
BrowserModule, BrowserModule,
RouterModule, RouterModule,
AppRoutingModule, AppRoutingModule,
HttpClientModule, HttpClientModule,
KarCWModule,
], ],
providers: [ providers: [
KarusicEnvironmentService,
{ provide: 'ENVIRONMENT', useValue: KarusicEnvironmentService },
//...ALL_SERVICES,
//...ALL_GUARDS,
PlayerService, PlayerService,
GenderService, GenderService,
DataService, DataService,
@ -72,6 +86,8 @@ import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
ArianeService, ArianeService,
], ],
exports: [ exports: [
//...ALL_COMPONENTS,
//...ALL_SCENES,
AppComponent, AppComponent,
ElementTypeComponent, ElementTypeComponent,
ElementSeriesComponent, ElementSeriesComponent,
@ -82,6 +98,6 @@ import { KarCWModule } from '@kangaroo-and-rabbit/kar-cw';
bootstrap: [ bootstrap: [
AppComponent AppComponent
], ],
schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA], //schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
}) })
export class AppModule { } export class AppModule { }

View File

@ -3,14 +3,13 @@
* @copyright 2018, Edouard DUPIN, all right reserved * @copyright 2018, Edouard DUPIN, all right reserved
* @license PROPRIETARY (see license file) * @license PROPRIETARY (see license file)
*/ */
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; import { Component, OnInit, ViewChild, ElementRef, Inject } from '@angular/core';
import { DataService, PlayerService, TrackService, AlbumService, ArtistService } from 'app/service'; import { DataService, PlayerService, TrackService, AlbumService, ArtistService } from 'app/service';
import { PlaylistCurrent } from 'app/service/player'; import { PlaylistCurrent } from 'app/service/player';
import { Title } from '@angular/platform-browser'; import { Title } from '@angular/platform-browser';
import { environment } from 'environments/environment';
import { Album, Artist, Track } from 'app/back-api'; import { Album, Artist, Track } from 'app/back-api';
import { isArray, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils'; import { isArray, isNullOrUndefined, Environment } from '@kangaroo-and-rabbit/kar-cw';
export enum PlayMode { export enum PlayMode {
@ -70,6 +69,7 @@ export class ElementPlayerAudioComponent implements OnInit {
} }
} }
constructor( constructor(
@Inject('ENVIRONMENT') private environment: Environment,
private playerService: PlayerService, private playerService: PlayerService,
private trackService: TrackService, private trackService: TrackService,
private dataService: DataService, private dataService: DataService,
@ -147,7 +147,7 @@ export class ElementPlayerAudioComponent implements OnInit {
title = `${title} (${this.dataAuthor})`; title = `${title} (${this.dataAuthor})`;
} }
this.titleService.setTitle(`${environment.applName} > ${title}`) this.titleService.setTitle(`${this.environment.applName} > ${title}`)
} }
changeMetadata() { changeMetadata() {
console.log('list of the stream:'); console.log('list of the stream:');

View File

@ -4,7 +4,7 @@
* @license PROPRIETARY (see license file) * @license PROPRIETARY (see license file)
*/ */
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils'; import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { NodeSmall } from 'app/back-api'; import { NodeSmall } from 'app/back-api';
import { AlbumService, DataService } from 'app/service'; import { AlbumService, DataService } from 'app/service';

View File

@ -7,7 +7,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { DataService, TrackService } from 'app/service'; import { DataService, TrackService } from 'app/service';
import { NodeSmall } from 'app/back-api'; import { NodeSmall } from 'app/back-api';
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils'; import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
@Component({ @Component({
selector: 'app-element-series', selector: 'app-element-series',

View File

@ -4,7 +4,7 @@
* @license PROPRIETARY (see license file) * @license PROPRIETARY (see license file)
*/ */
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils'; import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { NodeSmall } from 'app/back-api'; import { NodeSmall } from 'app/back-api';
import { AlbumService, DataService } from 'app/service'; import { AlbumService, DataService } from 'app/service';

View File

@ -4,7 +4,7 @@
* @license PROPRIETARY (see license file) * @license PROPRIETARY (see license file)
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service'; import { PopInService } from '@kangaroo-and-rabbit/kar-cw';
@Component({ @Component({
selector: 'create-type', selector: 'create-type',

View File

@ -5,8 +5,7 @@
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress'; import { UploadProgress, PopInService } from '@kangaroo-and-rabbit/kar-cw';
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service';
import { Album } from 'app/back-api'; import { Album } from 'app/back-api';
import { AlbumService, ArianeService, DataService, TrackService } from 'app/service'; import { AlbumService, ArianeService, DataService, TrackService } from 'app/service';

View File

@ -5,11 +5,10 @@
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { DataTools } from '@kangaroo-and-rabbit/kar-cw/utils/data-tools'; import { DataTools } from '@kangaroo-and-rabbit/kar-cw';
import { Album, Artist, NodeSmall, Track } from 'app/back-api'; import { Album, Artist, Track } from 'app/back-api';
import { ArtistService, DataService, ArianeService, AlbumService, PlayerService, TrackService } from 'app/service'; import { ArtistService, DataService, ArianeService, AlbumService, PlayerService, TrackService } from 'app/service';
import { filter } from 'rxjs';
@Component({ @Component({
selector: 'app-albums', selector: 'app-albums',

View File

@ -5,8 +5,7 @@
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress'; import { PopInService, UploadProgress } from '@kangaroo-and-rabbit/kar-cw';
import { PopInService } from '@kangaroo-and-rabbit/kar-cw/service';
import { Artist, Track } from 'app/back-api'; import { Artist, Track } from 'app/back-api';
import { ArtistService, DataService, GenderService, ArianeService, TrackService } from 'app/service'; import { ArtistService, DataService, GenderService, ArianeService, TrackService } from 'app/service';

View File

@ -5,8 +5,7 @@
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw'; import { UploadProgress, PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
import { Track } from 'app/back-api'; import { Track } from 'app/back-api';

View File

@ -5,8 +5,8 @@
*/ */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw'; import { UploadProgress,PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress'; import { } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
import { Artist, Gender } from 'app/back-api'; import { Artist, Gender } from 'app/back-api';
import { GenderService, ArtistService, TrackService, AlbumService } from 'app/service'; import { GenderService, ArtistService, TrackService, AlbumService } from 'app/service';

View File

@ -1,7 +1,4 @@
import { TypeCheck, isNullOrUndefined } from "@kangaroo-and-rabbit/kar-cw/utils"; import { DataStore, DataTools, TypeCheck, isNullOrUndefined } from "@kangaroo-and-rabbit/kar-cw";
import { DataTools } from "@kangaroo-and-rabbit/kar-cw/utils/data-tools";
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
export class GenericDataService<TYPE> { export class GenericDataService<TYPE> {
protected dataStore: DataStore<TYPE>; protected dataStore: DataStore<TYPE>;

View File

@ -10,10 +10,7 @@ import { Album, AlbumResource, UUID } from 'app/back-api';
import { RESTConfig, isArrayOf } from 'app/back-api/rest-tools'; import { RESTConfig, isArrayOf } from 'app/back-api/rest-tools';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { GenericDataService } from './GenericDataService'; import { GenericDataService } from './GenericDataService';
import { SessionService, TypeCheck, isNumber } from '@kangaroo-and-rabbit/kar-cw'; import { DataTools, DataStore, SessionService, TypeCheck, isNumber } from '@kangaroo-and-rabbit/kar-cw';
import { DataTools } from '@kangaroo-and-rabbit/kar-cw/utils/data-tools';
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
@Injectable() @Injectable()
export class AlbumService extends GenericDataService<Album> { export class AlbumService extends GenericDataService<Album> {

View File

@ -10,9 +10,7 @@ import { Artist, ArtistResource, UUID } from 'app/back-api';
import { RESTConfig } from 'app/back-api/rest-tools'; import { RESTConfig } from 'app/back-api/rest-tools';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { GenericDataService } from './GenericDataService'; import { GenericDataService } from './GenericDataService';
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service'; import { DataStore, SessionService } from '@kangaroo-and-rabbit/kar-cw';
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
@Injectable() @Injectable()

View File

@ -6,12 +6,11 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
import { GenderResource, Gender, UUID } from 'app/back-api'; import { GenderResource, Gender, UUID } from 'app/back-api';
import { RESTConfig } from 'app/back-api/rest-tools'; import { RESTConfig } from 'app/back-api/rest-tools';
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
import { environment } from 'environments/environment'; import { environment } from 'environments/environment';
import { GenericDataService } from './GenericDataService'; import { GenericDataService } from './GenericDataService';
import { DataStore, SessionService } from '@kangaroo-and-rabbit/kar-cw';
export interface MessageLogIn { export interface MessageLogIn {
id: number; id: number;

View File

@ -3,6 +3,9 @@
// `ng build --env=prod` then `environment.prod.ts` will be used instead. // `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`. // The list of which env maps to which file can be found in `.angular-cli.json`.
import { Injectable } from "@angular/core";
import { EnvironmentService } from '@kangaroo-and-rabbit/kar-cw';
const serverSSOAddress = 'http://atria-soft.org' const serverSSOAddress = 'http://atria-soft.org'
const environment_back_prod = { const environment_back_prod = {
@ -71,3 +74,18 @@ const environment_hybrid = {
export const environment = environment_local; export const environment = environment_local;
@Injectable({ providedIn: 'root' })
export class KarusicEnvironmentService extends EnvironmentService {
public production = environment.production;
// URL of development API
public applName = environment.applName;
public defaultServer = environment.defaultServer;
public server = environment.server;
public ssoSite = environment.ssoSite;
public ssoSignIn = environment.ssoSignIn;
public ssoSignUp = environment.ssoSignUp;
public ssoSignOut = environment.ssoSignOut;
public tokenStoredInPermanentStorage = environment.tokenStoredInPermanentStorage;
};