@yelon/bis 15.1.0-f09cdbae → 15.1.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2020/layout.mjs
CHANGED
|
@@ -296,7 +296,7 @@ class YunzaiI18NService extends YunzaiI18nBaseService {
|
|
|
296
296
|
}
|
|
297
297
|
else {
|
|
298
298
|
return this.http
|
|
299
|
-
.get(`${this.bis.baseUrl}/i18n/api/v2/${lang}?_allow_anonymous`)
|
|
299
|
+
.get(`${this.bis.baseUrl}/i18n/api/v2/language/${lang}?_allow_anonymous`)
|
|
300
300
|
.pipe(catchError(() => this.http.get(`assets/tmp/i18n/${lang}.json`)));
|
|
301
301
|
}
|
|
302
302
|
}
|
|
@@ -329,13 +329,15 @@ class YunzaiI18NService extends YunzaiI18nBaseService {
|
|
|
329
329
|
getLangs() {
|
|
330
330
|
const langs = Object.keys(YUNZAI_LANGS).map(code => {
|
|
331
331
|
const item = YUNZAI_LANGS[code];
|
|
332
|
-
return { code, text: item.text, abbr: item.abbr,
|
|
332
|
+
return { code, text: item.text, abbr: item.abbr, image: undefined };
|
|
333
333
|
});
|
|
334
334
|
if (ngDevMode) {
|
|
335
335
|
return of(langs);
|
|
336
336
|
}
|
|
337
337
|
else {
|
|
338
|
-
return this.http
|
|
338
|
+
return this.http
|
|
339
|
+
.get(`${this.bis.baseUrl}/i18n/api/v2/language?_allow_anonymous`)
|
|
340
|
+
.pipe(catchError(() => of(langs)));
|
|
339
341
|
}
|
|
340
342
|
}
|
|
341
343
|
ngOnDestroy() {
|
|
@@ -406,11 +408,11 @@ YunzaiI18NComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
406
408
|
[nzSelected]="item.code === curLangCode"
|
|
407
409
|
(click)="change(item.code)"
|
|
408
410
|
>
|
|
409
|
-
<template *ngIf="!item.
|
|
411
|
+
<template *ngIf="!item.icon">
|
|
410
412
|
<span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
411
413
|
</template>
|
|
412
|
-
<template *ngIf="item.
|
|
413
|
-
<img [src]="'data:image/png;base64,' + item.
|
|
414
|
+
<template *ngIf="item.icon">
|
|
415
|
+
<img [src]="'data:image/png;base64,' + item.icon" [alt]="item.abbr" class="pr-xs" />
|
|
414
416
|
</template>
|
|
415
417
|
{{ item.text }}
|
|
416
418
|
</li>
|
|
@@ -446,11 +448,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImpor
|
|
|
446
448
|
[nzSelected]="item.code === curLangCode"
|
|
447
449
|
(click)="change(item.code)"
|
|
448
450
|
>
|
|
449
|
-
<template *ngIf="!item.
|
|
451
|
+
<template *ngIf="!item.icon">
|
|
450
452
|
<span role="img" [attr.aria-label]="item.text" class="pr-xs">{{ item.abbr }}</span>
|
|
451
453
|
</template>
|
|
452
|
-
<template *ngIf="item.
|
|
453
|
-
<img [src]="'data:image/png;base64,' + item.
|
|
454
|
+
<template *ngIf="item.icon">
|
|
455
|
+
<img [src]="'data:image/png;base64,' + item.icon" [alt]="item.abbr" class="pr-xs" />
|
|
454
456
|
</template>
|
|
455
457
|
{{ item.text }}
|
|
456
458
|
</li>
|