Skip to content

Commit

Permalink
chore: remove app + qol fixes (#1091)
Browse files Browse the repository at this point in the history
* chore: rename download to get premid

* chore: remove app downloads

* chore: rename download to get premid

* chore: improve contributor roles
  • Loading branch information
veryCrunchy authored Oct 8, 2024
1 parent 5f577c2 commit 0643214
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 175 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ src/langs
.nuxt
package-lock.json
languageUpdater.js
.DS_Store
.DS_Store
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class="button"
replace
to="/downloads"
v-text="$t(`footer.usercount.button`)"
v-text="$t(`home.introduction.button.getPremid`)"
/>
</div>
</div>
Expand Down
26 changes: 15 additions & 11 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
content: $t('store.message.error')
}"
>
<i
@click="$router.push('/downloads#ext-downloads')"
class="fa-exclamation fas"
/>
<i @click="$router.push('/downloads')" class="fa-exclamation fas" />
</div>
</transition>
</div>
Expand Down Expand Up @@ -125,7 +122,14 @@
>
<span>
<i :class="'fas fa-' + category.logo"></i>
{{ $t(`header.${category.route}`) }}
{{
$t(
`header.${category.route}`.replace(
"header.downloads",
"home.introduction.button.getPremid"
)
)
}}
</span>
</nuxt-link>
</div>
Expand Down Expand Up @@ -410,16 +414,16 @@
route: "store",
string: "header.store"
},
{
logo: "download",
route: "downloads",
string: "header.downloads"
},
{
logo: "hands-helping",
route: "contributors",
string: "header.contributors"
}
},
{
logo: "download",
route: "downloads",
string: "home.introduction.button.getPremid"
},
]
};
},
Expand Down
75 changes: 25 additions & 50 deletions src/pages/contributors.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
<script>
const staffRoles = [
"673682085608816652", // Project Management
"1027665813525778436", // Software Engineer
"514546359865442304", // Discord Mod
"566417964820070421", // Technical Support
"685969048399249459", // Human Resources
"994342612532199525", // Community Management
"811262682408943616" // Localization Manager,
],
supportRoles = [
"1032759805732978708", //Contributor
"502165799172309013", //Donator
"515874214750715904", //Patron
"585532751663333383" //Booster
],
presenceDeveloperRole = "606222296016879722", //Presence Developer
proofreaderRole = "522755339448483840", //Proofreader
translatorRole = "502148045991968788", //Translator
roles = [...staffRoles, ...supportRoles];
export default {
name: "Contributors",
auth: false,
Expand Down Expand Up @@ -45,28 +64,11 @@
},
computed: {
sortedUsers() {
const staffRoles = [
"673682085608816652", // Project Management
"514546359865442304", // Moderator
"566417964820070421", // Support
"994342612532199525", // Community Management
"811262682408943616", // Localization Manager
"515874214750715904", //Patron
"585532751663333383", //Booster
"502165799172309013" //Donator
];
//* Sort by role array index
return this.contributors.sort((a, b) => {
if (
staffRoles.indexOf(a.user.roleId) >
staffRoles.indexOf(b.user.roleId)
)
if (roles.indexOf(a.user.roleId) > roles.indexOf(b.user.roleId))
return 1;
else if (
staffRoles.indexOf(a.user.roleId) <
staffRoles.indexOf(b.user.roleId)
)
else if (roles.indexOf(a.user.roleId) < roles.indexOf(b.user.roleId))
return -1;
else
return a.user.name
Expand All @@ -77,46 +79,23 @@
},
methods: {
isStaffRole(roleId) {
const staffRoles = [
"514546359865442304", // Discord Mod
"566417964820070421", // Technical Support
"673682085608816652", // Project Management
"685969048399249459", // Human Resources
"994342612532199525", // Community Management
"673682085608816652", // Project Management
"811262682408943616" // Localization Manager,
];
if (staffRoles.indexOf(roleId) !== -1) return true;
else return false;
},
isSupporterRole(roleId) {
const supportRoles = [
"1032759805732978708", //Contributor
"502165799172309013", //Donator
"515874214750715904", //Patron
"585532751663333383" //Booster
];
if (supportRoles.indexOf(roleId) !== -1) return true;
else return false;
},
isPresenceDeveloperRole(roleId) {
const presenceDeveloperRole = "606222296016879722"; //Presence Developer
if (presenceDeveloperRole == roleId) return true;
else return false;
},
isProofreaderRole(roleId) {
const proofreaderRole = "522755339448483840"; //Proofreader
if (proofreaderRole == roleId) return true;
else return false;
},
isTranslatorRole(roleId) {
const translatorRole = "502148045991968788"; //Translator
if (translatorRole == roleId) return true;
else return false;
},
Expand Down Expand Up @@ -149,11 +128,9 @@
v-for="contributor of sortedUsers"
:key="contributor.user.id + 'staff'"
class="contributor-card"
v-if="isStaffRole(contributor.user.roleId)"
>
<CreditCard
v-if="isStaffRole(contributor.user.roleId)"
:user="contributor.user"
/>
<CreditCard :user="contributor.user" />
</div>
</div>
</div>
Expand All @@ -168,11 +145,9 @@
v-for="contributor of sortedUsers"
:key="contributor.user.id + 'supporter'"
class="contributor-card"
v-if="isSupporterRole(contributor.user.roleId)"
>
<CreditCard
v-if="isSupporterRole(contributor.user.roleId)"
:user="contributor.user"
/>
<CreditCard :user="contributor.user" />
</div>
</div>
</div>
Expand Down
102 changes: 3 additions & 99 deletions src/pages/downloads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h1>{{ $t("downloads.header.title") }}</h1>
<p>{{ $t("downloads.header.subtitle") }}</p>
</div>
<div class="header__steps">
<!-- <div class="header__steps">
<h2>{{ $t("downloads.instructions.heading") }}</h2>
<ol>
<li>
Expand Down Expand Up @@ -39,7 +39,7 @@
</p>
</li>
</ol>
</div>
</div> -->
</div>

<div class="waves-divider waves-divider_bottom">
Expand Down Expand Up @@ -70,93 +70,12 @@

<transition name="card-animation" mode="out-in">
<div v-if="showDownloads">
<div
id="app-downloads"
class="dl-container__section dl-container__section_downloads waves-aligned"
>
<h1 class="section-header">
{{ $t("downloads.appdownloading.header") }}
<a
v-if="platform_order[1] == 'linux'"
href="https://github.com/PreMiD/Linux/releases"
target="_blank"
class="label label_downloads-version linux"
v-tippy="{
content: $t('downloads.warning.differentVersion2', {
0: appVersion
})
}"
v-text="linuxVersion"
></a>

<a
v-else-if="appVersion"
href="https://github.com/PreMiD/PreMiD/releases"
target="_blank"
class="label label_downloads-version"
v-text="appVersion"
></a>
</h1>
<div class="dl-container__cards">
<div v-for="(platform, index) of platform_order" :key="platform">
<div @click="open(platform, 'Application')">
<div
:class="{ 'current-platform': index == 1 }"
class="cards__card clickable"
>
<div class="card__icon">
<i :class="`fab fa-${platform}`"></i>
</div>
<div class="card__content">
<h3>
{{ builds[platform].os_name }}
<i
v-if="!builds[platform].has_installer"
v-tippy
class="fa-exclamation-circle fas platform-warning"
:content="
$t('downloads.tooltips.os.not.supported.part2', {
0: `<b>${$t(
'downloads.tooltips.os.not.supported.part1'
)}</b> `
})
"
></i>

<i
v-if="
platform_order[1] != 'linux' &&
builds[platform].os_name == 'Linux' &&
builds[platform].warning
"
class="fa-question-circle fas platform-warning linux"
v-tippy="{
content: $t('downloads.warning.differentVersion', {
0: linuxVersion
})
}"
></i>
</h3>
</div>
</div>
</div>
</div>
</div>
</div>

<div
id="ext-downloads"
class="dl-container__section dl-container__section_downloads"
>
<h1 class="section-header">
{{ $t("downloads.extdownloading.header") }}
<a
v-if="extVersion"
href="https://github.com/PreMiD/Extension"
target="_blank"
class="label label_downloads-version"
v-text="extVersion"
></a>
{{ $t("home.introduction.button.getPremid") }}
</h1>

<div class="dl-container__cards">
Expand Down Expand Up @@ -392,7 +311,6 @@
}
this.noBetas = noBetas;
this.extVersion = data.versions.extension;
this.appVersion = data.versions.app;
this.linuxVersion = data.versions.linux;
this.userAccess = userAccess;
Expand All @@ -408,9 +326,6 @@
data() {
return {
noBetas: false,
extVersion: null,
appVersion: null,
linuxVersion: null,
userAccess: false,
extraDownloads: [],
currentTab: null,
Expand All @@ -420,7 +335,6 @@
showBeta: false,
cardHover: false,
modalAvailable: false,
platforms: [],
isChrome: true,
browser: {
name: "Chrome",
Expand All @@ -431,7 +345,6 @@
number: null,
messageKey: null
},
platform_order: ["windows", "apple", "linux"],
builds: {
windows: {
os_name: "Windows",
Expand Down Expand Up @@ -517,11 +430,6 @@
};
}
let platform_temp = "linux";
var platform_order = this.platform_order;
if (ua.includes("OS X") || ua.includes("Mac")) platform_temp = "apple";
if (ua.includes("Windows")) platform_temp = "windows";
if (
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
ua
Expand All @@ -531,10 +439,6 @@
this.showDownloads = false;
}
//* Centering the current platform in array. Only works if array has 3 items.
platform_order.splice(platform_order.indexOf(platform_temp), 1);
platform_order.splice(1, 0, platform_temp);
if (
["#app-downloads", "#ext-downloads", "#beta-downloads"].includes(
window.location.hash
Expand Down
12 changes: 6 additions & 6 deletions src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
<p v-html="markdown($t('home.introduction.paragraph'))"></p>
</div>
<div class="heading__button-group">
<a class="button text--uppercase" href="#features">
<i class="fa-stream fas"></i>
{{ $t("home.introduction.button.features") }}
</a>
<nuxt-link
class="button button--black text--uppercase"
class="button text--uppercase"
to="/downloads"
>
<i class="fa-file-export fas"></i>
{{ $t(`home.introduction.button.downloads`) }}
{{ $t(`home.introduction.button.getPremid`) }}
</nuxt-link>
<a class="button button--black text--uppercase" href="#features">
<i class="fa-stream fas"></i>
{{ $t("home.introduction.button.features") }}
</a>
</div>
</div>
<div class="promo-container__presences" ref="promoPresences">
Expand Down
Loading

0 comments on commit 0643214

Please sign in to comment.