From 835d1c7e6e1c9d7469f36255c57603e072436953 Mon Sep 17 00:00:00 2001 From: SkyDynamic Date: Sat, 16 Dec 2023 23:08:50 +0800 Subject: [PATCH] style from PrimeBackup --- .../dev/skydynamic/quickbackupmulti/utils/QbmManager.java | 8 ++++---- src/main/resources/assets/quickbackupmulti/lang/en_us.yml | 1 - src/main/resources/assets/quickbackupmulti/lang/zh_cn.yml | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/skydynamic/quickbackupmulti/utils/QbmManager.java b/src/main/java/dev/skydynamic/quickbackupmulti/utils/QbmManager.java index cc19435..ad15f25 100644 --- a/src/main/java/dev/skydynamic/quickbackupmulti/utils/QbmManager.java +++ b/src/main/java/dev/skydynamic/quickbackupmulti/utils/QbmManager.java @@ -183,14 +183,14 @@ public static MutableText list() { totalBackupSizeB += backupSizeB; double backupSizeMB = (double) backupSizeB / FileUtils.ONE_MB; double backupSizeGB = (double) backupSizeB / FileUtils.ONE_GB; - String sizeString = (backupSizeMB >= 1000) ? String.format("%.2f GB", backupSizeGB) : String.format("%.2fMB", backupSizeMB); + String sizeString = (backupSizeMB >= 1000) ? String.format("%.2fGB", backupSizeGB) : String.format("%.2fMB", backupSizeMB); resultText.append("\n" + tr("quickbackupmulti.list_backup.slot.header", finalJ) + " ") .append(backText) .append(deleteText) - .append("§2§l" + sizeString) - .append(tr("quickbackupmulti.list_backup.slot.info", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(result.timestamp), desc)); + .append("§a" + sizeString) + .append(String.format(" §b%s§7: §r%s", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(result.timestamp), desc)); } catch (IOException e) { - resultText.append(Messenger.literal("\n"+ tr("quickbackupmulti.list_backup.slot.header", j) + " §2[▷] §c[×] §rNone")); + resultText.append(Messenger.literal("\n"+ tr("quickbackupmulti.list_backup.slot.header", j) + " §2[▷] §c[×] §r") + tr("quickbackupmulti.empty_comment")); } } double totalBackupSizeMB = (double) totalBackupSizeB / FileUtils.ONE_MB; diff --git a/src/main/resources/assets/quickbackupmulti/lang/en_us.yml b/src/main/resources/assets/quickbackupmulti/lang/en_us.yml index f4ebac1..41e8277 100644 --- a/src/main/resources/assets/quickbackupmulti/lang/en_us.yml +++ b/src/main/resources/assets/quickbackupmulti/lang/en_us.yml @@ -35,7 +35,6 @@ quickbackupmulti: restore: Click to restore to slot §6%s§r delete: Click to delete slot §6%s§r total_space: "Total space consumed: §a%s§r" - info: " §rDate: %s; Desc: %s" restore: countdown: diff --git a/src/main/resources/assets/quickbackupmulti/lang/zh_cn.yml b/src/main/resources/assets/quickbackupmulti/lang/zh_cn.yml index fd4c273..6c6d6ce 100644 --- a/src/main/resources/assets/quickbackupmulti/lang/zh_cn.yml +++ b/src/main/resources/assets/quickbackupmulti/lang/zh_cn.yml @@ -35,7 +35,6 @@ quickbackupmulti: restore: 点击回档至槽位§6%s§r delete: 点击删除槽位§6%s§r total_space: "备份总占用空间: §a%s§r" - info: " §r日期: %s; 注释: %s" restore: countdown: