From 387b937820cfdf34fccc2ae869c758c6d4279316 Mon Sep 17 00:00:00 2001 From: Phan An Date: Thu, 17 Oct 2024 11:41:30 +0700 Subject: [PATCH] refactor: remove barrel files (#1855) --- resources/assets/js/App.vue | 6 +-- resources/assets/js/__tests__/UnitTestCase.ts | 21 ++++----- .../js/__tests__/factory/genreFactory.ts | 2 +- .../js/__tests__/factory/songFactory.ts | 2 +- resources/assets/js/__tests__/stubs.ts | 2 +- resources/assets/js/app.ts | 10 +++-- .../js/components/album/AlbumCard.spec.ts | 8 ++-- .../assets/js/components/album/AlbumCard.vue | 13 ++++-- .../components/album/AlbumContextMenu.spec.ts | 8 ++-- .../js/components/album/AlbumContextMenu.vue | 13 ++++-- .../js/components/album/AlbumInfo.spec.ts | 4 +- .../assets/js/components/album/AlbumInfo.vue | 4 +- .../components/album/AlbumTrackList.spec.ts | 2 +- .../js/components/album/AlbumTrackList.vue | 2 +- .../album/AlbumTrackListItem.spec.ts | 6 +-- .../components/album/AlbumTrackListItem.vue | 10 +++-- .../js/components/artist/ArtistCard.spec.ts | 8 ++-- .../js/components/artist/ArtistCard.vue | 12 +++-- .../artist/ArtistContextMenu.spec.ts | 10 +++-- .../components/artist/ArtistContextMenu.vue | 12 +++-- .../js/components/artist/ArtistInfo.spec.ts | 6 +-- .../js/components/artist/ArtistInfo.vue | 4 +- .../auth/ForgotPasswordForm.spec.ts | 2 +- .../js/components/auth/ForgotPasswordForm.vue | 5 ++- .../js/components/auth/LoginForm.spec.ts | 4 +- .../assets/js/components/auth/LoginForm.vue | 6 +-- .../components/auth/ResetPasswordForm.spec.ts | 2 +- .../js/components/auth/ResetPasswordForm.vue | 9 ++-- .../components/auth/sso/GoogleLoginButton.vue | 2 +- ...ation.spec.ts => AcceptInvitation.spec.ts} | 4 +- .../invitation/AcceptInvitation.vue | 5 ++- .../koel-plus/ActivateLicenseForm.spec.ts | 2 +- .../koel-plus/ActivateLicenseForm.vue | 7 +-- .../components/koel-plus/BtnUpgradeToPlus.vue | 2 +- .../koel-plus/KoelPlusModal.spec.ts | 2 +- .../js/components/koel-plus/KoelPlusModal.vue | 2 +- .../js/components/layout/ModalWrapper.spec.ts | 4 +- .../js/components/layout/ModalWrapper.vue | 3 +- .../app-footer/FooterExtraControls.spec.ts | 4 +- .../layout/app-footer/FooterExtraControls.vue | 5 ++- .../app-footer/FooterPlaybackControls.spec.ts | 4 +- .../app-footer/FooterPlaybackControls.vue | 4 +- .../layout/app-footer/FooterQueueButton.vue | 8 ++-- .../layout/app-footer/FooterSongInfo.vue | 6 ++- .../layout/app-footer/index.spec.ts | 5 ++- .../js/components/layout/app-footer/index.vue | 13 ++++-- .../layout/main-wrapper/MainContent.spec.ts | 5 ++- .../layout/main-wrapper/MainContent.vue | 8 ++-- .../side-sheet/AboutKoelButton.spec.ts | 2 +- .../side-sheet/AboutKoelButton.vue | 4 +- .../side-sheet/LogoutButton.spec.ts | 2 +- .../main-wrapper/side-sheet/LogoutButton.vue | 2 +- .../main-wrapper/side-sheet/SideSheet.spec.ts | 9 ++-- .../main-wrapper/side-sheet/SideSheet.vue | 11 +++-- .../side-sheet/SideSheetTabHeader.spec.ts | 4 +- .../side-sheet/SideSheetTabHeader.vue | 2 +- .../main-wrapper/sidebar/HomeButton.spec.ts | 2 +- .../main-wrapper/sidebar/HomeButton.vue | 2 +- .../sidebar/PlaylistFolderSidebarItem.vue | 7 +-- .../sidebar/PlaylistSidebarItem.spec.ts | 4 +- .../sidebar/PlaylistSidebarItem.vue | 8 ++-- .../main-wrapper/sidebar/Sidebar.spec.ts | 6 +-- .../layout/main-wrapper/sidebar/Sidebar.vue | 8 +++- .../main-wrapper/sidebar/SidebarItem.spec.ts | 4 +- .../main-wrapper/sidebar/SidebarItem.vue | 4 +- .../sidebar/SidebarManageSection.spec.ts | 2 +- .../sidebar/SidebarManageSection.vue | 3 +- .../sidebar/SidebarPlaylistsSection.spec.ts | 5 ++- .../sidebar/SidebarPlaylistsSection.vue | 4 +- .../sidebar/SidebarYourLibrarySection.spec.ts | 2 +- .../sidebar/SidebarYourLibrarySection.vue | 2 +- .../js/components/meta/AboutKoelModal.spec.ts | 6 +-- .../js/components/meta/AboutKoelModal.vue | 6 ++- .../js/components/meta/CreditsBlock.spec.ts | 2 +- .../js/components/meta/CreditsBlock.vue | 2 +- .../js/components/meta/SupportKoel.spec.ts | 4 +- .../assets/js/components/meta/SupportKoel.vue | 4 +- .../CreatePlaylistContextMenu.spec.ts | 9 ++-- .../playlist/CreatePlaylistContextMenu.vue | 6 +-- .../CreatePlaylistContextMenuButton.vue | 2 +- .../playlist/CreatePlaylistFolderForm.spec.ts | 6 +-- .../playlist/CreatePlaylistFolderForm.vue | 8 +++- .../playlist/CreatePlaylistForm.spec.ts | 10 ++--- .../playlist/CreatePlaylistForm.vue | 14 ++++-- .../playlist/EditPlaylistFolderForm.spec.ts | 8 ++-- .../playlist/EditPlaylistFolderForm.vue | 9 +++- .../playlist/EditPlaylistForm.spec.ts | 13 +++--- .../components/playlist/EditPlaylistForm.vue | 10 ++++- ...ts => InvitePlaylistCollaborators.spec.ts} | 2 +- .../playlist/InvitePlaylistCollaborators.vue | 4 +- .../PlaylistCollaborationModal.spec.ts | 2 +- .../playlist/PlaylistCollaborationModal.vue | 4 +- .../playlist/PlaylistCollaboratorList.spec.ts | 2 +- .../playlist/PlaylistCollaboratorList.vue | 8 ++-- .../playlist/PlaylistCollaboratorListItem.vue | 2 +- .../playlist/PlaylistContextMenu.spec.ts | 12 ++--- .../playlist/PlaylistContextMenu.vue | 13 ++++-- .../PlaylistFolderContextMenu.spec.ts | 13 +++--- .../playlist/PlaylistFolderContextMenu.vue | 11 +++-- .../CreateSmartPlaylistForm.vue | 21 +++++---- .../smart-playlist/EditSmartPlaylistForm.vue | 22 +++++----- .../smart-playlist/SmartPlaylistRuleGroup.vue | 2 +- .../components/podcast/AddPodcastForm.spec.ts | 4 +- .../js/components/podcast/AddPodcastForm.vue | 8 +++- .../js/components/podcast/EpisodeItem.spec.ts | 6 +-- .../js/components/podcast/EpisodeItem.vue | 11 +++-- .../components/podcast/EpisodePogress.spec.ts | 2 +- .../js/components/podcast/PodcastCard.vue | 2 +- .../components/podcast/PodcastListSorter.vue | 2 +- .../EditableProfileAvatar.vue | 6 +-- .../profile-preferences/LastfmIntegration.vue | 9 ++-- .../PreferencesForm.spec.ts | 8 ++-- .../profile-preferences/PreferencesForm.vue | 5 ++- .../profile-preferences/ProfileForm.spec.ts | 8 ++-- .../profile-preferences/ProfileForm.vue | 9 ++-- .../profile-preferences/QRLogin.spec.ts | 4 +- .../profile-preferences/QRLogin.vue | 4 +- .../SpotifyIntegration.spec.ts | 6 +-- .../SpotifyIntegration.vue | 3 +- .../profile-preferences/ThemeCard.spec.ts | 6 +-- .../profile-preferences/ThemeCard.vue | 2 +- .../profile-preferences/ThemeList.spec.ts | 6 +-- .../profile-preferences/ThemeList.vue | 2 +- .../screens/AlbumListScreen.spec.ts | 10 +++-- .../js/components/screens/AlbumListScreen.vue | 9 +++- .../js/components/screens/AlbumScreen.spec.ts | 10 +++-- .../js/components/screens/AlbumScreen.vue | 15 +++++-- .../components/screens/AllSongsScreen.spec.ts | 14 +++--- .../js/components/screens/AllSongsScreen.vue | 22 +++++----- .../screens/ArtistListScreen.spec.ts | 8 ++-- .../components/screens/ArtistListScreen.vue | 9 +++- .../components/screens/ArtistScreen.spec.ts | 10 +++-- .../js/components/screens/ArtistScreen.vue | 15 +++++-- .../js/components/screens/EpisodeScreen.vue | 13 ++++-- .../screens/FavoritesScreen.spec.ts | 2 +- .../js/components/screens/FavoritesScreen.vue | 10 +++-- .../screens/GenreListScreen.spec.ts | 7 +-- .../js/components/screens/GenreListScreen.vue | 8 ++-- .../js/components/screens/GenreScreen.spec.ts | 7 +-- .../js/components/screens/GenreScreen.vue | 13 ++++-- .../js/components/screens/HomeScreen.spec.ts | 9 ++-- .../js/components/screens/HomeScreen.vue | 10 +++-- .../components/screens/PlaylistScreen.spec.ts | 13 +++--- .../js/components/screens/PlaylistScreen.vue | 23 +++++----- .../components/screens/PodcastListScreen.vue | 8 ++-- .../js/components/screens/PodcastScreen.vue | 12 +++-- .../js/components/screens/ProfileScreen.vue | 2 +- .../js/components/screens/QueueScreen.spec.ts | 7 +-- .../js/components/screens/QueueScreen.vue | 14 ++++-- .../screens/RecentlyPlayedScreen.spec.ts | 8 ++-- .../screens/RecentlyPlayedScreen.vue | 8 ++-- .../components/screens/SettingsScreen.spec.ts | 6 +-- .../js/components/screens/SettingsScreen.vue | 11 +++-- .../js/components/screens/UploadScreen.vue | 8 ++-- .../components/screens/UserListScreen.spec.ts | 6 +-- .../js/components/screens/UserListScreen.vue | 6 +-- .../components/screens/VisualizerScreen.vue | 5 ++- .../js/components/screens/YouTubeScreen.vue | 7 +-- .../screens/home/MostPlayedAlbums.spec.ts | 2 +- .../screens/home/MostPlayedAlbums.vue | 2 +- .../screens/home/MostPlayedArtists.spec.ts | 2 +- .../screens/home/MostPlayedArtists.vue | 3 +- .../screens/home/MostPlayedSongs.spec.ts | 2 +- .../screens/home/MostPlayedSongs.vue | 2 +- .../screens/home/RecentlyAddedAlbums.spec.ts | 2 +- .../screens/home/RecentlyAddedAlbums.vue | 2 +- .../screens/home/RecentlyAddedSongs.spec.ts | 2 +- .../screens/home/RecentlyAddedSongs.vue | 2 +- .../screens/home/RecentlyPlayedSongs.spec.ts | 6 +-- .../screens/home/RecentlyPlayedSongs.vue | 2 +- .../screens/home/ViewAllRecentSongsButton.vue | 2 +- .../search/SearchExcerptsScreen.spec.ts | 4 +- .../screens/search/SearchExcerptsScreen.vue | 4 +- .../search/SearchSongResultsScreen.spec.ts | 2 +- .../search/SearchSongResultsScreen.vue | 8 ++-- .../search/SongExcerptResultsBlock.vue | 4 +- .../js/components/song/AddToMenu.spec.ts | 9 ++-- .../assets/js/components/song/AddToMenu.vue | 7 +-- .../js/components/song/EditSongForm.spec.ts | 17 +++---- .../js/components/song/EditSongForm.vue | 17 ++++--- .../song/PlayableContextMenu.spec.ts | 15 ++++--- .../components/song/PlayableContextMenu.vue | 32 ++++++++------ .../js/components/song/SongCard.spec.ts | 4 +- .../assets/js/components/song/SongCard.vue | 10 +++-- .../js/components/song/SongLikeButton.spec.ts | 6 +-- .../js/components/song/SongLikeButton.vue | 2 +- .../js/components/song/SongList.spec.ts | 6 +-- .../assets/js/components/song/SongList.vue | 11 +++-- .../components/song/SongListControls.spec.ts | 4 +- .../js/components/song/SongListControls.vue | 4 +- .../js/components/song/SongListItem.spec.ts | 4 +- .../js/components/song/SongListItem.vue | 11 +++-- .../js/components/song/SongListSorter.vue | 7 +-- .../js/components/song/SongThumbnail.spec.ts | 10 ++--- .../js/components/song/SongThumbnail.vue | 5 ++- .../js/components/ui/AlbumArtOverlay.spec.ts | 4 +- .../js/components/ui/AlbumArtOverlay.vue | 4 +- .../js/components/ui/BtnScrollToTop.spec.ts | 2 +- .../js/components/ui/BtnScrollToTop.vue | 2 +- .../assets/js/components/ui/ContextMenu.vue | 3 +- .../assets/js/components/ui/DialogBox.vue | 1 + .../js/components/ui/FooterPlayButton.spec.ts | 14 +++--- .../js/components/ui/FooterPlayButton.vue | 13 ++++-- .../js/components/ui/LyricsPane.spec.ts | 4 +- .../assets/js/components/ui/LyricsPane.vue | 7 +-- .../assets/js/components/ui/Magnifier.spec.ts | 2 +- .../js/components/ui/PlaylistThumbnail.vue | 11 +++-- .../js/components/ui/ProfileAvatar.spec.ts | 2 +- .../assets/js/components/ui/ProfileAvatar.vue | 3 +- .../js/components/ui/RepeatModeSwitch.spec.ts | 6 +-- .../js/components/ui/RepeatModeSwitch.vue | 4 +- .../js/components/ui/SearchForm.spec.ts | 6 +-- .../assets/js/components/ui/SearchForm.vue | 5 ++- .../components/ui/SidebarMenuToggleButton.vue | 2 +- .../js/components/ui/ThumbnailStack.vue | 2 +- .../js/components/ui/VolumeSlider.spec.ts | 7 +-- .../assets/js/components/ui/VolumeSlider.vue | 6 ++- .../ui/album-artist/AlbumOrArtistCard.spec.ts | 2 +- .../ui/album-artist/AlbumOrArtistCard.vue | 3 +- .../AlbumOrArtistThumbnail.spec.ts | 9 ++-- .../album-artist/AlbumOrArtistThumbnail.vue | 19 +++++--- .../js/components/ui/equalizer/Equalizer.vue | 8 ++-- .../js/components/ui/form/CheckBox.spec.ts | 2 +- .../ui/message-toaster/MessageToaster.vue | 3 +- .../js/components/ui/upload/DropZone.vue | 2 +- .../components/ui/upload/UploadItem.spec.ts | 6 +-- .../js/components/ui/upload/UploadItem.vue | 4 +- .../ui/youtube/YouTubeVideoItem.spec.ts | 2 +- .../ui/youtube/YouTubeVideoItem.vue | 4 +- .../ui/youtube/YouTubeVideoList.spec.ts | 8 ++-- .../ui/youtube/YouTubeVideoList.vue | 4 +- .../js/components/user/AddUserForm.spec.ts | 4 +- .../assets/js/components/user/AddUserForm.vue | 10 +++-- .../js/components/user/EditUserForm.spec.ts | 10 ++--- .../js/components/user/EditUserForm.vue | 11 +++-- .../js/components/user/InviteUserForm.spec.ts | 4 +- .../js/components/user/InviteUserForm.vue | 7 ++- .../assets/js/components/user/UserAvatar.vue | 2 +- .../js/components/user/UserCard.spec.ts | 10 ++--- .../assets/js/components/user/UserCard.vue | 12 +++-- .../js/components/utils/AppInitializer.vue | 10 +++-- .../components/utils/GlobalEventListeners.vue | 12 +++-- .../js/components/utils/HotkeyListener.vue | 11 +++-- resources/assets/js/composables/index.ts | 25 ----------- .../assets/js/composables/useAuthorization.ts | 2 +- .../assets/js/composables/useDialogBox.ts | 3 +- .../assets/js/composables/useDragAndDrop.ts | 10 ++++- .../composables/useEpisodeProgressTracking.ts | 4 +- .../assets/js/composables/useErrorHandler.ts | 6 ++- .../assets/js/composables/useFloatingUi.ts | 2 +- .../assets/js/composables/useKoelPlus.ts | 2 +- .../assets/js/composables/useLocalStorage.ts | 2 +- .../js/composables/useMessageToaster.ts | 3 +- resources/assets/js/composables/useModal.ts | 4 +- .../composables/useNewVersionNotification.ts | 2 +- resources/assets/js/composables/useOverlay.ts | 2 +- .../js/composables/usePlayableMenuMethods.ts | 7 +-- .../js/composables/usePlaylistManagement.ts | 8 ++-- .../assets/js/composables/usePolicies.ts | 5 ++- resources/assets/js/composables/useRouter.ts | 2 +- .../js/composables/useSmartPlaylistForm.ts | 2 +- .../assets/js/composables/useSongList.ts | 12 +++-- .../js/composables/useThirdPartyServices.ts | 2 +- resources/assets/js/composables/useUpload.ts | 15 ++++--- resources/assets/js/config/events.ts | 2 +- resources/assets/js/config/index.ts | 7 --- resources/assets/js/config/routes.ts | 9 ++-- resources/assets/js/directives/index.ts | 5 --- resources/assets/js/directives/tooltip.ts | 2 +- resources/assets/js/remote/App.vue | 9 ++-- .../js/remote/components/PlayableDetails.vue | 3 +- .../js/remote/components/RemoteFooter.spec.ts | 2 +- .../js/remote/components/RemoteFooter.vue | 2 +- .../assets/js/remote/components/Scanner.vue | 2 +- .../js/remote/components/VolumeControl.vue | 2 +- resources/assets/js/router.ts | 3 +- resources/assets/js/services/audioService.ts | 7 +-- .../assets/js/services/authService.spec.ts | 9 ++-- resources/assets/js/services/authService.ts | 6 +-- .../js/services/downloadService.spec.ts | 4 +- .../assets/js/services/downloadService.ts | 6 +-- resources/assets/js/services/http.ts | 4 +- resources/assets/js/services/index.ts | 15 ------- .../js/services/invitationService.spec.ts | 5 ++- .../assets/js/services/invitationService.ts | 7 +-- .../js/services/mediaInfoService.spec.ts | 8 ++-- .../assets/js/services/mediaInfoService.ts | 7 ++- .../js/services/playbackService.spec.ts | 24 +++++----- .../assets/js/services/playbackService.ts | 29 ++++++------ .../playlistCollaborationService.spec.ts | 3 +- .../services/playlistCollaborationService.ts | 3 +- .../assets/js/services/plusService.spec.ts | 2 +- resources/assets/js/services/plusService.ts | 2 +- .../assets/js/services/socketListener.ts | 7 ++- resources/assets/js/services/socketService.ts | 4 +- resources/assets/js/services/uploadService.ts | 9 ++-- .../assets/js/services/volumeManager.spec.ts | 2 +- .../assets/js/services/youTubeService.spec.ts | 4 +- .../assets/js/services/youTubeService.ts | 5 ++- resources/assets/js/stores/albumStore.spec.ts | 5 ++- resources/assets/js/stores/albumStore.ts | 8 ++-- .../assets/js/stores/artistStore.spec.ts | 4 +- resources/assets/js/stores/artistStore.ts | 6 ++- resources/assets/js/stores/commonStore.ts | 10 ++++- resources/assets/js/stores/equalizerStore.ts | 4 +- .../assets/js/stores/favoriteStore.spec.ts | 6 +-- resources/assets/js/stores/favoriteStore.ts | 6 +-- resources/assets/js/stores/genreStore.spec.ts | 2 +- resources/assets/js/stores/genreStore.ts | 2 +- resources/assets/js/stores/index.ts | 19 -------- .../assets/js/stores/overviewStore.spec.ts | 10 +++-- resources/assets/js/stores/overviewStore.ts | 6 +-- .../assets/js/stores/playlistFolderStore.ts | 2 +- .../assets/js/stores/playlistStore.spec.ts | 7 +-- resources/assets/js/stores/playlistStore.ts | 7 ++- resources/assets/js/stores/podcastStore.ts | 2 +- .../assets/js/stores/preferenceStore.spec.ts | 6 +-- resources/assets/js/stores/preferenceStore.ts | 2 +- resources/assets/js/stores/queueStore.spec.ts | 9 ++-- resources/assets/js/stores/queueStore.ts | 8 ++-- .../js/stores/recentlyPlayedStore.spec.ts | 7 +-- .../assets/js/stores/recentlyPlayedStore.ts | 4 +- .../assets/js/stores/searchStore.spec.ts | 11 +++-- resources/assets/js/stores/searchStore.ts | 6 ++- .../assets/js/stores/settingStore.spec.ts | 4 +- resources/assets/js/stores/settingStore.ts | 2 +- resources/assets/js/stores/songStore.spec.ts | 26 +++++------ resources/assets/js/stores/songStore.ts | 16 +++++-- resources/assets/js/stores/themeStore.spec.ts | 3 +- resources/assets/js/stores/themeStore.ts | 2 +- resources/assets/js/stores/userStore.spec.ts | 6 +-- resources/assets/js/stores/userStore.ts | 6 +-- resources/assets/js/stores/visualizerStore.ts | 2 +- resources/assets/js/utils/common.ts | 43 ------------------ resources/assets/js/utils/eventBus.ts | 2 +- resources/assets/js/utils/formatters.spec.ts | 4 +- resources/assets/js/utils/helpers.ts | 44 +++++++++++++++++-- resources/assets/js/utils/index.ts | 11 ----- .../asteroid/scripts/AudioAnalyzer.ts | 2 +- resources/assets/js/visualizers/default.ts | 4 +- .../assets/js/visualizers/fluid-cube/index.ts | 4 +- .../assets/js/visualizers/plane-mesh/index.ts | 2 +- .../assets/js/visualizers/waveform/index.ts | 2 +- tests/Traits/CreatesApplication.php | 2 +- 344 files changed, 1294 insertions(+), 997 deletions(-) rename resources/assets/js/components/invitation/{AcceptInvivation.spec.ts => AcceptInvitation.spec.ts} (95%) rename resources/assets/js/components/playlist/{InvitePlaylistContributors.spec.ts => InvitePlaylistCollaborators.spec.ts} (90%) delete mode 100644 resources/assets/js/composables/index.ts delete mode 100644 resources/assets/js/config/index.ts delete mode 100644 resources/assets/js/directives/index.ts delete mode 100644 resources/assets/js/services/index.ts delete mode 100644 resources/assets/js/stores/index.ts delete mode 100644 resources/assets/js/utils/common.ts delete mode 100644 resources/assets/js/utils/index.ts diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index dbc23eb3..022299dc 100644 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -37,10 +37,10 @@ diff --git a/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue b/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue index c4d59cdc..3aec475b 100644 --- a/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue +++ b/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue @@ -43,9 +43,10 @@