Add warning small size sync

pull/1/head
Made Baruna 2022-07-13 04:32:41 +07:00
parent 9945a5be9e
commit 49417996b4
2 changed files with 8 additions and 1 deletions

View File

@ -51,6 +51,9 @@
<span>- {numberFormat.format(remoteSize)} KB</span> <span>- {numberFormat.format(remoteSize)} KB</span>
</p> </p>
<p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {remoteFormatted}</p> <p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {remoteFormatted}</p>
{#if remoteSize / localSize < 0.3}
<p class="text-red-400 font-bold mt-1">{$t('sync.smallSizeWarning')}</p>
{/if}
<Button disabled={loading} className="mt-2 w-full" on:click={useRemoteData}> <Button disabled={loading} className="mt-2 w-full" on:click={useRemoteData}>
<Icon path={loading ? mdiLoading : mdiDownload} spin={loading} className="mr-1" />{$t('sync.useGoogleDriveData')} <Icon path={loading ? mdiLoading : mdiDownload} spin={loading} className="mr-1" />{$t('sync.useGoogleDriveData')}
</Button> </Button>
@ -66,6 +69,9 @@
<span>- {numberFormat.format(localSize)} KB</span> <span>- {numberFormat.format(localSize)} KB</span>
</p> </p>
<p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {localFormatted}</p> <p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {localFormatted}</p>
{#if localSize / remoteSize < 0.3}
<p class="text-red-400 font-bold mt-1">{$t('sync.smallSizeWarning')}</p>
{/if}
<Button disabled={loading} className="mt-2 w-full" on:click={useLocalData}> <Button disabled={loading} className="mt-2 w-full" on:click={useLocalData}>
<Icon path={loading ? mdiLoading : mdiUpload} spin={loading} className="mr-1" />{$t('sync.useLocalData')} <Icon path={loading ? mdiLoading : mdiUpload} spin={loading} className="mr-1" />{$t('sync.useLocalData')}
</Button> </Button>

View File

@ -761,7 +761,8 @@
"useLocalData": "Use Local Browser Data", "useLocalData": "Use Local Browser Data",
"download": "Download Both Data", "download": "Download Both Data",
"lastModified": "Last modified", "lastModified": "Last modified",
"or": "OR" "or": "OR",
"smallSizeWarning": "CAREFUL, THE SIZE IS MUCH SMALLER!"
}, },
"footer": { "footer": {
"affliate": "Paimon.moe is not affiliated with HoYoverse.", "affliate": "Paimon.moe is not affiliated with HoYoverse.",