@adminforth/i18n 1.4.2 → 1.5.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/dist/index.js +2 -1
- package/index.ts +2 -1
- package/package.json +2 -1
- package/types.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -260,6 +260,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
260
260
|
brandSlug: adminforth.config.customization.brandNameSlug,
|
|
261
261
|
pluginInstanceId: this.pluginInstanceId,
|
|
262
262
|
primaryLanguage: this.primaryLanguage,
|
|
263
|
+
afOrder: this.options.loginPageLanguageSelectorOrder || 0,
|
|
263
264
|
supportedLanguages: this.options.supportedLanguages.map(lang => ({
|
|
264
265
|
code: lang,
|
|
265
266
|
// lang name on on language native name
|
|
@@ -268,7 +269,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
268
269
|
};
|
|
269
270
|
// add underLogin component
|
|
270
271
|
if (!this.externalAppOnly) {
|
|
271
|
-
|
|
272
|
+
adminforth.config.customization.loginPageInjections.underLoginButton.push({
|
|
272
273
|
file: this.componentPath('LanguageUnderLogin.vue'),
|
|
273
274
|
meta: compMeta
|
|
274
275
|
});
|
package/index.ts
CHANGED
|
@@ -293,6 +293,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
293
293
|
brandSlug: adminforth.config.customization.brandNameSlug,
|
|
294
294
|
pluginInstanceId: this.pluginInstanceId,
|
|
295
295
|
primaryLanguage: this.primaryLanguage,
|
|
296
|
+
afOrder: this.options.loginPageLanguageSelectorOrder || 0,
|
|
296
297
|
supportedLanguages: this.options.supportedLanguages.map(lang => (
|
|
297
298
|
{
|
|
298
299
|
code: lang,
|
|
@@ -303,7 +304,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
303
304
|
};
|
|
304
305
|
// add underLogin component
|
|
305
306
|
if (!this.externalAppOnly) {
|
|
306
|
-
(adminforth.config.customization.loginPageInjections.
|
|
307
|
+
(adminforth.config.customization.loginPageInjections.underLoginButton as Array<any>).push({
|
|
307
308
|
file: this.componentPath('LanguageUnderLogin.vue'),
|
|
308
309
|
meta: compMeta
|
|
309
310
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/i18n",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@aws-sdk/client-ses": "^3.654.0",
|
|
32
32
|
"@sapphire/async-queue": "^1.5.5",
|
|
33
|
+
"adminforth": "^2.4.0-next.221",
|
|
33
34
|
"chokidar": "^4.0.1",
|
|
34
35
|
"fs-extra": "^11.3.2",
|
|
35
36
|
"iso-3166": "^4.3.0",
|
package/types.ts
CHANGED
|
@@ -26,6 +26,11 @@ export interface PluginOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
categoryFieldName: string;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Language selector on login page order
|
|
31
|
+
*/
|
|
32
|
+
loginPageLanguageSelectorOrder?: number;
|
|
33
|
+
|
|
29
34
|
/**
|
|
30
35
|
* Optional source field to store e.g. file name where it first was captured
|
|
31
36
|
*/
|