hl-core 0.0.7-beta.11 → 0.0.7-beta.12

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.
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <base-drawer :panel-title="$dataStore.menu.title" which-panel="settings">
3
3
  <base-panel-item>
4
- <v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat"></v-btn>
4
+ <v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('decrease')"></v-btn>
5
5
  Шрифт
6
- <v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat"></v-btn>
6
+ <v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('increase')"></v-btn>
7
7
  </base-panel-item>
8
8
  <base-panel-item>
9
9
  <v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
@@ -26,6 +26,16 @@
26
26
  const dialog = ref(false);
27
27
  const dataStore = useDataStore();
28
28
 
29
+ const handleFontSize = (action: 'increase' | 'decrease') => {
30
+ if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
31
+ if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
32
+ if (dataStore.isEFO) {
33
+ dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
34
+ } else {
35
+ dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
36
+ }
37
+ };
38
+
29
39
  const logoutUser = async () => {
30
40
  dialog.value = false;
31
41
  await dataStore.logoutUser();
@@ -10,7 +10,7 @@ class MenuItemConfig {
10
10
  hasLine?: boolean;
11
11
  description?: string | null;
12
12
  url?: string | null;
13
- initial?: object | null;
13
+ initial?: any | null;
14
14
  icon?: string | null;
15
15
  action?: Function | void;
16
16
  disabled?: typeof computed;
@@ -24,7 +24,7 @@ class MenuItemConfig {
24
24
  hasLine?: boolean,
25
25
  description?: string | null,
26
26
  url?: string | null,
27
- initial?: object | null,
27
+ initial?: any | null,
28
28
  icon?: string | null,
29
29
  action?: Function | void,
30
30
  disabled?: typeof computed,
@@ -48,6 +48,7 @@ export const constants = Object.freeze({
48
48
  rejectclient: 'rejectclient',
49
49
  },
50
50
  postActions: {
51
+ font: 'font',
51
52
  route: 'route',
52
53
  applicationCreated: 'applicationCreated',
53
54
  clipboard: 'clipboard',
@@ -35,3 +35,24 @@ const openSettings = async () => {
35
35
  dataStore.settings.open = true;
36
36
  };
37
37
  </script>
38
+ <style>
39
+ .mainpage,
40
+ label .v-label .v-field-label,
41
+ .v-field__input,
42
+ .v-label.v-field-label,
43
+ .v-field,
44
+ .v-input,
45
+ span,
46
+ header,
47
+ p {
48
+ font-size: v-bind('dataStore.fontSize + "px"') !important;
49
+ line-height: v-bind('dataStore.fontSize*1.5 + "px"') !important;
50
+ }
51
+
52
+ .v-input__details,
53
+ .v-messages__message {
54
+ font-size: v-bind('dataStore.fontSize*0.8 + "px"') !important;
55
+ line-height: v-bind('dataStore.fontSize*1 + "px"') !important;
56
+ padding-bottom: 3px;
57
+ }
58
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.7-beta.11",
3
+ "version": "0.0.7-beta.12",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -18,28 +18,28 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "nuxt build",
21
- "dev": "nuxt dev",
21
+ "dev": "nuxt clean && nuxt dev",
22
22
  "generate": "nuxt generate",
23
23
  "preview": "nuxt preview"
24
24
  },
25
25
  "devDependencies": {
26
- "@nuxt/devtools": "^0.2.5",
27
- "nuxt": "^3.3.1",
26
+ "@nuxt/devtools": "^0.3.2",
27
+ "nuxt": "^3.3.3",
28
28
  "prettier": "^2.8.4",
29
29
  "typescript": "^4.9.5"
30
30
  },
31
31
  "dependencies": {
32
32
  "@mdi/font": "^7.1.96",
33
- "@nuxtjs/tailwindcss": "^6.6.0",
34
- "@pinia/nuxt": "^0.4.7",
33
+ "@nuxtjs/tailwindcss": "^6.6.5",
34
+ "@pinia/nuxt": "^0.4.8",
35
35
  "animate.css": "^4.1.1",
36
- "axios": "^1.3.4",
36
+ "axios": "^1.3.5",
37
37
  "fast-xml-parser": "4.0.12",
38
38
  "jwt-decode": "^3.1.2",
39
39
  "maska": "1.5.0",
40
- "pinia": "^2.0.33",
40
+ "pinia": "^2.0.34",
41
41
  "v-idle-3": "^0.3.14",
42
42
  "vue-toastification": "^2.0.0-rc.5",
43
- "vuetify": "^3.1.10"
43
+ "vuetify": "^3.1.13"
44
44
  }
45
45
  }
@@ -43,6 +43,12 @@ export const useDataStore = defineStore('data', {
43
43
  sendToParent(action, value) {
44
44
  window.parent.postMessage({ action: action, value: value }, '*');
45
45
  },
46
+ sendToChild(action, value) {
47
+ const childFrame = document.getElementById('product-iframe');
48
+ if (childFrame && childFrame.contentWindow && childFrame.contentWindow.postMessage) {
49
+ childFrame.contentWindow.postMessage({ action: action, value: value }, '*');
50
+ }
51
+ },
46
52
  getFilesByIIN(iin) {
47
53
  return this.signedDocumentList.filter(file => file.iin === iin && file.fileTypeName === 'Удостоверение личности');
48
54
  },