Integrate settings and release history for Manager 0.9.4

This commit is contained in:
Дмитрий committed 2026-10-29 16:10:43 +05:00
commit dad10d8a5d
38 files changed
+2298 -372

No files matched your search

+1 -1
View File
@@ -15,7 +15,7 @@ const buttonVariants = cva(
size: {
sm: "h-9 px-3 text-sm",
md: "h-11 px-5 text-[15px]",
xl: "h-16 px-10 text-lg tracking-wide",
xl: "h-12 px-6 text-base",
},
},
defaultVariants: { variant: "secondary", size: "md" },
+15
View File
@@ -0,0 +1,15 @@
import { Button, type ButtonProps } from "./button";
/** Two explicit actions, each with its own enabled state and keyboard focus. */
export function SplitButton({ label, primary, secondary }: {
label: string;
primary: ButtonProps;
secondary: ButtonProps;
}) {
return <div role="group" aria-label={label} className="inline-flex max-w-full items-stretch rounded-md">
<Button type="button" variant="primary" {...primary}
className="h-auto min-h-12 min-w-0 rounded-r-none px-5 py-2 text-sm whitespace-normal" />
<Button type="button" variant="secondary" {...secondary}
className="h-auto min-h-12 min-w-0 rounded-l-none border-l border-l-gold/30 px-4 py-2 text-sm whitespace-normal" />
</div>;
}
+24
View File
@@ -0,0 +1,24 @@
# Release history data (internal)
The Manager feed is imported from the canonical `changelog/history.json`. The
server snapshot in this directory is copied from `Corfirean/coa-server-build`
commit `9bf1411de93e98cbcd0e8ebbcdac3a457d5fbaf0`, path
`changelog/history.json`, on 2026-10-28. Only schema, component, repository and
releases are retained. Do not independently edit historical records here.
At runtime the native read-only command fetches the fixed canonical URL, bounds
and validates the feed, and caches it for offline use. The bundled records appear
immediately and remain available if neither network nor cache is usable. These
records cannot select a package or authorize an update.
`latest-note-translations.json` contains the reviewed Manager notes through 0.9.3, the new
0.9.4 Manager entries, and the 0.261028.83 server notes in Russian, German, French, Spanish and Simplified
Chinese. English remains canonical. Translations are keyed by exact original
text: changing an original invalidates its translation. A partly translated
release falls back entirely to English and displays an explicit notice.
When preparing future release notes, refresh the server snapshot from a pinned
canonical commit and add all five translations for each new original note.
Never rewrite released fragments to add translations. Run
`node --test tools/release-history.test.mjs`; its completeness check expects the
latest bundled record of each component to have every translation.
+222 -6
View File
@@ -1,45 +1,261 @@
{
"manager": {
"ru": {
"Choose Parallel or Global level scaling in module settings": "Выбирайте параллельное или глобальное масштабирование уровней в настройках модуля",
"Report Content Scaling problems directly to its repository": "Отправляйте отчёты о проблемах Content Scaling прямо в его репозиторий",
"Send custom race problem reports directly to their maintainer": "Отправляйте отчёты о проблемах дополнительных рас напрямую их разработчику",
"Internet sharing restores the LAN address after server restarts": "Общий доступ через интернет восстанавливает адрес локальной сети после перезапуска сервера",
"Configure custom race availability for new characters": "Настраивайте доступность дополнительных рас для новых персонажей",
"Public listing offers every realm that starts together, not just the main one": "Публиковать можно каждый реалм, запускаемый вместе с основным",
"Public listing is a short list of realms with a window for the details": "Публичные реалмы представлены компактным списком с отдельным окном подробностей",
"Configure profession and defense skill gains in server settings": "Настраивайте рост навыков профессий и защиты в настройках сервера",
"Starting a server sets the character classes of the realm chosen on Overview": "При запуске применяются классы персонажей реалма, выбранного на экране «Обзор»",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth": "Запускайте Wildcard и Warcraft Reborn вместе с Conquest of Azeroth",
"Control portable characters and keep Manager running in the system tray": "Управляйте переносимыми персонажами и оставляйте Manager работать в системном трее",
"Existing unsupported character records no longer block unrelated server updates": "Старые неподдерживаемые записи персонажей больше не блокируют несвязанные обновления сервера",
"New server installation waits for slower database startup": "Установка нового сервера дольше ожидает запуска базы на медленных дисках",
"Find and edit CoA options in the existing server settings": "Параметры CoA доступны для поиска и редактирования в настройках сервера",
"Simultaneous update checks share results or wait their turn": "Одновременные проверки обновлений используют общий результат или ожидают своей очереди",
"Recovery can stop an unfinished world startup after restoring an older launcher": "Восстановление может остановить зависший запуск мира после возврата старого launcher",
"Slow server startup no longer triggers an early update rollback": "Медленный запуск сервера больше не вызывает преждевременный откат обновления"
"Slow server startup no longer triggers an early update rollback": "Медленный запуск сервера больше не вызывает преждевременный откат обновления",
"Settings group updates, startup and maintenance with translated release history": "Настройки сгруппированы по обновлениям, запуску и обслуживанию с переведённой историей выпусков",
"Update and launch without updating share a divided button": "Обновление и запуск без обновления объединены в разделённую кнопку",
"Maximizing the window keeps text and controls at a comfortable size": "При разворачивании окна текст и элементы управления сохраняют удобный размер"
},
"de": {
"Choose Parallel or Global level scaling in module settings": "Parallele oder globale Levelskalierung in den Moduleinstellungen wählen",
"Report Content Scaling problems directly to its repository": "Probleme mit Content Scaling direkt in dessen Repository melden",
"Send custom race problem reports directly to their maintainer": "Probleme mit zusätzlichen Völkern direkt an deren Entwickler melden",
"Internet sharing restores the LAN address after server restarts": "Internetfreigabe stellt nach Serverneustarts die LAN-Adresse wieder her",
"Configure custom race availability for new characters": "Verfügbarkeit zusätzlicher Völker für neue Charaktere festlegen",
"Public listing offers every realm that starts together, not just the main one": "Alle gemeinsam gestarteten Realms können veröffentlicht werden, nicht nur der Hauptrealm",
"Public listing is a short list of realms with a window for the details": "Öffentliche Realms erscheinen als kurze Liste mit einem Detailfenster",
"Configure profession and defense skill gains in server settings": "Zuwachs von Berufs- und Verteidigungsfertigkeiten in den Servereinstellungen festlegen",
"Starting a server sets the character classes of the realm chosen on Overview": "Beim Serverstart werden die Charakterklassen des in der Übersicht gewählten Realms angewendet",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth": "Wildcard und Warcraft Reborn gemeinsam mit Conquest of Azeroth starten",
"Control portable characters and keep Manager running in the system tray": "Portable Charaktere verwalten und Manager im Infobereich weiterlaufen lassen",
"Existing unsupported character records no longer block unrelated server updates": "Bestehende nicht unterstützte Charakterdatensätze blockieren keine unabhängigen Serverupdates mehr",
"New server installation waits for slower database startup": "Die Neuinstallation wartet länger auf einen langsamen Datenbankstart",
"Find and edit CoA options in the existing server settings": "CoA-Optionen in den bestehenden Servereinstellungen suchen und bearbeiten",
"Simultaneous update checks share results or wait their turn": "Gleichzeitige Updateprüfungen teilen Ergebnisse oder warten aufeinander",
"Recovery can stop an unfinished world startup after restoring an older launcher": "Die Wiederherstellung stoppt einen unvollständigen Weltstart auch mit altem Launcher",
"Slow server startup no longer triggers an early update rollback": "Ein langsamer Serverstart löst keinen vorzeitigen Update-Rollback mehr aus"
"Slow server startup no longer triggers an early update rollback": "Ein langsamer Serverstart löst keinen vorzeitigen Update-Rollback mehr aus",
"Settings group updates, startup and maintenance with translated release history": "Einstellungen bündeln Updates, Start und Wartung mit übersetztem Versionsverlauf",
"Update and launch without updating share a divided button": "Aktualisieren und ohne Update starten teilen sich eine geteilte Schaltfläche",
"Maximizing the window keeps text and controls at a comfortable size": "Beim Maximieren bleiben Text und Bedienelemente angenehm groß"
},
"fr": {
"Choose Parallel or Global level scaling in module settings": "Choisissez une progression parallèle ou globale des niveaux dans les paramètres du module",
"Report Content Scaling problems directly to its repository": "Signalez les problèmes de Content Scaling directement dans son dépôt",
"Send custom race problem reports directly to their maintainer": "Envoyez les signalements concernant les races supplémentaires directement à leur développeur",
"Internet sharing restores the LAN address after server restarts": "Le partage Internet rétablit l’adresse du réseau local après un redémarrage du serveur",
"Configure custom race availability for new characters": "Configurez les races supplémentaires disponibles pour les nouveaux personnages",
"Public listing offers every realm that starts together, not just the main one": "Tous les royaumes démarrant ensemble peuvent être publiés, pas seulement le principal",
"Public listing is a short list of realms with a window for the details": "Les royaumes publics apparaissent dans une liste compacte avec une fenêtre de détails",
"Configure profession and defense skill gains in server settings": "Configurez les gains de compétences de métier et de défense dans les paramètres du serveur",
"Starting a server sets the character classes of the realm chosen on Overview": "Le démarrage applique les classes du royaume choisi sur l’écran Aperçu",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth": "Démarrez Wildcard et Warcraft Reborn avec Conquest of Azeroth",
"Control portable characters and keep Manager running in the system tray": "Gérez les personnages portables et laissez Manager fonctionner dans la zone de notification",
"Existing unsupported character records no longer block unrelated server updates": "Les anciennes fiches de personnage non prises en charge ne bloquent plus les mises à jour sans rapport",
"New server installation waits for slower database startup": "L’installation attend le démarrage de la base sur les disques plus lents",
"Find and edit CoA options in the existing server settings": "Recherchez et modifiez les options CoA dans les paramètres du serveur",
"Simultaneous update checks share results or wait their turn": "Les vérifications simultanées partagent leurs résultats ou attendent leur tour",
"Recovery can stop an unfinished world startup after restoring an older launcher": "La restauration peut arrêter un démarrage du monde inachevé avec un ancien lanceur",
"Slow server startup no longer triggers an early update rollback": "Un démarrage lent du serveur ne déclenche plus un retour arrière prématuré"
"Slow server startup no longer triggers an early update rollback": "Un démarrage lent du serveur ne déclenche plus un retour arrière prématuré",
"Settings group updates, startup and maintenance with translated release history": "Les paramètres regroupent les mises à jour, le démarrage et la maintenance avec un historique traduit",
"Update and launch without updating share a divided button": "La mise à jour et le lancement sans mise à jour partagent un bouton divisé",
"Maximizing the window keeps text and controls at a comfortable size": "Le texte et les commandes gardent une taille confortable lorsque la fenêtre est maximisée"
},
"es": {
"Choose Parallel or Global level scaling in module settings": "Elige escalado de nivel paralelo o global en los ajustes del módulo",
"Report Content Scaling problems directly to its repository": "Informa de problemas de Content Scaling directamente en su repositorio",
"Send custom race problem reports directly to their maintainer": "Envía los informes sobre razas adicionales directamente a su desarrollador",
"Internet sharing restores the LAN address after server restarts": "El acceso por Internet restaura la dirección de red local tras reiniciar el servidor",
"Configure custom race availability for new characters": "Configura las razas adicionales disponibles para personajes nuevos",
"Public listing offers every realm that starts together, not just the main one": "Puedes publicar todos los reinos que se inician juntos, no solo el principal",
"Public listing is a short list of realms with a window for the details": "Los reinos públicos se muestran en una lista breve con una ventana de detalles",
"Configure profession and defense skill gains in server settings": "Configura las mejoras de habilidades de profesión y defensa en los ajustes del servidor",
"Starting a server sets the character classes of the realm chosen on Overview": "Al iniciar el servidor se aplican las clases del reino elegido en Resumen",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth": "Inicia Wildcard y Warcraft Reborn junto con Conquest of Azeroth",
"Control portable characters and keep Manager running in the system tray": "Gestiona personajes portátiles y mantén Manager en la bandeja del sistema",
"Existing unsupported character records no longer block unrelated server updates": "Los registros antiguos de personajes no compatibles ya no bloquean actualizaciones del servidor no relacionadas",
"New server installation waits for slower database startup": "La instalación espera más tiempo al inicio de la base de datos en discos lentos",
"Find and edit CoA options in the existing server settings": "Busca y edita opciones de CoA en la configuración actual del servidor",
"Simultaneous update checks share results or wait their turn": "Las comprobaciones simultáneas comparten resultados o esperan su turno",
"Recovery can stop an unfinished world startup after restoring an older launcher": "La recuperación puede detener el inicio del mundo tras restaurar un lanzador antiguo",
"Slow server startup no longer triggers an early update rollback": "El inicio lento del servidor ya no provoca una reversión prematura de la actualización"
"Slow server startup no longer triggers an early update rollback": "El inicio lento del servidor ya no provoca una reversión prematura de la actualización",
"Settings group updates, startup and maintenance with translated release history": "Los ajustes agrupan actualizaciones, inicio y mantenimiento con un historial de versiones traducido",
"Update and launch without updating share a divided button": "Actualizar e iniciar sin actualizar comparten un botón dividido",
"Maximizing the window keeps text and controls at a comfortable size": "Al maximizar la ventana, el texto y los controles mantienen un tamaño cómodo"
},
"zh": {
"Choose Parallel or Global level scaling in module settings": "在模块设置中选择并行或全局等级缩放",
"Report Content Scaling problems directly to its repository": "直接向 Content Scaling 仓库报告问题",
"Send custom race problem reports directly to their maintainer": "将自定义种族问题直接报告给其维护者",
"Internet sharing restores the LAN address after server restarts": "服务器重启后,互联网共享会恢复局域网地址",
"Configure custom race availability for new characters": "设置新角色可选的自定义种族",
"Public listing offers every realm that starts together, not just the main one": "可以发布所有同时启动的服务器,而不仅是主服务器",
"Public listing is a short list of realms with a window for the details": "公开服务器使用简短列表展示,详情在单独窗口中查看",
"Configure profession and defense skill gains in server settings": "在服务器设置中调整专业和防御技能的提升",
"Starting a server sets the character classes of the realm chosen on Overview": "启动时会应用“概览”中所选服务器的角色职业",
"Start Wildcard and Warcraft Reborn together with Conquest of Azeroth": "将 Wildcard 和 Warcraft Reborn 与 Conquest of Azeroth 一同启动",
"Control portable characters and keep Manager running in the system tray": "管理可携带角色,并让 Manager 继续在系统托盘中运行",
"Existing unsupported character records no longer block unrelated server updates": "已有的不受支持角色记录不再阻止无关的服务器更新",
"New server installation waits for slower database startup": "安装新服务器时会等待较慢的数据库启动",
"Find and edit CoA options in the existing server settings": "在现有服务器设置中查找和编辑 CoA 选项",
"Simultaneous update checks share results or wait their turn": "同时进行的更新检查会共用结果或依次执行",
"Recovery can stop an unfinished world startup after restoring an older launcher": "恢复旧版启动器后,恢复流程也能停止未完成启动的世界服务器",
"Slow server startup no longer triggers an early update rollback": "服务器启动缓慢不再导致更新过早回滚"
"Slow server startup no longer triggers an early update rollback": "服务器启动缓慢不再导致更新过早回滚",
"Settings group updates, startup and maintenance with translated release history": "设置按更新、启动和维护分组,并提供已翻译的版本历史",
"Update and launch without updating share a divided button": "更新和不更新直接启动使用同一个分段按钮",
"Maximizing the window keeps text and controls at a comfortable size": "最大化窗口时,文字和控件仍保持舒适的大小"
}
},
"server": {}
"server": {
"ru": {
"Restrict new characters by custom race without changing existing characters": "Ограничивайте выбор дополнительных рас для новых персонажей, не меняя существующих",
"More class abilities, items and Pale Reach quests work as intended": "Исправлена работа ряда классовых способностей, предметов и заданий Pale Reach",
"Witch Doctor and Guardian bots use their totems and standards, and fewer casts are refused": "Боты Witch Doctor и Guardian используют тотемы и штандарты; заклинания реже отклоняются",
"Venomancer Fortitude tanks use their real defensive abilities": "Танки Venomancer Fortitude используют свои настоящие защитные способности",
"Healer bots waste fewer big heals and tank bots spread their defensives": "Лекари реже тратят мощное исцеление впустую, а танки распределяют защитные способности",
"Dungeon bots drink and rest until the tank is ready to go on": "Боты в подземельях пьют и отдыхают, пока танк не будет готов продолжить",
"Archery Rangers use Precision Shot and Brutal Shot": "Archery Ranger использует Precision Shot и Brutal Shot",
"Black Knight tank bots can pull in auto-dungeon mode": "Танк Black Knight может начинать бой в автоматическом режиме подземелий",
"Boltslinger bots use spells they actually know": "Boltslinger использует только изученные заклинания",
"Bots with unsuitable gear are refitted at login": "Боты с неподходящим снаряжением переодеваются при входе",
"Bots with full bags make room to hand in finished quests": "Боты с полными сумками освобождают место для сдачи выполненных заданий",
"Bots pick weapons and shields for their combat spells, not for enchanting recipes": "Боты подбирают оружие и щиты для боевых способностей, а не для рецептов зачарования",
"Bots get their gear repaired and stop looping to the repairer": "Боты чинят снаряжение и перестают ходить к ремонтнику по кругу",
"Bots stay out of Outland and Northrend when those are not scaled to the level cap": "Боты не отправляются в Запределье и Нордскол, если те не масштабированы под предел уровня",
"Bots plan long walks around areas too strong for them": "При дальних переходах боты обходят слишком опасные для них области",
"Dead bots run back to their bodies and come back healthy": "Погибшие боты возвращаются к телам и воскресают здоровыми",
"Meet travelling companions and rivals in dynamic open-world encounters": "Встречайте попутчиков и соперников в динамических событиях открытого мира",
"New companions respect the server's custom race restrictions": "Новые спутники соблюдают ограничения дополнительных рас сервера",
"Ranged bots no longer stand still while Auto Shot or Shoot is active": "Боты дальнего боя больше не замирают при активном Auto Shot или Shoot",
"Battleground bots no longer travel in a straight line": "Боты на полях боя больше не перемещаются по прямой",
"Far less server lag with hundreds of bots online": "Значительно снижены задержки сервера при сотнях ботов в сети",
"Inspect the mana restoration spells recognized by an online companion": "Просматривайте заклинания восстановления маны, распознанные у спутника в сети",
"Bots stop hitting mobs they cannot reach": "Боты прекращают атаковать недоступных противников",
"Bot economy errands skip groups, battlegrounds and dungeons": "Экономические поручения ботов не выполняются в группах, на полях боя и в подземельях",
"Dungeon finder fills your group with bots that really join you": "Поиск подземелий заполняет группу ботами, которые действительно присоединяются к вам",
"Stop an unfinished server startup before restoring its database": "Перед восстановлением базы данных можно остановить незавершённый запуск сервера",
"Imported 40 upstream commits with class, item and Pale Reach quest fixes, optional account-wide friends, and corrected Vanity purchases": "Включены 40 изменений апстрима: исправления классов, предметов и заданий Pale Reach, необязательные друзья на весь аккаунт и исправленные покупки Vanity"
},
"de": {
"Restrict new characters by custom race without changing existing characters": "Neue Charaktere nach zusätzlichem Volk beschränken, ohne bestehende Charaktere zu ändern",
"More class abilities, items and Pale Reach quests work as intended": "Weitere Klassenfähigkeiten, Gegenstände und Pale-Reach-Quests funktionieren korrekt",
"Witch Doctor and Guardian bots use their totems and standards, and fewer casts are refused": "Witch-Doctor- und Guardian-Bots nutzen Totems und Standarten; weniger Zauber werden abgelehnt",
"Venomancer Fortitude tanks use their real defensive abilities": "Venomancer-Fortitude-Tanks nutzen ihre tatsächlichen Defensivfähigkeiten",
"Healer bots waste fewer big heals and tank bots spread their defensives": "Heiler verschwenden weniger große Heilungen und Tanks verteilen ihre Defensivfähigkeiten",
"Dungeon bots drink and rest until the tank is ready to go on": "Dungeon-Bots trinken und ruhen, bis der Tank bereit ist",
"Archery Rangers use Precision Shot and Brutal Shot": "Archery Ranger nutzen Precision Shot und Brutal Shot",
"Black Knight tank bots can pull in auto-dungeon mode": "Black-Knight-Tanks können im automatischen Dungeonmodus Gegner heranziehen",
"Boltslinger bots use spells they actually know": "Boltslinger nutzen nur tatsächlich erlernte Zauber",
"Bots with unsuitable gear are refitted at login": "Bots mit ungeeigneter Ausrüstung werden beim Anmelden neu ausgestattet",
"Bots with full bags make room to hand in finished quests": "Bots mit vollen Taschen schaffen Platz zum Abgeben erledigter Quests",
"Bots pick weapons and shields for their combat spells, not for enchanting recipes": "Bots wählen Waffen und Schilde nach Kampffähigkeiten statt Verzauberungsrezepten",
"Bots get their gear repaired and stop looping to the repairer": "Bots reparieren Ausrüstung und laufen nicht mehr wiederholt zum Reparateur",
"Bots stay out of Outland and Northrend when those are not scaled to the level cap": "Bots meiden Scherbenwelt und Nordend, wenn diese nicht auf das Levellimit skaliert sind",
"Bots plan long walks around areas too strong for them": "Bots umgehen auf langen Wegen Gebiete mit zu starken Gegnern",
"Dead bots run back to their bodies and come back healthy": "Tote Bots kehren zu ihren Körpern zurück und werden gesund wiederbelebt",
"Meet travelling companions and rivals in dynamic open-world encounters": "Begegne reisenden Begleitern und Rivalen in dynamischen Ereignissen der offenen Welt",
"New companions respect the server's custom race restrictions": "Neue Begleiter beachten die Beschränkungen zusätzlicher Völker",
"Ranged bots no longer stand still while Auto Shot or Shoot is active": "Fernkampf-Bots bleiben bei aktivem Auto Shot oder Shoot nicht mehr stehen",
"Battleground bots no longer travel in a straight line": "Schlachtfeld-Bots bewegen sich nicht mehr geradlinig",
"Far less server lag with hundreds of bots online": "Deutlich weniger Serververzögerungen bei Hunderten aktiven Bots",
"Inspect the mana restoration spells recognized by an online companion": "Erkannte Manaregeneration-Zauber eines aktiven Begleiters anzeigen",
"Bots stop hitting mobs they cannot reach": "Bots greifen unerreichbare Gegner nicht weiter an",
"Bot economy errands skip groups, battlegrounds and dungeons": "Wirtschaftsaufgaben der Bots überspringen Gruppen, Schlachtfelder und Dungeons",
"Dungeon finder fills your group with bots that really join you": "Der Dungeonfinder füllt Gruppen mit Bots, die sich tatsächlich anschließen",
"Stop an unfinished server startup before restoring its database": "Unvollständigen Serverstart vor dem Wiederherstellen der Datenbank stoppen",
"Imported 40 upstream commits with class, item and Pale Reach quest fixes, optional account-wide friends, and corrected Vanity purchases": "40 Upstream-Änderungen mit Klassen-, Gegenstands- und Pale-Reach-Questkorrekturen, optionalen accountweiten Freunden und korrigierten Vanity-Käufen übernommen"
},
"fr": {
"Restrict new characters by custom race without changing existing characters": "Restreignez les races supplémentaires des nouveaux personnages sans modifier les personnages existants",
"More class abilities, items and Pale Reach quests work as intended": "Davantage de capacités de classe, d’objets et de quêtes de Pale Reach fonctionnent correctement",
"Witch Doctor and Guardian bots use their totems and standards, and fewer casts are refused": "Les bots Witch Doctor et Guardian utilisent leurs totems et étendards ; moins de sorts sont refusés",
"Venomancer Fortitude tanks use their real defensive abilities": "Les tanks Venomancer Fortitude utilisent leurs véritables capacités défensives",
"Healer bots waste fewer big heals and tank bots spread their defensives": "Les soigneurs gaspillent moins de gros soins et les tanks répartissent leurs défenses",
"Dungeon bots drink and rest until the tank is ready to go on": "Les bots de donjon boivent et se reposent jusqu’à ce que le tank soit prêt",
"Archery Rangers use Precision Shot and Brutal Shot": "Les Archery Rangers utilisent Precision Shot et Brutal Shot",
"Black Knight tank bots can pull in auto-dungeon mode": "Les tanks Black Knight peuvent engager les ennemis en mode donjon automatique",
"Boltslinger bots use spells they actually know": "Les Boltslingers utilisent les sorts qu’ils connaissent réellement",
"Bots with unsuitable gear are refitted at login": "Les bots mal équipés reçoivent un équipement adapté à la connexion",
"Bots with full bags make room to hand in finished quests": "Les bots aux sacs pleins font de la place pour rendre les quêtes terminées",
"Bots pick weapons and shields for their combat spells, not for enchanting recipes": "Les bots choisissent armes et boucliers selon leurs sorts de combat, pas les recettes d’enchantement",
"Bots get their gear repaired and stop looping to the repairer": "Les bots font réparer leur équipement sans retourner en boucle chez le réparateur",
"Bots stay out of Outland and Northrend when those are not scaled to the level cap": "Les bots évitent l’Outreterre et le Norfendre si leur niveau n’est pas adapté au plafond",
"Bots plan long walks around areas too strong for them": "Les bots contournent les zones trop dangereuses lors des longs trajets",
"Dead bots run back to their bodies and come back healthy": "Les bots morts rejoignent leur corps et reviennent en bonne santé",
"Meet travelling companions and rivals in dynamic open-world encounters": "Rencontrez des compagnons voyageurs et des rivaux lors d’événements dynamiques en monde ouvert",
"New companions respect the server's custom race restrictions": "Les nouveaux compagnons respectent les restrictions de races supplémentaires du serveur",
"Ranged bots no longer stand still while Auto Shot or Shoot is active": "Les bots à distance ne restent plus immobiles lorsque Auto Shot ou Shoot est actif",
"Battleground bots no longer travel in a straight line": "Les bots des champs de bataille ne se déplacent plus en ligne droite",
"Far less server lag with hundreds of bots online": "Beaucoup moins de ralentissements avec des centaines de bots connectés",
"Inspect the mana restoration spells recognized by an online companion": "Consultez les sorts de restauration de mana reconnus chez un compagnon connecté",
"Bots stop hitting mobs they cannot reach": "Les bots cessent d’attaquer les ennemis inaccessibles",
"Bot economy errands skip groups, battlegrounds and dungeons": "Les tâches économiques des bots ignorent groupes, champs de bataille et donjons",
"Dungeon finder fills your group with bots that really join you": "La recherche de donjon remplit votre groupe avec des bots qui vous rejoignent réellement",
"Stop an unfinished server startup before restoring its database": "Arrêtez un démarrage de serveur inachevé avant de restaurer sa base de données",
"Imported 40 upstream commits with class, item and Pale Reach quest fixes, optional account-wide friends, and corrected Vanity purchases": "Intégration de 40 changements amont : classes, objets et quêtes de Pale Reach corrigés, amis de compte facultatifs et achats Vanity corrigés"
},
"es": {
"Restrict new characters by custom race without changing existing characters": "Restringe las razas adicionales de personajes nuevos sin modificar los existentes",
"More class abilities, items and Pale Reach quests work as intended": "Más habilidades de clase, objetos y misiones de Pale Reach funcionan correctamente",
"Witch Doctor and Guardian bots use their totems and standards, and fewer casts are refused": "Los bots Witch Doctor y Guardian usan sus tótems y estandartes y se rechazan menos hechizos",
"Venomancer Fortitude tanks use their real defensive abilities": "Los tanques Venomancer Fortitude usan sus verdaderas habilidades defensivas",
"Healer bots waste fewer big heals and tank bots spread their defensives": "Los sanadores desperdician menos curas grandes y los tanques distribuyen sus defensivos",
"Dungeon bots drink and rest until the tank is ready to go on": "Los bots de mazmorra beben y descansan hasta que el tanque está listo",
"Archery Rangers use Precision Shot and Brutal Shot": "Los Archery Rangers usan Precision Shot y Brutal Shot",
"Black Knight tank bots can pull in auto-dungeon mode": "Los tanques Black Knight pueden iniciar combates en el modo automático de mazmorras",
"Boltslinger bots use spells they actually know": "Los Boltslingers usan hechizos que realmente conocen",
"Bots with unsuitable gear are refitted at login": "Los bots con equipo inadecuado reciben equipo apropiado al conectarse",
"Bots with full bags make room to hand in finished quests": "Los bots con bolsas llenas hacen espacio para entregar misiones completadas",
"Bots pick weapons and shields for their combat spells, not for enchanting recipes": "Los bots eligen armas y escudos por sus hechizos de combate, no por recetas de encantamiento",
"Bots get their gear repaired and stop looping to the repairer": "Los bots reparan su equipo y dejan de volver al reparador en bucle",
"Bots stay out of Outland and Northrend when those are not scaled to the level cap": "Los bots evitan Terrallende y Rasganorte si no están escalados al límite de nivel",
"Bots plan long walks around areas too strong for them": "Los bots evitan zonas demasiado peligrosas en los viajes largos",
"Dead bots run back to their bodies and come back healthy": "Los bots muertos vuelven a sus cuerpos y regresan con buena salud",
"Meet travelling companions and rivals in dynamic open-world encounters": "Encuentra compañeros viajeros y rivales en encuentros dinámicos de mundo abierto",
"New companions respect the server's custom race restrictions": "Los nuevos compañeros respetan las restricciones de razas adicionales del servidor",
"Ranged bots no longer stand still while Auto Shot or Shoot is active": "Los bots a distancia ya no se quedan inmóviles con Auto Shot o Shoot activo",
"Battleground bots no longer travel in a straight line": "Los bots de campos de batalla ya no viajan en línea recta",
"Far less server lag with hundreds of bots online": "Mucho menos lag del servidor con cientos de bots conectados",
"Inspect the mana restoration spells recognized by an online companion": "Consulta los hechizos de restauración de maná reconocidos en un compañero conectado",
"Bots stop hitting mobs they cannot reach": "Los bots dejan de atacar a enemigos inalcanzables",
"Bot economy errands skip groups, battlegrounds and dungeons": "Las tareas económicas de los bots omiten grupos, campos de batalla y mazmorras",
"Dungeon finder fills your group with bots that really join you": "El buscador de mazmorras llena tu grupo con bots que realmente se unen",
"Stop an unfinished server startup before restoring its database": "Detén un inicio de servidor incompleto antes de restaurar su base de datos",
"Imported 40 upstream commits with class, item and Pale Reach quest fixes, optional account-wide friends, and corrected Vanity purchases": "Integrados 40 cambios del proyecto original: correcciones de clases, objetos y misiones de Pale Reach, amigos opcionales de toda la cuenta y compras Vanity corregidas"
},
"zh": {
"Restrict new characters by custom race without changing existing characters": "限制新角色可选的自定义种族,不影响现有角色",
"More class abilities, items and Pale Reach quests work as intended": "修复更多职业技能、物品和 Pale Reach 任务",
"Witch Doctor and Guardian bots use their totems and standards, and fewer casts are refused": "Witch Doctor 和 Guardian 机器人会使用图腾和旗帜,施法被拒绝的情况减少",
"Venomancer Fortitude tanks use their real defensive abilities": "Venomancer Fortitude 坦克会使用实际拥有的防御技能",
"Healer bots waste fewer big heals and tank bots spread their defensives": "治疗机器人减少浪费大型治疗,坦克会错开使用防御技能",
"Dungeon bots drink and rest until the tank is ready to go on": "副本机器人会喝水和休息,直到坦克准备好继续",
"Archery Rangers use Precision Shot and Brutal Shot": "Archery Ranger 会使用 Precision Shot 和 Brutal Shot",
"Black Knight tank bots can pull in auto-dungeon mode": "Black Knight 坦克可以在自动副本模式中拉怪",
"Boltslinger bots use spells they actually know": "Boltslinger 只会使用实际学会的法术",
"Bots with unsuitable gear are refitted at login": "装备不合适的机器人会在登录时更换装备",
"Bots with full bags make room to hand in finished quests": "背包已满的机器人会腾出空间以提交已完成的任务",
"Bots pick weapons and shields for their combat spells, not for enchanting recipes": "机器人根据战斗法术选择武器和盾牌,而不是根据附魔配方",
"Bots get their gear repaired and stop looping to the repairer": "机器人会修理装备,不再反复往返修理商",
"Bots stay out of Outland and Northrend when those are not scaled to the level cap": "如果外域和诺森德未缩放到等级上限,机器人会避开这些地区",
"Bots plan long walks around areas too strong for them": "机器人长途行走时会绕开过于危险的区域",
"Dead bots run back to their bodies and come back healthy": "死亡的机器人会跑回尸体并以健康状态复活",
"Meet travelling companions and rivals in dynamic open-world encounters": "在动态开放世界事件中遇见旅行伙伴和对手",
"New companions respect the server's custom race restrictions": "新伙伴会遵守服务器的自定义种族限制",
"Ranged bots no longer stand still while Auto Shot or Shoot is active": "远程机器人不再因 Auto Shot 或 Shoot 启用而原地不动",
"Battleground bots no longer travel in a straight line": "战场机器人不再沿直线移动",
"Far less server lag with hundreds of bots online": "数百个机器人在线时,服务器延迟显著降低",
"Inspect the mana restoration spells recognized by an online companion": "查看在线伙伴所识别的法力恢复法术",
"Bots stop hitting mobs they cannot reach": "机器人会停止攻击无法接近的敌人",
"Bot economy errands skip groups, battlegrounds and dungeons": "机器人的经济事务会跳过队伍、战场和副本",
"Dungeon finder fills your group with bots that really join you": "地下城查找器会用真正加入队伍的机器人补齐队伍",
"Stop an unfinished server startup before restoring its database": "恢复数据库前可以停止尚未完成的服务器启动",
"Imported 40 upstream commits with class, item and Pale Reach quest fixes, optional account-wide friends, and corrected Vanity purchases": "合入 40 项上游更改:职业、物品及 Pale Reach 任务修复,可选的账号共享好友,以及 Vanity 购买修复"
}
}
}
File diff suppressed because it is too large. Load diff
+7 -2
View File
@@ -25,9 +25,14 @@ export {};
notes:["worldserver.exe differs from the one listed in RELEASE.json (release 2026-09-11); this looks like a customised build."],modifies_files:false};
const svc=(n: string,p: number,st: string)=>({name:n,state:st,pid:st==="running"?100:null,port:p,port_ready:st==="running",conflict:null,uptime_secs:st==="running"?4206:null});
{ const q = new URLSearchParams(location.search); const w0 = window as any; if (q.get("client")) w0.__client = q.get("client"); if (q.get("modified")) w0.__modified = true; }
(window as any).__TAURI_EVENT_PLUGIN_INTERNALS__ = { unregisterListener() {} };
(window as any).__TAURI_INTERNALS__ = {
transformCallback: (cb: unknown)=>cb, unregisterCallback(){}, convertFileSrc:(x: unknown)=>x,
invoke: async (cmd: string, args?: any)=>{
if(cmd==="open_link") return null;
if(cmd==="pending_update") return null;
if(cmd==="plugin:app|version") return "0.8.2";
if(cmd==="release_history") throw new Error("Offline demo: using bundled notes");
if(cmd==="realm_profiles") return {active:realm,wildcard_created:wildcardCreated,reborn_created:rebornCreated,reborn_supported:true,supported:true,recovery_pending:false,simultaneous,secondary_world_port:simultaneous?8086:null,secondary_running:simultaneous&&running,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:withReborn&&running};
if(cmd==="realm_simultaneous") { if(running) throw new Error("Stop both realms before changing simultaneous startup."); simultaneous=args.enabled; wildcardCreated ||= simultaneous; return {active:realm,wildcard_created:wildcardCreated,reborn_created:rebornCreated,reborn_supported:true,supported:true,recovery_pending:false,simultaneous,secondary_world_port:simultaneous?8086:null,secondary_running:false,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:false}; }
if(cmd==="realm_with_reborn") { if(running) throw new Error("Stop all realms before changing which realms start together."); withReborn=args.enabled; rebornCreated ||= withReborn; return {active:realm,wildcard_created:wildcardCreated,reborn_created:rebornCreated,reborn_supported:true,supported:true,recovery_pending:false,simultaneous,secondary_world_port:simultaneous?8086:null,secondary_running:false,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:false}; }
@@ -49,8 +54,8 @@ export {};
if(cmd==="preview_preset"){const a=args;const sc=a.scope==="server"?serverSchema:botsSchema;const pr=(a.scope==="server"?serverPresets:botsPresets).presets as any[];const p=pr.find(x=>x.id===a.preset)??{id:a.preset??"defaults",title:"Recommended defaults",description:"Every setting returns to its default value."};const st=(sc.settings as any[]).filter(x=>x.type==="int"||x.type==="float"||x.type==="enum").slice(0,3);return {id:p.id,title:p.title,description:p.description,changes:st.map(x=>({key:x.key,title:x.title,from:x.default,to:x.type==="enum"?(x.options?.[1]?.value??x.default):(Number(x.default)||1)*2,dangerous:false}))};}
if(cmd==="companion_sizes") return {hardware:{cores:16,ram_gb:31,free_ram_gb:12},sizes:[{id:"small",title:"Small",bots:50,warning:null},{id:"medium",title:"Medium",bots:250,warning:null},{id:"large",title:"Large",bots:500,warning:"500 companions may need more CPU and memory than this computer has (8 cores, 16 GB)."}]};
if(cmd==="add_companions"){const base=(window as any).__bots??85;(window as any).__target=base+args.count;return {spawned:"queued",created:null,baseline:base};}
if(cmd==="check_update") return {from_version:(window as any).__updated?"0.261001.8":"0.260930.5",to_version:"0.261001.8",items:[],conflicts:[],migrations:5,pending_migrations:(window as any).__updated?0:5,download_bytes:6000000};
if(cmd==="apply_update"){const w=window as any;for(let i=1;i<=8;i++){await new Promise((r: any)=>setTimeout(r,700));(w.__handlers?.["update-progress"]??[]).forEach((h: any)=>h({event:"update-progress",id:1,payload:{step:i<4?"Downloading the update":i<7?"Applying the update":"Finishing",percent:i*12}}));}(window as any).__updated=true;return {txn:{state:"committed",to_version:"0.261001.8"},migrations:null};}
if(cmd==="check_update") return {from_version:(window as any).__updated?"0.261028.83":"0.261026.81",to_version:"0.261028.83",items:[],conflicts:[],migrations:5,pending_migrations:(window as any).__updated?0:5,download_bytes:6000000};
if(cmd==="apply_update"){const w=window as any;for(let i=1;i<=8;i++){await new Promise((r: any)=>setTimeout(r,700));(w.__handlers?.["update-progress"]??[]).forEach((h: any)=>h({event:"update-progress",id:1,payload:{step:i<4?"Downloading the update":i<7?"Applying the update":"Finishing",percent:i*12}}));}(window as any).__updated=true;return {txn:{state:"committed",to_version:"0.261028.83"},migrations:null};}
if(cmd==="get_population"){if(!running) return null;let b=(window as any).__bots??85;const t=(window as any).__target??0;if(t>b){b=Math.min(t,b+25);(window as any).__bots=b;}return {online_total:b,bots_online:Math.max(0,b-7),players_online:0,bots_total:b};}
if(cmd==="get_performance") return running?{mean_ms:14,median_ms:15,p95_ms:24,p99_ms:30,max_ms:61,ticks_per_sec:71.4}:null;
if(cmd==="run_diagnostics") return {problems:2,checks:[{id:"files",title:"Server files",level:"ok",detail:"All expected server parts were found."},{id:"world",title:"World server",level:"warn",detail:"Not running."},{id:"disk",title:"Free disk space",level:"warn",detail:"Only 3 GB free; backups and updates need room."},{id:"exposure",title:"Private services",level:"ok",detail:"Database and server console are not reachable from the network."}]};
+26
View File
@@ -3,6 +3,32 @@ import type en from "./en";
/** Deutsch. Entwurf einer Übersetzung; vor der Veröffentlichung von Muttersprachlern zu prüfen. */
const de: Partial<Record<keyof typeof en, string>> = {
"upd.preexistingCharacters": "Bereits vor dem Update fehlten bei {n} Charakterdatensätzen die Startdaten für Volk/Klasse. Unveränderte Datensätze wurden bewahrt und blockierten das Update nicht. Details stehen in der Diagnose; diese älteren Unstimmigkeiten wurden nicht automatisch behoben.",
"settings.autoManager": "Updates im Hintergrund herunterladen",
"settings.startServer": "Nach dem Update starten",
"settings.version": "Version {v}",
"settings.startupHelp": "Details zum Start",
"settings.section.updates": "Updates",
"settings.section.startup": "Start",
"settings.section.client": "Client und Dateien",
"settings.section.service": "Wartung",
"settings.section.interface": "Oberfläche",
"settings.organized": "Updates, Serverstart und Spieldateien verwalten",
"settings.clientLink": "Clientdateien und Spieldaten",
"history.title": "Änderungsverlauf",
"history.open": "Was sich ändert",
"history.server": "Server",
"history.manager": "Manager",
"history.all": "Alle Versionen",
"history.range": "Für dieses Update",
"history.language": "Sprache der Einträge",
"history.fallback": "Englisches Original: Diese Version wurde noch nicht übersetzt",
"history.empty": "Für dieses Update sind noch keine Einträge veröffentlicht",
"history.files": "Dateiänderungen",
"history.offline": "Gespeicherter Verlauf · offline verfügbar",
"history.refreshed": "Veröffentlichter Verlauf aktualisiert",
"history.experimental": "Portable Charaktere sind experimentell. Sichere deine Charaktere vor der Verwendung.",
"settings.attention": "Ein Update erfordert Aufmerksamkeit. Öffne Updates für die Wiederherstellungsoptionen.",
"races.unknownIds": "Nicht mehr im Katalog vorhandene Völker-IDs: {ids}. Beim Speichern werden diese alten Einschränkungen entfernt.",
"races.reviewCatalog": "Der Völkerkatalog wurde geändert oder noch nicht geprüft. Prüfe die Liste und speichere sie erneut.",
+27 -1
View File
@@ -1,6 +1,32 @@
/** English is the source of truth: every key must exist here; other locales fall back to it. */
const en = {
"upd.preexistingCharacters": "Before the update, {n} character records already lacked race/class starting data. Unchanged records were preserved and did not block the update. Details are saved in diagnostics; these older inconsistencies have not been automatically repaired.",
"settings.autoManager": "Download updates in the background",
"settings.startServer": "Start after updating",
"settings.version": "Version {v}",
"settings.startupHelp": "Startup details",
"settings.section.updates": "Updates",
"settings.section.startup": "Startup",
"settings.section.client": "Client and files",
"settings.section.service": "Maintenance",
"settings.section.interface": "Interface",
"settings.organized": "Manage updates, startup and your game files",
"settings.clientLink": "Client files and game data",
"history.title": "Release history",
"history.open": "What changed",
"history.server": "Server",
"history.manager": "Manager",
"history.all": "All versions",
"history.range": "For this update",
"history.language": "Notes language",
"history.fallback": "Original English notes: this release has not been translated yet",
"history.empty": "No published notes for this update",
"history.files": "File changes",
"history.offline": "Saved release history · available offline",
"history.refreshed": "Published notes refreshed",
"history.experimental": "Portable Characters is experimental. Back up your characters before using it.",
"settings.attention": "An update needs attention. Open Updates to review recovery options.",
"races.unknownIds": "RaceIDs no longer in this catalog: {ids}. Saving the reviewed list removes these old restrictions.",
"races.reviewCatalog": "The race catalog changed or has not been verified. Review the list and save it before applying restrictions.",
@@ -1125,7 +1151,7 @@ const en = {
"browse.offlineWarning": "The server is currently offline. Joining with a portable character will become available once the host starts the server.",
"browse.play": "Play",
"browse.playSoon": "Joining arrives with the account support of the next step.",
"registry.title": "Public listing",
"registry.title": "Public realms",
"registry.dialogTitle": "Public listing · {realm}",
"registry.publishAll": "Publish all realms",
"registry.publishAllText": "One description, language and region for every realm that is not listed yet. Each realm is listed under the server name; the realms that start next to the main one get their realm name added.",
+26
View File
@@ -3,6 +3,32 @@ import type en from "./en";
/** Español. Traducción provisional; debe revisarla un hablante nativo antes de publicarse. */
const es: Partial<Record<keyof typeof en, string>> = {
"upd.preexistingCharacters": "Antes de actualizar, a {n} registros de personaje ya les faltaban datos iniciales de raza/clase. Los registros sin cambios se conservaron y no bloquearon la actualización. Los detalles están en el diagnóstico; estas inconsistencias anteriores no se repararon automáticamente.",
"settings.autoManager": "Descargar actualizaciones en segundo plano",
"settings.startServer": "Iniciar tras actualizar",
"settings.version": "Versión {v}",
"settings.startupHelp": "Detalles del inicio",
"settings.section.updates": "Actualizaciones",
"settings.section.startup": "Inicio",
"settings.section.client": "Cliente y archivos",
"settings.section.service": "Mantenimiento",
"settings.section.interface": "Interfaz",
"settings.organized": "Gestiona actualizaciones, inicio y archivos del juego",
"settings.clientLink": "Archivos del cliente y datos del juego",
"history.title": "Historial de cambios",
"history.open": "Qué cambia",
"history.server": "Servidor",
"history.manager": "Manager",
"history.all": "Todas las versiones",
"history.range": "Para esta actualización",
"history.language": "Idioma de las notas",
"history.fallback": "Original en inglés: esta versión aún no está traducida",
"history.empty": "No hay notas publicadas para esta actualización",
"history.files": "Cambios en archivos",
"history.offline": "Historial guardado · disponible sin conexión",
"history.refreshed": "Historial publicado actualizado",
"history.experimental": "Los personajes portátiles son experimentales. Haz una copia de seguridad de tus personajes antes de usarlos.",
"settings.attention": "Una actualización requiere atención. Abre Actualizaciones para ver las opciones de recuperación.",
"races.unknownIds": "RaceID que ya no están en el catálogo: {ids}. Al guardar la lista revisada se eliminan estas restricciones antiguas.",
"races.reviewCatalog": "El catálogo de razas ha cambiado o aún no está verificado. Revisa la lista y guárdala.",
+26
View File
@@ -3,6 +3,32 @@ import type en from "./en";
/** Français. Traduction provisoire ; à faire relire par un locuteur natif avant la publication. */
const fr: Partial<Record<keyof typeof en, string>> = {
"upd.preexistingCharacters": "Avant la mise à jour, {n} fiches de personnage n’avaient déjà pas de données de départ pour leur race/classe. Les fiches inchangées ont été conservées sans bloquer la mise à jour. Les détails sont dans le diagnostic ; ces incohérences anciennes n’ont pas été corrigées automatiquement.",
"settings.autoManager": "Télécharger les mises à jour en arrière-plan",
"settings.startServer": "Démarrer après la mise à jour",
"settings.version": "Version {v}",
"settings.startupHelp": "Détails du démarrage",
"settings.section.updates": "Mises à jour",
"settings.section.startup": "Démarrage",
"settings.section.client": "Client et fichiers",
"settings.section.service": "Maintenance",
"settings.section.interface": "Interface",
"settings.organized": "Gérer les mises à jour, le démarrage et les fichiers du jeu",
"settings.clientLink": "Fichiers du client et données du jeu",
"history.title": "Historique des changements",
"history.open": "Ce qui change",
"history.server": "Serveur",
"history.manager": "Manager",
"history.all": "Toutes les versions",
"history.range": "Pour cette mise à jour",
"history.language": "Langue des notes",
"history.fallback": "Original anglais : cette version n’est pas encore traduite",
"history.empty": "Aucune note publiée pour cette mise à jour",
"history.files": "Fichiers modifiés",
"history.offline": "Historique enregistré · disponible hors ligne",
"history.refreshed": "Historique publié actualisé",
"history.experimental": "Les personnages portables sont expérimentaux. Sauvegardez vos personnages avant utilisation.",
"settings.attention": "Une mise à jour nécessite votre attention. Ouvrez Mises à jour pour les options de récupération.",
"races.unknownIds": "RaceID absents de ce catalogue : {ids}. Sauvegarder la liste vérifiée supprime ces anciennes restrictions.",
"races.reviewCatalog": "Le catalogue des races a changé ou n’a pas été vérifié. Vérifiez la liste et sauvegardez-la.",
+27 -1
View File
@@ -3,6 +3,32 @@ import type en from "./en";
/** Русский. Черновой перевод; требует проверки носителем перед релизом. */
const ru: Partial<Record<keyof typeof en, string>> = {
"upd.preexistingCharacters": "До обновления у {n} записей персонажей уже отсутствовали стартовые данные расы/класса. Неизменившиеся записи сохранены и не заблокировали обновление. Подробности есть в диагностике; эти старые несоответствия автоматически не исправлялись.",
"settings.autoManager": "Скачивать обновления в фоне",
"settings.startServer": "Запустить после обновления",
"settings.version": "Версия {v}",
"settings.startupHelp": "Подробнее о запуске",
"settings.section.updates": "Обновления",
"settings.section.startup": "Запуск",
"settings.section.client": "Клиент и файлы",
"settings.section.service": "Обслуживание",
"settings.section.interface": "Интерфейс",
"settings.organized": "Обновления, запуск сервера и файлы игры",
"settings.clientLink": "Файлы клиента и игровые данные",
"history.title": "История изменений",
"history.open": "Что изменится",
"history.server": "Сервер",
"history.manager": "Manager",
"history.all": "Все версии",
"history.range": "К обновлению",
"history.language": "Язык записей",
"history.fallback": "Английский оригинал: этот выпуск пока не переведён",
"history.empty": "Для этого обновления пока нет опубликованных записей",
"history.files": "Изменения файлов",
"history.offline": "Сохранённая история · доступна без сети",
"history.refreshed": "Опубликованная история обновлена",
"history.experimental": "Переносимые персонажи — экспериментальная функция. Перед использованием сохраните резервную копию персонажей.",
"settings.attention": "Обновление требует внимания. Откройте «Обновления», чтобы выбрать способ восстановления.",
"races.unknownIds": "RaceID, которых больше нет в каталоге: {ids}. Сохранение проверенного списка удалит эти старые ограничения.",
"races.reviewCatalog": "Каталог рас изменился или ещё не проверен. Проверьте список и сохраните его перед применением ограничений.",
@@ -1107,7 +1133,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"browse.offlineWarning": "Сервер сейчас не запущен хостом. Игра переносимым персонажем станет доступна, когда владелец включит сервер.",
"browse.play": "Играть",
"browse.playSoon": "Вход на сервер появится вместе с поддержкой аккаунтов на следующем шаге.",
"registry.title": "Публичный список",
"registry.title": "Публичные реалмы",
"registry.dialogTitle": "Публичный список · {realm}",
"registry.publishAll": "Опубликовать все реалмы",
"registry.publishAllText": "Одно описание, язык и регион для каждого реалма, которого ещё нет в списке. Реалмы публикуются под названием сервера; к реалмам, которые запускаются рядом с основным, добавляется название реалма.",
+26
View File
@@ -1,6 +1,32 @@
/** Simplified Chinese localization (zh-CN) */
const zh = {
"upd.preexistingCharacters": "更新前已有 {n} 条角色记录缺少种族/职业初始数据。未变化的记录已保留,不会阻止更新。详情已保存到诊断报告;这些既有问题尚未自动修复。",
"settings.autoManager": "在后台下载更新",
"settings.startServer": "更新后启动",
"settings.version": "版本 {v}",
"settings.startupHelp": "启动详情",
"settings.section.updates": "更新",
"settings.section.startup": "启动",
"settings.section.client": "客户端与文件",
"settings.section.service": "维护",
"settings.section.interface": "界面",
"settings.organized": "管理更新、服务器启动与游戏文件",
"settings.clientLink": "客户端文件与游戏数据",
"history.title": "更新日志",
"history.open": "更新内容",
"history.server": "服务器",
"history.manager": "Manager",
"history.all": "所有版本",
"history.range": "本次更新",
"history.language": "日志语言",
"history.fallback": "英文原文:此版本尚未翻译",
"history.empty": "本次更新暂无已发布的日志",
"history.files": "文件变更",
"history.offline": "已保存的日志 · 离线可用",
"history.refreshed": "已刷新发布日志",
"history.experimental": "可携带角色功能仍处于实验阶段。使用前请备份角色。",
"settings.attention": "某次更新需要处理。请打开“更新”查看恢复选项。",
"races.unknownIds": "此目录中已不存在的种族 ID:{ids}。保存检查后的列表将移除这些旧限制。",
"races.reviewCatalog": "种族目录已更改或尚未验证。请检查列表并保存后再应用限制。",
+3 -3
View File
@@ -16,10 +16,10 @@
--font-sans: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}
/* Everything is sized in rem, so scaling the root font grows the whole interface with the window
(16px up to about 1280px wide, then gradually larger; capped at 26px). */
/* Window size changes layout, not UI density. Keep rem tied to the user's default
font size; browser zoom and operating-system display scaling still apply. */
html {
font-size: clamp(16px, calc(0.75vw + 6.4px), 26px);
font-size: 100%;
}
html,
+16
View File
@@ -0,0 +1,16 @@
import manager from "../../changelog/history.json";
import server from "@/data/server-history.json";
import translations from "@/data/latest-note-translations.json";
import type { Locale } from "@/i18n";
import { localizeNotes, type Component, type History, type Release } from "./releaseHistoryModel";
export { compareVersions, releasesForUpdate } from "./releaseHistoryModel";
export type { Component, History } from "./releaseHistoryModel";
export const bundledHistories: Record<Component, History> = { manager: manager as History, server: server as History };
export const repositories = { manager: "Corfirean/coa-server-manager", server: "Corfirean/coa-server-build" };
export function translatedNotes(component: Component, release: Release, locale: Locale): { notes: string[]; fallback: boolean } {
if (locale === "en") return { notes: release.notes, fallback: false };
const dict = (translations[component] as Record<string, Record<string, string>>)[locale] ?? {};
return localizeNotes(release.notes, dict);
}
+23
View File
@@ -0,0 +1,23 @@
export type Component = "server" | "manager";
export interface Release { version: string; tag: string; date: string; notes: string[]; prerelease?: boolean; experimentalFeatures?: string[] }
export interface History { component: Component; releases: Release[]; source?: "remote" | "cache" }
// Only stable numeric versions participate in an installed-to-target update range.
export function compareVersions(a: string, b: string): number {
const aa = a.split(".").map(Number), bb = b.split(".").map(Number);
for (let i = 0; i < Math.max(aa.length, bb.length); i++) {
const d = (aa[i] ?? 0) - (bb[i] ?? 0);
if (d) return d;
}
return 0;
}
export function releasesForUpdate(releases: Release[], from?: string, to?: string): Release[] {
if (!to || !/^\d+(\.\d+)+$/.test(to)) return [];
const knownFrom = from && /^\d+(\.\d+)+$/.test(from);
return releases.filter(r => !r.prerelease && /^\d+(\.\d+)+$/.test(r.version) &&
(knownFrom ? compareVersions(r.version, from) > 0 && compareVersions(r.version, to) <= 0 : r.version === to));
}
export function localizeNotes(notes: string[], dictionary: Record<string, string> = {}) {
const complete = notes.every(note => dictionary[note]);
return { notes: complete ? notes.map(note => dictionary[note]) : notes, fallback: !complete };
}
+11 -33
View File
@@ -1,12 +1,12 @@
import { useEffect, useState } from "react";
import { getVersion } from "@tauri-apps/api/app";
import { Loader2 } from "lucide-react";
import { Loader2, RefreshCw, Monitor } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { useT } from "@/i18n";
import { autoUpdateEnabled, installNow, lookForUpdate, setAutoUpdate, useSelfUpdate } from "@/lib/selfUpdate";
export function AboutCard() {
export function AboutCard({ onHistory }: { onHistory?: () => void }) {
const t = useT();
const s = useSelfUpdate();
const [version, setVersion] = useState("");
@@ -21,37 +21,12 @@ export function AboutCard() {
return (
<Card className="mt-6 p-6">
<h2 className="font-semibold">{t("app.name")}</h2>
<p className="mt-1 text-sm text-muted">{t("about.version", { v: version || "…" })}</p>
<label className="mt-3 flex cursor-pointer items-start gap-2 text-sm">
<input
type="checkbox"
className="mt-1"
checked={auto}
onChange={(e) => {
setAuto(e.target.checked);
setAutoUpdate(e.target.checked);
}}
/>
<span>
{t("about.auto")}
<span className="block text-xs text-muted">{t("about.autoHint")}</span>
</span>
</label>
<div className="flex items-start justify-between gap-3">
<div><h2 className="flex items-center gap-2 font-semibold"><Monitor className="h-4 w-4 text-gold" aria-hidden />{t("history.manager")}</h2><p className="mt-2 text-sm text-muted">{t("settings.version", { v: version || "…" })}</p></div>
<Button size="sm" disabled={busy} aria-label={t("about.check")} title={t("about.check")} onClick={() => { setAsked(true); void lookForUpdate({ download: false }); }}><RefreshCw className={`h-4 w-4 ${s.phase === "checking" ? "animate-spin" : ""}`} aria-hidden /></Button>
</div>
<p className="mt-3 text-xs text-muted">{t("about.autoHint")}</p>
<div className="mt-4 flex flex-wrap items-center gap-3">
<Button
size="sm"
disabled={busy}
onClick={() => {
setAsked(true);
void lookForUpdate({ download: false });
}}
>
{s.phase === "checking" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("about.check")}
</Button>
{s.version && s.phase !== "current" && (
<Button size="sm" variant="primary" disabled={busy} onClick={() => void installNow()}>
{(s.phase === "downloading" || s.phase === "installing") && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
@@ -64,7 +39,7 @@ export function AboutCard() {
</span>
)}
</div>
{s.version && s.notes && s.phase !== "current" && <p className="mt-3 whitespace-pre-line text-sm text-muted">{s.notes}</p>}
{onHistory ? <button className="mt-3 cursor-pointer text-sm text-gold hover:underline" onClick={onHistory}>{t(s.version && s.phase !== "current" ? "history.open" : "history.title")}</button> : s.version && s.notes && s.phase !== "current" && <p className="mt-3 whitespace-pre-line text-sm text-muted">{s.notes}</p>}
{s.phase === "ready" && <p className="mt-3 text-sm text-ok" role="status">{t("selfupd.onClose")}</p>}
{asked && s.phase === "current" && <p className="mt-3 text-sm text-ok" role="status">{t("about.upToDate")}</p>}
{s.phase === "error" && (
@@ -73,6 +48,9 @@ export function AboutCard() {
{s.error && <p className="selectable mt-1 break-all text-xs text-muted">{s.error}</p>}
</div>
)}
<label className="mt-5 flex cursor-pointer items-center justify-between gap-3 border-t border-line pt-4 text-sm" title={t("about.auto")}>
<span>{t("settings.autoManager")}</span><input type="checkbox" role="switch" aria-description={t("about.auto")} checked={auto} onChange={e => { setAuto(e.target.checked); setAutoUpdate(e.target.checked); }} className="h-4 w-4 accent-[#c9a24a]" />
</label>
</Card>
);
}
+13 -26
View File
@@ -15,6 +15,7 @@ import { PublishRealmDialog } from "@/screens/PublishDialog";
import { useRegistryStatus } from "@/lib/registry";
import { usePublishRealms, type PublishRealm } from "@/lib/publishRealms";
import { useAutoRestart } from "@/lib/autoRestartPrefs";
import { SplitButton } from "@/components/ui/split-button";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
@@ -410,32 +411,21 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
<div className="mt-7 flex flex-wrap items-center gap-x-4 gap-y-3">
{running ? (
<Button variant="secondary" size="xl" disabled={transitioning} onClick={() => run("stopping")} className="min-w-56">
<Button variant="secondary" size="xl" disabled={transitioning} onClick={() => run("stopping")} className="min-w-40">
{transitioning && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />}
{t("btn.stop")}
</Button>
) : upd.available ? (
<Button
variant="primary"
size="xl"
disabled={transitioning || upd.applying}
onClick={() => (needsDecision ? onOpenUpdates() : void runServerUpdate())}
className="min-w-56"
>
{upd.applying && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />}
{upd.applying ? t("btn.updating") : needsDecision ? t("overview.openUpdates") : t("btn.update")}
</Button>
<SplitButton label={t("overview.server")}
primary={{ disabled: transitioning || upd.applying, onClick: () => (needsDecision ? onOpenUpdates() : void runServerUpdate()), children: <>{upd.applying && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}{upd.applying ? t("btn.updating") : needsDecision ? t("overview.openUpdates") : t("btn.update")}</> }}
secondary={{ disabled: transitioning || upd.applying, onClick: () => run("starting"), children: t("btn.startWithoutUpdate") }}
/>
) : (
<Button variant="primary" size="xl" disabled={transitioning} onClick={() => run("starting")} className="min-w-56">
<Button variant="primary" size="xl" disabled={transitioning} onClick={() => run("starting")} className="min-w-40">
{transitioning && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />}
{transitioning ? (action === "stopping" ? t("btn.stoppingCaps") : t("btn.startingCaps")) : t("btn.start")}
</Button>
)}
{!running && upd.available && (
<Button variant="secondary" size="sm" disabled={transitioning || upd.applying} onClick={() => run("starting")}>
{t("btn.startWithoutUpdate")}
</Button>
)}
{running && (
<Button variant="ghost" size="sm" disabled={transitioning || upd.applying} onClick={() => run("restarting")}>
{t("btn.restart")}
@@ -456,7 +446,7 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
{client && <RealmlistMenu serverId={server.id} />}
{client && jobBusy ? (
<div
className="relative flex h-16 min-w-64 items-center overflow-hidden rounded-md border border-gold/50 bg-card-2"
className="relative flex h-12 min-w-64 items-center overflow-hidden rounded-md border border-gold/50 bg-card-2"
role="progressbar"
aria-valuenow={jobPct}
aria-valuemin={0}
@@ -482,9 +472,10 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
</button>
</div>
) : client && (clientStatus?.update_available || job.phase === "choose") ? (
<Button variant="primary" size="xl" disabled={playing || job.phase === "choose"} onClick={() => void startClientUpdate(server.id)} className="min-w-40">
{t("btn.updateClient")}
</Button>
<SplitButton label={t("btn.play")}
primary={{ disabled: playing || job.phase === "choose", onClick: () => void startClientUpdate(server.id), children: t("btn.updateClient") }}
secondary={{ disabled: realmBusy || playing || upd.applying, onClick: () => void play(), children: <>{playing && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}{t("btn.playWithoutUpdate")}</> }}
/>
) : client ? (
<Button variant="primary" size="xl" disabled={realmBusy || playing} onClick={() => void play()} className="min-w-40">
{playing && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />}
@@ -495,11 +486,6 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
{t("btn.setupClient")}
</Button>
) : null}
{client && !jobBusy && (clientStatus?.update_available || job.phase === "choose") && (
<Button variant="secondary" size="sm" disabled={realmBusy || playing || upd.applying} onClick={() => void play()}>
{t("btn.playWithoutUpdate")}
</Button>
)}
</div>
</div>
<div className="mt-6 flex flex-wrap items-center justify-between gap-3 border-t border-line/60 pt-4 text-xs text-muted">
@@ -559,6 +545,7 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
<div className="mt-4 rounded-md border border-gold/40 bg-gold/5 p-3 text-sm">
<p>{t("overview.updateAvail", { to: upd.preview.to_version, from: upd.preview.from_version ?? "?" })}</p>
{upd.preview.latest_version && <p>{t("upd.intermediate", { to: upd.preview.to_version, latest: upd.preview.latest_version })}</p>}
<button className="mt-2 cursor-pointer text-gold hover:underline" onClick={onOpenUpdates}>{t("history.open")}</button>
{needsDecision && <p className="mt-1 text-muted">{t("overview.updateConflicts")}</p>}
{upd.applying && (
<div className="mt-2">
+3 -2
View File
@@ -2,10 +2,11 @@ import { useState } from "react";
import { Globe, Network } from "lucide-react";
import { useT } from "@/i18n";
import { cn } from "@/lib/utils";
import { PublishCard } from "./PublishCard";
import { BrowsePage } from "@/screens/BrowsePage";
import { FriendsPage } from "@/screens/FriendsPage";
export function PlayWithFriends({ serverId }: { serverId: string; path?: string }) {
export function PlayWithFriends({ serverId, serverName = "" }: { serverId: string; serverName?: string; path?: string }) {
const t = useT();
const [tab, setTab] = useState<"servers" | "lan">("servers");
@@ -38,7 +39,7 @@ export function PlayWithFriends({ serverId }: { serverId: string; path?: string
</button>
</div>
{tab === "servers" && <BrowsePage />}
{tab === "servers" && <><PublishCard serverId={serverId} serverName={serverName} /><BrowsePage /></>}
{tab === "lan" && <FriendsPage serverId={serverId} />}
</div>
);
+1 -1
View File
@@ -33,7 +33,7 @@ export function RealmStartupSettings({ serverId }: { serverId: string }) {
{view?.with_reborn && <p className="mt-1 text-sm text-muted">{t("realm.rebornPort", { port: view.reborn_world_port ?? "—" })}</p>}
{view && view.active !== "coa" && !view.with_reborn && <p className="mt-1 text-sm text-warn">{t("realm.rebornNeedsCoa")}</p>}
{view?.simultaneous && view.with_reborn && <p className="mt-3 text-sm">{t("realm.allThree")}</p>}
<p className="mt-3 text-sm text-muted">{t("realm.simultaneousHint")}</p>
<details className="mt-4 text-sm text-muted"><summary className="cursor-pointer">{t("settings.startupHelp")}</summary><p className="mt-2 leading-relaxed">{t("realm.simultaneousHint")}</p></details>
{busy && <p className="mt-2 text-sm" role="status">{t("realm.preparing")}</p>}
{error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>}
</Card>;
+1 -1
View File
@@ -92,7 +92,7 @@ export function RealmlistMenu({ serverId, className }: { serverId: string; class
onClick={() => setOpen((v) => !v)}
aria-haspopup="menu"
aria-expanded={open}
className="flex h-16 cursor-pointer items-center gap-3 rounded-md border border-line bg-card-2 px-4 text-left transition-colors hover:border-gold/50"
className="flex h-12 cursor-pointer items-center gap-3 rounded-md border border-line bg-card-2 px-4 text-left transition-colors hover:border-gold/50"
>
<span>
<span className="block text-[11px] uppercase tracking-wide text-muted">{t("realm.label")}</span>
+76
View File
@@ -0,0 +1,76 @@
import { useEffect, useRef, useState } from "react";
import { invoke } from "@tauri-apps/api/core";
import { getVersion } from "@tauri-apps/api/app";
import { useI18n, LOCALES, type Locale } from "@/i18n";
import { useSelfUpdate } from "@/lib/selfUpdate";
import { bundledHistories, compareVersions, releasesForUpdate, repositories, translatedNotes, type Component, type History } from "@/lib/releaseHistory";
import { api } from "@/lib/api";
import { Card } from "@/components/ui/card";
export interface HistorySelection { component: Component; from?: string; to?: string }
export function ReleaseHistory({ selection, onSelect }: { selection: HistorySelection; onSelect: (selection: HistorySelection) => void }) {
const { locale, t } = useI18n();
const [language, setLanguage] = useState<Locale>(locale);
const [feeds, setFeeds] = useState(bundledHistories);
const [fresh, setFresh] = useState<Partial<Record<Component, boolean>>>({});
const [mode, setMode] = useState<"all" | "range">("all");
const [selected, setSelected] = useState("");
const [installed, setInstalled] = useState<string>();
const updater = useSelfUpdate();
const { component } = selection;
const lastServer = useRef<HistorySelection>({ component: "server" });
const [linkError, setLinkError] = useState<string>();
useEffect(() => { if (component === "server") lastServer.current = selection; setLinkError(undefined); }, [selection, component]);
const target = component === "manager" ? updater.version : selection.to;
const from = component === "manager" ? installed : selection.from;
useEffect(() => setLanguage(locale), [locale]);
useEffect(() => { void getVersion().then(setInstalled).catch(() => {}); }, []);
useEffect(() => {
setSelected("");
setMode(selection.to || (component === "manager" && updater.version) ? "range" : "all");
}, [selection, component, updater.version]);
useEffect(() => {
let live = true;
void invoke<History>("release_history", { component }).then(feed => {
if (live && feed.component === component && Array.isArray(feed.releases)) {
setFeeds(previous => ({ ...previous, [component]: feed }));
setFresh(previous => ({ ...previous, [component]: feed.source === "remote" }));
}
}).catch(() => {}); // Bundled reviewed notes remain visible offline.
return () => { live = false; };
}, [component]);
const releases = [...(mode === "range" ? releasesForUpdate(feeds[component].releases, from, target) : feeds[component].releases)]
.sort((a, b) => compareVersions(b.version.split("-")[0], a.version.split("-")[0]) || b.date.localeCompare(a.date));
const record = releases.find(r => r.version === selected) ?? releases[0];
const notes = record ? translatedNotes(component, record, language) : undefined;
return <Card id="release-history" tabIndex={-1} className="mt-6 scroll-mt-4 overflow-hidden">
<div className="flex flex-wrap items-center justify-between gap-4 border-b border-line p-5">
<h2 className="font-semibold">{t("history.title")}</h2>
<div className="flex rounded-md border border-line p-1" aria-label={t("history.title")}>
{(["server", "manager"] as const).map(c => <button key={c} aria-pressed={component === c} onClick={() => onSelect(c === "server" ? lastServer.current : { component: c })} className={`cursor-pointer rounded px-3 py-1.5 text-sm ${component === c ? "bg-gold/10 text-gold" : "text-muted hover:text-ink"}`}>{t(`history.${c}`)}</button>)}
</div>
</div>
<div className="flex flex-wrap items-center justify-between gap-3 border-b border-line px-5 py-3 text-sm">
<div className="flex gap-3">
<button className={mode === "all" ? "text-gold" : "cursor-pointer text-muted"} aria-pressed={mode === "all"} onClick={() => setMode("all")}>{t("history.all")}</button>
{target && <button className={mode === "range" ? "text-gold" : "cursor-pointer text-muted"} aria-pressed={mode === "range"} onClick={() => setMode("range")}>{t("history.range")}{from ? ` · ${from} → ${target}` : ` · ${target}`}</button>}
</div>
<label className="flex items-center gap-2 text-muted">{t("history.language")}<select value={language} onChange={e => setLanguage(e.target.value as Locale)} className="rounded border border-line bg-panel px-2 py-1 text-ink">{LOCALES.map(l => <option key={l.id} value={l.id}>{l.name}</option>)}</select></label>
</div>
<div className="grid min-h-64 md:grid-cols-[180px_1fr]">
<div className="flex max-h-96 gap-1 overflow-auto border-b border-line p-3 md:block md:border-r md:border-b-0" aria-label={t("history.all")}>
{releases.map(r => <button key={r.tag} aria-pressed={r.version === record?.version} onClick={() => setSelected(r.version)} className={`mb-1 block shrink-0 cursor-pointer rounded-md px-3 py-2 text-left text-sm md:w-full ${r.version === record?.version ? "bg-gold/10 text-gold" : "text-muted hover:bg-white/5"}`}><span className="block font-medium">{r.version}</span><span className="text-xs text-muted">{r.date}{r.prerelease ? " · Pre-release" : ""}</span></button>)}
</div>
<div className="min-w-0 p-5" aria-live="polite">
{record && notes ? <><h3 className="text-lg font-semibold">{t(`history.${component}`)} {record.version}</h3>
{notes.fallback && <p className="mt-2 text-xs text-warn">{t("history.fallback")}</p>}
<ul lang={notes.fallback ? "en" : language} className="mt-4 list-disc space-y-2 pl-5 text-sm leading-relaxed">{notes.notes.map((note, i) => <li key={i}>{note}</li>)}</ul>
{record.experimentalFeatures?.includes("portable-characters") && <p className="mt-4 rounded border border-warn/30 p-3 text-sm text-warn">{t("history.experimental")}</p>}
<a className="mt-5 inline-block text-sm text-gold hover:underline" href={`https://github.com/${repositories[component]}/releases/tag/${encodeURIComponent(record.tag)}`} onClick={e => { e.preventDefault(); void api.openLink(e.currentTarget.href).catch(error => setLinkError(String(error))); }}>GitHub ↗</a>
{linkError && <p className="mt-2 break-words text-xs text-bad" role="alert">{linkError}</p>}
</> : <p className="text-sm text-muted">{t("history.empty")}</p>}
</div>
</div>
<p className="border-t border-line px-5 py-3 text-xs text-muted">{fresh[component] ? t("history.refreshed") : t("history.offline")}</p>
</Card>;
}
+256
View File
@@ -0,0 +1,256 @@
import { useEffect, useState } from "react";
import { open } from "@tauri-apps/plugin-dialog";
import { ChevronDown, ChevronRight, Loader2, RefreshCw, Server } from "lucide-react";
import { applyServerUpdate, clearServerUpdateResult, refreshServerUpdateState, useServerUpdate } from "@/lib/serverUpdate";
import { isUpdateCurrent } from "@/lib/serverUpdateStatus";
import { api, asUiError, type UiError, type UpdatePreview, type UpdateTxn } from "@/lib/api";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { useStartAfterUpdate } from "@/lib/updatePrefs";
import { hasKey, useHuman, useI18n, type Key } from "@/i18n";
function mb(bytes: number) {
return bytes >= 1 << 20 ? `${(bytes / (1 << 20)).toFixed(1)} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`;
}
export function ServerUpdateCard({ serverId, onHistory, onAttention }: { serverId: string; onHistory: (from?: string | null, to?: string) => void; onAttention: (value: boolean) => void }) {
const { t } = useI18n();
const upd = useServerUpdate(serverId);
const human = useHuman();
const [preview, setPreview] = useState<UpdatePreview | null>(upd.preview);
const [pending, setPending] = useState<UpdateTxn | null>(null);
const [pendingChecked, setPendingChecked] = useState(false);
const [pendingStateError, setPendingStateError] = useState<UiError | null>(null);
const [localBusy, setBusy] = useState<"check" | "rollback" | "retry" | null>(null);
// an update keeps running in the background when this tab is left, so its state is the shared one
const busy = upd.applying ? "update" : localBusy;
const progress = upd.applying ? { step: upd.step ?? "Starting", percent: upd.percent } : null;
const [localError, setError] = useState<UiError | null>(null);
const error = pendingStateError ?? localError ?? upd.uiError;
const [localDone, setDone] = useState<string | null>(null);
const done = upd.result && "committed" in upd.result ? t("upd.updatedTo", { v: upd.result.committed }) : localDone;
const [choices, setChoices] = useState<Record<string, "keep" | "replace">>(() => Object.fromEntries((upd.preview?.conflicts ?? []).map(c => [c, "keep" as const])));
const [advanced, setAdvanced] = useState(false);
const [source, setSource] = useState("");
const [startAfter, setStartAfter] = useStartAfterUpdate("server", serverId);
useEffect(() => {
let active = true;
setPendingChecked(false);
setPending(null);
setPendingStateError(null);
void api.pendingUpdate(serverId).then((txn) => {
if (active) { setPending(txn); setPendingChecked(true); }
}).catch((e) => { if (active) setPendingStateError(asUiError(e)); });
return () => { active = false; };
}, [serverId]);
// Every finished attempt refreshes the disk state, including failures in the background.
useEffect(() => {
if (!upd.stateRevision) return;
setPreview(null);
setPendingChecked(!upd.stateError);
setPendingStateError(upd.stateError);
if (!upd.stateError) setPending(upd.result && "pending" in upd.result ? upd.result.pending : null);
}, [upd.stateRevision, serverId]);
useEffect(() => { onAttention(!!pending || !!pendingStateError); }, [pending, pendingStateError, onAttention]);
async function refreshPending() {
setPendingChecked(false);
try {
const txn = await refreshServerUpdateState(serverId);
setPending(txn);
setPendingStateError(null);
setPendingChecked(true);
return txn;
} catch (e) { setPendingStateError(asUiError(e)); throw e; }
}
async function check() {
setBusy("check");
setError(null);
setDone(null);
clearServerUpdateResult(serverId);
setPreview(null);
try {
const txn = await refreshPending();
if (txn) return;
const p = await api.checkUpdate(serverId, source.trim() || undefined);
setPreview(p);
setChoices(Object.fromEntries(p.conflicts.map((c) => [c, "keep" as const])));
} catch (e) {
setError(asUiError(e));
} finally {
setBusy(null);
}
}
async function update() {
if (!pendingChecked || pendingStateError || pending) return;
setError(null);
setDone(null);
await applyServerUpdate(serverId, { choices, source: source.trim() || undefined });
}
async function rollback(txn: UpdateTxn) {
if (!window.confirm(t("upd.confirmBack"))) return;
setBusy("rollback");
setError(null);
try {
await api.rollbackUpdate(serverId, txn.id);
setPending(null);
setDone(t("upd.wentBack"));
} catch (e) {
setError(asUiError(e));
} finally {
try { await refreshPending(); } catch { /* Keep the disk-state error visible. */ }
setBusy(null);
}
}
async function retryValidation(txn: UpdateTxn) {
setBusy("retry");
setError(null);
try {
const result = await api.retryUpdateValidation(serverId, txn.id);
if (result.state === "committed") {
setPending(null);
setPreview(null);
setDone(t("upd.updatedTo", { v: result.to_version }));
clearServerUpdateResult(serverId);
} else setPending(result);
} catch (e) { setError(asUiError(e)); }
finally {
try { await refreshPending(); } catch { /* Keep the disk-state error visible. */ }
setBusy(null);
}
}
async function browse() {
const p = await open({ directory: true, multiple: false, title: t("upd.dialogTitle") });
if (typeof p === "string") setSource(p);
}
return (
<div>
{pending && (
<Card className="mt-6 border-warn/40 p-5" role="alert">
<p className="font-medium text-warn">
{pending.state === "needs-decision" ? t("upd.pendingBad") : t("upd.pendingUnfinished")}
</p>
<p className="mt-1 whitespace-pre-wrap text-sm text-muted">{pending.message ?? t("upd.safeBack")}</p>
{pending.state === "needs-decision" && (
<Button className="mt-3 mr-3" size="sm" disabled={!!busy} onClick={() => void retryValidation(pending)}>
{busy === "retry" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("upd.retryValidation")}
</Button>
)}
<p className="mt-1 text-sm text-muted">{t("upd.backNote")}</p>
<Button className="mt-3" size="sm" disabled={!!busy} onClick={() => void rollback(pending)}>
{busy === "rollback" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{pending.from_version ? t("upd.goBackTo", { v: pending.from_version }) : t("upd.goBackBefore")}
</Button>
</Card>
)}
<Card className="mt-6 p-6">
<div className="flex items-start justify-between gap-3">
<div><h2 className="flex items-center gap-2 font-semibold"><Server className="h-4 w-4 text-gold" aria-hidden />{t("history.server")}</h2>
<p className="mt-2 text-sm text-muted">{preview?.from_version ? t("settings.version", { v: preview.from_version }) : "…"}</p></div>
<Button size="sm" disabled={!!busy} onClick={() => void check()} aria-label={t("upd.check")} title={t("upd.check")}><RefreshCw className={`h-4 w-4 ${busy === "check" ? "animate-spin" : ""}`} aria-hidden /></Button>
</div>
<button className="mt-3 cursor-pointer text-sm text-gold hover:underline" onClick={() => onHistory(preview?.from_version, preview && !isUpdateCurrent(preview) ? preview.to_version : undefined)}>{t(preview && !isUpdateCurrent(preview) ? "history.open" : "history.title")}</button>
<div className="mt-3"><button onClick={() => setAdvanced((v) => !v)} aria-expanded={advanced} className="flex cursor-pointer items-center gap-1 text-xs text-muted hover:text-ink">
{advanced ? <ChevronDown className="h-3 w-3" aria-hidden /> : <ChevronRight className="h-3 w-3" aria-hidden />}{t("install.advanced")}
</button></div>
{advanced && (
<div className="mt-3 flex gap-2">
<input aria-label={t("upd.folderLabel")} value={source} onChange={(e) => setSource(e.target.value)} placeholder={t("upd.folderHint")} className="selectable flex-1 rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-gold" />
<Button size="sm" onClick={browse}>{t("install.browse")}</Button>
</div>
)}
{done && pendingChecked && !pendingStateError && <p className="mt-4 text-sm text-ok" role="status">{done}</p>}
{error && (
<div className="mt-4" role="alert">
<p className="selectable whitespace-pre-wrap break-words text-sm text-bad">
{error.human.code === "unknown" ? error.technical : human(error.human).message}
</p>
<button className="mt-1 cursor-pointer text-xs text-muted underline" onClick={() => void navigator.clipboard.writeText(error.technical)}>
{t("common.copyError")}
</button>
</div>
)}
{preview?.database_check_error && (
<p className="selectable mt-4 break-words text-sm text-warn" role="status">{t("upd.dbUnchecked", { why: preview.database_check_error })}</p>
)}
{preview && isUpdateCurrent(preview) && (
<div className="mt-5 border-t border-line pt-4">
<p className="font-medium text-ok" role="status">{t("upd.current", { v: preview.to_version })}</p>
</div>
)}
{preview && !isUpdateCurrent(preview) && (
<div className="mt-5 border-t border-line pt-4">
<p className="font-medium">
{preview.from_version ? t("upd.availableFrom", { to: preview.to_version, from: preview.from_version }) : t("upd.available", { to: preview.to_version })}
</p>
{preview.latest_version && <p className="mt-1 text-sm text-warn" role="status">{t("upd.intermediate", { to: preview.to_version, latest: preview.latest_version })}</p>}
<p className="mt-1 text-sm text-muted">
{!preview.database_check_error && (preview.pending_migrations ?? preview.migrations) > 0
? t("upd.summaryDb", { size: mb(preview.download_bytes), files: preview.items.filter((i) => i.action !== "skip").length, db: preview.pending_migrations ?? preview.migrations })
: t("upd.summary", { size: mb(preview.download_bytes), files: preview.items.filter((i) => i.action !== "skip").length })}
</p>
<details className="mt-3" open={preview.items.some(i => i.action === "conflict")}><summary className="cursor-pointer text-sm text-muted">{t("history.files")}</summary><ul className="mt-3 max-h-56 divide-y divide-line overflow-auto text-sm">
{preview.items.filter((i) => i.action !== "skip").map((i) => (
<li key={i.path} className="py-2">
<div className="flex justify-between gap-3">
<span className="selectable break-all">{i.path}</span>
<span className={i.action === "conflict" ? "shrink-0 text-warn" : "shrink-0 text-muted"}>{t(`upd.act.${i.action}` as Key)}</span>
</div>
{i.action === "conflict" && (
<fieldset className="mt-2 flex flex-wrap gap-4 text-xs text-muted">
<legend className="sr-only">{t("upd.conflict")}</legend>
<span className="text-warn">{t("upd.conflict")}</span>
{(["keep", "replace"] as const).map((c) => (
<label key={c} className="flex cursor-pointer items-center gap-1">
<input type="radio" name={i.path} checked={choices[i.path] === c} onChange={() => setChoices((x) => ({ ...x, [i.path]: c }))} />
{c === "keep" ? t("upd.keep") : t("upd.replace")}
</label>
))}
</fieldset>
)}
</li>
))}
</ul></details>
<Button className="mt-4" variant="primary" disabled={!!busy || !pendingChecked || !!pendingStateError || !!pending} onClick={() => void update()}>
{busy === "update" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("upd.now")}
</Button>
<p className="mt-2 text-xs text-muted">{t("upd.stopNote")}</p>
</div>
)}
{busy === "update" && progress && (
<div className="mt-5">
<div className="flex justify-between text-sm">
<span role="status">{hasKey(`ustep.${progress.step}`) ? t(`ustep.${progress.step}` as Key) : progress.step}</span>
<span className="text-muted">{progress.percent}%</span>
</div>
<div className="mt-2 h-2 overflow-hidden rounded-full bg-white/10" role="progressbar" aria-valuenow={progress.percent} aria-valuemin={0} aria-valuemax={100}>
<div className="h-full rounded-full bg-gold transition-[width] duration-300" style={{ width: `${progress.percent}%` }} />
</div>
</div>
)}
<label className="mt-5 flex cursor-pointer items-center justify-between gap-3 border-t border-line pt-4 text-sm" title={t("upd.startAfter")}>
<span>{t("settings.startServer")}</span><input type="checkbox" role="switch" checked={startAfter} onChange={(e) => setStartAfter(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
</label>
</Card>
</div>
);
}
+49 -286
View File
@@ -1,292 +1,55 @@
import { useEffect, useState } from "react";
import { open } from "@tauri-apps/plugin-dialog";
import { ChevronDown, ChevronRight, Loader2 } from "lucide-react";
import { applyServerUpdate, clearServerUpdateResult, refreshServerUpdateState, useServerUpdate } from "@/lib/serverUpdate";
import { isUpdateCurrent } from "@/lib/serverUpdateStatus";
import { api, asUiError, type UiError, type UpdatePreview, type UpdateTxn } from "@/lib/api";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { ClientCard } from "@/screens/ClientCard";
import { GameDataCard } from "@/screens/GameDataCard";
import { DiagnosticsCard } from "@/screens/DiagnosticsCard";
import { AboutCard } from "@/screens/AboutCard";
import { RemoveServerCard } from "@/screens/RemoveServerCard";
import { useStartAfterUpdate } from "@/lib/updatePrefs";
import { hasKey, useHuman, useI18n, type Key } from "@/i18n";
import { useState } from "react";
import { Download, Power, FolderOpen, Wrench, Languages } from "lucide-react";
import { useI18n } from "@/i18n";
import { LanguagePicker } from "@/components/LanguagePicker";
import { RealmStartupSettings } from "@/screens/RealmStartupSettings";
import { RepairCard } from "@/screens/RepairCard";
import { PublishCard } from "@/screens/PublishCard";
import { AutoRestartSettings } from "@/screens/AutoRestartSettings";
import { Card } from "@/components/ui/card";
import { useServerUpdate } from "@/lib/serverUpdate";
import { ServerUpdateCard } from "./ServerUpdateCard";
import { AboutCard } from "./AboutCard";
import { ReleaseHistory, type HistorySelection } from "./ReleaseHistory";
import { ClientCard } from "./ClientCard";
import { GameDataCard } from "./GameDataCard";
import { RealmStartupSettings } from "./RealmStartupSettings";
import { AutoRestartSettings } from "./AutoRestartSettings";
import { DiagnosticsCard } from "./DiagnosticsCard";
import { RepairCard } from "./RepairCard";
import { RemoveServerCard } from "./RemoveServerCard";
function mb(bytes: number) {
return bytes >= 1 << 20 ? `${(bytes / (1 << 20)).toFixed(1)} MB` : `${Math.max(1, Math.round(bytes / 1024))} KB`;
}
export function SettingsHome({ serverId, serverName = "", path, onForget }: { serverId: string; serverName?: string; path: string; onForget: () => Promise<void> }) {
const sections = [["updates", Download], ["startup", Power], ["client", FolderOpen], ["service", Wrench], ["interface", Languages]] as const;
export function SettingsHome({ serverId, path, onForget }: { serverId: string; serverName?: string; path: string; onForget: () => Promise<void> }) {
const { t } = useI18n();
const upd = useServerUpdate(serverId);
const human = useHuman();
const [preview, setPreview] = useState<UpdatePreview | null>(null);
const [pending, setPending] = useState<UpdateTxn | null>(null);
const [pendingChecked, setPendingChecked] = useState(false);
const [pendingStateError, setPendingStateError] = useState<UiError | null>(null);
const [localBusy, setBusy] = useState<"check" | "rollback" | "retry" | null>(null);
// an update keeps running in the background when this tab is left, so its state is the shared one
const busy = upd.applying ? "update" : localBusy;
const progress = upd.applying ? { step: upd.step ?? "Starting", percent: upd.percent } : null;
const [localError, setError] = useState<UiError | null>(null);
const error = pendingStateError ?? localError ?? upd.uiError;
const [localDone, setDone] = useState<string | null>(null);
const done = upd.result && "committed" in upd.result ? t("upd.updatedTo", { v: upd.result.committed }) : localDone;
const [choices, setChoices] = useState<Record<string, "keep" | "replace">>({});
const [advanced, setAdvanced] = useState(false);
const [source, setSource] = useState("");
const [startAfter, setStartAfter] = useStartAfterUpdate("server", serverId);
useEffect(() => {
let active = true;
setPendingChecked(false);
setPending(null);
setPreview(null);
setPendingStateError(null);
void api.pendingUpdate(serverId).then((txn) => {
if (active) { setPending(txn); setPendingChecked(true); }
}).catch((e) => { if (active) setPendingStateError(asUiError(e)); });
return () => { active = false; };
}, [serverId]);
// Every finished attempt refreshes the disk state, including failures in the background.
useEffect(() => {
if (!upd.stateRevision) return;
setPreview(null);
setPendingChecked(!upd.stateError);
setPendingStateError(upd.stateError);
if (!upd.stateError) setPending(upd.result && "pending" in upd.result ? upd.result.pending : null);
}, [upd.stateRevision, serverId]);
async function refreshPending() {
setPendingChecked(false);
try {
const txn = await refreshServerUpdateState(serverId);
setPending(txn);
setPendingStateError(null);
setPendingChecked(true);
return txn;
} catch (e) { setPendingStateError(asUiError(e)); throw e; }
const [section, setSection] = useState<(typeof sections)[number][0]>("updates");
const [attention, setAttention] = useState(false);
const update = useServerUpdate(serverId);
const [history, setHistory] = useState<HistorySelection>(() => ({ component: "server", from: update.preview?.from_version ?? undefined, to: update.available ? update.preview?.to_version : undefined }));
function showHistory(selection: HistorySelection) {
setHistory(selection);
requestAnimationFrame(() => {
const element = document.getElementById("release-history");
element?.scrollIntoView({ behavior: "smooth", block: "start" });
element?.focus({ preventScroll: true });
});
}
async function check() {
setBusy("check");
setError(null);
setDone(null);
clearServerUpdateResult(serverId);
setPreview(null);
try {
const txn = await refreshPending();
if (txn) return;
const p = await api.checkUpdate(serverId, source.trim() || undefined);
setPreview(p);
setChoices(Object.fromEntries(p.conflicts.map((c) => [c, "keep" as const])));
} catch (e) {
setError(asUiError(e));
} finally {
setBusy(null);
}
}
async function update() {
if (!pendingChecked || pendingStateError || pending) return;
setError(null);
setDone(null);
await applyServerUpdate(serverId, { choices, source: source.trim() || undefined });
}
async function rollback(txn: UpdateTxn) {
if (!window.confirm(t("upd.confirmBack"))) return;
setBusy("rollback");
setError(null);
try {
await api.rollbackUpdate(serverId, txn.id);
setPending(null);
setDone(t("upd.wentBack"));
} catch (e) {
setError(asUiError(e));
} finally {
try { await refreshPending(); } catch { /* Keep the disk-state error visible. */ }
setBusy(null);
}
}
async function retryValidation(txn: UpdateTxn) {
setBusy("retry");
setError(null);
try {
const result = await api.retryUpdateValidation(serverId, txn.id);
if (result.state === "committed") {
setPending(null);
setPreview(null);
setDone(t("upd.updatedTo", { v: result.to_version }));
clearServerUpdateResult(serverId);
} else setPending(result);
} catch (e) { setError(asUiError(e)); }
finally {
try { await refreshPending(); } catch { /* Keep the disk-state error visible. */ }
setBusy(null);
}
}
async function browse() {
const p = await open({ directory: true, multiple: false, title: t("upd.dialogTitle") });
if (typeof p === "string") setSource(p);
}
return (
<div className="max-w-2xl">
<h1 className="text-2xl font-semibold">{t("settings.title")}</h1>
<p className="mt-1 text-muted">{t("q.settings")}</p>
{pending && (
<Card className="mt-6 border-warn/40 p-5" role="alert">
<p className="font-medium text-warn">
{pending.state === "needs-decision" ? t("upd.pendingBad") : t("upd.pendingUnfinished")}
</p>
<p className="mt-1 whitespace-pre-wrap text-sm text-muted">{pending.message ?? t("upd.safeBack")}</p>
{pending.state === "needs-decision" && (
<Button className="mt-3 mr-3" size="sm" disabled={!!busy} onClick={() => void retryValidation(pending)}>
{busy === "retry" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("upd.retryValidation")}
</Button>
)}
<p className="mt-1 text-sm text-muted">{t("upd.backNote")}</p>
<Button className="mt-3" size="sm" disabled={!!busy} onClick={() => void rollback(pending)}>
{busy === "rollback" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{pending.from_version ? t("upd.goBackTo", { v: pending.from_version }) : t("upd.goBackBefore")}
</Button>
</Card>
)}
<Card className="mt-6 p-6">
<h2 className="font-semibold">{t("settings.language")}</h2>
<p className="mt-1 text-sm text-muted">{t("settings.languageHint")}</p>
<LanguagePicker className="mt-3" />
</Card>
<ClientCard serverId={serverId} />
<RealmStartupSettings serverId={serverId} />
<AutoRestartSettings serverId={serverId} />
<GameDataCard serverId={serverId} />
<DiagnosticsCard serverId={serverId} />
<RepairCard key={serverId} serverId={serverId} />
<PublishCard key={`publish-${serverId}`} serverId={serverId} serverName={serverName} />
<AboutCard />
<Card className="mt-6 p-6">
<h2 className="font-semibold">{t("upd.title")}</h2>
<p className="mt-1 text-sm text-muted">{t("upd.text")}</p>
<label className="mt-3 flex cursor-pointer items-center gap-2 text-sm">
<input type="checkbox" checked={startAfter} onChange={(e) => setStartAfter(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
<span>{t("upd.startAfter")}</span>
</label>
<div className="mt-4 flex items-center gap-3">
<Button variant="primary" disabled={!!busy} onClick={() => void check()}>
{busy === "check" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("upd.check")}
</Button>
<button onClick={() => setAdvanced((v) => !v)} aria-expanded={advanced} className="flex cursor-pointer items-center gap-1 text-sm text-muted hover:text-ink">
{advanced ? <ChevronDown className="h-4 w-4" aria-hidden /> : <ChevronRight className="h-4 w-4" aria-hidden />}
{t("install.advanced")}
</button>
</div>
{advanced && (
<div className="mt-3 flex gap-2">
<input aria-label={t("upd.folderLabel")} value={source} onChange={(e) => setSource(e.target.value)} placeholder={t("upd.folderHint")} className="selectable flex-1 rounded-md border border-line bg-bg px-3 py-2 text-sm outline-none focus:border-gold" />
<Button size="sm" onClick={browse}>{t("install.browse")}</Button>
</div>
)}
{done && pendingChecked && !pendingStateError && <p className="mt-4 text-sm text-ok" role="status">{done}</p>}
{upd.result && "committed" in upd.result && !!upd.result.preexistingCharacters && <p className="mt-3 text-sm text-warn" role="status">{t("upd.preexistingCharacters", { n: upd.result.preexistingCharacters })}</p>}
{error && (
<div className="mt-4" role="alert">
<p className="selectable whitespace-pre-wrap break-words text-sm text-bad">
{error.human.code === "unknown" ? error.technical : human(error.human).message}
</p>
<button className="mt-1 cursor-pointer text-xs text-muted underline" onClick={() => void navigator.clipboard.writeText(error.technical)}>
{t("common.copyError")}
</button>
</div>
)}
{preview?.database_check_error && (
<p className="selectable mt-4 break-words text-sm text-warn" role="status">{t("upd.dbUnchecked", { why: preview.database_check_error })}</p>
)}
{preview && isUpdateCurrent(preview) && (
<div className="mt-5 border-t border-line pt-4">
<p className="font-medium text-ok" role="status">{t("upd.current", { v: preview.to_version })}</p>
</div>
)}
{preview && !isUpdateCurrent(preview) && (
<div className="mt-5 border-t border-line pt-4">
<p className="font-medium">
{preview.from_version ? t("upd.availableFrom", { to: preview.to_version, from: preview.from_version }) : t("upd.available", { to: preview.to_version })}
</p>
{preview.latest_version && <p className="mt-1 text-sm text-warn" role="status">{t("upd.intermediate", { to: preview.to_version, latest: preview.latest_version })}</p>}
<p className="mt-1 text-sm text-muted">
{!preview.database_check_error && (preview.pending_migrations ?? preview.migrations) > 0
? t("upd.summaryDb", { size: mb(preview.download_bytes), files: preview.items.filter((i) => i.action !== "skip").length, db: preview.pending_migrations ?? preview.migrations })
: t("upd.summary", { size: mb(preview.download_bytes), files: preview.items.filter((i) => i.action !== "skip").length })}
</p>
<ul className="mt-3 max-h-56 divide-y divide-line overflow-auto text-sm">
{preview.items.filter((i) => i.action !== "skip").map((i) => (
<li key={i.path} className="py-2">
<div className="flex justify-between gap-3">
<span className="selectable break-all">{i.path}</span>
<span className={i.action === "conflict" ? "shrink-0 text-warn" : "shrink-0 text-muted"}>{t(`upd.act.${i.action}` as Key)}</span>
</div>
{i.action === "conflict" && (
<fieldset className="mt-2 flex flex-wrap gap-4 text-xs text-muted">
<legend className="sr-only">{t("upd.conflict")}</legend>
<span className="text-warn">{t("upd.conflict")}</span>
{(["keep", "replace"] as const).map((c) => (
<label key={c} className="flex cursor-pointer items-center gap-1">
<input type="radio" name={i.path} checked={choices[i.path] === c} onChange={() => setChoices((x) => ({ ...x, [i.path]: c }))} />
{c === "keep" ? t("upd.keep") : t("upd.replace")}
</label>
))}
</fieldset>
)}
</li>
))}
</ul>
<Button className="mt-4" variant="primary" disabled={!!busy || !pendingChecked || !!pendingStateError || !!pending} onClick={() => void update()}>
{busy === "update" && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{t("upd.now")}
</Button>
<p className="mt-2 text-xs text-muted">{t("upd.stopNote")}</p>
</div>
)}
{busy === "update" && progress && (
<div className="mt-5">
<div className="flex justify-between text-sm">
<span role="status">{hasKey(`ustep.${progress.step}`) ? t(`ustep.${progress.step}` as Key) : progress.step}</span>
<span className="text-muted">{progress.percent}%</span>
</div>
<div className="mt-2 h-2 overflow-hidden rounded-full bg-white/10" role="progressbar" aria-valuenow={progress.percent} aria-valuemin={0} aria-valuemax={100}>
<div className="h-full rounded-full bg-gold transition-[width] duration-300" style={{ width: `${progress.percent}%` }} />
</div>
</div>
)}
</Card>
<RemoveServerCard serverId={serverId} path={path} onForget={onForget} />
return <div className="mx-auto w-full max-w-5xl pb-8">
<h1 className="text-2xl font-semibold">{t("settings.title")}</h1>
<p className="mt-1 text-sm text-muted">{t("settings.organized")}</p>
<nav aria-label={t("settings.title")} className="mt-6 flex flex-wrap gap-1 border-b border-line pb-3">
{sections.map(([id, Icon]) => <button key={id} aria-current={section === id ? "page" : undefined} onClick={() => setSection(id)} className={`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm ${section === id ? "bg-gold/10 text-gold" : "text-muted hover:bg-white/5 hover:text-ink"}`}>
<Icon className="h-4 w-4" aria-hidden />{t(`settings.section.${id}`)}
</button>)}
</nav>
{attention && section !== "updates" && <button role="alert" onClick={() => setSection("updates")} className="mt-4 w-full cursor-pointer rounded-lg border border-warn/40 p-4 text-left text-sm text-warn">{t("settings.attention")}</button>}
<div hidden={section !== "updates"}>
<div className="grid items-start gap-x-5 lg:grid-cols-2">
<ServerUpdateCard onAttention={setAttention} serverId={serverId} onHistory={(from, to) => showHistory({ component: "server", from: from ?? undefined, to })} />
<AboutCard onHistory={() => showHistory({ component: "manager" })} />
</div>
<button onClick={() => setSection("client")} className="mt-5 flex w-full cursor-pointer items-center justify-between gap-3 rounded-lg border border-line px-5 py-4 text-left text-sm hover:bg-white/5"><span>{t("settings.clientLink")}</span><span aria-hidden>→</span></button>
<ReleaseHistory selection={history} onSelect={setHistory} />
</div>
);
<div hidden={section !== "startup"} className="max-w-3xl"><RealmStartupSettings serverId={serverId} /><AutoRestartSettings serverId={serverId} /></div>
<div hidden={section !== "client"} className="max-w-3xl"><ClientCard serverId={serverId} /><GameDataCard serverId={serverId} /></div>
<div hidden={section !== "service"} className="max-w-3xl"><DiagnosticsCard serverId={serverId} /><RepairCard serverId={serverId} /><RemoveServerCard serverId={serverId} path={path} onForget={onForget} /></div>
<div hidden={section !== "interface"} className="max-w-3xl"><Card className="mt-6 p-6"><h2 className="font-semibold">{t("settings.language")}</h2><p className="mt-1 text-sm text-muted">{t("settings.languageHint")}</p><LanguagePicker className="mt-4" /></Card></div>
</div>;
}
+1 -1
View File
@@ -161,7 +161,7 @@ export function Shell(props: {
) : page === "report" ? (
<ReportPage key={server.id} serverId={server.id} />
) : page === "friends" ? (
<PlayWithFriends key={server.id} serverId={server.id} path={server.path} />
<PlayWithFriends key={server.id} serverName={server.name} serverId={server.id} path={server.path} />
) : page === "settings" ? (
<SettingsHome key={server.id} serverId={server.id} serverName={server.name} path={server.path} onForget={() => props.onForget(server.id)} />
) : page === "characters" ? (