Generate random seed when ?sort=random param is specified

This commit is contained in:
2022-11-23 20:43:11 -05:00
parent 38fba363f2
commit 4ec54c9a32
10 changed files with 23542 additions and 153 deletions

View File

@@ -60,7 +60,6 @@ export default {
color: #222 !important;
font-size: 1.75rem;
padding: 0;
font-family: Hack;
}
.navbar-brand:hover {

View File

@@ -42,6 +42,8 @@
</template>
<script>
import {randomSeed} from "@/util";
export default {
name: "SortSelect",
computed: {
@@ -52,7 +54,7 @@ export default {
methods: {
onSelect(sortMode) {
if (sortMode === "random") {
this.$store.commit("setSeed", Math.round(Math.random() * 100000));
this.$store.commit("setSeed", randomSeed());
}
this.$store.commit("setSortMode", sortMode);
}