mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
reload after db upgrade logic
This commit is contained in:
1 parent
afeb43fc2c
commit
a38a28a836
3 files changed
+33
-19
No files matched your search
@@ -34,6 +34,7 @@ interface Progress {
|
||||
message: string;
|
||||
current?: number;
|
||||
total?: number;
|
||||
unit?: string;
|
||||
}
|
||||
|
||||
function LoadingDialog() {
|
||||
@@ -139,9 +140,10 @@ function LoadingDialog() {
|
||||
|
||||
listen<DownloadProgress>("download-url-progress", ({ payload }) => {
|
||||
updateProgress({
|
||||
message: `Downloading ${payload.filepath} (MiB)`,
|
||||
message: `Downloading ${payload.filepath}`,
|
||||
current: payload.downloaded >> 20,
|
||||
total: payload.content_length >> 20,
|
||||
unit: "MiB",
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
@@ -175,7 +177,7 @@ function LoadingDialog() {
|
||||
? messages.map((m, i) => (
|
||||
<p key={i}>
|
||||
{m.total
|
||||
? `${m.message} (${m.current}/${m.total})`
|
||||
? `${m.message} (${(m.current || 0).toLocaleString()}/${m.total.toLocaleString()}${m.unit ? ` ${m.unit}` : ""})`
|
||||
: m.message}
|
||||
</p>
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user