File tree 4 files changed +37
-15
lines changed
client/web/angular-customer-app/src
4 files changed +37
-15
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export const appConfig: ApplicationConfig = {
37
37
provideHttpClient ( withFetch ( ) ) ,
38
38
provideMarkdown ( ) ,
39
39
provideAnimationsAsync ( ) ,
40
- provideFirebaseApp ( ( ) => initializeApp ( environment . firebaseConfig ) ) ,
40
+ provideFirebaseApp ( ( ) => initializeApp ( environment ) ) ,
41
41
provideStorage ( ( ) => getStorage ( ) ) ,
42
42
provideAuth ( ( ) => getAuth ( ) ) ,
43
43
provideVertexAI ( ( ) => getVertexAI ( ) ) ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const routes: Routes = [
22
22
path : 'chat' ,
23
23
component : ChatbotComponent ,
24
24
} ,
25
- { path : '/config.html' , redirectTo : '/config.html' } ,
26
- { path : '/config' , redirectTo : '/config.html' } ,
25
+ // { path: '/config.html', redirectTo: '/config.html'},
26
+ // { path: '/config', redirectTo: '/config.html'},
27
27
{ path : '**' , redirectTo : '/chat' } ,
28
28
] ;
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
+ declare const window : any ;
18
+
19
+ export declare interface BootstrapData {
20
+ firebase : {
21
+ apiKey ?: string ;
22
+ authDomain ?: string ,
23
+ databaseURL ?: string ,
24
+ projectId ?: string ,
25
+ storageBucket ?: string ,
26
+ messagingSenderId ?: string ,
27
+ measurementId ?: string ,
28
+ appId ?: string ,
29
+ } ;
30
+ geminiApiKey ?: string ;
31
+ debugToken ?: string ;
32
+ viewCodeLink ?: string ;
33
+ viewCodeMessage ?: string ;
34
+ }
35
+
36
+ const bootstrapData = window [ 'APP_TEMPLATE_BOOTSTRAP' ] as BootstrapData ;
37
+
38
+ console . log ( bootstrapData ) ;
39
+
40
+ if ( ! bootstrapData ) {
41
+ window . location . href = '/config.html' ;
42
+ }
43
+
17
44
export const environment = {
18
- production : false ,
19
- // URL for the backend. Exposed through the Angular proxy server.
20
- backendUrl : "/api" ,
21
- firebaseConfig : {
22
- apiKey : "" ,
23
- authDomain : "" ,
24
- projectId : "" ,
25
- storageBucket : "" ,
26
- messagingSenderId : "" ,
27
- appId : ""
28
- } ,
29
- // recaptchaEnterpriseKey: "",
45
+ ...bootstrapData ?. firebase ,
46
+ geminiApiKey : bootstrapData ?. geminiApiKey || '' ,
47
+ viewCodeLink : bootstrapData ?. viewCodeLink || '' ,
48
+ viewCodeMessage : bootstrapData ?. viewCodeMessage || '' ,
30
49
} ;
31
50
51
+ console . log ( 'env' , environment )
52
+
32
53
export const geminiModel = "gemini-2.0-flash" ;
Original file line number Diff line number Diff line change 24
24
< link rel ="icon " type ="image/x-icon " href ="favicon.ico ">
25
25
< link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap " rel ="stylesheet ">
26
26
< link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
27
+ < script src ="/bootstrap.js "> </ script >
27
28
</ head >
28
29
< body class ="mat-typography ">
29
30
< app-root > </ app-root >
You can’t perform that action at this time.
0 commit comments