Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/SortingSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const options = {
least_recent: "ascending",
channel_name_asc: "channel_ascending",
channel_name_desc: "channel_descending",
random: "random",
};

const selectedSort = ref("descending");
Expand All @@ -37,6 +38,9 @@ watch(selectedSort, value => {
case "channel_descending":
emit("apply", (a, b) => b.uploaderName.localeCompare(a.uploaderName));
break;
case "random":
emit("apply", (a, b) => Math.random() - 0.5);
break;
default:
console.error("Unexpected sort value");
}
Expand Down