-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove withDefaults, use destructure everywhere
Use reactive props destructure (https://blog.vuejs.org/posts/vue-3-5#reactive-props-destructure) to simplify the prop declaration. Also, finding unused props is far easier with destructure (a lot of unused props were removed in fact), so all the defineProps statements have been migrated as well. Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
- Loading branch information
Showing
62 changed files
with
482 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
<template> | ||
<VBtn | ||
v-bind="$attrs" | ||
icon | ||
:size="props.size" | ||
:disabled="!playbackManager.nextItem" | ||
@click="playbackManager.setNextItem"> | ||
<VIcon :size="size"> | ||
<VIcon v-bind="$attrs"> | ||
<IMdiSkipNext /> | ||
</VIcon> | ||
</VBtn> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { playbackManager } from '@/store/playback-manager'; | ||
const props = defineProps<{ size?: string }>(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
<template> | ||
<VBtn | ||
v-bind="$attrs" | ||
icon | ||
:size="size" | ||
:color="playbackManager.isShuffling ? 'primary' : undefined" | ||
@click="playbackManager.toggleShuffle"> | ||
<VIcon :size="size"> | ||
<VIcon v-bind="$attrs"> | ||
<IMdiShuffle /> | ||
</VIcon> | ||
</VBtn> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { playbackManager } from '@/store/playback-manager'; | ||
defineProps<{ size?: string }>(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.