Skip to content

Commit

Permalink
fix: Should identify the server created save
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Aug 22, 2024
1 parent d5cd053 commit 4c74ecc
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ save:
shared: Instanz verwendet freigegebenen Speicherordner
showDirectory: Speicherverzeichnis anzeigen
unselected: gemeinsames Archiv
useCurrent: Aktuelle Welt verwenden
saves: {}
screenshots:
empty: Sie haben keine Bildschirmfotos
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ save:
shared: Instance use shared saves folder
showDirectory: Show saves directory
unselected: Shared Saves
useCurrent: Use current world
saves: {}
screenshots:
empty: You don't have screenshots
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/es-ES.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ save:
shared: La instancia utiliza la carpeta guardada compartida
showDirectory: Mostrar directorio de guardado
unselected: archivo compartido
useCurrent: Usar el mundo actual
saves: {}
screenshots:
empty: No tienes capturas de pantalla
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,7 @@ save:
shared: L'instance utilise le dossier de sauvegarde partagé
showDirectory: Afficher le répertoire de sauvegarde
unselected: archives partagées
useCurrent: Utiliser le monde actuel
saves: {}
screenshots:
empty: Vous n'avez pas de capture d'écran
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/gl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ save:
shared: A instancia utiliza o cartafol de gardados compartidos
showDirectory: Mostrar o directorio de gardar
unselected: arquivo compartido
useCurrent: Usa o mundo actual
saves: {}
server:
maxPlayers: Máximo xogadores
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/hu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ save:
shared: Példány megosztott mentési mappa használata
showDirectory: Mentés könyvtár megjelenítése
unselected: megosztott archívum
useCurrent: Használja a jelenlegi világot
saves: {}
screenshots:
empty: Nincsenek képernyőképeid
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/it-IT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,7 @@ save:
shared: L'istanza utilizza la cartella di salvataggio condivisa
showDirectory: Mostra la directory di salvataggio
unselected: archivio condiviso
useCurrent: Usa il mondo attuale
saves: {}
screenshots:
empty: Non hai screenshot
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/pl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,7 @@ save:
shared: Instancja korzysta ze wspólnego folderu zapisów
showDirectory: Pokaż katalog zapisu
unselected: wspólne archiwum
useCurrent: Użyj obecnego świata
saves: {}
screenshots:
empty: Nie masz zrzutów ekranu
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/ru.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ save:
shared: Экземпляр использует общую папку сохранений
showDirectory: Открыть папку с мирами
unselected: общий архив
useCurrent: Использовать текущий мир
screenshots:
empty: У вас нет снимков экрана
goto: Открыть папку со снимками экрана
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/uk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ save:
shared: Екземпляр використовує спільну папку збереження
showDirectory: Показати каталог збереження
unselected: спільний архів
useCurrent: Використовуйте поточний світ
saves: {}
screenshots:
empty: У вас немає скріншотів
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ save:
shared: 实例使用共享存档文件夹
showDirectory: 显示保存目录
unselected: 共享的存档
useCurrent: 使用当前世界
saves: {}
screenshots:
empty: 您还没有截图
Expand Down
1 change: 1 addition & 0 deletions xmcl-keystone-ui/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,7 @@ save:
shared: 實例使用共享存档資料夾
showDirectory: 顯示儲存目錄
unselected: 共享的存檔
useCurrent: 使用當前世界
saves: {}
screenshots:
empty: 您還沒有截圖
Expand Down
6 changes: 4 additions & 2 deletions xmcl-keystone-ui/src/views/AppLaunchServerDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
@click="toggle"
>
<v-icon size="80">
add
{{ rawWorldExists ? 'save' : 'add' }}
</v-icon>
{{ t('save.createNew') }}
{{ rawWorldExists ? t('save.useCurrent') : t('save.createNew') }}
</v-card>
</v-item>
<v-item
Expand Down Expand Up @@ -259,6 +259,7 @@ const onlineMode = ref(false)
const isAcceptEula = ref(false)
const nogui = ref(false)
const linkedWorld = ref('')
const rawWorldExists = ref(false)
const { getEULA, setEULA, getServerProperties, setServerProperties } = useService(InstanceOptionsServiceKey)
const { linkSaveAsServerWorld, getLinkedSaveWorld } = useService(InstanceSavesServiceKey)
Expand Down Expand Up @@ -302,6 +303,7 @@ const { isShown } = useDialog('launch-server', () => {
_eula = v
})
getLinkedSaveWorld(path.value).then((v) => {
rawWorldExists.value = v !== undefined && v !== ''
linkedWorld.value = v ?? ''
})
getServerInstanceMods(path.value).then((mods) => {
Expand Down
2 changes: 1 addition & 1 deletion xmcl-runtime-api/src/services/InstanceSavesService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export interface InstanceSavesService {
/**
* Get the linked save world path.
* @param instancePath
* @return The linked save world path. Should if it's a origial world folder them it's unlinked folder existed. `undefined` if no folder existed.
* @return The linked save world path. Empty string if it's a raw world folder, else it's linked folder existed. `undefined` if no folder existed.
*/
getLinkedSaveWorld(instancePath: string): Promise<string | undefined>
}
Expand Down

0 comments on commit 4c74ecc

Please sign in to comment.