Skip to content

Commit f4a35cf

Browse files
committed
refactor: adjust widgets to library component changes
1 parent a87d426 commit f4a35cf

File tree

4 files changed

+81
-111
lines changed

4 files changed

+81
-111
lines changed

src/views/Dashboard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
</CRow>
8383
</CCardFooter>
8484
</CCard>
85-
<WidgetsSocial/>
85+
<WidgetsBrand/>
8686
<CRow>
8787
<CCol md="12">
8888
<CCard header-html="Traffic &amp; Sales" body-wrapper>
@@ -451,15 +451,15 @@
451451
<script>
452452
import MainChartExample from './charts/MainChartExample'
453453
import WidgetsDropdown from './widgets/WidgetsDropdown'
454-
import WidgetsSocial from './widgets/WidgetsSocial'
454+
import WidgetsBrand from './widgets/WidgetsBrand'
455455
import CChartLineSimple from './charts/CChartLineSimple'
456456
457457
export default {
458458
name: 'Dashboard',
459459
components: {
460460
MainChartExample,
461461
WidgetsDropdown,
462-
WidgetsSocial,
462+
WidgetsBrand,
463463
CChartLineSimple
464464
},
465465
data () {

src/views/widgets/Widgets.vue

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -121,48 +121,6 @@
121121
</CWidgetIcon>
122122
</CCol>
123123
</CRow>
124-
<CRow>
125-
<CCol col="12" sm="6" lg="3">
126-
<CWidgetIcon
127-
header="$1.999,50"
128-
text="Income"
129-
variant="primary"
130-
link="#"
131-
>
132-
<CIcon name="settings" width="24"/>
133-
</CWidgetIcon>
134-
</CCol>
135-
<CCol col="12" sm="6" lg="3">
136-
<CWidgetIcon
137-
header="$1.999,50"
138-
text="Income"
139-
variant="info"
140-
link="#"
141-
>
142-
<CIcon name="laptop" width="24"/>
143-
</CWidgetIcon>
144-
</CCol>
145-
<CCol col="12" sm="6" lg="3">
146-
<CWidgetIcon
147-
header="$1.999,50"
148-
text="Income"
149-
variant="warning"
150-
link="#"
151-
>
152-
<CIcon name="moon" width="24"/>
153-
</CWidgetIcon>
154-
</CCol>
155-
<CCol col="12" sm="6" lg="3">
156-
<CWidgetIcon
157-
header="$1.999,50"
158-
text="Income"
159-
variant="danger"
160-
link="#"
161-
>
162-
<CIcon name="bell" width="24"/>
163-
</CWidgetIcon>
164-
</CCol>
165-
</CRow>
166124
<CRow>
167125
<CCol col="12" sm="6" lg="3">
168126
<CWidgetIcon
@@ -234,10 +192,21 @@
234192
no-padding
235193
>
236194
<CIcon name="moon" class="c-mx-5 " width="24"/>
195+
<template #footer>
196+
<CCardFooter class="c-card-footer c-px-3 c-py-2">
197+
<CLink
198+
class="c-font-weight-bold c-font-xs c-btn-block c-text-muted"
199+
href="https://coreui.io/"
200+
>
201+
View more
202+
<CIcon name="arrowRight" class="c-float-right" width="16"/>
203+
</CLink>
204+
</CCardFooter>
205+
</template>
237206
</CWidgetIcon>
238207
</CCol>
239208
</CRow>
240-
<CRow>
209+
<!-- <CRow>
241210
<CCol col="12" sm="6" lg="4">
242211
<CWidgetIcon
243212
header="$1.999,50"
@@ -271,9 +240,9 @@
271240
<CIcon name="moon" class="c-mx-5" width="24"/>
272241
</CWidgetIcon>
273242
</CCol>
274-
</CRow>
275-
<WidgetsSocial noCharts/>
276-
<WidgetsSocial/>
243+
</CRow> -->
244+
<WidgetsBrand noCharts/>
245+
<WidgetsBrand/>
277246
<CCardGroup class="c-mb-4">
278247
<CWidgetProgressIcon
279248
header="87.500"
@@ -473,18 +442,18 @@
473442
<WidgetsDropdown/>
474443
<CRow>
475444
<CCol sm="6" lg="3">
476-
<CWidgetSmallText
445+
<CWidgetHeaderDetails
477446
right-header="SALE"
478447
right-footer="Today 6:43 AM"
479448
left-header="$1.890,65"
480449
left-footer="+432,50 (15,78%)"
481450
>
482451
<CChartLineSimple style="height:40px"/>
483452
<CChartBarSimple style="height:40px"/>
484-
</CWidgetSmallText>
453+
</CWidgetHeaderDetails>
485454
</CCol>
486455
<CCol sm="6" lg="3">
487-
<CWidgetSmallText
456+
<CWidgetHeaderDetails
488457
variant="success"
489458
right-header="SALE"
490459
right-footer="Today 6:43 AM"
@@ -493,10 +462,10 @@
493462
>
494463
<CChartLineSimple style="height:40px"/>
495464
<CChartBarSimple style="height:40px"/>
496-
</CWidgetSmallText>
465+
</CWidgetHeaderDetails>
497466
</CCol>
498467
<CCol sm="6" lg="3">
499-
<CWidgetSmallText
468+
<CWidgetHeaderDetails
500469
variant="danger"
501470
right-header="SALE"
502471
right-footer="Today 6:43 AM"
@@ -505,10 +474,10 @@
505474
>
506475
<CChartLineSimple style="height:40px"/>
507476
<CChartBarSimple style="height:40px"/>
508-
</CWidgetSmallText>
477+
</CWidgetHeaderDetails>
509478
</CCol>
510479
<CCol sm="6" lg="3">
511-
<CWidgetSmallText
480+
<CWidgetHeaderDetails
512481
variant="warning"
513482
right-header="SALE"
514483
right-footer="Today 6:43 AM"
@@ -517,7 +486,7 @@
517486
>
518487
<CChartLineSimple style="height:40px"/>
519488
<CChartBarSimple style="height:40px"/>
520-
</CWidgetSmallText>
489+
</CWidgetHeaderDetails>
521490
</CCol>
522491
</CRow>
523492
<CRow>
@@ -556,7 +525,7 @@
556525
</template>
557526

558527
<script>
559-
import WidgetsSocial from './WidgetsSocial'
528+
import WidgetsBrand from './WidgetsBrand'
560529
import WidgetsDropdown from './WidgetsDropdown'
561530
import { CChartLineSimple, CChartBarSimple } from '../charts/index.js'
562531
@@ -565,7 +534,7 @@ export default {
565534
components: {
566535
CChartLineSimple,
567536
CChartBarSimple,
568-
WidgetsSocial,
537+
WidgetsBrand,
569538
WidgetsDropdown
570539
}
571540
}

src/views/widgets/WidgetsSocial.vue renamed to src/views/widgets/WidgetsBrand.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<CRow>
33
<template v-if="!noCharts">
44
<CCol md="3" sm="6">
5-
<CWidgetSocial
5+
<CWidgetBrand
66
variant="facebook"
77
right-header="89k"
88
right-footer="friends"
@@ -22,10 +22,10 @@
2222
label="Friends"
2323
labels="months"
2424
/>
25-
</CWidgetSocial>
25+
</CWidgetBrand>
2626
</CCol>
2727
<CCol md="3" sm="6">
28-
<CWidgetSocial
28+
<CWidgetBrand
2929
variant="twitter"
3030
right-header="973k"
3131
right-footer="followers"
@@ -45,10 +45,10 @@
4545
label="Followers"
4646
labels="months"
4747
/>
48-
</CWidgetSocial>
48+
</CWidgetBrand>
4949
</CCol>
5050
<CCol md="3" sm="6">
51-
<CWidgetSocial
51+
<CWidgetBrand
5252
variant="linkedin"
5353
right-header="500+"
5454
right-footer="contracts"
@@ -68,10 +68,10 @@
6868
label="Contracts"
6969
labels="months"
7070
/>
71-
</CWidgetSocial>
71+
</CWidgetBrand>
7272
</CCol>
7373
<CCol md="3" sm="6">
74-
<CWidgetSocial
74+
<CWidgetBrand
7575
right-header="12"
7676
right-footer="events"
7777
left-header="4"
@@ -91,12 +91,12 @@
9191
label="Followers"
9292
labels="months"
9393
/>
94-
</CWidgetSocial>
94+
</CWidgetBrand>
9595
</CCol>
9696
</template>
9797
<template v-else>
9898
<CCol md="3" sm="6">
99-
<CWidgetSocial
99+
<CWidgetBrand
100100
variant="facebook"
101101
right-header="89k"
102102
right-footer="friends"
@@ -108,10 +108,10 @@
108108
height="56"
109109
class="c-my-4"
110110
/>
111-
</CWidgetSocial>
111+
</CWidgetBrand>
112112
</CCol>
113113
<CCol md="3" sm="6">
114-
<CWidgetSocial
114+
<CWidgetBrand
115115
variant="twitter"
116116
right-header="973k"
117117
right-footer="followers"
@@ -123,10 +123,10 @@
123123
height="56"
124124
class="c-my-4"
125125
/>
126-
</CWidgetSocial>
126+
</CWidgetBrand>
127127
</CCol>
128128
<CCol md="3" sm="6">
129-
<CWidgetSocial
129+
<CWidgetBrand
130130
variant="linkedin"
131131
right-header="500+"
132132
right-footer="contracts"
@@ -138,10 +138,10 @@
138138
height="56"
139139
class="c-my-4"
140140
/>
141-
</CWidgetSocial>
141+
</CWidgetBrand>
142142
</CCol>
143143
<CCol md="3" sm="6">
144-
<CWidgetSocial
144+
<CWidgetBrand
145145
right-header="12"
146146
right-footer="events"
147147
left-header="4"
@@ -153,7 +153,7 @@
153153
height="56"
154154
class="c-my-4"
155155
/>
156-
</CWidgetSocial>
156+
</CWidgetBrand>
157157
</CCol>
158158
</template>
159159
</CRow>

0 commit comments

Comments
 (0)