index.vue
2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<script lang="ts" setup>
const recentDevicesHeaders = [
{ title: 'BROWSER', key: 'browser' },
{ title: 'DEVICE', key: 'device' },
{ title: 'LOCATION', key: 'location' },
{ title: 'RECENT ACTIVITY', key: 'recentActivity' },
]
const recentDevices = [
{
browser: 'Chrome on Windows',
device: 'HP Spectre 360',
location: 'Mekah, UEA',
recentActivity: '28 Apr 2022, 18:20',
deviceIcon: { icon: 'ri-macbook-line', color: 'primary' },
},
{
browser: 'Chrome on iPhone',
device: 'iPhone 12x',
location: 'Madinah, UEA',
recentActivity: '20 Apr 2022, 10:20',
deviceIcon: { icon: 'ri-android-line', color: 'error' },
},
{
browser: 'Chrome on Android',
device: 'Oneplus 9 Pro',
location: 'Madinah, UEA',
recentActivity: '16 Apr 2022, 04:20',
deviceIcon: { icon: 'ri-smartphone-line', color: 'success' },
},
{
browser: 'Chrome on macOS',
device: 'Apple iMac',
location: 'Mekah, UEA',
recentActivity: '28 Apr 2022, 18:20',
deviceIcon: { icon: 'ri-mac-line', color: 'secondary' },
},
{
browser: 'Chrome on Windows',
device: 'HP Spectre 360',
location: 'Madinah, UEA',
recentActivity: '20 Apr 2022, 10:20',
deviceIcon: { icon: 'ri-macbook-line', color: 'primary' },
},
{
browser: 'Chrome on Android',
device: 'Oneplus 9 Pro',
location: 'Madinah, UEA',
recentActivity: '16 Apr 2022, 04:20',
deviceIcon: { icon: 'ri-android-line', color: 'success' },
},
]
</script>
<template>
<VRow>
<!-- SECTION Recent Devices -->
<VCol cols="12">
<!-- 👉 Table -->
<VCard title="Recent Devices" class="recentDeviceCard">
<VDataTable :headers="recentDevicesHeaders" :items="recentDevices" hide-default-footer class="text-no-wrap">
<template #item.browser="{ item }">
<div class="d-flex gap-x-3">
<VIcon size="20" :icon="item.deviceIcon.icon" :color="item.deviceIcon.color" />
<h6 class="text-h6">
{{ item.browser }}
</h6>
</div>
</template>
<!-- TODO Refactor this after vuetify provides proper solution for removing default footer -->
<template #bottom />
</VDataTable>
</VCard>
</VCol>
<!-- !SECTION -->
</VRow>
</template>