Skip to content

Commit

Permalink
Merge pull request #1004 from RradLaw/develop
Browse files Browse the repository at this point in the history
feat: added "basic" level gym badge
  • Loading branch information
TurtIeSocks authored Apr 21, 2024
2 parents 5f43f9f + 7d9ec75 commit 9fc5909
Show file tree
Hide file tree
Showing 25 changed files with 130 additions and 83 deletions.
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Dieser Timer ist nicht verifiziert",
"all": "Alle",
"badge_0": "Keins",
"badge_1": "Bronze",
"badge_2": "Silber",
"badge_3": "Gold",
"badge_1": "Basis",
"badge_2": "Bronze",
"badge_3": "Silber",
"badge_4": "Gold",
"gym_badge_menu": "Fitness Abzeichen bearbeiten",
"gym_badges": "Fitness Abzeichen",
"gym_badge_diamonds": "Zeige Fitness Abzeichen",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Este Temporizador no está Verificado",
"all": "Todos",
"badge_0": "Ninguno",
"badge_1": "Bronce",
"badge_2": "Plata",
"badge_3": "Oro",
"badge_1": "Básico",
"badge_2": "Bronce",
"badge_3": "Plata",
"badge_4": "Oro",
"gym_badge_menu": "Editar Insignia de Gimnasio",
"gym_badges": "Insignias de Gimnasio",
"gym_badge_diamonds": "Mostrar Insignias de Gimnasio",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Ce Minuteur n'est pas Vérifié",
"all": "Tout",
"badge_0": "Aucun",
"badge_1": "Bronze",
"badge_2": "Argent",
"badge_3": "Or",
"badge_1": "Basique",
"badge_2": "Bronze",
"badge_3": "Argent",
"badge_4": "Or",
"gym_badge_menu": "Modifier le Badge de Salle de Sport",
"gym_badges": "Badges de Salle de Sport",
"gym_badge_diamonds": "Afficher les Badges de Salle de Sport",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "यह टाइमर असत्यापित है",
"all": "सभी",
"badge_0": "कोई नहीं",
"badge_1": "कांस्य",
"badge_2": "रजत",
"badge_3": "सोना",
"badge_1": "मूल",
"badge_2": "कांस्य",
"badge_3": "रजत",
"badge_4": "सोना",
"gym_badge_menu": "जिम बैज संपादित करें",
"gym_badges": "जिम बैज",
"gym_badge_diamonds": "जिम बैज दिखाएं",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Timer ini Tidak Terverifikasi",
"all": "Semua",
"badge_0": "Tidak Ada",
"badge_1": "Bronze",
"badge_2": "Perak",
"badge_3": "Emas",
"badge_1": "Dasar",
"badge_2": "Bronze",
"badge_3": "Perak",
"badge_4": "Emas",
"gym_badge_menu": "Edit Lencana Gym",
"gym_badges": "Lencana Gym",
"gym_badge_diamonds": "Tampilkan Lencana Gym",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Este Timer não está Verificado",
"all": "Todos",
"badge_0": "Nenhum",
"badge_1": "Bronze",
"badge_2": "Prata",
"badge_3": "Ouro",
"badge_1": "Básico",
"badge_2": "Bronze",
"badge_3": "Prata",
"badge_4": "Ouro",
"gym_badge_menu": "Editar Insígnia de Ginásio",
"gym_badges": "Insígnias de Ginásio",
"gym_badge_diamonds": "Mostrar Insígnias de Ginásio",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "このタイマーは未検証です",
"all": "すべて",
"badge_0": "なし",
"badge_1": "ブロンズ",
"badge_2": "シルバー",
"badge_3": "ゴールド",
"badge_1": "基本",
"badge_2": "ブロンズ",
"badge_3": "シルバー",
"badge_4": "ゴールド",
"gym_badge_menu": "ジムバッジを編集",
"gym_badges": "ジムバッジ",
"gym_badge_diamonds": "ジムバッジを表示",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,10 @@
"timer_unverified": "이 타이머는 미검증",
"all": "모두",
"badge_0": "없음",
"badge_1": "브론즈",
"badge_2": "실버",
"badge_3": "골드",
"badge_1": "기본",
"badge_2": "브론즈",
"badge_3": "실버",
"badge_4": "골드",
"gym_badge_menu": "체육관 배지 편집",
"gym_badges": "체육관 배지",
"gym_badge_diamonds": "체육관 배지 보기",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Deze Timer is Niet Geverifieerd",
"all": "Alles",
"badge_0": "Geen",
"badge_1": "Brons",
"badge_2": "Zilver",
"badge_3": "Goud",
"badge_1": "Basis",
"badge_2": "Brons",
"badge_3": "Zilver",
"badge_4": "Goud",
"gym_badge_menu": "Bewerk Gym Badge",
"gym_badges": "Gym Badges",
"gym_badge_diamonds": "Toon Gym Badges",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Ten Timer Nie Jest Zweryfikowany",
"all": "Wszystkie",
"badge_0": "Brak",
"badge_1": "Brązowy",
"badge_2": "Srebrny",
"badge_3": "Złoty",
"badge_1": "Podst.",
"badge_2": "Brązowy",
"badge_3": "Srebrny",
"badge_4": "Złoty",
"gym_badge_menu": "Edytuj Odznaki Siłowni",
"gym_badges": "Odznaki Siłowni",
"gym_badge_diamonds": "Pokaż Odznaki Siłowni",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Este Temporizador não está Verificado",
"all": "Todos",
"badge_0": "Nenhum",
"badge_1": "Bronze",
"badge_2": "Prata",
"badge_3": "Ouro",
"badge_1": "Básico",
"badge_2": "Bronze",
"badge_3": "Prata",
"badge_4": "Ouro",
"gym_badge_menu": "Editar Insígnia de Ginásio",
"gym_badges": "Insígnias de Ginásio",
"gym_badge_diamonds": "Mostrar Insígnias de Ginásio",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Этот Таймер Не Проверен",
"all": "Все",
"badge_0": "Нет",
"badge_1": "Бронза",
"badge_2": "Серебро",
"badge_3": "Золото",
"badge_1": "Базовый",
"badge_2": "Бронза",
"badge_3": "Серебро",
"badge_4": "Золото",
"gym_badge_menu": "Редактировать Значок Спортзала",
"gym_badges": "Значки Спортзалов",
"gym_badge_diamonds": "Показать Значки Спортзала",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Denna Timer är Ej Verifierad",
"all": "Alla",
"badge_0": "Ingen",
"badge_1": "Brons",
"badge_2": "Silver",
"badge_3": "Guld",
"badge_1": "Grundläggande",
"badge_2": "Brons",
"badge_3": "Silver",
"badge_4": "Guld",
"gym_badge_menu": "Redigera Gymmärke",
"gym_badges": "Gymmärken",
"gym_badge_diamonds": "Visa Gymmärken",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "ตัวจับเวลานี้ยังไม่ได้รับการยืนยัน",
"all": "ทั้งหมด",
"badge_0": "ไม่มี",
"badge_1": "ทองแดง",
"badge_2": "เงิน",
"badge_3": "ทอง",
"badge_1": "พื้นฐาน",
"badge_2": "ทองแดง",
"badge_3": "เงิน",
"badge_4": "ทอง",
"gym_badge_menu": "แก้ไขเหรียญยิม",
"gym_badges": "เหรียญยิม",
"gym_badge_diamonds": "แสดงเหรียญยิม",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Bu Zamanlayıcı Doğrulanmadı",
"all": "Tümü",
"badge_0": "Yok",
"badge_1": "Bronz",
"badge_2": "Gümüş",
"badge_3": "Altın",
"badge_1": "Temel",
"badge_2": "Bronz",
"badge_3": "Gümüş",
"badge_4": "Altın",
"gym_badge_menu": "Spor Salonu Rozeti Düzenle",
"gym_badges": "Spor Salonu Rozetleri",
"gym_badge_diamonds": "Spor Salonu Rozetlerini Göster",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/generated/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "此計時器未經驗證",
"all": "全部",
"badge_0": "",
"badge_1": "",
"badge_2": "",
"badge_3": "",
"badge_1": "基礎",
"badge_2": "",
"badge_3": "",
"badge_4": "",
"gym_badge_menu": "編輯健身房徽章",
"gym_badges": "健身房徽章",
"gym_badge_diamonds": "顯示健身房徽章",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/human/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,10 @@
"without_ar": "Ohne AR",
"both": "Beide",
"badge_0": "keiner",
"badge_1": "Bronze",
"badge_2": "Silber",
"badge_3": "Gold",
"badge_1": "Basis",
"badge_2": "Bronze",
"badge_3": "Silber",
"badge_4": "Gold",
"gym_badge_menu": "Arenaorden bearbeiten",
"gym_badges": "Arenaorden",
"gym_badge_diamonds": "Arenaorden anzeigen",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/human/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@
"timer_unverified": "This Timer is Unverified",
"all": "All",
"badge_0": "None",
"badge_1": "Bronze",
"badge_2": "Silver",
"badge_3": "Gold",
"badge_1": "Basic",
"badge_2": "Bronze",
"badge_3": "Silver",
"badge_4": "Gold",
"gym_badge_menu": "Edit Gym Badge",
"gym_badges": "Gym Badges",
"gym_badge_diamonds": "Show Gym Badges",
Expand Down
7 changes: 4 additions & 3 deletions packages/locales/lib/human/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
"timer_unverified": "Ce timer n'est pas vérifié",
"all": "Tout",
"badge_0": "Sans",
"badge_1": "Bronze",
"badge_2": "Argent",
"badge_3": "Or",
"badge_1": "Basique",
"badge_2": "Bronze",
"badge_3": "Argent",
"badge_4": "Or",
"gym_badge_menu": "Editer Badge d'Arène",
"gym_badges": "Badges d'Arènes",
"gym_badge_diamonds": "Afficher les Badges d'Arènes",
Expand Down
8 changes: 4 additions & 4 deletions packages/locales/lib/human/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
"backups": "Kopie zapasowe",
"backups_subtitle": "Umożliwia tworzenie kopii zapasowych i ładowanie ustawień na różne urządzenia",
"badge_0": "Brak",
"badge_1": "Brąz",
"badge_2": "Srebro",
"badge_3": "Złoto",
"basic": "Podstawowy",
"badge_1": "Podst.",
"badge_2": "Brąz",
"badge_3": "Srebro",
"badge_4": "Złoto",
"basic_description": "Łatwe wybieranie Pokémonów i zastosowanie globalnego filtra",
"battle_changes": "W bitwie",
"battle_changes_poracle": "battle_changes",
Expand Down
21 changes: 21 additions & 0 deletions server/src/db/migrations/20240416222131_basicGymBadge.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable no-unused-vars */

/**
* @param {import("knex").Knex} knex
*/
exports.up = async (knex) => {
// Increment all non-zero badges by 1 (e.g., moving Bronze from value 1 to value 2, making room for a basic badge)
await knex('gymBadges')
.where('badge', '>', 0)
.update({ badge: knex.raw('?? + 1', ['badge']) })
}

/**
* @param {import("knex").Knex} knex
*/
exports.down = async (knex) => {
// Decrement all non-zero badges by 1 (e.g., moving Bronze from value 2 to value 1)
await knex('gymBadges')
.where('badge', '>', 0)
.update({ badge: knex.raw('?? - 1', ['badge']) })
}
3 changes: 2 additions & 1 deletion src/assets/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const NUNDO_HUNDO = /** @type {const} */ (['zeroIv', 'hundoIv'])

export const ENUM_GENDER = /** @type {const} */ ([0, 1, 2, 3])

export const ENUM_BADGES = /** @type {const} */ ([0, 1, 2, 3])
export const ENUM_BADGES = /** @type {const} */ ([0, 1, 2, 3, 4])

export const S2_LEVELS = /** @type {const} */ ([
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
Expand All @@ -19,6 +19,7 @@ export const BADGES = /** @type {const} */ ([
'badge_1',
'badge_2',
'badge_3',
'badge_4',
])

export const QUEST_SETS = /** @type {const} */ ([
Expand Down
14 changes: 8 additions & 6 deletions src/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ body {
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 1);
}

.badge-1 {
.badge-2 {
background: linear-gradient(
to right,
#cd7f32,
Expand All @@ -142,7 +142,8 @@ body {
#cd7f32
);
}
.badge-2 {

.badge-3 {
background: linear-gradient(
to right,
#c0c0c0,
Expand All @@ -152,7 +153,8 @@ body {
#c0c0c0
);
}
.badge-3 {

.badge-4 {
background: linear-gradient(
to right,
#bf953f,
Expand Down Expand Up @@ -395,15 +397,15 @@ input[type='time']::-webkit-calendar-picker-indicator {
filter: invert(100%);
}

.badge_3 {
.badge_4 {
color: #ffd700;
}

.badge_2 {
.badge_3 {
color: #c0c0c0;
}

.badge_1 {
.badge_2 {
color: #cd7f32;
}

Expand Down
Loading

0 comments on commit 9fc5909

Please sign in to comment.