Enhance update progress modal step granularity, timers and theme-agnostic styling
This commit is contained in:
@@ -60,7 +60,16 @@ const dictionary = {
|
||||
"Installing package & updating configurations...": "Установка пакета и обновление настроек...",
|
||||
"Applying changes & reloading services...": "Применение изменений и перезапуск служб...",
|
||||
"Connecting to update server...": "Подключение к серверу обновлений...",
|
||||
"Comparing version releases...": "Сравнение версий релизов...",
|
||||
"Fetching release & commit metadata...": "Запрос метаданных релизов и коммитов...",
|
||||
"Comparing versions & fingerprint check...": "Сравнение версий и проверка целостности...",
|
||||
"Stopping active services...": "Остановка активных служб...",
|
||||
"Removing binaries & package files...": "Удаление бинарных файлов и пакетов...",
|
||||
"Cleaning configuration & reloading...": "Очистка конфигураций и перезапуск...",
|
||||
"Environment preparation & dependency check...": "Подготовка окружения и проверка зависимостей...",
|
||||
"Downloading package from repository...": "Загрузка пакета из репозитория...",
|
||||
"Unpacking & installing binaries...": "Распаковка и установка компонентов...",
|
||||
"Updating configuration & access permissions...": "Обновление конфигураций и прав доступа...",
|
||||
"Applying changes & reloading services...": "Применение изменений и перезапуск служб...",
|
||||
"Update completed successfully!": "Обновление успешно завершено!",
|
||||
"Installation completed successfully!": "Установка успешно завершена!",
|
||||
"Removal completed successfully!": "Удаление успешно завершено!",
|
||||
|
||||
@@ -3700,3 +3700,27 @@ msgstr "Пожалуйста, подождите, выполняется опе
|
||||
|
||||
msgid "Operation failed"
|
||||
msgstr "Операция не выполнена"
|
||||
|
||||
msgid "Fetching release & commit metadata..."
|
||||
msgstr "Запрос метаданных релизов и коммитов..."
|
||||
|
||||
msgid "Comparing versions & fingerprint check..."
|
||||
msgstr "Сравнение версий и проверка целостности..."
|
||||
|
||||
msgid "Stopping active services..."
|
||||
msgstr "Остановка активных служб..."
|
||||
|
||||
msgid "Removing binaries & package files..."
|
||||
msgstr "Удаление бинарных файлов и пакетов..."
|
||||
|
||||
msgid "Cleaning configuration & reloading..."
|
||||
msgstr "Очистка конфигураций и перезапуск..."
|
||||
|
||||
msgid "Environment preparation & dependency check..."
|
||||
msgstr "Подготовка окружения и проверка зависимостей..."
|
||||
|
||||
msgid "Unpacking & installing binaries..."
|
||||
msgstr "Распаковка и установка компонентов..."
|
||||
|
||||
msgid "Updating configuration & access permissions..."
|
||||
msgstr "Обновление конфигураций и прав доступа..."
|
||||
|
||||
@@ -111,13 +111,24 @@ export function showUpdateProgressModal(
|
||||
}
|
||||
|
||||
const steps = isCheckAction
|
||||
? [_('Connecting to update server...'), _('Comparing version releases...')]
|
||||
: [
|
||||
_('Initializing operation...'),
|
||||
_('Downloading package from repository...'),
|
||||
_('Installing package & updating configurations...'),
|
||||
_('Applying changes & reloading services...'),
|
||||
];
|
||||
? [
|
||||
_('Connecting to update server...'),
|
||||
_('Fetching release & commit metadata...'),
|
||||
_('Comparing versions & fingerprint check...'),
|
||||
]
|
||||
: isRemoveAction
|
||||
? [
|
||||
_('Stopping active services...'),
|
||||
_('Removing binaries & package files...'),
|
||||
_('Cleaning configuration & reloading...'),
|
||||
]
|
||||
: [
|
||||
_('Environment preparation & dependency check...'),
|
||||
_('Downloading package from repository...'),
|
||||
_('Unpacking & installing binaries...'),
|
||||
_('Updating configuration & access permissions...'),
|
||||
_('Applying changes & reloading services...'),
|
||||
];
|
||||
|
||||
let currentStepIndex = 0;
|
||||
let elapsedSeconds = 0;
|
||||
@@ -235,21 +246,34 @@ export function showUpdateProgressModal(
|
||||
if (isInstallOrUpdate) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 4 && currentStepIndex === 0) {
|
||||
if (elapsedSeconds >= 2 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 12 && currentStepIndex === 1) {
|
||||
} else if (elapsedSeconds >= 5 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
} else if (elapsedSeconds >= 25 && currentStepIndex === 2) {
|
||||
} else if (elapsedSeconds >= 9 && currentStepIndex === 2) {
|
||||
setStep(3);
|
||||
} else if (elapsedSeconds >= 14 && currentStepIndex === 3) {
|
||||
setStep(4);
|
||||
}
|
||||
}, 1000);
|
||||
}, 500);
|
||||
} else if (isCheckAction) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 1 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 2 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
}
|
||||
}, 800);
|
||||
}, 500);
|
||||
} else if (isRemoveAction) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 1 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 3 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function setStep(stepIndex: number, customStatus?: string) {
|
||||
|
||||
@@ -15151,10 +15151,19 @@ function showUpdateProgressModal(options) {
|
||||
} else {
|
||||
modalTitleText = `${_("Updating")} ${options.componentTitle}...`;
|
||||
}
|
||||
const steps = isCheckAction ? [_("Connecting to update server..."), _("Comparing version releases...")] : [
|
||||
_("Initializing operation..."),
|
||||
const steps = isCheckAction ? [
|
||||
_("Connecting to update server..."),
|
||||
_("Fetching release & commit metadata..."),
|
||||
_("Comparing versions & fingerprint check...")
|
||||
] : isRemoveAction ? [
|
||||
_("Stopping active services..."),
|
||||
_("Removing binaries & package files..."),
|
||||
_("Cleaning configuration & reloading...")
|
||||
] : [
|
||||
_("Environment preparation & dependency check..."),
|
||||
_("Downloading package from repository..."),
|
||||
_("Installing package & updating configurations..."),
|
||||
_("Unpacking & installing binaries..."),
|
||||
_("Updating configuration & access permissions..."),
|
||||
_("Applying changes & reloading services...")
|
||||
];
|
||||
let currentStepIndex = 0;
|
||||
@@ -15257,21 +15266,34 @@ function showUpdateProgressModal(options) {
|
||||
if (isInstallOrUpdate) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 4 && currentStepIndex === 0) {
|
||||
if (elapsedSeconds >= 2 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 12 && currentStepIndex === 1) {
|
||||
} else if (elapsedSeconds >= 5 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
} else if (elapsedSeconds >= 25 && currentStepIndex === 2) {
|
||||
} else if (elapsedSeconds >= 9 && currentStepIndex === 2) {
|
||||
setStep(3);
|
||||
} else if (elapsedSeconds >= 14 && currentStepIndex === 3) {
|
||||
setStep(4);
|
||||
}
|
||||
}, 1e3);
|
||||
}, 500);
|
||||
} else if (isCheckAction) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 1 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 2 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
}
|
||||
}, 800);
|
||||
}, 500);
|
||||
} else if (isRemoveAction) {
|
||||
autoAdvanceTimer = setInterval(() => {
|
||||
if (isCompleted) return;
|
||||
if (elapsedSeconds >= 1 && currentStepIndex === 0) {
|
||||
setStep(1);
|
||||
} else if (elapsedSeconds >= 3 && currentStepIndex === 1) {
|
||||
setStep(2);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
function setStep(stepIndex, customStatus) {
|
||||
if (stepIndex < 0 || stepIndex >= steps.length) return;
|
||||
|
||||
@@ -3700,3 +3700,27 @@ msgstr "Пожалуйста, подождите, выполняется опе
|
||||
|
||||
msgid "Operation failed"
|
||||
msgstr "Операция не выполнена"
|
||||
|
||||
msgid "Fetching release & commit metadata..."
|
||||
msgstr "Запрос метаданных релизов и коммитов..."
|
||||
|
||||
msgid "Comparing versions & fingerprint check..."
|
||||
msgstr "Сравнение версий и проверка целостности..."
|
||||
|
||||
msgid "Stopping active services..."
|
||||
msgstr "Остановка активных служб..."
|
||||
|
||||
msgid "Removing binaries & package files..."
|
||||
msgstr "Удаление бинарных файлов и пакетов..."
|
||||
|
||||
msgid "Cleaning configuration & reloading..."
|
||||
msgstr "Очистка конфигураций и перезапуск..."
|
||||
|
||||
msgid "Environment preparation & dependency check..."
|
||||
msgstr "Подготовка окружения и проверка зависимостей..."
|
||||
|
||||
msgid "Unpacking & installing binaries..."
|
||||
msgstr "Распаковка и установка компонентов..."
|
||||
|
||||
msgid "Updating configuration & access permissions..."
|
||||
msgstr "Обновление конфигураций и прав доступа..."
|
||||
|
||||
Reference in New Issue
Block a user