Update conflict modal wording

- close #20
pull/1/head
Made Baruna 2021-03-31 05:18:52 +08:00
parent 42419dabdc
commit ec1a3dc24b
3 changed files with 37 additions and 12 deletions

View File

@ -1,7 +1,8 @@
<script>
import { mdiCloudAlert, mdiContentSave, mdiDownload, mdiFile, mdiGoogleDrive, mdiLoading, mdiUpload } from '@mdi/js';
import { t } from 'svelte-i18n';
import Button from './Button.svelte';
import Icon from './Icon.svelte';
export let remoteTime;
@ -30,34 +31,34 @@
<div class="flex">
<Icon path={mdiCloudAlert} color="white" size={2} />
<p class="flex-1 text-white text-lg md:text-xl font-bold ml-4">
Your local data is conflicting with the ones stored in the Google Drive!
{$t('sync.message')}
</p>
</div>
<div class="mt-4 p-4 bg-item rounded-xl text-white">
<p class="font-bold">
<Icon path={mdiGoogleDrive} className="mr-2" />
Google Drive Data -
{remoteNewer ? 'NEWER' : 'OLDER'}
{$t('sync.googleDriveData')} -
<span class={remoteNewer ? 'text-green-400' : 'text-red-400'}>{remoteNewer ? $t('sync.newer') : $t('sync.older')}</span>
</p>
<p class="text-gray-400 mt-1">Last modified: {remoteFormatted}</p>
<p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {remoteFormatted}</p>
<Button disabled={loading} className="mt-2 w-full" on:click={useRemoteData}>
<Icon path={loading ? mdiLoading : mdiDownload} spin={loading} className="mr-1" />Replace Local Data
<Icon path={loading ? mdiLoading : mdiDownload} spin={loading} className="mr-1" />{$t('sync.useGoogleDriveData')}
</Button>
</div>
<p class="mt-2 text-white text-center">OR</p>
<p class="mt-2 text-white text-center">{$t('sync.or')}</p>
<div class="mt-2 p-4 bg-item rounded-xl text-white">
<p class="font-bold">
<Icon path={mdiFile} className="mr-2" />
Local Data -
{remoteNewer ? 'OLDER' : 'NEWER'}
{$t('sync.localData')} -
<span class={remoteNewer ? 'text-red-400' : 'text-green-400'}>{remoteNewer ? $t('sync.older') : $t('sync.newer')}
</p>
<p class="text-gray-400 mt-1">Last modified: {localFormatted}</p>
<p class="text-gray-400 mt-1">{$t('sync.lastModified')}: {localFormatted}</p>
<Button disabled={loading} className="mt-2 w-full" on:click={useLocalData}>
<Icon path={loading ? mdiLoading : mdiUpload} spin={loading} className="mr-1" />Replace Google Drive Data
<Icon path={loading ? mdiLoading : mdiUpload} spin={loading} className="mr-1" />{$t('sync.useLocalData')}
</Button>
</div>
<div class="flex mt-6 justify-end">
<Button className="w-full md:w-auto" on:click={downloadBackup}>
<Icon path={mdiContentSave} className="mr-1" />Download Both Data
<Icon path={mdiContentSave} className="mr-1" />{$t('sync.download')}
</Button>
</div>

View File

@ -381,5 +381,17 @@
],
"subtitleNotCollect": "What paimon.moe NOT collect",
"notCollect": "Paimon.moe never save any password, uid, username, email, temporary keys, or feedback url. If you are interested, the project is open source and you can check the source code at https://github.com/MadeBaruna/paimon-moe-api and https://github.com/MadeBaruna/paimon-moe"
},
"sync": {
"message": "Your local data in this browser is conflicting with the ones stored in the Google Drive!",
"googleDriveData": "Google Drive Data",
"localData": "This Browser Local Data",
"older": "OLDER",
"newer": "NEWER",
"useGoogleDriveData": "Use Data From Google Drive",
"useLocalData": "Use This Browser Local Data",
"download": "Download Both Data",
"lastModified": "Last modified",
"or": "OR"
}
}

View File

@ -381,5 +381,17 @@
],
"subtitleNotCollect": "Apa yang paimon.moe TIDAK kumpulkan",
"notCollect": "Paimon.moe tidak menyimpan password, uid, username, email, temporary keys, atau feedback url. Jika kamu tertarik, projek nya open source dan kamu bisa mengecek kode nya di https://github.com/MadeBaruna/paimon-moe-api dan https://github.com/MadeBaruna/paimon-moe"
},
"sync": {
"message": "Data yang tersimpan pada browser ini tidak sama dengan yang tersimpan pada Google Drive!",
"googleDriveData": "Data Google Drive",
"localData": "Data Pada Browser Ini",
"older": "LEBIH LAMA",
"newer": "LEBIH BARU",
"useGoogleDriveData": "Gunakan Data Dari Google Drive",
"useLocalData": "Gunakan Data Dari Browser Ini",
"download": "Download Kedua Data",
"lastModified": "Terakhir dimodifikasi",
"or": "ATAU"
}
}