|
@ -10,6 +10,15 @@ |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-4"> |
|
|
|
|
|
<a |
|
|
|
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
|
|
|
href="/" |
|
|
|
|
|
> |
|
|
|
|
|
Take me back to the home page |
|
|
|
|
|
</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="mt-4"> |
|
|
<div class="mt-4"> |
|
|
<!-- Migration Options --> |
|
|
<!-- Migration Options --> |
|
|
<div class="bg-white shadow rounded-lg"> |
|
|
<div class="bg-white shadow rounded-lg"> |
|
@ -44,12 +53,21 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-4"> |
|
|
|
|
|
<h3 |
|
|
|
|
|
v-if="comparison && (comparison.sqliteAccounts.length > 1 || comparison.sqliteSettings.length > 1 || comparison.sqliteContacts.length > 0)" |
|
|
|
|
|
class="text-lg leading-6 font-medium text-red-900 mb-4" |
|
|
|
|
|
> |
|
|
|
|
|
Beware: you have unexpected existing data in the SQLite database that will be overwritten. You should talk with Trent. |
|
|
|
|
|
</h3> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- Action Buttons --> |
|
|
<!-- Action Buttons --> |
|
|
<div class="mt-4 mb-8 flex flex-wrap gap-4"> |
|
|
<div class="mt-4 mb-8 flex flex-wrap gap-4"> |
|
|
<button |
|
|
<button |
|
|
:disabled="isLoading" |
|
|
:disabled="isLoading" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
@click="displayDatabases" |
|
|
@click="compareDatabases" |
|
|
> |
|
|
> |
|
|
<IconRenderer |
|
|
<IconRenderer |
|
|
v-if="isLoading" |
|
|
v-if="isLoading" |
|
@ -62,13 +80,13 @@ |
|
|
icon-name="chart" |
|
|
icon-name="chart" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
/> |
|
|
/> |
|
|
Show Existing Data |
|
|
Compare Databases |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
|
|
|
<button |
|
|
<button |
|
|
:disabled="isLoading" |
|
|
:disabled="isLoading || !comparison" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
@click="compareDatabases" |
|
|
@click="migrateAll" |
|
|
> |
|
|
> |
|
|
<IconRenderer |
|
|
<IconRenderer |
|
|
v-if="isLoading" |
|
|
v-if="isLoading" |
|
@ -78,16 +96,18 @@ |
|
|
/> |
|
|
/> |
|
|
<IconRenderer |
|
|
<IconRenderer |
|
|
v-else |
|
|
v-else |
|
|
icon-name="chart" |
|
|
icon-name="check" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
/> |
|
|
/> |
|
|
Compare Databases |
|
|
Migrate All (Recommended) |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
<div class="w-full border-t border-gray-200 my-4"></div> |
|
|
|
|
|
|
|
|
<button |
|
|
<button |
|
|
:disabled="isLoading || !comparison" |
|
|
:disabled="isLoading" |
|
|
class="inline-flex items-center px-6 py-3 border border-transparent text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
@click="migrateAll" |
|
|
@click="displayDatabases" |
|
|
> |
|
|
> |
|
|
<IconRenderer |
|
|
<IconRenderer |
|
|
v-if="isLoading" |
|
|
v-if="isLoading" |
|
@ -97,14 +117,12 @@ |
|
|
/> |
|
|
/> |
|
|
<IconRenderer |
|
|
<IconRenderer |
|
|
v-else |
|
|
v-else |
|
|
icon-name="check" |
|
|
icon-name="chart" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
svg-class="-ml-1 mr-3 h-5 w-5" |
|
|
/> |
|
|
/> |
|
|
Migrate All (Recommended) |
|
|
Show Previous Data |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
|
|
|
<div class="w-full border-t border-gray-200 my-4"></div> |
|
|
|
|
|
|
|
|
|
|
|
<button |
|
|
<button |
|
|
:disabled="isLoading || !comparison" |
|
|
:disabled="isLoading || !comparison" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
|
class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 disabled:opacity-50 disabled:cursor-not-allowed" |
|
@ -406,7 +424,7 @@ |
|
|
icon-name="plusCircle" |
|
|
icon-name="plusCircle" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
/> |
|
|
/> |
|
|
<span class="text-sm font-medium text-blue-900">Added</span> |
|
|
<span class="text-sm font-medium text-blue-900">Add</span> |
|
|
</div> |
|
|
</div> |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
comparison.differences.accounts.added.length |
|
|
comparison.differences.accounts.added.length |
|
@ -454,7 +472,7 @@ |
|
|
class="mt-4" |
|
|
class="mt-4" |
|
|
> |
|
|
> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
Added Accounts ({{ comparison.differences.accounts.added.length }}): |
|
|
Add Accounts ({{ comparison.differences.accounts.added.length }}): |
|
|
</h4> |
|
|
</h4> |
|
|
<div class="space-y-1"> |
|
|
<div class="space-y-1"> |
|
|
<div |
|
|
<div |
|
@ -535,7 +553,7 @@ |
|
|
icon-name="plusCircle" |
|
|
icon-name="plusCircle" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
/> |
|
|
/> |
|
|
<span class="text-sm font-medium text-blue-900">Added</span> |
|
|
<span class="text-sm font-medium text-blue-900">Add</span> |
|
|
</div> |
|
|
</div> |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
comparison.differences.settings.added.length |
|
|
comparison.differences.settings.added.length |
|
@ -583,7 +601,7 @@ |
|
|
class="mt-4" |
|
|
class="mt-4" |
|
|
> |
|
|
> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
Added Settings ({{ comparison.differences.settings.added.length }}): |
|
|
Add Settings ({{ comparison.differences.settings.added.length }}): |
|
|
</h4> |
|
|
</h4> |
|
|
<div class="space-y-1"> |
|
|
<div class="space-y-1"> |
|
|
<div |
|
|
<div |
|
@ -658,7 +676,7 @@ |
|
|
icon-name="plusCircle" |
|
|
icon-name="plusCircle" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
svg-class="h-5 w-5 text-blue-600 mr-2" |
|
|
/> |
|
|
/> |
|
|
<span class="text-sm font-medium text-blue-900">Added</span> |
|
|
<span class="text-sm font-medium text-blue-900">Add</span> |
|
|
</div> |
|
|
</div> |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
<span class="text-sm font-bold text-blue-900">{{ |
|
|
comparison.differences.contacts.added.length |
|
|
comparison.differences.contacts.added.length |
|
@ -706,7 +724,7 @@ |
|
|
class="mt-4" |
|
|
class="mt-4" |
|
|
> |
|
|
> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
<h4 class="text-sm font-medium text-gray-900 mb-2"> |
|
|
Added Contacts ({{ comparison.differences.contacts.added.length }}): |
|
|
Add Contacts ({{ comparison.differences.contacts.added.length }}): |
|
|
</h4> |
|
|
</h4> |
|
|
<div class="space-y-1"> |
|
|
<div class="space-y-1"> |
|
|
<div |
|
|
<div |
|
@ -799,7 +817,7 @@ import { |
|
|
getDexieAccounts, |
|
|
getDexieAccounts, |
|
|
getDexieSettings, |
|
|
getDexieSettings, |
|
|
getDexieContacts, |
|
|
getDexieContacts, |
|
|
} from "../services/migrationService"; |
|
|
} from "../services/indexedDBMigrationService"; |
|
|
import { logger } from "../utils/logger"; |
|
|
import { logger } from "../utils/logger"; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|