diff --git a/frontend/src/helperComponents/Rating.svelte b/frontend/src/helperComponents/Rating.svelte index 26f89fd..64cc1ea 100644 --- a/frontend/src/helperComponents/Rating.svelte +++ b/frontend/src/helperComponents/Rating.svelte @@ -1,30 +1,9 @@
- -

Rating: {config.score * 2}

-

{ratingInWords[config.score * 2]}

+ +

Rating: {score}

+

{ratingInWords[score]}

diff --git a/frontend/src/star-rating/StarInput.svelte b/frontend/src/star-rating/StarInput.svelte new file mode 100644 index 0000000..95afa20 --- /dev/null +++ b/frontend/src/star-rating/StarInput.svelte @@ -0,0 +1,134 @@ + + + +
+
+ {#each Array(count) as _, i} + + {/each} +
+
+ + diff --git a/frontend/src/star-rating/Stars.svelte b/frontend/src/star-rating/Stars.svelte deleted file mode 100644 index 1f68b3d..0000000 --- a/frontend/src/star-rating/Stars.svelte +++ /dev/null @@ -1,63 +0,0 @@ - - - - -
-
-
- {#each Array(config.countStars) as star, id} - {#if Math.floor(config.score) === id} - - {:else if Math.floor(config.score) > id} - - {:else} - - {/if} - {/each} -
- -
- {#if config.showScore} - - {#if config.scoreFormat} - {config.scoreFormat()} - {:else} - ({((config.score/config.countStars)*100).toFixed(2)}%) - {/if} - - {/if} -
- - \ No newline at end of file