diff --git a/assets/jsons/translations/de.json b/assets/jsons/translations/de.json index 4a631259..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", @@ -728,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Länge", + "nps" : "Noten Pro Sekunde", "tags": "Stichworte", "specificities": "Allgemein", "requirements": "Anforderungen" @@ -795,7 +792,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/en.json b/assets/jsons/translations/en.json index 625c0405..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", @@ -728,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Duration", + "nps" : "Notes Per Second", "tags": "tags", "specificities": "general", "requirements": "requirements" @@ -795,7 +792,13 @@ }, "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": { diff --git a/assets/jsons/translations/es.json b/assets/jsons/translations/es.json index 67441fa6..4a0fabf6 100644 --- a/assets/jsons/translations/es.json +++ b/assets/jsons/translations/es.json @@ -25,9 +25,6 @@ } }, "pages": { - "shared-maps": { - "title": "Mapas comunes" - }, "version-viewer": { "launch-mods": { "oculus": "Modo Oculus", @@ -727,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Duración", + "nps" : "Notas Por Segundo", "tags": "tags", "specificities": "general", "requirements": "requisitos" @@ -794,7 +792,13 @@ }, "map-item": { "by": "Por {songAutor}", - "mapped-by": "mapeado por" + "mapped-by": "mapeado por", + "delete": "Borrar", + "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..6b382951 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", @@ -230,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": { @@ -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..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": "絞り込み", @@ -728,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "尺", + "nps" : "秒間ノート数", "tags": "タグ", "specificities": "一般", "requirements": "要Mod" @@ -795,7 +792,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..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": "Фильтр", @@ -728,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "Длительность", + "nps" : "Нот в Секунду", "tags": "тэги", "specificities": "основное", "requirements": "требуемые моды" @@ -795,7 +792,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..e4d4dfd9 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": "篩選", @@ -653,7 +649,6 @@ "valid-btn": "取消關聯譜面" } }, - "download-maps": { "search-btn": "搜尋", "loading-maps": "譜面載入中...", @@ -729,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "時長", + "nps" : "每秒音符數", "tags": "標籤", "specificities": "general", "requirements": "要求" @@ -796,7 +792,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..54c48cb6 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": "筛选", @@ -653,7 +649,6 @@ "valid-btn": "取消关联谱面" } }, - "download-maps": { "search-btn": "搜索", "loading-maps": "谱面加载中...", @@ -729,6 +724,7 @@ "maps": { "map-filter-panel": { "duration": "时长", + "nps" : "每秒音符数", "tags": "标签", "specificities": "general", "requirements": "要求" @@ -796,7 +792,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/src/renderer/components/maps-mangement-components/filter-panel.component.tsx b/src/renderer/components/maps-mangement-components/filter-panel.component.tsx index 5332c5ce..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 t("maps.map-filter-panel.duration"); + 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 "NPS"; + return MIN_NPS; } if (nps === MAX_NPS) { return "∞"; @@ -167,9 +167,11 @@ export function FilterPanel({ className, ref, playlist = false, filter, onChange return !playlist ? ( -
- - +
+ + + {t("maps.map-filter-panel.nps")} + {t("maps.map-filter-panel.duration")}
@@ -180,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)}> 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 49242a6f..617776d7 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,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); @@ -156,25 +156,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 +246,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 && ( + +
+
+
)}
diff --git a/src/renderer/index.css b/src/renderer/index.css index b8730906..a0d20c98 100644 --- a/src/renderer/index.css +++ b/src/renderer/index.css @@ -78,6 +78,24 @@ background: rgba(0, 0, 0, 0.25); } +.tippy-box[data-theme~='default'] { + @apply bg-neutral-900; + @apply text-white; +} + +.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;