[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",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"preserveSymlinks": true,
"polyfills": [
"zone.js"
],
@ -54,7 +55,7 @@
"outputHashing": "none",
"sourceMap": true,
"namedChunks": true,
"aot": true,
"aot": false,
"extractLicenses": true,
"vendorChunk": true,
"buildOptimizer": false

View File

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

View File

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

View File

@ -3,14 +3,13 @@
* @copyright 2018, Edouard DUPIN, all right reserved
* @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 { PlaylistCurrent } from 'app/service/player';
import { Title } from '@angular/platform-browser';
import { environment } from 'environments/environment';
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 {
@ -70,6 +69,7 @@ export class ElementPlayerAudioComponent implements OnInit {
}
}
constructor(
@Inject('ENVIRONMENT') private environment: Environment,
private playerService: PlayerService,
private trackService: TrackService,
private dataService: DataService,
@ -147,7 +147,7 @@ export class ElementPlayerAudioComponent implements OnInit {
title = `${title} (${this.dataAuthor})`;
}
this.titleService.setTitle(`${environment.applName} > ${title}`)
this.titleService.setTitle(`${this.environment.applName} > ${title}`)
}
changeMetadata() {
console.log('list of the stream:');

View File

@ -4,7 +4,7 @@
* @license PROPRIETARY (see license file)
*/
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 { 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 { NodeSmall } from 'app/back-api';
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw/utils';
import { isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
@Component({
selector: 'app-element-series',

View File

@ -4,7 +4,7 @@
* @license PROPRIETARY (see license file)
*/
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 { AlbumService, DataService } from 'app/service';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,8 +5,8 @@
*/
import { Component, OnInit } from '@angular/core';
import { PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { UploadProgress } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
import { UploadProgress,PopInService, isNullOrUndefined } from '@kangaroo-and-rabbit/kar-cw';
import { } from '@kangaroo-and-rabbit/kar-cw/popin/upload-progress/upload-progress';
import { Artist, Gender } from 'app/back-api';
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 { DataTools } from "@kangaroo-and-rabbit/kar-cw/utils/data-tools";
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
import { DataStore, DataTools, TypeCheck, isNullOrUndefined } from "@kangaroo-and-rabbit/kar-cw";
export class GenericDataService<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 { environment } from 'environments/environment';
import { GenericDataService } from './GenericDataService';
import { 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';
import { DataTools, DataStore, SessionService, TypeCheck, isNumber } from '@kangaroo-and-rabbit/kar-cw';
@Injectable()
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 { environment } from 'environments/environment';
import { GenericDataService } from './GenericDataService';
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
import { DataStore } from '@kangaroo-and-rabbit/kar-cw/utils/data-store';
import { DataStore, SessionService } from '@kangaroo-and-rabbit/kar-cw';
@Injectable()

View File

@ -6,12 +6,11 @@
import { Injectable } from '@angular/core';
import { SessionService } from '@kangaroo-and-rabbit/kar-cw/service';
import { GenderResource, Gender, UUID } from 'app/back-api';
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 { GenericDataService } from './GenericDataService';
import { DataStore, SessionService } from '@kangaroo-and-rabbit/kar-cw';
export interface MessageLogIn {
id: number;

View File

@ -3,6 +3,9 @@
// `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`.
import { Injectable } from "@angular/core";
import { EnvironmentService } from '@kangaroo-and-rabbit/kar-cw';
const serverSSOAddress = 'http://atria-soft.org'
const environment_back_prod = {
@ -71,3 +74,18 @@ const environment_hybrid = {
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;
};