Skip to content

Commit 0643214

Browse files
authored
chore: remove app + qol fixes (#1091)
* chore: rename download to get premid * chore: remove app downloads * chore: rename download to get premid * chore: improve contributor roles
1 parent 5f577c2 commit 0643214

File tree

8 files changed

+60
-175
lines changed

8 files changed

+60
-175
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ src/langs
77
.nuxt
88
package-lock.json
99
languageUpdater.js
10-
.DS_Store
10+
.DS_Store
11+
pnpm-lock.yaml

src/components/Footer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class="button"
1313
replace
1414
to="/downloads"
15-
v-text="$t(`footer.usercount.button`)"
15+
v-text="$t(`home.introduction.button.getPremid`)"
1616
/>
1717
</div>
1818
</div>

src/components/Navigation.vue

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
content: $t('store.message.error')
1515
}"
1616
>
17-
<i
18-
@click="$router.push('/downloads#ext-downloads')"
19-
class="fa-exclamation fas"
20-
/>
17+
<i @click="$router.push('/downloads')" class="fa-exclamation fas" />
2118
</div>
2219
</transition>
2320
</div>
@@ -125,7 +122,14 @@
125122
>
126123
<span>
127124
<i :class="'fas fa-' + category.logo"></i>
128-
{{ $t(`header.${category.route}`) }}
125+
{{
126+
$t(
127+
`header.${category.route}`.replace(
128+
"header.downloads",
129+
"home.introduction.button.getPremid"
130+
)
131+
)
132+
}}
129133
</span>
130134
</nuxt-link>
131135
</div>
@@ -410,16 +414,16 @@
410414
route: "store",
411415
string: "header.store"
412416
},
413-
{
414-
logo: "download",
415-
route: "downloads",
416-
string: "header.downloads"
417-
},
418417
{
419418
logo: "hands-helping",
420419
route: "contributors",
421420
string: "header.contributors"
422-
}
421+
},
422+
{
423+
logo: "download",
424+
route: "downloads",
425+
string: "home.introduction.button.getPremid"
426+
},
423427
]
424428
};
425429
},

src/pages/contributors.vue

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
<script>
2+
const staffRoles = [
3+
"673682085608816652", // Project Management
4+
"1027665813525778436", // Software Engineer
5+
"514546359865442304", // Discord Mod
6+
"566417964820070421", // Technical Support
7+
"685969048399249459", // Human Resources
8+
"994342612532199525", // Community Management
9+
"811262682408943616" // Localization Manager,
10+
],
11+
supportRoles = [
12+
"1032759805732978708", //Contributor
13+
"502165799172309013", //Donator
14+
"515874214750715904", //Patron
15+
"585532751663333383" //Booster
16+
],
17+
presenceDeveloperRole = "606222296016879722", //Presence Developer
18+
proofreaderRole = "522755339448483840", //Proofreader
19+
translatorRole = "502148045991968788", //Translator
20+
roles = [...staffRoles, ...supportRoles];
221
export default {
322
name: "Contributors",
423
auth: false,
@@ -45,28 +64,11 @@
4564
},
4665
computed: {
4766
sortedUsers() {
48-
const staffRoles = [
49-
"673682085608816652", // Project Management
50-
"514546359865442304", // Moderator
51-
"566417964820070421", // Support
52-
"994342612532199525", // Community Management
53-
"811262682408943616", // Localization Manager
54-
"515874214750715904", //Patron
55-
"585532751663333383", //Booster
56-
"502165799172309013" //Donator
57-
];
58-
5967
//* Sort by role array index
6068
return this.contributors.sort((a, b) => {
61-
if (
62-
staffRoles.indexOf(a.user.roleId) >
63-
staffRoles.indexOf(b.user.roleId)
64-
)
69+
if (roles.indexOf(a.user.roleId) > roles.indexOf(b.user.roleId))
6570
return 1;
66-
else if (
67-
staffRoles.indexOf(a.user.roleId) <
68-
staffRoles.indexOf(b.user.roleId)
69-
)
71+
else if (roles.indexOf(a.user.roleId) < roles.indexOf(b.user.roleId))
7072
return -1;
7173
else
7274
return a.user.name
@@ -77,46 +79,23 @@
7779
},
7880
methods: {
7981
isStaffRole(roleId) {
80-
const staffRoles = [
81-
"514546359865442304", // Discord Mod
82-
"566417964820070421", // Technical Support
83-
"673682085608816652", // Project Management
84-
"685969048399249459", // Human Resources
85-
"994342612532199525", // Community Management
86-
"673682085608816652", // Project Management
87-
"811262682408943616" // Localization Manager,
88-
];
89-
9082
if (staffRoles.indexOf(roleId) !== -1) return true;
9183
else return false;
9284
},
9385
isSupporterRole(roleId) {
94-
const supportRoles = [
95-
"1032759805732978708", //Contributor
96-
"502165799172309013", //Donator
97-
"515874214750715904", //Patron
98-
"585532751663333383" //Booster
99-
];
100-
10186
if (supportRoles.indexOf(roleId) !== -1) return true;
10287
else return false;
10388
},
10489
10590
isPresenceDeveloperRole(roleId) {
106-
const presenceDeveloperRole = "606222296016879722"; //Presence Developer
107-
10891
if (presenceDeveloperRole == roleId) return true;
10992
else return false;
11093
},
11194
isProofreaderRole(roleId) {
112-
const proofreaderRole = "522755339448483840"; //Proofreader
113-
11495
if (proofreaderRole == roleId) return true;
11596
else return false;
11697
},
11798
isTranslatorRole(roleId) {
118-
const translatorRole = "502148045991968788"; //Translator
119-
12099
if (translatorRole == roleId) return true;
121100
else return false;
122101
},
@@ -149,11 +128,9 @@
149128
v-for="contributor of sortedUsers"
150129
:key="contributor.user.id + 'staff'"
151130
class="contributor-card"
131+
v-if="isStaffRole(contributor.user.roleId)"
152132
>
153-
<CreditCard
154-
v-if="isStaffRole(contributor.user.roleId)"
155-
:user="contributor.user"
156-
/>
133+
<CreditCard :user="contributor.user" />
157134
</div>
158135
</div>
159136
</div>
@@ -168,11 +145,9 @@
168145
v-for="contributor of sortedUsers"
169146
:key="contributor.user.id + 'supporter'"
170147
class="contributor-card"
148+
v-if="isSupporterRole(contributor.user.roleId)"
171149
>
172-
<CreditCard
173-
v-if="isSupporterRole(contributor.user.roleId)"
174-
:user="contributor.user"
175-
/>
150+
<CreditCard :user="contributor.user" />
176151
</div>
177152
</div>
178153
</div>

src/pages/downloads.vue

Lines changed: 3 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1>{{ $t("downloads.header.title") }}</h1>
77
<p>{{ $t("downloads.header.subtitle") }}</p>
88
</div>
9-
<div class="header__steps">
9+
<!-- <div class="header__steps">
1010
<h2>{{ $t("downloads.instructions.heading") }}</h2>
1111
<ol>
1212
<li>
@@ -39,7 +39,7 @@
3939
</p>
4040
</li>
4141
</ol>
42-
</div>
42+
</div> -->
4343
</div>
4444

4545
<div class="waves-divider waves-divider_bottom">
@@ -70,93 +70,12 @@
7070

7171
<transition name="card-animation" mode="out-in">
7272
<div v-if="showDownloads">
73-
<div
74-
id="app-downloads"
75-
class="dl-container__section dl-container__section_downloads waves-aligned"
76-
>
77-
<h1 class="section-header">
78-
{{ $t("downloads.appdownloading.header") }}
79-
<a
80-
v-if="platform_order[1] == 'linux'"
81-
href="https://github.com/PreMiD/Linux/releases"
82-
target="_blank"
83-
class="label label_downloads-version linux"
84-
v-tippy="{
85-
content: $t('downloads.warning.differentVersion2', {
86-
0: appVersion
87-
})
88-
}"
89-
v-text="linuxVersion"
90-
></a>
91-
92-
<a
93-
v-else-if="appVersion"
94-
href="https://github.com/PreMiD/PreMiD/releases"
95-
target="_blank"
96-
class="label label_downloads-version"
97-
v-text="appVersion"
98-
></a>
99-
</h1>
100-
<div class="dl-container__cards">
101-
<div v-for="(platform, index) of platform_order" :key="platform">
102-
<div @click="open(platform, 'Application')">
103-
<div
104-
:class="{ 'current-platform': index == 1 }"
105-
class="cards__card clickable"
106-
>
107-
<div class="card__icon">
108-
<i :class="`fab fa-${platform}`"></i>
109-
</div>
110-
<div class="card__content">
111-
<h3>
112-
{{ builds[platform].os_name }}
113-
<i
114-
v-if="!builds[platform].has_installer"
115-
v-tippy
116-
class="fa-exclamation-circle fas platform-warning"
117-
:content="
118-
$t('downloads.tooltips.os.not.supported.part2', {
119-
0: `<b>${$t(
120-
'downloads.tooltips.os.not.supported.part1'
121-
)}</b> `
122-
})
123-
"
124-
></i>
125-
126-
<i
127-
v-if="
128-
platform_order[1] != 'linux' &&
129-
builds[platform].os_name == 'Linux' &&
130-
builds[platform].warning
131-
"
132-
class="fa-question-circle fas platform-warning linux"
133-
v-tippy="{
134-
content: $t('downloads.warning.differentVersion', {
135-
0: linuxVersion
136-
})
137-
}"
138-
></i>
139-
</h3>
140-
</div>
141-
</div>
142-
</div>
143-
</div>
144-
</div>
145-
</div>
146-
14773
<div
14874
id="ext-downloads"
14975
class="dl-container__section dl-container__section_downloads"
15076
>
15177
<h1 class="section-header">
152-
{{ $t("downloads.extdownloading.header") }}
153-
<a
154-
v-if="extVersion"
155-
href="https://github.com/PreMiD/Extension"
156-
target="_blank"
157-
class="label label_downloads-version"
158-
v-text="extVersion"
159-
></a>
78+
{{ $t("home.introduction.button.getPremid") }}
16079
</h1>
16180

16281
<div class="dl-container__cards">
@@ -392,7 +311,6 @@
392311
}
393312
394313
this.noBetas = noBetas;
395-
this.extVersion = data.versions.extension;
396314
this.appVersion = data.versions.app;
397315
this.linuxVersion = data.versions.linux;
398316
this.userAccess = userAccess;
@@ -408,9 +326,6 @@
408326
data() {
409327
return {
410328
noBetas: false,
411-
extVersion: null,
412-
appVersion: null,
413-
linuxVersion: null,
414329
userAccess: false,
415330
extraDownloads: [],
416331
currentTab: null,
@@ -420,7 +335,6 @@
420335
showBeta: false,
421336
cardHover: false,
422337
modalAvailable: false,
423-
platforms: [],
424338
isChrome: true,
425339
browser: {
426340
name: "Chrome",
@@ -431,7 +345,6 @@
431345
number: null,
432346
messageKey: null
433347
},
434-
platform_order: ["windows", "apple", "linux"],
435348
builds: {
436349
windows: {
437350
os_name: "Windows",
@@ -517,11 +430,6 @@
517430
};
518431
}
519432
520-
let platform_temp = "linux";
521-
var platform_order = this.platform_order;
522-
523-
if (ua.includes("OS X") || ua.includes("Mac")) platform_temp = "apple";
524-
if (ua.includes("Windows")) platform_temp = "windows";
525433
if (
526434
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
527435
ua
@@ -531,10 +439,6 @@
531439
this.showDownloads = false;
532440
}
533441
534-
//* Centering the current platform in array. Only works if array has 3 items.
535-
platform_order.splice(platform_order.indexOf(platform_temp), 1);
536-
platform_order.splice(1, 0, platform_temp);
537-
538442
if (
539443
["#app-downloads", "#ext-downloads", "#beta-downloads"].includes(
540444
window.location.hash

src/pages/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
<p v-html="markdown($t('home.introduction.paragraph'))"></p>
1616
</div>
1717
<div class="heading__button-group">
18-
<a class="button text--uppercase" href="#features">
19-
<i class="fa-stream fas"></i>
20-
{{ $t("home.introduction.button.features") }}
21-
</a>
2218
<nuxt-link
23-
class="button button--black text--uppercase"
19+
class="button text--uppercase"
2420
to="/downloads"
2521
>
2622
<i class="fa-file-export fas"></i>
27-
{{ $t(`home.introduction.button.downloads`) }}
23+
{{ $t(`home.introduction.button.getPremid`) }}
2824
</nuxt-link>
25+
<a class="button button--black text--uppercase" href="#features">
26+
<i class="fa-stream fas"></i>
27+
{{ $t("home.introduction.button.features") }}
28+
</a>
2929
</div>
3030
</div>
3131
<div class="promo-container__presences" ref="promoPresences">

0 commit comments

Comments
 (0)