mirror of
https://github.com/simon987/sist2.git
synced 2025-12-11 14:38:54 +00:00
Generate random seed when ?sort=random param is specified
This commit is contained in:
@@ -60,7 +60,6 @@ export default {
|
||||
color: #222 !important;
|
||||
font-size: 1.75rem;
|
||||
padding: 0;
|
||||
font-family: Hack;
|
||||
}
|
||||
|
||||
.navbar-brand:hover {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user