hl-core 0.0.7-beta.1 → 0.0.7-beta.2

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.
@@ -0,0 +1,8 @@
1
+ import { defineStore } from 'pinia';
2
+ import { FormStoreClass } from '@/composables/classes';
3
+
4
+ export const useFormStore = defineStore('forms', {
5
+ state: () => ({
6
+ ...new FormStoreClass(),
7
+ }),
8
+ });
package/store/messages.ts CHANGED
@@ -1,12 +1,12 @@
1
- export const t = (whichText: string) => {
1
+ export const t = (whichText: string): string => {
2
2
  const keys = whichText.includes('.') ? whichText.split('.') : whichText;
3
3
  if (typeof keys === typeof []) {
4
4
  const firstKey = keys[0];
5
5
  const secondKey = keys[1];
6
6
  const firstObject = messages.ru[firstKey as keyof typeof messages.ru];
7
- return firstObject[secondKey as keyof typeof firstObject];
7
+ return firstObject[secondKey as keyof typeof firstObject] as string;
8
8
  } else {
9
- return messages.ru[keys as keyof typeof messages.ru];
9
+ return messages.ru[keys as keyof typeof messages.ru] as string;
10
10
  }
11
11
  };
12
12
 
@@ -197,6 +197,7 @@ export const messages = {
197
197
  userFullName: 'ФИО',
198
198
  userRoles: 'Роли',
199
199
  noUserRoles: 'Нет ролей',
200
+ welcome: 'Добро пожаловать',
200
201
  },
201
202
  placeholders: {
202
203
  login: 'Логин',
@@ -1,33 +0,0 @@
1
- <template>
2
- <button
3
- v-if="!isLink"
4
- type="button"
5
- @click="$emit('clicked')"
6
- :class="[
7
- classes,
8
- $libStyles.greenBtn,
9
- $libStyles[`btnH${$capitalize(size)}`],
10
- ]"
11
- >
12
- {{ text }}
13
- </button>
14
- </template>
15
-
16
- <script>
17
- export default {
18
- props: {
19
- text: {
20
- type: String,
21
- default: 'Кнопка',
22
- },
23
- size: {
24
- type: String,
25
- default: 'md',
26
- },
27
- classes: {
28
- type: String,
29
- default: '',
30
- },
31
- },
32
- };
33
- </script>
@@ -1,12 +0,0 @@
1
- import { defineStore } from 'pinia';
2
-
3
- export const useAppStore = defineStore('app', {
4
- state: () => ({
5
- name: 'App Store',
6
- }),
7
- actions: {
8
- Test() {
9
- return `From ${this.name}`;
10
- },
11
- },
12
- });