bfg-common 1.5.753 → 1.5.755

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,112 @@
1
+ <template>
2
+ <div class="skeleton-page grid gap-3 p-4 h-inherit overflow-hidden">
3
+ <div class="left-content grid p-4">
4
+ <div class="flex justify-between gap-4 flex-wrap">
5
+ <ui-skeleton-item width="80" height="20" />
6
+ <ui-skeleton-item width="160" height="36" />
7
+ </div>
8
+ <div class="border-block flex flex-col py-3 px-4 my-4">
9
+ <ui-skeleton-item width="100%" height="20" />
10
+ <ui-skeleton-item width="50%" height="20" />
11
+ <ui-skeleton-item width="30%" height="20" />
12
+ <ui-skeleton-item width="70%" height="20" />
13
+ <ui-skeleton-item width="20%" height="20" />
14
+ <ui-skeleton-item width="50%" height="20" />
15
+ <ui-skeleton-item width="80%" height="20" />
16
+ <ui-skeleton-item width="70%" height="20" />
17
+ <ui-skeleton-item width="20%" height="20" />
18
+ </div>
19
+ <ui-skeleton-item width="96" height="20" class="ml-auto" />
20
+ </div>
21
+ <div class="right-content grid p-4">
22
+ <div class="flex justify-between gap-4 flex-wrap top-container">
23
+ <ui-skeleton-item width="80" height="20" />
24
+ <div class="actions-block flex">
25
+ <ui-skeleton-item width="20" height="20" />
26
+ <div class="line-border"></div>
27
+ <ui-skeleton-item width="20" height="20" />
28
+ <div class="line-border"></div>
29
+ <ui-skeleton-item width="20" height="20" />
30
+ </div>
31
+ </div>
32
+ <div class="details-block flex flex-col my-6">
33
+ <div
34
+ v-for="index in detailsItemsCount"
35
+ :key="index"
36
+ class="details-block-item flex p-3"
37
+ >
38
+ <ui-skeleton-item width="20" height="20" class="mr-[10px]" />
39
+ <ui-skeleton-item width="144" height="20" />
40
+ <ui-skeleton-item width="144" height="20" class="ml-auto" />
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </template>
46
+
47
+ <script setup lang="ts">
48
+ const detailsItemsCount = ref<number>(3)
49
+ </script>
50
+
51
+ <style>
52
+ :root {
53
+ --backups-left-skeleton-border-color: #e9ebed;
54
+ --backups-right-skeleton-action-line-border-color: #e9ebeda3;
55
+ --backups-right-skeleton-item-bg-color: #e9ebed66;
56
+ }
57
+ :root.dark-theme {
58
+ --backups-left-skeleton-border-color: #e9ebed1f;
59
+ --backups-right-skeleton-action-line-border-color: #e9ebed1f;
60
+ --backups-right-skeleton-item-bg-color: #e9ebed0f;
61
+ }
62
+ </style>
63
+
64
+ <style scoped lang="scss">
65
+ .skeleton-page {
66
+ grid-template-columns: repeat(2, calc(50% - 6px));
67
+
68
+ .left-content,
69
+ .right-content {
70
+ background-color: var(--backups-page-inner-block-bg);
71
+ box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.0784313725);
72
+ border-radius: 8px;
73
+ grid-template-rows: max-content 1fr max-content;
74
+ overflow: hidden;
75
+ }
76
+ .border-block {
77
+ border: 1px solid var(--backups-left-skeleton-border-color);
78
+ border-radius: 8px;
79
+ grid-row-gap: 10px;
80
+ overflow: auto;
81
+
82
+ :deep(.skeleton-item) {
83
+ min-height: 20px;
84
+ }
85
+ }
86
+ .right-content {
87
+ .top-container {
88
+ .actions-block {
89
+ grid-column-gap: 10px;
90
+
91
+ .line-border {
92
+ border: 1px solid
93
+ var(--backups-right-skeleton-action-line-border-color);
94
+ }
95
+ }
96
+ }
97
+ .details-block {
98
+ grid-row-gap: 10px;
99
+ overflow: auto;
100
+
101
+ .details-block-item {
102
+ background-color: var(--backups-right-skeleton-item-bg-color);
103
+ border-radius: 6px;
104
+ }
105
+
106
+ :deep(.skeleton-item) {
107
+ min-height: 20px;
108
+ }
109
+ }
110
+ }
111
+ }
112
+ </style>
@@ -80,20 +80,26 @@ const onSelectContextMenuItem = (item: UI_I_ContextMenuItem): void => {
80
80
 
81
81
  <style scoped lang="scss">
82
82
  .backups-context-menu-view {
83
- :deep(.menu-item) {
84
- .context-icon {
85
- display: none;
86
- }
83
+ :deep(.context-wrap) {
84
+ min-width: 112px;
87
85
 
88
- .item-ui-icon {
89
- margin-right: 8px;
90
- }
86
+ .menu-item {
87
+ .context-icon {
88
+ display: none;
89
+ }
91
90
 
92
- &:last-child {
93
- color: #ea3223;
91
+ .item-ui-icon {
92
+ margin-right: 8px;
93
+ width: 16px;
94
+ height: 16px;
95
+ }
94
96
 
95
- .context-link:hover {
97
+ &:last-child {
96
98
  color: #ea3223;
99
+
100
+ .context-link:hover {
101
+ color: #ea3223;
102
+ }
97
103
  }
98
104
  }
99
105
  }
@@ -433,6 +433,9 @@ watch(height, () => {
433
433
  line-height: 18px;
434
434
  text-align: right;
435
435
  }
436
+ :deep(.ui-main-info-block-item) {
437
+ grid-column-gap: 10px;
438
+ }
436
439
  :deep(.ui-main-info-block-item-right) {
437
440
  white-space: unset !important;
438
441
  max-width: 50%;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.753",
4
+ "version": "1.5.755",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
package/plugins/time.ts CHANGED
@@ -1,58 +1,58 @@
1
- import { defineNuxtPlugin } from '#app'
2
- import type { UI_T_LangValue } from '~/lib/models/types'
3
- export default defineNuxtPlugin(() => {
4
- const time = function (): any {
5
- const self: any = {}
6
- self.millisecondsToHour = function (ms: number): number {
7
- return ~~(ms / 1000 / 60 / 60 / 24)
8
- }
9
- self.formatTime = (
10
- seconds: number,
11
- lang: UI_T_LangValue = 'ru_RU'
12
- ): string => {
13
- const units = {
14
- en_US: { s: 's', m: 'm', h: 'h' },
15
- ru_RU: { s: 'с', m: 'м', h: 'ч' },
16
- hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
17
- be_BY: { s: 'с', m: 'хв', h: 'г' },
18
- kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
19
- zh_CHS: { s: '秒', m: '分', h: '时' },
20
- BROWSER: { s: 's', m: 'm', h: 'h' },
21
- }
22
-
23
- const unit = units[lang] || units.en_US
24
-
25
- if (seconds < 60) {
26
- return `${seconds}${unit.s}`
27
- }
28
-
29
- const hours = Math.floor(seconds / 3600)
30
- const minutes = Math.floor((seconds % 3600) / 60)
31
- const secs = seconds % 60
32
-
33
- let result = ''
34
-
35
- if (hours > 0) {
36
- result += `${hours}${unit.h} `
37
- }
38
-
39
- if (minutes > 0) {
40
- result += `${minutes}${unit.m} `
41
- }
42
-
43
- if (secs > 0) {
44
- result += `${secs}${unit.s}`
45
- }
46
-
47
- return result.trim()
48
- }
49
-
50
- return self
51
- }.call({})
52
-
53
- return {
54
- provide: {
55
- time,
56
- },
57
- }
58
- })
1
+ import { defineNuxtPlugin } from '#app'
2
+ import type { UI_T_LangValue } from '~/lib/models/types'
3
+ export default defineNuxtPlugin(() => {
4
+ const time = function (): any {
5
+ const self: any = {}
6
+ self.millisecondsToHour = function (ms: number): number {
7
+ return ~~(ms / 1000 / 60 / 60 / 24)
8
+ }
9
+ self.formatTime = (
10
+ seconds: number,
11
+ lang: UI_T_LangValue = 'ru_RU'
12
+ ): string => {
13
+ const units = {
14
+ en_US: { s: 's', m: 'm', h: 'h' },
15
+ ru_RU: { s: 'с', m: 'м', h: 'ч' },
16
+ hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
17
+ be_BY: { s: 'с', m: 'хв', h: 'г' },
18
+ kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
19
+ zh_CHS: { s: '秒', m: '分', h: '时' },
20
+ BROWSER: { s: 's', m: 'm', h: 'h' },
21
+ }
22
+
23
+ const unit = units[lang] || units.en_US
24
+
25
+ if (seconds < 60) {
26
+ return `${seconds}${unit.s}`
27
+ }
28
+
29
+ const hours = Math.floor(seconds / 3600)
30
+ const minutes = Math.floor((seconds % 3600) / 60)
31
+ const secs = seconds % 60
32
+
33
+ let result = ''
34
+
35
+ if (hours > 0) {
36
+ result += `${hours}${unit.h} `
37
+ }
38
+
39
+ if (minutes > 0) {
40
+ result += `${minutes}${unit.m} `
41
+ }
42
+
43
+ if (secs > 0) {
44
+ result += `${secs}${unit.s}`
45
+ }
46
+
47
+ return result.trim()
48
+ }
49
+
50
+ return self
51
+ }.call({})
52
+
53
+ return {
54
+ provide: {
55
+ time,
56
+ },
57
+ }
58
+ })