@adminforth/i18n 1.4.2 → 1.6.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/build.log CHANGED
@@ -17,5 +17,5 @@ custom/package-lock.json
17
17
  custom/package.json
18
18
  custom/tsconfig.json
19
19
 
20
- sent 32,964 bytes received 248 bytes 66,424.00 bytes/sec
21
- total size is 32,031 speedup is 0.96
20
+ sent 33,187 bytes received 248 bytes 66,870.00 bytes/sec
21
+ total size is 32,254 speedup is 0.96
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <div class="min-w-40">
3
- <div class="cursor-pointer flex items-center justify-between gap-1 block px-4 py-2 text-sm text-black
4
- hover:bg-html dark:text-darkSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextActive
5
- w-full select-none "
3
+ <div class="cursor-pointer flex items-center justify-between gap-1 block px-4 py-2 text-sm
4
+ bg-lightUserMenuItemBackground hover:bg-lightUserMenuItemBackgroundHover text-lightUserMenuItemText
5
+ hover:text-lightUserMenuItemText dark:bg-darkUserMenuItemBackground dark:hover:bg-darkUserMenuItemBackgroundHover
6
+ dark:text-darkUserMenuItemText dark:hover:darkUserMenuItemTextHover w-full select-none"
6
7
  :class="{ 'bg-black bg-opacity-10 ': showDropdown }"
7
8
  @click="showDropdown = !showDropdown"
8
9
  >
@@ -22,11 +23,9 @@
22
23
  <div v-if="showDropdown" >
23
24
 
24
25
  <div class="cursor-pointer flex items-center gap-1 block px-4 py-1 text-sm
25
- text-black dark:text-darkSidebarTextHover
26
- bg-black bg-opacity-10
27
- hover:brightness-110
28
- hover:text-lightPrimary dark:hover:text-darkPrimary
29
- hover:bg-lightPrimaryContrast dark:hover:bg-darkPrimaryContrast
26
+ bg-lightUserMenuItemBackground hover:bg-lightUserMenuItemBackgroundHover text-lightUserMenuItemText
27
+ hover:text-lightUserMenuItemText dark:bg-darkUserMenuItemBackground dark:hover:bg-darkUserMenuItemBackgroundHover
28
+ dark:text-darkUserMenuItemText dark:hover:darkUserMenuItemTextHover
30
29
  w-full text-select-none pl-5 select-none"
31
30
  v-for="option in options.filter((opt) => opt.value !== selectedOption.value)"
32
31
  @click="doChangeLang(option.value)"
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <div class="min-w-40">
3
- <div class="cursor-pointer flex items-center justify-between gap-1 block px-4 py-2 text-sm text-black
4
- hover:bg-html dark:text-darkSidebarTextHover dark:hover:bg-darkSidebarItemHover dark:hover:text-darkSidebarTextActive
5
- w-full select-none "
3
+ <div class="cursor-pointer flex items-center justify-between gap-1 block px-4 py-2 text-sm
4
+ bg-lightUserMenuItemBackground hover:bg-lightUserMenuItemBackgroundHover text-lightUserMenuItemText
5
+ hover:text-lightUserMenuItemText dark:bg-darkUserMenuItemBackground dark:hover:bg-darkUserMenuItemBackgroundHover
6
+ dark:text-darkUserMenuItemText dark:hover:darkUserMenuItemTextHover w-full select-none"
6
7
  :class="{ 'bg-black bg-opacity-10 ': showDropdown }"
7
8
  @click="showDropdown = !showDropdown"
8
9
  >
@@ -22,11 +23,9 @@
22
23
  <div v-if="showDropdown" >
23
24
 
24
25
  <div class="cursor-pointer flex items-center gap-1 block px-4 py-1 text-sm
25
- text-black dark:text-darkSidebarTextHover
26
- bg-black bg-opacity-10
27
- hover:brightness-110
28
- hover:text-lightPrimary dark:hover:text-darkPrimary
29
- hover:bg-lightPrimaryContrast dark:hover:bg-darkPrimaryContrast
26
+ bg-lightUserMenuItemBackground hover:bg-lightUserMenuItemBackgroundHover text-lightUserMenuItemText
27
+ hover:text-lightUserMenuItemText dark:bg-darkUserMenuItemBackground dark:hover:bg-darkUserMenuItemBackgroundHover
28
+ dark:text-darkUserMenuItemText dark:hover:darkUserMenuItemTextHover
30
29
  w-full text-select-none pl-5 select-none"
31
30
  v-for="option in options.filter((opt) => opt.value !== selectedOption.value)"
32
31
  @click="doChangeLang(option.value)"
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
- (adminforth.config.customization.loginPageInjections.underInputs).push({
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.underInputs).push({
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.4.2",
3
+ "version": "1.6.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
  */