aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/views/mods/ThunderstoreModsView.vue
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-05-09 23:35:04 +0200
committerGitHub <noreply@github.com>2023-05-09 23:35:04 +0200
commit007e32fd632da33ea1b1442f9a55f6ad008ad177 (patch)
tree32de00dddb0a5ea3cdbf0f4c24db92f6a0713e32 /src-vue/src/views/mods/ThunderstoreModsView.vue
parent1ce900ca2d5cf91ae410c2ec918e1431aa15a677 (diff)
downloadFlightCore-007e32fd632da33ea1b1442f9a55f6ad008ad177.tar.gz
FlightCore-007e32fd632da33ea1b1442f9a55f6ad008ad177.zip
style: Partially autoformat Vue source files (#326)
* style: Add/remove spaces where applicable * style: Add missing newlines * style: Fix indentation * style: Add newlines between CSS classes
Diffstat (limited to 'src-vue/src/views/mods/ThunderstoreModsView.vue')
-rw-r--r--src-vue/src/views/mods/ThunderstoreModsView.vue17
1 files changed, 12 insertions, 5 deletions
diff --git a/src-vue/src/views/mods/ThunderstoreModsView.vue b/src-vue/src/views/mods/ThunderstoreModsView.vue
index 5a7270df..410af5f3 100644
--- a/src-vue/src/views/mods/ThunderstoreModsView.vue
+++ b/src-vue/src/views/mods/ThunderstoreModsView.vue
@@ -54,7 +54,7 @@ import { ThunderstoreModVersion } from "../../../../src-tauri/bindings/Thunderst
export default defineComponent({
name: "ThunderstoreModsView",
- components: {ThunderstoreModCard},
+ components: { ThunderstoreModCard },
async mounted() {
this.$store.commit('fetchThunderstoreMods');
},
@@ -100,7 +100,7 @@ export default defineComponent({
// Sort mods regarding user selected algorithm.
let compare: (a: ThunderstoreMod, b: ThunderstoreMod) => number;
- switch(this.modSorting) {
+ switch (this.modSorting) {
case SortOptions.NAME_ASC:
compare = (a: ThunderstoreMod, b: ThunderstoreMod) => a.name.localeCompare(b.name);
break;
@@ -116,10 +116,10 @@ export default defineComponent({
case SortOptions.MOST_DOWNLOADED:
compare = (a: ThunderstoreMod, b: ThunderstoreMod) => {
const aTotal = a.versions.reduce((prev, next) => {
- return {downloads: prev.downloads + next.downloads} as ThunderstoreModVersion;
+ return { downloads: prev.downloads + next.downloads } as ThunderstoreModVersion;
}).downloads;
const bTotal = b.versions.reduce((prev, next) => {
- return {downloads: prev.downloads + next.downloads} as ThunderstoreModVersion;
+ return { downloads: prev.downloads + next.downloads } as ThunderstoreModVersion;
}).downloads;
return -1 * (aTotal - bTotal);
};
@@ -142,7 +142,7 @@ export default defineComponent({
const startIndex = this.currentPageIndex * perPageValue;
const endIndexCandidate = startIndex + perPageValue;
- const endIndex = endIndexCandidate > this.modsList.length ? this.modsList.length : endIndexCandidate;
+ const endIndex = endIndexCandidate > this.modsList.length ? this.modsList.length : endIndexCandidate;
return this.modsList.slice(startIndex, endIndex);
},
shouldDisplayPagination(): boolean {
@@ -229,36 +229,43 @@ export default defineComponent({
width: calc(var(--thunderstore-mod-card-width) * var(--thunderstore-mod-card-columns-count) + var(--thunderstore-mod-card-margin) * 2 * var(--thunderstore-mod-card-columns-count));
}
+
@media (min-width: 628px) {
.card-container {
--thunderstore-mod-card-columns-count: 2;
}
}
+
@media (min-width: 836px) {
.card-container {
--thunderstore-mod-card-columns-count: 3;
}
}
+
@media (min-width: 1006px) {
.card-container {
--thunderstore-mod-card-columns-count: 4;
}
}
+
@media (min-width: 1196px) {
.card-container {
--thunderstore-mod-card-columns-count: 5;
}
}
+
@media (min-width: 1386px) {
.card-container {
--thunderstore-mod-card-columns-count: 6;
}
}
+
@media (min-width: 1576px) {
.card-container {
--thunderstore-mod-card-columns-count: 7;
}
}
+
@media (min-width: 1766px) {
.card-container {
--thunderstore-mod-card-columns-count: 8;