From 7f3a55cee47cb91694d84338cc50591982fa3207 Mon Sep 17 00:00:00 2001 From: shidorien Date: Fri, 5 Jan 2024 22:53:47 +0100 Subject: [PATCH 01/19] Add translations for map characteristics and map item actions --- assets/jsons/translations/en.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 625c0405..28a9b1b6 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -728,6 +728,8 @@ "maps": { "map-filter-panel": { "duration": "Duration", + "nps" : "Notes Per Second", + "nps-abbr" : "NPS", "tags": "tags", "specificities": "general", "requirements": "requirements" @@ -793,9 +795,24 @@ "Expert": "expert", "ExpertPlus": "expert+" }, + "map-Characteristics": { + "Standard": "standard", + "OneSaber": "one saber", + "NoArrows": "no arrows", + "90Degree": "90°", + "360Degree": "360°", + "Lightshow": "lightshow", + "Lawless": "lawless" + }, "map-item": { "by": "By {songAutor}", - "mapped-by": "mapped by" + "mapped-by": "mapped by", + "delete": "Delete", + "preview" : "Preview map", + "bsr-code" : "BSR code", + "download" : "Download map", + "downloading" :"Downloading map", + "cancel-download" : "Cancel download" } }, "models": { From 79be8a8173394f08fb8567eddc668e7261108e16 Mon Sep 17 00:00:00 2001 From: shidorien Date: Fri, 5 Jan 2024 22:53:54 +0100 Subject: [PATCH 02/19] Add styles for tooltips --- src/renderer/index.css | 21 +++++++++++++++++++++ src/renderer/index.tsx | 1 + 2 files changed, 22 insertions(+) diff --git a/src/renderer/index.css b/src/renderer/index.css index b8730906..3ad6255b 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -19,6 +19,7 @@ } * { + user-select: none; } @@ -78,6 +79,26 @@ background: rgba(0, 0, 0, 0.25); } + + +.tippy-box[data-theme~='default'] { + @apply !bg-neutral-900; + color: #fff; +} + +.tippy-box[data-theme~='default'][data-placement^='top'] > .tippy-arrow::before { + @apply !border-t-neutral-900 +} +.tippy-box[data-theme~='default'][data-placement^='bottom'] > .tippy-arrow::before { + @apply !border-b-neutral-900 +} +.tippy-box[data-theme~='default'][data-placement^='left'] > .tippy-arrow::before { + @apply !border-l-neutral-900 +} +.tippy-box[data-theme~='default'][data-placement^='right'] > .tippy-arrow::before { + @apply !border-r-neutral-900 +} + @keyframes glowing { 0% { background-position: 0 0; diff --git a/src/renderer/index.tsx b/src/renderer/index.tsx index befd5df7..66e121a6 100644 --- a/src/renderer/index.tsx +++ b/src/renderer/index.tsx @@ -1,6 +1,7 @@ import { createRoot } from "react-dom/client"; import { HashRouter } from "react-router-dom"; import "tailwindcss/tailwind.css"; + import "./index.css"; import { IpcService } from "./services/ipc.service"; import { ThemeService } from "./services/theme.service"; From 395b6704fdb10425f37c9836b8ba9bd0b77b142c Mon Sep 17 00:00:00 2001 From: shidorien Date: Fri, 5 Jan 2024 22:54:41 +0100 Subject: [PATCH 03/19] add tippy --- .../map-item.component.tsx | 135 +++++++++++------- 1 file changed, 81 insertions(+), 54 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/map-item.component.tsx b/src/renderer/components/maps-mangement-components/map-item.component.tsx index b71ccd33..71cc59ca 100644 --- a/src/renderer/components/maps-mangement-components/map-item.component.tsx +++ b/src/renderer/components/maps-mangement-components/map-item.component.tsx @@ -21,6 +21,7 @@ import useDoubleClick from "use-double-click"; import { GlowEffect } from "../shared/glow-effect.component"; import { useDelayedState } from "renderer/hooks/use-delayed-state.hook"; import { useService } from "renderer/hooks/use-service.hook"; +import Tippy from "@tippyjs/react"; export type ParsedMapDiff = { type: BsvMapDifficultyType; name: string; stars: number }; @@ -51,7 +52,7 @@ export type MapItemProps = { }; export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl, autorId, mapId, diffs, ranked, bpm, duration, likes, createdAt, selected, downloading, showOwned, callBackParam, onDelete, onDownload, onSelected, onCancelDownload, onDoubleClick }: MapItemProps) => { - + const linkOpener = useService(LinkOpenerService); const audioPlayer = useService(AudioPlayerService); @@ -156,25 +157,25 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl, return ( setHovered(true)} onHoverEnd={() => setHovered(false)} style={{ zIndex: hovered && 5, transform: "translateZ(0) scale(1.0, 1.0)", backfaceVisibility: "hidden" }}> - - {(diffsPanelHovered || bottomBarHovered) && ( - - {Array.from(diffs.entries()).map(([charac, diffSet]) => ( -
    - {diffSet.map(({ type, name, stars }) => ( -
  1. - - - {stars ? ★ {stars} : {parseDiffLabel(type)}} - - {parseDiffLabel(name)} -
  2. - ))} -
- ))} -
- )} -
+ + {(diffsPanelHovered || bottomBarHovered) && ( + + {Array.from(diffs.entries()).map(([charac, diffSet]) => ( +
    + {diffSet.map(({ type, name, stars }) => ( +
  1. + + + {stars ? ★ {stars} : {parseDiffLabel(type)}} + + {parseDiffLabel(name)} +
  2. + ))} +
+ ))} +
+ )} +
@@ -246,46 +247,66 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
{onDelete && !downloading && ( - { - e.stopPropagation(); - onDelete(callBackParam); - }} - /> + +
+ { + e.stopPropagation(); + onDelete(callBackParam); + }} + /> +
+
)} {onDownload && !downloading && ( - { - e.stopPropagation(); - onDownload(callBackParam); - }} - /> + +
+ { + e.stopPropagation(); + onDownload(callBackParam); + }} + /> +
+
)} {onCancelDownload && !downloading && ( - { - e.stopPropagation(); - onCancelDownload(callBackParam); - }} - /> + +
+ { + e.stopPropagation(); + onCancelDownload(callBackParam); + }} + /> +
+
)} - {downloading && } + {downloading && + +
+ +
+
+ } {previewUrl && ( + +
+
+
)} {mapId && ( + +
+
+
)}
From 05a3a383eeba6863c1c6bb4f58941a226593328a Mon Sep 17 00:00:00 2001 From: shidorien Date: Sat, 6 Jan 2024 20:44:23 +0100 Subject: [PATCH 04/19] Remove unused map characteristics translations --- assets/jsons/translations/en.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 28a9b1b6..b54ba29d 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -795,15 +795,6 @@ "Expert": "expert", "ExpertPlus": "expert+" }, - "map-Characteristics": { - "Standard": "standard", - "OneSaber": "one saber", - "NoArrows": "no arrows", - "90Degree": "90°", - "360Degree": "360°", - "Lightshow": "lightshow", - "Lawless": "lawless" - }, "map-item": { "by": "By {songAutor}", "mapped-by": "mapped by", From f448f023f88bb36cab6b343eccc97e0a3ad22123 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sat, 6 Jan 2024 20:44:52 +0100 Subject: [PATCH 05/19] Remove unused import statement --- src/renderer/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/renderer/index.tsx b/src/renderer/index.tsx index 66e121a6..befd5df7 100644 --- a/src/renderer/index.tsx +++ b/src/renderer/index.tsx @@ -1,7 +1,6 @@ import { createRoot } from "react-dom/client"; import { HashRouter } from "react-router-dom"; import "tailwindcss/tailwind.css"; - import "./index.css"; import { IpcService } from "./services/ipc.service"; import { ThemeService } from "./services/theme.service"; From fcad40ec66617dd15d683fca787c829ba4be5eb8 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 00:26:10 +0100 Subject: [PATCH 06/19] Update filter panel component --- .../filter-panel.component.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx index 5332c5ce..c9f701b7 100644 --- a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx +++ b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx @@ -56,7 +56,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange const renderDurationLabel = (sec: number): JSX.Element => { const textValue = (() => { if (sec === MIN_DURATION) { - return t("maps.map-filter-panel.duration"); + return "0"; } if (sec === MAX_DURATION) { return "∞"; @@ -72,7 +72,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange const renderNpsLabel = (nps: number): JSX.Element => { const textValue = (() => { if (nps === MIN_NPS) { - return "NPS"; + return "0" } if (nps === MAX_NPS) { return "∞"; @@ -167,9 +167,13 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange return !playlist ? ( -
- - + +
+ + + + {t("maps.map-filter-panel.nps")} + {t("maps.map-filter-panel.duration")}
From 902ca819c548f81b277f27b676ced1050c11a52c Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 00:27:52 +0100 Subject: [PATCH 07/19] Remove unused abbreviation for NPS --- assets/jsons/translations/en.json | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index b54ba29d..9995d535 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -729,7 +729,6 @@ "map-filter-panel": { "duration": "Duration", "nps" : "Notes Per Second", - "nps-abbr" : "NPS", "tags": "tags", "specificities": "general", "requirements": "requirements" From 0b1f36cc9618464102fd07d9e184c4fc565b3a73 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 00:44:17 +0100 Subject: [PATCH 08/19] Add translations --- assets/jsons/translations/de.json | 9 ++++++++- assets/jsons/translations/es.json | 9 ++++++++- assets/jsons/translations/fr.json | 9 ++++++++- assets/jsons/translations/ja.json | 9 ++++++++- assets/jsons/translations/ru.json | 9 ++++++++- assets/jsons/translations/zh-tw.json | 9 ++++++++- assets/jsons/translations/zh.json | 9 ++++++++- 7 files changed, 56 insertions(+), 7 deletions(-) diff --git a/assets/jsons/translations/de.json b/assets/jsons/translations/de.json index 4a631259..d4cf9904 100644 --- a/assets/jsons/translations/de.json +++ b/assets/jsons/translations/de.json @@ -728,6 +728,7 @@ "maps": { "map-filter-panel": { "duration": "Länge", + "nps" : "Noten pro Sekunde", "tags": "Stichworte", "specificities": "Allgemein", "requirements": "Anforderungen" @@ -795,7 +796,13 @@ }, "map-item": { "by": "Von {songAutor}", - "mapped-by": "Gemapped von" + "mapped-by": "Gemapped von", + "delete": "Löschen", + "preview" : "Kartenvorschau", + "bsr-code" : "BSR Code", + "download" : "Karte herunterladen", + "downloading" :"Karte wird heruntergeladen", + "cancel-download" : "Download abbrechen" } }, "models": { diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 67441fa6..31a77dcc 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -727,6 +727,7 @@ "maps": { "map-filter-panel": { "duration": "Duración", + "nps" : "Notas por Segundo", "tags": "tags", "specificities": "general", "requirements": "requisitos" @@ -794,7 +795,13 @@ }, "map-item": { "by": "Por {songAutor}", - "mapped-by": "mapeado por" + "mapped-by": "mapeado por", + "delete": "Eliminar", + "preview" : "Vista previa del mapa", + "bsr-code" : "Código BSR", + "download" : "Descargar mapa", + "downloading" :"Descargando mapa", + "cancel-download" : "Cancelar descarga" } }, "models": { diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 7631e256..495972f6 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -724,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Durée", + "nps" : "Notes par Seconde", "tags": "tags", "specificities": "général", "requirements": "requis" @@ -791,7 +792,13 @@ }, "map-item": { "by": "Par {songAutor}", - "mapped-by": "mappée par" + "mapped-by": "mappée par", + "delete": "Supprimer", + "preview" : "Aperçu de la carte", + "bsr-code" : "Code BSR", + "download" : "Télécharger la carte", + "downloading" :"Téléchargement de la carte", + "cancel-download" : "Annuler le téléchargement" } }, "models": { diff --git a/assets/jsons/translations/ja.json b/assets/jsons/translations/ja.json index 65132a6a..f2284a4e 100644 --- a/assets/jsons/translations/ja.json +++ b/assets/jsons/translations/ja.json @@ -728,6 +728,7 @@ "maps": { "map-filter-panel": { "duration": "尺", + "nps" : "秒間ノート数", "tags": "タグ", "specificities": "一般", "requirements": "要Mod" @@ -795,7 +796,13 @@ }, "map-item": { "by": "By {songAutor}", - "mapped-by": "作成者 " + "mapped-by": "作成者 ", + "delete": "削除", + "preview" : "マッププレビュー", + "bsr-code" : "BSRコード", + "download" : "マップをダウンロード", + "downloading" :"マップをダウンロード中", + "cancel-download" : "ダウンロードをキャンセル" } }, "models": { diff --git a/assets/jsons/translations/ru.json b/assets/jsons/translations/ru.json index f1e289e6..9b31d3c9 100644 --- a/assets/jsons/translations/ru.json +++ b/assets/jsons/translations/ru.json @@ -728,6 +728,7 @@ "maps": { "map-filter-panel": { "duration": "Длительность", + "nps" : "Нот в Секунду", "tags": "тэги", "specificities": "основное", "requirements": "требуемые моды" @@ -795,7 +796,13 @@ }, "map-item": { "by": "От {songAutor}", - "mapped-by": "автор карты " + "mapped-by": "автор карты ", + "delete": "Удалить", + "preview" : "Предпросмотр карты", + "bsr-code" : "Код BSR", + "download" : "Скачать карту", + "downloading" :"Загрузка карты", + "cancel-download" : "Отменить загрузку" } }, "models": { diff --git a/assets/jsons/translations/zh-tw.json b/assets/jsons/translations/zh-tw.json index cf2e71b2..35739258 100644 --- a/assets/jsons/translations/zh-tw.json +++ b/assets/jsons/translations/zh-tw.json @@ -729,6 +729,7 @@ "maps": { "map-filter-panel": { "duration": "時長", + "nps" : "每秒音符數", "tags": "標籤", "specificities": "general", "requirements": "要求" @@ -796,7 +797,13 @@ }, "map-item": { "by": "By {songAutor}", - "mapped-by": "mapped by" + "mapped-by": "mapped by", + "delete": "刪除", + "preview" : "預覽地圖", + "bsr-code" : "BSR代碼", + "download" : "下載地圖", + "downloading" :"正在下載地圖", + "cancel-download" : "取消下載" } }, "models": { diff --git a/assets/jsons/translations/zh.json b/assets/jsons/translations/zh.json index 2e806fc0..46617d51 100644 --- a/assets/jsons/translations/zh.json +++ b/assets/jsons/translations/zh.json @@ -729,6 +729,7 @@ "maps": { "map-filter-panel": { "duration": "时长", + "nps" : "每秒音符数", "tags": "标签", "specificities": "general", "requirements": "要求" @@ -796,7 +797,13 @@ }, "map-item": { "by": "By {songAutor}", - "mapped-by": "mapped by" + "mapped-by": "mapped by", + "delete": "删除", + "preview" : "预览地图", + "bsr-code" : "BSR代码", + "download" : "下载地图", + "downloading" :"正在下载地图", + "cancel-download" : "取消下载" } }, "models": { From 4c7a61ecd0f0055791e1367eb655a374bb1a3a09 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 00:57:26 +0100 Subject: [PATCH 09/19] Update translation for delete button in Spanish --- assets/jsons/translations/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 31a77dcc..a6c831aa 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -796,7 +796,7 @@ "map-item": { "by": "Por {songAutor}", "mapped-by": "mapeado por", - "delete": "Eliminar", + "delete": "Borrar", "preview" : "Vista previa del mapa", "bsr-code" : "Código BSR", "download" : "Descargar mapa", From 32cab3d4eb93f6e216ceafa6d4e675f528299438 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:06:25 +0100 Subject: [PATCH 10/19] Update translations for de.json, es.json, and fr.json --- assets/jsons/translations/de.json | 2 +- assets/jsons/translations/es.json | 2 +- assets/jsons/translations/fr.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/jsons/translations/de.json b/assets/jsons/translations/de.json index d4cf9904..443cee50 100644 --- a/assets/jsons/translations/de.json +++ b/assets/jsons/translations/de.json @@ -728,7 +728,7 @@ "maps": { "map-filter-panel": { "duration": "Länge", - "nps" : "Noten pro Sekunde", + "nps" : "Noten Pro Sekunde", "tags": "Stichworte", "specificities": "Allgemein", "requirements": "Anforderungen" diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index a6c831aa..f4aa37e6 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -727,7 +727,7 @@ "maps": { "map-filter-panel": { "duration": "Duración", - "nps" : "Notas por Segundo", + "nps" : "Notas Por Segundo", "tags": "tags", "specificities": "general", "requirements": "requisitos" diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 495972f6..0b24017b 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -724,7 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Durée", - "nps" : "Notes par Seconde", + "nps" : "Notes Par Seconde", "tags": "tags", "specificities": "général", "requirements": "requis" From 40ecf536d0624338e00994654eb4d0476870e97a Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:17:29 +0100 Subject: [PATCH 11/19] Remove unused translation --- assets/jsons/translations/de.json | 4 ---- assets/jsons/translations/en.json | 4 ---- assets/jsons/translations/es.json | 4 +--- assets/jsons/translations/fr.json | 3 --- assets/jsons/translations/ja.json | 4 ---- assets/jsons/translations/ru.json | 4 ---- assets/jsons/translations/zh-tw.json | 4 ---- assets/jsons/translations/zh.json | 4 ---- 8 files changed, 1 insertion(+), 30 deletions(-) diff --git a/assets/jsons/translations/de.json b/assets/jsons/translations/de.json index 443cee50..a2781aef 100644 --- a/assets/jsons/translations/de.json +++ b/assets/jsons/translations/de.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "Geteilte Maps" - }, "version-viewer": { "launch-mods": { "oculus": "Oculus Modus", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "Geteilte Maps", "search-bar": { "search-placeholder": "Suche eine Map", "filters-btn": "Filter", diff --git a/assets/jsons/translations/en.json b/assets/jsons/translations/en.json index 9995d535..2bf32c3c 100644 --- a/assets/jsons/translations/en.json +++ b/assets/jsons/translations/en.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "Shared maps" - }, "version-viewer": { "launch-mods": { "oculus": "Oculus Mode", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "Shared maps", "search-bar": { "search-placeholder": "Search a map", "filters-btn": "Filters", diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index f4aa37e6..5ff9abeb 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -25,9 +25,7 @@ } }, "pages": { - "shared-maps": { - "title": "Mapas comunes" - }, + "version-viewer": { "launch-mods": { "oculus": "Modo Oculus", diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 0b24017b..490062fe 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "Maps partagées" - }, "version-viewer": { "launch-mods": { "oculus": "Mode Oculus", diff --git a/assets/jsons/translations/ja.json b/assets/jsons/translations/ja.json index f2284a4e..a6a798ac 100644 --- a/assets/jsons/translations/ja.json +++ b/assets/jsons/translations/ja.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "共有マップ" - }, "version-viewer": { "launch-mods": { "oculus": "Oculusモード", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "共有マップ", "search-bar": { "search-placeholder": "マップを検索", "filters-btn": "絞り込み", diff --git a/assets/jsons/translations/ru.json b/assets/jsons/translations/ru.json index 9b31d3c9..b0b8d892 100644 --- a/assets/jsons/translations/ru.json +++ b/assets/jsons/translations/ru.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "Общие карты" - }, "version-viewer": { "launch-mods": { "oculus": "Режим Oculus", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "Общие карты", "search-bar": { "search-placeholder": "Поиск среди карт", "filters-btn": "Фильтр", diff --git a/assets/jsons/translations/zh-tw.json b/assets/jsons/translations/zh-tw.json index 35739258..b77c186a 100644 --- a/assets/jsons/translations/zh-tw.json +++ b/assets/jsons/translations/zh-tw.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "共享譜面 " - }, "version-viewer": { "launch-mods": { "oculus": "Oculus 模式", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "Shared maps", "search-bar": { "search-placeholder": "譜面搜尋", "filters-btn": "篩選", diff --git a/assets/jsons/translations/zh.json b/assets/jsons/translations/zh.json index 46617d51..9d19e3d2 100644 --- a/assets/jsons/translations/zh.json +++ b/assets/jsons/translations/zh.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "共享谱面" - }, "version-viewer": { "launch-mods": { "oculus": "Oculus 模式", @@ -42,7 +39,6 @@ } }, "maps": { - "title": "Shared maps", "search-bar": { "search-placeholder": "谱面搜索", "filters-btn": "筛选", From 1ed71c61efcbc5a634fae81170fb7c07494c3f12 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:18:04 +0100 Subject: [PATCH 12/19] Remove unnecessary line in es.json --- assets/jsons/translations/es.json | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 5ff9abeb..4a0fabf6 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -25,7 +25,6 @@ } }, "pages": { - "version-viewer": { "launch-mods": { "oculus": "Modo Oculus", From a51bf1ab15baaaa82028c561727b5380c09169ba Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:22:30 +0100 Subject: [PATCH 13/19] Update French translations --- assets/jsons/translations/fr.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/jsons/translations/fr.json b/assets/jsons/translations/fr.json index 490062fe..6b382951 100644 --- a/assets/jsons/translations/fr.json +++ b/assets/jsons/translations/fr.json @@ -227,8 +227,11 @@ "steam-download": { "warnings": { "msg": { + "ManifestChecksum": "Le manifeste précédemment téléchargé ne correspond pas au nouveau 🤔", "ConnectionTimeout": "Ta connexion internet semble instable 🥶", - "Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est surement instable." + "ConnectionLost": "La connexion a été perdue, essayez à nouveau...", + "ConnectionError": "Impossible de se connecter à Steam, essayez à nouveau...", + "Unknown": "Quelque chose d'étrange s'est produit 🤔 Votre connexion est probablement instable." } }, "errors": { From a7dbe61535085f6a0c7ba18d6b887765ede5ec37 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:26:44 +0100 Subject: [PATCH 14/19] Remove unnecessary whitespace in zh-tw.json --- assets/jsons/translations/zh-tw.json | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/jsons/translations/zh-tw.json b/assets/jsons/translations/zh-tw.json index b77c186a..e4d4dfd9 100644 --- a/assets/jsons/translations/zh-tw.json +++ b/assets/jsons/translations/zh-tw.json @@ -649,7 +649,6 @@ "valid-btn": "取消關聯譜面" } }, - "download-maps": { "search-btn": "搜尋", "loading-maps": "譜面載入中...", From 8c9597ab0e268d1668dc0ac83e001c4c48e170ff Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:27:16 +0100 Subject: [PATCH 15/19] Remove unnecessary code in zh.json --- assets/jsons/translations/zh.json | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/jsons/translations/zh.json b/assets/jsons/translations/zh.json index 9d19e3d2..54c48cb6 100644 --- a/assets/jsons/translations/zh.json +++ b/assets/jsons/translations/zh.json @@ -649,7 +649,6 @@ "valid-btn": "取消关联谱面" } }, - "download-maps": { "search-btn": "搜索", "loading-maps": "谱面加载中...", From 072e2991badac8f1aca1f1cb8db05afdcbb6cd3b Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:28:47 +0100 Subject: [PATCH 16/19] Update filter panel component layout --- .../maps-mangement-components/filter-panel.component.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx index c9f701b7..3d1f743d 100644 --- a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx +++ b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx @@ -167,9 +167,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange return !playlist ? ( - -
- +
{t("maps.map-filter-panel.nps")} @@ -184,7 +182,6 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange {translateMapSpecificity(specificity)}
))} -

{t("maps.map-filter-panel.requirements")}

{MAP_REQUIREMENTS.map(requirement => (
handleCheckbox(requirement)}> From e071d792ad2e1ccdfd212388c8761300251ccaf6 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 01:32:05 +0100 Subject: [PATCH 17/19] Remove unnecessary empty lines and whitespace --- .../maps-mangement-components/map-item.component.tsx | 1 - src/renderer/index.css | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/map-item.component.tsx b/src/renderer/components/maps-mangement-components/map-item.component.tsx index 71cc59ca..f0e4415d 100644 --- a/src/renderer/components/maps-mangement-components/map-item.component.tsx +++ b/src/renderer/components/maps-mangement-components/map-item.component.tsx @@ -52,7 +52,6 @@ export type MapItemProps = { }; export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl, autorId, mapId, diffs, ranked, bpm, duration, likes, createdAt, selected, downloading, showOwned, callBackParam, onDelete, onDownload, onSelected, onCancelDownload, onDoubleClick }: MapItemProps) => { - const linkOpener = useService(LinkOpenerService); const audioPlayer = useService(AudioPlayerService); diff --git a/src/renderer/index.css b/src/renderer/index.css index 3ad6255b..fde11256 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -19,7 +19,6 @@ } * { - user-select: none; } @@ -79,8 +78,6 @@ background: rgba(0, 0, 0, 0.25); } - - .tippy-box[data-theme~='default'] { @apply !bg-neutral-900; color: #fff; From 6e2dfa26b7666e7bc6f08ce285cf446fee1dd594 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 17:21:08 +0100 Subject: [PATCH 18/19] Add modification after review --- .../maps-mangement-components/filter-panel.component.tsx | 8 ++++---- .../maps-mangement-components/map-item.component.tsx | 6 +++--- src/renderer/index.css | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx index 3d1f743d..7962b23e 100644 --- a/src/renderer/components/maps-mangement-components/filter-panel.component.tsx +++ b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx @@ -56,7 +56,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange const renderDurationLabel = (sec: number): JSX.Element => { const textValue = (() => { if (sec === MIN_DURATION) { - return "0"; + return MIN_DURATION; } if (sec === MAX_DURATION) { return "∞"; @@ -72,7 +72,7 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange const renderNpsLabel = (nps: number): JSX.Element => { const textValue = (() => { if (nps === MIN_NPS) { - return "0" + return MIN_NPS; } if (nps === MAX_NPS) { return "∞"; @@ -170,8 +170,8 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange
- {t("maps.map-filter-panel.nps")} - {t("maps.map-filter-panel.duration")} + {t("maps.map-filter-panel.nps")} + {t("maps.map-filter-panel.duration")}
diff --git a/src/renderer/components/maps-mangement-components/map-item.component.tsx b/src/renderer/components/maps-mangement-components/map-item.component.tsx index f0e4415d..609792f0 100644 --- a/src/renderer/components/maps-mangement-components/map-item.component.tsx +++ b/src/renderer/components/maps-mangement-components/map-item.component.tsx @@ -246,7 +246,7 @@ export const MapItem = memo(({ hash, title, autor, songAutor, coverUrl, songUrl,
{onDelete && !downloading && ( - +
)} {onDownload && !downloading && ( - +
)} {mapId && ( - +
.tippy-arrow::before { From 7dc63fa7750d1ed281abf0408f80cfc0578b79b9 Mon Sep 17 00:00:00 2001 From: shidorien Date: Sun, 7 Jan 2024 18:27:42 +0100 Subject: [PATCH 19/19] Fix tippy-box styles in index.css --- src/renderer/index.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/index.css b/src/renderer/index.css index 46612bfe..a0d20c98 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -79,21 +79,21 @@ } .tippy-box[data-theme~='default'] { - @apply !bg-neutral-900; - @apply !text-white; + @apply bg-neutral-900; + @apply text-white; } .tippy-box[data-theme~='default'][data-placement^='top'] > .tippy-arrow::before { - @apply !border-t-neutral-900 + @apply border-t-neutral-900 } .tippy-box[data-theme~='default'][data-placement^='bottom'] > .tippy-arrow::before { - @apply !border-b-neutral-900 + @apply border-b-neutral-900 } .tippy-box[data-theme~='default'][data-placement^='left'] > .tippy-arrow::before { - @apply !border-l-neutral-900 + @apply border-l-neutral-900 } .tippy-box[data-theme~='default'][data-placement^='right'] > .tippy-arrow::before { - @apply !border-r-neutral-900 + @apply border-r-neutral-900 } @keyframes glowing {