File tree Expand file tree Collapse file tree 4 files changed +37
-15
lines changed
client/web/angular-customer-app/src Expand file tree Collapse file tree 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 = {
3737 provideHttpClient ( withFetch ( ) ) ,
3838 provideMarkdown ( ) ,
3939 provideAnimationsAsync ( ) ,
40- provideFirebaseApp ( ( ) => initializeApp ( environment . firebaseConfig ) ) ,
40+ provideFirebaseApp ( ( ) => initializeApp ( environment ) ) ,
4141 provideStorage ( ( ) => getStorage ( ) ) ,
4242 provideAuth ( ( ) => getAuth ( ) ) ,
4343 provideVertexAI ( ( ) => getVertexAI ( ) ) ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const routes: Routes = [
2222 path : 'chat' ,
2323 component : ChatbotComponent ,
2424 } ,
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'},
2727 { path : '**' , redirectTo : '/chat' } ,
2828] ;
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
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+
1744export 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 || '' ,
3049} ;
3150
51+ console . log ( 'env' , environment )
52+
3253export const geminiModel = "gemini-2.0-flash" ;
Original file line number Diff line number Diff line change 2424 < link rel ="icon " type ="image/x-icon " href ="favicon.ico ">
2525 < link href ="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap " rel ="stylesheet ">
2626 < link href ="https://fonts.googleapis.com/icon?family=Material+Icons " rel ="stylesheet ">
27+ < script src ="/bootstrap.js "> </ script >
2728</ head >
2829< body class ="mat-typography ">
2930 < app-root > </ app-root >
You can’t perform that action at this time.
0 commit comments