Skip to content

Commit

Permalink
feat: Support to show the archived status for curseforge/modrinth pro…
Browse files Browse the repository at this point in the history
…ject
  • Loading branch information
ci010 committed Aug 3, 2024
1 parent 5804219 commit 2aeba9d
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 3 deletions.
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,11 @@ mod:
switchDefaultSource: Quelle der Standardänderung
toUpdate: '{count} zu aktualisieren'
modInstall:
archived: >-
{name} wurde archiviert.
{name} erhält keine weiteren Updates, es sei denn, der Autor beschließt, das
Projekt aus der Archivierung zu entfernen.
checkDependencies: Abhängigkeiten prüfen
checkUpgrade: Prüfen Sie auf Aktualisierungen von Änderungen
checkedDependencies: Überprüfte Abhängigkeiten
Expand Down
5 changes: 4 additions & 1 deletion xmcl-keystone-ui/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,9 @@ mod:
switchDefaultSource: Default Mod Source
toUpdate: '{count} to update'
modInstall:
archived: >-
{name} has been archived. {name} will not receive any further updates unless
the author decides to unarchive the project.
checkDependencies: Check Dependencies
checkUpgrade: Check Mods Update
checkedDependencies: Checked Dependencies
Expand Down Expand Up @@ -1104,7 +1107,7 @@ save:
selected: Local Saves
shared: Instance use shared saves folder
showDirectory: Show saves directory
unselected: shared archive
unselected: Shared Saves
saves: {}
screenshots:
empty: You don't have screenshots
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/es-ES.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ mod:
switchDefaultSource: Fuente de Mods por Defecto
toUpdate: '{count} para actualizar'
modInstall:
archived: >-
{name} ha sido archivado.
{name} no recibirá más actualizaciones a menos que el autor decida
desarchivar el proyecto.
checkDependencies: Verificar dependencias
checkUpgrade: Verificar Actualizaciones de Mods
checkedDependencies: Dependencias comprobadas
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,11 @@ mod:
showInCurseforge: Afficher le mod dans Curseforge
showInModrinth: Afficher {name} sur Modrinth
modInstall:
archived: >-
{name} a été archivé.
{name} ne recevra plus de mises à jour à moins que l'auteur ne décide de
désarchiver le projet.
checkDependencies: Vérifier les dépendances
checkedDependencies: Dépendances vérifiées
install: Installer
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/gl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ mod:
mods: '{count} Mods'
searchOnCurseforge: Busca {name} en curseforge
modInstall:
archived: >-
{name} foi arquivado.
{name} non recibirá máis actualizacións a non ser que o autor decida
desarquivar o proxecto.
checkDependencies: Comproba as dependencias
checkedDependencies: Dependencias verificadas
installDependencies: Instalar dependencias que faltan
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/hu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,11 @@ mod:
switchDefaultSource: Alapértelmezett mod forrás
toUpdate: '{count} frissítendő'
modInstall:
archived: >-
{name} archiválva.
{name} nem kap további frissítéseket, kivéve, ha a szerző úgy dönt, hogy
visszavonja a projekt archiválását.
checkDependencies: Ellenőrizze a függőségeket
checkUpgrade: Modok frissítésének ellenőrzése
checkedDependencies: Ellenőrzött függőségek
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/it-IT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,11 @@ mod:
switchDefaultSource: Sorgente Mod Predefinita
toUpdate: '{count} da aggiornare'
modInstall:
archived: >-
{nome} è stato archiviato.
{name} non riceverà ulteriori aggiornamenti a meno che l'autore non decida
di annullare l'archiviazione del progetto.
checkDependencies: Controlla le dipendenze
checkUpgrade: Controlla Aggiornamento Mod
checkedDependencies: Dipendenze controllate
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/pl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,11 @@ mod:
switchDefaultSource: Domyślne źródło modów
toUpdate: '{count} aktualizować'
modInstall:
archived: >-
{name} zostało zarchiwizowane.
{name} nie otrzyma żadnych dalszych aktualizacji, chyba że autor zdecyduje
się na rozpakowanie projektu.
checkDependencies: Sprawdź zależności
checkUpgrade: Sprawdź aktualizację modów
checkedDependencies: Sprawdzone zależności
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/ru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,11 @@ mod:
switchDefaultSource: Источник контента модов по умолчанию
toUpdate: '{count} для обновления'
modInstall:
archived: >-
{name} заархивировано.
{name} не будет получать никаких дальнейших обновлений, если автор не решит
разархивировать проект.
checkDependencies: Проверить недостающие зависимости
checkUpgrade: Проверить обновления для модов
checkedDependencies: Недостающие зависимости проверены
Expand Down
5 changes: 5 additions & 0 deletions xmcl-keystone-ui/locales/uk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,11 @@ mod:
switchDefaultSource: Джерело модифікації за замовчуванням
toUpdate: '{count} на оновлення'
modInstall:
archived: >-
{name} заархівовано.
{name} не отримуватиме подальших оновлень, якщо автор не вирішить
розархівувати проект.
checkDependencies: Перевірити залежності
checkUpgrade: Перевірте оновлення модифікацій
checkedDependencies: Перевірені залежності
Expand Down
3 changes: 3 additions & 0 deletions xmcl-keystone-ui/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,9 @@ mod:
switchDefaultSource: 本地模组默认显示为
toUpdate: '{count} 个有新版本'
modInstall:
archived: |-
{name} 已存档。
除非作者决定取消存档该项目,否则 {name} 将不会收到任何进一步的更新。
checkDependencies: 检查依赖关系
checkUpgrade: 检查模组更新
checkedDependencies: 已检查依赖关系
Expand Down
3 changes: 3 additions & 0 deletions xmcl-keystone-ui/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,9 @@ mod:
switchDefaultSource: 本地模組默认显示为
toUpdate: '{count} 個有新版本'
modInstall:
archived: |-
{name} 已存檔。
除非作者決定取消存檔該項目,否則 {name} 將不會收到任何進一步的更新。
checkDependencies: 檢查依賴關係
checkUpgrade: 檢查模組更新
checkedDependencies: 已檢查依賴關係
Expand Down
9 changes: 9 additions & 0 deletions xmcl-keystone-ui/src/components/MarketProjectDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
class="mod-detail contained w-full overflow-auto"
@scroll="onScroll"
>
<v-alert
v-if="detail.archived"
type="error"
text
tile
>
{{ t('modInstall.archived', { name: detail.title }) }}
</v-alert>
<div class="header-container flex flex-grow gap-4 p-4">
<div class="self-center">
<v-skeleton-loader
Expand Down Expand Up @@ -791,6 +799,7 @@ export interface ProjectDetail {
externals: ExternalResource[]
galleries: ModGallery[]
info: Info[]
archived?: boolean
}
const tab = ref(0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getCurseforgeFileGameVersions, getCurseforgeRelationType, getCursforgeF
import { injection } from '@/util/inject'
import { ModFile } from '@/util/mod'
import { ProjectFile } from '@/util/search'
import { FileModLoaderType, Mod } from '@xmcl/curseforge'
import { FileModLoaderType, Mod, ModStatus } from '@xmcl/curseforge'
import { Resource } from '@xmcl/runtime-api'
const props = defineProps<{
Expand Down Expand Up @@ -138,6 +138,7 @@ const model = computed(() => {
externals,
galleries,
info,
archived: ModStatus.Inactive === mod?.status || ModStatus.Abandoned === mod?.status,
}
return detail
})
Expand Down Expand Up @@ -338,7 +339,6 @@ const onRefresh = () => {
}
const modrinthId = computed(() => props.modrinth || props.allFiles.find(v => v.curseforge?.projectId === props.curseforgeId && v.modrinth)?.modrinth?.projectId)
</script>
<template>
<MarketProjectDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ const onOpenDependency = (dep: ProjectDependency) => {
const curseforgeId = computed(() => props.curseforge || props.allFiles.find(v => v.modrinth?.projectId === props.projectId && v.curseforge)?.curseforge?.projectId)
const archived = computed(() => {
return project.value?.status === 'archived'
})
// watchEffect(() => {
// console.log(project.value.status)
// })
</script>

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export function useModrinthProjectDetailData(projectId: Ref<string>, project: Re
externals,
galleries,
info,
archived: project.value?.status === 'archived',
}
return detail
})
Expand Down

0 comments on commit 2aeba9d

Please sign in to comment.