Skip to content

Commit c26a7b9

Browse files
committed
refactor: change inner ids' props type to Number
1 parent 698d31b commit c26a7b9

File tree

282 files changed

+579
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+579
-451
lines changed

src/components/BaseSidebarItem.vue

+29-9
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ import BaseLinkContainer
4545
from '@/components/containers/links/BaseLinkContainer.vue'
4646
import BaseIcon from '@/components/icons/BaseIcon.vue'
4747
import BaseImage from '@/components/images/BaseImage.vue'
48+
import {
49+
params as formatRouterParams
50+
} from '@/helpers/formatters/plugins/router'
4851
4952
export default {
5053
name: 'BaseSidebarItem',
@@ -88,27 +91,44 @@ export default {
8891
)
8992
},
9093
isPathsMatch () {
91-
return this.$route
92-
.path
93-
.includes(
94-
this.link?.path
95-
)
94+
return this.routePath.includes(
95+
this.linkPath
96+
)
97+
},
98+
routePath () {
99+
return this.$route.path
100+
},
101+
linkPath () {
102+
return this.link?.path
96103
},
97104
isParamsMatch () {
98105
return (
99-
this.routeParamsString ===
106+
this.routeParamsFormattedString ===
100107
this.linkParamsString
101108
)
102109
},
103-
routeParamsString () {
110+
routeParamsFormattedString () {
104111
return JSON.stringify(
105-
this.$route.params
112+
this.routeParamsFormatted
106113
)
107114
},
115+
routeParamsFormatted () {
116+
return formatRouterParams(
117+
{
118+
params: this.routeParams
119+
}
120+
)
121+
},
122+
routeParams () {
123+
return this.$route.params
124+
},
108125
linkParamsString () {
109126
return JSON.stringify(
110-
this.link?.params
127+
this.linkParams
111128
)
129+
},
130+
linkParams () {
131+
return this.link?.params
112132
}
113133
},
114134
methods: {

src/components/buttons/play/BasePlayButton.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ export default {
4040
CheckedOptionButton
4141
},
4242
props: {
43-
isLoading: Boolean,
44-
error: Error,
4543
checkedOptions: {
4644
type: Array,
4745
default () {
4846
return []
4947
}
50-
}
48+
},
49+
isLoading: Boolean,
50+
error: Error
5151
},
5252
emits: [
5353
'click'

src/components/buttons/play/profile/favorites/BaseProfileFavoritesTracksPlayButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
],
1919
props: {
2020
profileId: {
21-
type: String,
21+
type: Number,
2222
required: true
2323
},
2424
order: String

src/components/buttons/play/profile/library/BaseProfileLibraryTracksPlayButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default {
2020
],
2121
props: {
2222
profileId: {
23-
type: String,
23+
type: Number,
2424
required: true
2525
},
2626
order: String,

src/components/buttons/play/profile/library/album/BaseProfileLibraryAlbumTracksPlayButton.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export default {
1919
],
2020
props: {
2121
profileId: {
22-
type: String,
22+
type: Number,
2323
required: true
2424
},
2525
libraryAlbumId: {
26-
type: String,
26+
type: Number,
2727
required: true
2828
},
2929
order: String

src/components/buttons/play/profile/library/artist/BaseProfileLibraryArtistTracksPlayButton.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export default {
1919
],
2020
props: {
2121
profileId: {
22-
type: String,
22+
type: Number,
2323
required: true
2424
},
2525
libraryArtistId: {
26-
type: String,
26+
type: Number,
2727
required: true
2828
},
2929
order: String

src/components/buttons/play/profile/playlist/BaseProfilePlaylistTracksPlayButton.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export default {
1818
],
1919
props: {
2020
profileId: {
21-
type: String,
21+
type: Number,
2222
required: true
2323
},
2424
playlistId: {
25-
type: String,
25+
type: Number,
2626
required: true
2727
},
2828
order: String

src/components/containers/forms/community/BaseCommunityUpdateFormContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
],
3131
props: {
3232
communityId: {
33-
type: String,
33+
type: Number,
3434
required: true
3535
},
3636
image: Object

src/components/containers/forms/message/BaseMessageCreateFormContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
},
2727
props: {
2828
profileId: {
29-
type: String,
29+
type: Number,
3030
required: true
3131
},
3232
images: {

src/components/containers/forms/playlist/BasePlaylistUpdateFormContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
],
3131
props: {
3232
playlistId: {
33-
type: String,
33+
type: Number,
3434
required: true
3535
},
3636
image: Object

src/components/containers/forms/post/BasePostCreateFormContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export default {
5454
return []
5555
}
5656
},
57-
profileId: String,
58-
communityId: String
57+
profileId: Number,
58+
communityId: Number
5959
},
6060
emits: [
6161
'success'

src/components/containers/forms/post/comment/BasePostCommentCreateFormContainer.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
required: true
3434
},
3535
postId: {
36-
type: String,
36+
type: Number,
3737
required: true
3838
},
3939
images: {
@@ -60,8 +60,8 @@ export default {
6060
return []
6161
}
6262
},
63-
profileId: String,
64-
communityId: String
63+
profileId: Number,
64+
communityId: Number
6565
},
6666
emits: [
6767
'success'

src/components/containers/links/album/BaseAlbumLinkContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default {
3030
},
3131
artistName: String,
3232
isLinkToLibrary: Boolean,
33-
profileId: String,
34-
libraryAlbumId: String
33+
profileId: Number,
34+
libraryAlbumId: Number
3535
},
3636
emits: [
3737
'linkClick'

src/components/containers/links/artist/BaseArtistLinkContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export default {
4949
required: true
5050
},
5151
isLinkToLibrary: Boolean,
52-
profileId: String,
53-
libraryArtistId: String
52+
profileId: Number,
53+
libraryArtistId: Number
5454
},
5555
emits: [
5656
'linkActiveChange',

src/components/containers/links/track/BaseTrackLinkContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export default {
3030
},
3131
artistName: String,
3232
isLinkToLibrary: Boolean,
33-
profileId: String,
34-
libraryTrackId: String
33+
profileId: Number,
34+
libraryTrackId: Number
3535
},
3636
emits: [
3737
'linkClick'

src/components/containers/modals/community/BaseCommunityModalContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default {
4444
],
4545
props: {
4646
communityId: {
47-
type: String,
47+
type: Number,
4848
required: true
4949
},
5050
scope: {

src/components/containers/modals/library/BaseLibraryCommonModalContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default {
3737
],
3838
props: {
3939
profileId: {
40-
type: String,
40+
type: Number,
4141
required: true
4242
},
4343
scope: {

src/components/containers/pages/community/BaseCommunityPageContainer.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
},
4848
props: {
4949
communityId: {
50-
type: String,
50+
type: Number,
5151
required: true
5252
},
5353
scope: String,
@@ -109,7 +109,6 @@ export default {
109109
return this.communityData
110110
?.creator
111111
?.id
112-
?.toString()
113112
}
114113
},
115114
watch: {

src/components/containers/pages/community/BaseCommunityPaginatedPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default {
6262
type: String,
6363
required: true
6464
},
65-
communityId: String,
65+
communityId: Number,
6666
limit: Number,
6767
order: String,
6868
model: String,

src/components/containers/pages/conversation/BaseConversationPageContainer.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
],
3232
props: {
3333
conversationId: {
34-
type: String,
34+
type: Number,
3535
required: true
3636
}
3737
},
@@ -55,10 +55,13 @@ export default {
5555
}
5656
},
5757
profileNickname () {
58-
return this.conversationData?.profile?.nickname
58+
return this.profileData?.nickname
59+
},
60+
profileData () {
61+
return this.conversationData?.profile
5962
},
6063
profileId () {
61-
return this.conversationData?.profile?.id?.toString()
64+
return this.profileData?.id
6265
},
6366
tabData () {
6467
return formatConversationPageTab(

src/components/containers/pages/profile/BaseProfilePageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
},
4040
props: {
4141
profileId: {
42-
type: String,
42+
type: Number,
4343
required: true
4444
},
4545
scope: String,

src/components/containers/pages/profile/BaseProfilePaginatedPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
type: String,
7272
required: true
7373
},
74-
profileId: String,
74+
profileId: Number,
7575
limit: Number,
7676
order: String,
7777
model: String,

src/components/containers/pages/profile/favorites/BaseProfileFavoritesPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
],
3333
props: {
3434
profileId: {
35-
type: String,
35+
type: Number,
3636
required: true
3737
},
3838
scope: String,

src/components/containers/pages/profile/favorites/BaseProfileFavoritesPaginatedPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default {
6161
paginatedPageMixin
6262
],
6363
props: {
64-
profileId: String,
64+
profileId: Number,
6565
scope: String,
6666
limit: Number,
6767
order: String,

src/components/containers/pages/profile/library/BaseProfileLibraryPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
],
3737
props: {
3838
profileId: {
39-
type: String,
39+
type: Number,
4040
required: true
4141
},
4242
scope: String,

src/components/containers/pages/profile/library/BaseProfileLibraryPaginatedPageContainer.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default {
8181
searchablePageMixin
8282
],
8383
props: {
84-
profileId: String,
84+
profileId: Number,
8585
scope: String,
8686
limit: Number,
8787
order: String,

src/components/containers/pages/profile/library/album/BaseProfileLibraryAlbumPageContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ export default {
3333
],
3434
props: {
3535
profileId: {
36-
type: String,
36+
type: Number,
3737
required: true
3838
},
3939
libraryAlbumId: {
40-
type: String,
40+
type: Number,
4141
required: true
4242
},
4343
scope: String,

src/components/containers/pages/profile/library/album/BaseProfileLibraryAlbumPaginatedPageContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export default {
6161
paginatedPageMixin
6262
],
6363
props: {
64-
profileId: String,
65-
libraryAlbumId: String,
64+
profileId: Number,
65+
libraryAlbumId: Number,
6666
scope: String,
6767
limit: Number,
6868
order: String,

src/components/containers/pages/profile/library/artist/BaseProfileLibraryArtistPageContainer.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export default {
3434
],
3535
props: {
3636
profileId: {
37-
type: String,
37+
type: Number,
3838
required: true
3939
},
4040
libraryArtistId: {
41-
type: String,
41+
type: Number,
4242
required: true
4343
},
4444
scope: String,

0 commit comments

Comments
 (0)