Skip to content

Commit 0fd0dd4

Browse files
refactor(convention): remove app-dashboard prefix from component declration (#1)
refactor(convention): components naming conventions
2 parents e928af7 + 45dc35d commit 0fd0dd4

File tree

12 files changed

+70
-93
lines changed

12 files changed

+70
-93
lines changed

src/components/dashboard/bar/notifications/Menu.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
<v-sheet rounded="lg" class="notifications-menu overflow-hidden">
3030
<v-responsive max-height="400" min-height="250" style="overflow-y: scroll">
31-
<app-dashboard-bar-notifications-loader v-if="isLoading" />
31+
<notifications-loader v-if="isLoading" />
3232

3333
<template v-if="notifications.length">
3434
<v-list v-for="notification in notifications" :key="notification.id" lines="three">
35-
<app-dashboard-bar-notifications-item :notification="notification" />
35+
<notifications-item :notification="notification" />
3636
</v-list>
3737
</template>
3838

@@ -54,8 +54,8 @@ import { useI18n } from 'vue-i18n'
5454
import { useNotificationsStore } from '@/stores/notifications'
5555
import { useUser } from '@/composables/useUser'
5656
import AppTooltipBtn from '@/components/app/TooltipBtn.vue'
57-
import AppDashboardBarNotificationsLoader from './Loader.vue'
58-
import AppDashboardBarNotificationsItem from './Item.vue'
57+
import NotificationsLoader from './Loader.vue'
58+
import NotificationsItem from './Item.vue'
5959
6060
const menu = ref(false)
6161
const width = computed(() => (mobile.value ? 420 : 380))

src/components/dashboard/chat/conversations/List.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</v-list-item>
2121
</template>
2222

23-
<app-dashboard-chat-settings ref="settings" />
23+
<chat-settings ref="settings" />
2424

2525
<v-divider color="grey-darken-1" />
2626

@@ -94,7 +94,7 @@ import { onMounted } from 'vue'
9494
import { storeToRefs } from 'pinia'
9595
import { useAuthStore } from '@/stores/auth'
9696
import { useChatStore } from '@/stores/chats'
97-
import AppDashboardChatSettings from '@/components/dashboard/chat/Settings.vue'
97+
import ChatSettings from '@/components/dashboard/chat/Settings.vue'
9898
9999
const authStore = useAuthStore()
100100
const chatStore = useChatStore()

src/components/dashboard/chat/messages/Message.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<!-- Voice message -->
3939
<div v-else>
4040
<div class="d-inline-block rounded-pill" :class="{ 'ms-4': !current, 'me-4': current }">
41-
<app-dashboard-chat-messages-audio-player :source="data.source" />
41+
<chat-messages-audio-player :source="data.source" />
4242
</div>
4343
</div>
4444

@@ -69,7 +69,7 @@
6969
<script setup>
7070
import { computed } from 'vue'
7171
import { useUser } from '@/composables/useUser'
72-
import AppDashboardChatMessagesAudioPlayer from './AudioPlayer.vue'
72+
import ChatMessagesAudioPlayer from './AudioPlayer.vue'
7373
7474
const props = defineProps({ data: Object })
7575
const user = useUser()

src/components/dashboard/chat/sender/Sender.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</template>
3939
</v-text-field>
4040

41-
<app-dashboard-chat-sender-recorder
41+
<chat-sender-recorder
4242
@abort="isRecording = false"
4343
@recorded=";(isRecording = false), send('voice', $event)"
4444
:is-recording="isRecording"
@@ -58,7 +58,7 @@ import { useChatStore } from '@/stores/chats'
5858
import { useAuthStore } from '@/stores/auth'
5959
import { useAppStore } from '@/stores/app'
6060
import EmojiesPicker from './EmojiesPicker.vue'
61-
import AppDashboardChatSenderRecorder from './Recorder.vue'
61+
import ChatSenderRecorder from './Recorder.vue'
6262
6363
const message = ref(null)
6464
const loading = ref(false)

src/components/dashboard/drawer/NavigationDrawer.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<v-list density="comfortable">
1010
<template v-for="link in links">
1111
<!-- Having children, we need to render it via list group -->
12-
<app-dashboard-drawer-item-group v-if="link.children" :link="link" />
12+
<drawer-item-group v-if="link.children" :link="link" />
1313

1414
<!-- Not having any children -->
15-
<app-dashboard-drawer-item
15+
<drawer-item
1616
v-if="!link.children && (link.permissions && !can(link.permissions) ? false : true)"
1717
:link="link"
1818
/>
@@ -25,8 +25,8 @@
2525
import { ref } from 'vue'
2626
import { useLocale } from 'vuetify'
2727
import { useUser } from '@/composables/useUser'
28-
import AppDashboardDrawerItem from './Item.vue'
29-
import AppDashboardDrawerItemGroup from './ItemGroup.vue'
28+
import DrawerItem from './Item.vue'
29+
import DrawerItemGroup from './ItemGroup.vue'
3030
3131
const user = useUser()
3232
const { t } = useLocale()

src/layouts/dashboard.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<!-- end snackbar -->
66

77
<!-- sidebar -->
8-
<app-dashboard-drawer v-model="isNavDrawerActive" :rail="rail" />
8+
<drawer v-model="isNavDrawerActive" :rail="rail" />
99
<!-- end sidebar -->
1010

1111
<!-- navbar -->
12-
<app-dashboard-bar @rail:switch="navigationDrawer" />
12+
<bar @rail:switch="navigationDrawer" />
1313
<!-- end navbar -->
1414

1515
<!-- content -->
1616
<v-main>
17-
<app-dashboard-loader v-show="isLoading" />
17+
<loader v-show="isLoading" />
1818
<div v-show="!isLoading" class="pa-4 pa-lg-6">
1919
<router-view />
2020
</div>
@@ -30,9 +30,9 @@ import { useDisplay } from 'vuetify'
3030
import { useAppStore } from '@/stores/app'
3131
import { useNotificationsStore } from '@/stores/notifications'
3232
import AppSnackbar from '@/components/app/Snackbar.vue'
33-
import AppDashboardDrawer from '@/components/dashboard/drawer/NavigationDrawer.vue'
34-
import AppDashboardLoader from '@/components/dashboard/Loader.vue'
35-
import AppDashboardBar from '@/components/dashboard/bar/Bar.vue'
33+
import Drawer from '@/components/dashboard/drawer/NavigationDrawer.vue'
34+
import Loader from '@/components/dashboard/Loader.vue'
35+
import Bar from '@/components/dashboard/bar/Bar.vue'
3636
3737
const rail = ref(false)
3838
const isNavDrawerActive = ref(true)

src/pages/dashboard/chat.vue

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<source src="/message.mp3" type="audio/mpeg" />
55
</audio>
66

7-
<app-dashboard-chat-conversations-list />
7+
<chat-conversations-list />
88

99
<!--
1010
Equation: (Screen height - Navbar height - Top & Bottom paddings)
@@ -15,10 +15,7 @@
1515
class="position-relative h-100 ms-0 ms-lg-5"
1616
rounded="lg"
1717
>
18-
<app-dashboard-chat-toolbar
19-
:conversation="chatStore.activeConversation"
20-
:isLoadingChat="isLoadingChat"
21-
/>
18+
<chat-toolbar :conversation="chatStore.activeConversation" :isLoadingChat="isLoadingChat" />
2219

2320
<v-divider color="grey-darken-1" />
2421

@@ -46,11 +43,8 @@
4643
</div>
4744

4845
<ul v-else>
49-
<app-dashboard-chat-messages-message v-for="data in chat" :data="data" />
50-
<app-dashboard-chat-typing
51-
v-if="chat.length && isPartnerTyping"
52-
:partner="activeConversation"
53-
/>
46+
<chat-messages-message v-for="data in chat" :data="data" />
47+
<chat-typing v-if="chat.length && isPartnerTyping" :partner="activeConversation" />
5448
</ul>
5549
</div>
5650

@@ -59,11 +53,11 @@
5953
class="d-flex align-center position-absolute w-100 pa-5"
6054
style="bottom: 0; left: 0; height: 84px"
6155
>
62-
<app-dashboard-chat-sender />
56+
<chat-sender />
6357
</div>
6458
</v-sheet>
6559

66-
<app-dashboard-chat-empty v-else />
60+
<chat-empty v-else />
6761
</v-main>
6862
</v-layout>
6963
</template>
@@ -77,12 +71,12 @@ import { useChatStore } from '@/stores/chats'
7771
import { useLoader } from '@/composables/useLoader'
7872
import { useUser } from '@/composables/useUser'
7973
import axios from '@/plugins/axios'
80-
import AppDashboardChatMessagesMessage from '@/components/dashboard/chat/messages/Message.vue'
81-
import AppDashboardChatSender from '@/components/dashboard/chat/sender/Sender.vue'
82-
import AppDashboardChatConversationsList from '@/components/dashboard/chat/conversations/List.vue'
83-
import AppDashboardChatTyping from '@/components/dashboard/chat/Typing.vue'
84-
import AppDashboardChatToolbar from '@/components/dashboard/chat/Toolbar.vue'
85-
import AppDashboardChatEmpty from '@/components/dashboard/chat/Empty.vue'
74+
import ChatMessagesMessage from '@/components/dashboard/chat/messages/Message.vue'
75+
import ChatSender from '@/components/dashboard/chat/sender/Sender.vue'
76+
import ChatConversationsList from '@/components/dashboard/chat/conversations/List.vue'
77+
import ChatTyping from '@/components/dashboard/chat/Typing.vue'
78+
import ChatToolbar from '@/components/dashboard/chat/Toolbar.vue'
79+
import ChatEmpty from '@/components/dashboard/chat/Empty.vue'
8680
8781
const container = ref(null)
8882
const sender = ref(null)

src/pages/dashboard/index.vue

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<app-sheet title="Dashboard" class="mb-0">
33
<v-row no-gutters>
44
<v-col cols="12" sm="6" lg="3">
5-
<app-dashboard-widgets-stat
5+
<widgets-stat
66
title="Today Orders"
77
value="1,900"
88
percentage="25.47%"
@@ -14,18 +14,13 @@
1414
<v-divider vertical />
1515

1616
<v-col cols="12" sm="6" lg="3">
17-
<app-dashboard-widgets-stat
18-
title="Today Orders"
19-
value="2,500"
20-
percentage="5.64%"
21-
class="px-5 py-0"
22-
/>
17+
<widgets-stat title="Today Orders" value="2,500" percentage="5.64%" class="px-5 py-0" />
2318
</v-col>
2419

2520
<v-divider vertical />
2621

2722
<v-col cols="12" sm="6" lg="3">
28-
<app-dashboard-widgets-stat
23+
<widgets-stat
2924
title="Today Orders"
3025
value="564"
3126
percentage="14.47%"
@@ -37,7 +32,7 @@
3732
<v-divider vertical />
3833

3934
<v-col cols="12" sm="6" lg="3">
40-
<app-dashboard-widgets-stat
35+
<widgets-stat
4136
title="Today Orders"
4237
value="1,000"
4338
percentage="9.14%"
@@ -130,33 +125,25 @@
130125
<v-col cols="16" lg="6">
131126
<v-row>
132127
<v-col cols="12">
133-
<app-dashboard-widgets-sales-revenue />
128+
<widgets-sales-revenue />
134129
</v-col>
135130

136131
<!-- Second widget -->
137132
<v-col cols="12" lg="6">
138-
<app-dashboard-widgets-bar-simple
139-
title="Active Subscriptions"
140-
value="1.1K"
141-
percentage="25.47%"
142-
/>
133+
<widgets-bar-simple title="Active Subscriptions" value="1.1K" percentage="25.47%" />
143134
</v-col>
144135

145136
<!-- Third widget -->
146137
<v-col cols="12" lg="6">
147-
<app-dashboard-widgets-bar-simple
148-
title="AVG Subscriptions"
149-
value="341.2"
150-
percentage="10%"
151-
/>
138+
<widgets-bar-simple title="AVG Subscriptions" value="341.2" percentage="10%" />
152139
</v-col>
153140

154141
<v-col cols="6">
155-
<app-dashboard-widgets-website-performance />
142+
<widgets-website-performance />
156143
</v-col>
157144

158145
<v-col cols="6">
159-
<app-dashboard-widgets-pie />
146+
<widgets-pie />
160147
</v-col>
161148

162149
<!-- Fourth widget -->
@@ -264,11 +251,11 @@ import { LineChart, useLineChart } from 'vue-chart-3'
264251
import { useUser } from '@/composables/useUser'
265252
import { useLoader } from '@/composables/useLoader'
266253
import { months, numbers, createGradient } from '@/assets/js/charts/utils'
267-
import AppDashboardWidgetsSalesRevenue from '@/components/dashboard/widgets/SalesRevenue.vue'
268-
import AppDashboardWidgetsBarSimple from '@/components/dashboard/widgets/BarSimple.vue'
269-
import AppDashboardWidgetsWebsitePerformance from '@/components/dashboard/widgets/WebsitePerformance.vue'
270-
import AppDashboardWidgetsStat from '@/components/dashboard/widgets/Stat.vue'
271-
import AppDashboardWidgetsPie from '@/components/dashboard/widgets/Pie.vue'
254+
import WidgetsSalesRevenue from '@/components/dashboard/widgets/SalesRevenue.vue'
255+
import WidgetsBarSimple from '@/components/dashboard/widgets/BarSimple.vue'
256+
import WidgetsWebsitePerformance from '@/components/dashboard/widgets/WebsitePerformance.vue'
257+
import WidgetsStat from '@/components/dashboard/widgets/Stat.vue'
258+
import WidgetsPie from '@/components/dashboard/widgets/Pie.vue'
272259
273260
Chart.register(...registerables)
274261

src/pages/dashboard/profile.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<app-sheet title="Profile">
44
<v-row class="mt-2">
55
<v-col cols="4" class="mx-auto text-center mb-5">
6-
<app-dashboard-profile-avatar @save="saveAvatar" :user="user" />
6+
<profile-avatar @save="saveAvatar" :user="user" />
77
<h4 class="mt-1">Profile Picture</h4>
88
<p class="text-grey">Change your profile picture.</p>
99
</v-col>
@@ -99,7 +99,7 @@ import { useForm } from '@/composables/useForm'
9999
import { useUser } from '@/composables/useUser'
100100
import { useLoader } from '@/composables/useLoader'
101101
import storage from '@/plugins/storage'
102-
import AppDashboardProfileAvatar from '@/components/dashboard/profile/Avatar.vue'
102+
import ProfileAvatar from '@/components/dashboard/profile/Avatar.vue'
103103
104104
const user = useUser()
105105
const loader = useLoader()

src/pages/dashboard/roles.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<template #item.id="{ item }">#{{ item.raw.id }}</template>
1212

1313
<template #item.actions="{ item }">
14-
<app-dashboard-edit-btn @click="composer.update(item.raw)" />
15-
<app-dashboard-delete-btn @click.prevent />
14+
<edit-btn @click="composer.update(item.raw)" />
15+
<delete-btn @click.prevent />
1616
</template>
1717

1818
<template #bottom>
@@ -24,7 +24,7 @@
2424
</app-sheet>
2525

2626
<useComposer ref="composer" title="Role" v-slot="{ props }">
27-
<app-dashboard-roles-compose v-bind="props" @created="fetch()" />
27+
<roles-compose v-bind="props" @created="fetch()" />
2828
</useComposer>
2929
</template>
3030

@@ -33,9 +33,9 @@ import { ref, onMounted } from 'vue'
3333
import axios from '@/plugins/axios'
3434
import { useLoader } from '@/composables/useLoader'
3535
import useComposer from '@/hoc/useComposer.vue'
36-
import AppDashboardRolesCompose from '@/components/dashboard/roles/Compose.vue'
37-
import AppDashboardEditBtn from '@/components/dashboard/EditBtn.vue'
38-
import AppDashboardDeleteBtn from '@/components/dashboard/DeleteBtn.vue'
36+
import RolesCompose from '@/components/dashboard/roles/Compose.vue'
37+
import EditBtn from '@/components/dashboard/EditBtn.vue'
38+
import DeleteBtn from '@/components/dashboard/DeleteBtn.vue'
3939
4040
const page = ref(1)
4141
const composer = ref(null)

0 commit comments

Comments
 (0)