File tree 3 files changed +20
-12
lines changed
src/components/views/panel
3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const props = defineProps({
44
44
45
45
const i18n = useI18n (' panel' , ' ratings' );
46
46
47
- const { votes, rating, score } = toRefs (props );
47
+ const { votes, rating } = toRefs (props );
48
48
49
49
const votesUnit = computed (() => {
50
50
if (votes ?.value === undefined ) return undefined ;
@@ -121,17 +121,19 @@ const _rating = computed(() => (rating?.value ?? 0) * 10);
121
121
.rating-container {
122
122
--duration : 1000ms ;
123
123
124
- flex : 1 1 auto ;
125
- min-width : 6rem ;
126
- padding : 0.5rem ;
124
+ flex : 1 0 6rem ;
127
125
128
126
.rating-skeleton {
129
127
width : 2.125rem ;
130
128
margin-top : 0.5rem ;
131
129
}
132
130
133
- @media (width <= 640px ) {
134
- padding : 0.5rem 25% ;
131
+ @media (width <= 725px ) {
132
+ padding : 0.5rem 10% ;
133
+ }
134
+
135
+ @media (width <= 500px ) {
136
+ padding : 0.5rem ;
135
137
}
136
138
}
137
139
</style >
Original file line number Diff line number Diff line change @@ -106,9 +106,7 @@ const containerRef = ref<InstanceType<typeof TextField>>();
106
106
.score-container {
107
107
--duration : 1000ms ;
108
108
109
- flex : 1 1 auto ;
110
- min-width : 6rem ;
111
- padding : 0.5rem ;
109
+ flex : 1 0 6rem ;
112
110
113
111
.score-label {
114
112
align-self : center ;
@@ -124,8 +122,12 @@ const containerRef = ref<InstanceType<typeof TextField>>();
124
122
margin-top : 0.5rem ;
125
123
}
126
124
127
- @media (width <= 640px ) {
128
- padding : 0.5rem 25% ;
125
+ @media (width <= 725px ) {
126
+ padding : 0.5rem 10% ;
127
+ }
128
+
129
+ @media (width <= 500px ) {
130
+ padding : 0.5rem ;
129
131
}
130
132
}
131
133
</style >
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { TraktSyncRatingValue } from '@dvcol/trakt-http-client/models';
6
6
import PanelRating from ' ~/components/views/panel/PanelRating.vue' ;
7
7
import PanelScore from ' ~/components/views/panel/PanelScore.vue' ;
8
8
import { useExtensionSettingsStoreRefs } from ' ~/stores/settings/extension.store' ;
9
+ import { watchMedia } from ' ~/utils/window.utils' ;
9
10
10
11
defineProps ({
11
12
rating: {
@@ -41,18 +42,21 @@ const emit = defineEmits<{
41
42
const { enableRatings } = useExtensionSettingsStoreRefs ();
42
43
43
44
const onScoreEdit = (progress : TraktSyncRatingValue ) => emit (' onScoreEdit' , progress );
45
+
46
+ const isCompact = watchMedia (' (max-width: 725px)' );
44
47
</script >
45
48
46
49
<template >
47
50
<NFlex class =" statistics-container" justify =" space-around" >
51
+ <slot v-if =" isCompact" />
48
52
<PanelRating
49
53
v-if =" enableRatings"
50
54
:loading =" loadingRating"
51
55
:votes =" votes"
52
56
:rating =" rating"
53
57
:url =" url"
54
58
/>
55
- <slot />
59
+ <slot v-if = " !isCompact " />
56
60
<PanelScore
57
61
v-if =" enableRatings"
58
62
:loading =" loadingScore"
You can’t perform that action at this time.
0 commit comments