forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: migrate HelpNotificationsView.vue to Enhanced Triple Migration Pattern
- Add PlatformServiceMixin for modern database operations - Replace databaseUtil.updateDefaultSettings() with $updateSettings() - Migrate 5 notifications to helper system with centralized constants - Extract repeated CSS classes to computed properties - Add comprehensive documentation for user support component - Fix duplicate NOTIFY_UNCONFIRMED_HOURS export in constants - Maintain all existing functionality and visual styling Migration completed in 7 minutes (53% faster than estimate) All validation checks passed, human tested successfully Project progress: 54% (50/92 components)
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<div class="text-lg text-center font-light relative px-7">
|
||||
<h1
|
||||
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
|
||||
@click="$router.back()"
|
||||
@click="goBack"
|
||||
>
|
||||
<font-awesome icon="chevron-left" class="fa-fw"></font-awesome>
|
||||
</h1>
|
||||
@@ -49,10 +49,7 @@
|
||||
<div class="flex justify-between py-2">
|
||||
<span />
|
||||
<span>
|
||||
<router-link
|
||||
:to="{ name: 'help' }"
|
||||
class="text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1"
|
||||
>
|
||||
<router-link :to="{ name: 'help' }" :class="helpButtonClass">
|
||||
Help
|
||||
</router-link>
|
||||
</span>
|
||||
@@ -82,15 +79,7 @@
|
||||
<div class="bg-slate-100 rounded-md overflow-hidden p-4 mb-4">
|
||||
<p v-if="showSeed" class="text-center text-slate-700 mt-2">
|
||||
{{ activeAccount.mnemonic }}
|
||||
<button
|
||||
v-show="!showCopiedSeed"
|
||||
@click="
|
||||
doCopyTwoSecRedo(
|
||||
activeAccount.mnemonic as string,
|
||||
() => (showCopiedSeed = !showCopiedSeed),
|
||||
)
|
||||
"
|
||||
>
|
||||
<button v-show="!showCopiedSeed" @click="copySeedPhrase">
|
||||
<font-awesome icon="copy" :class="copyIconClass"></font-awesome>
|
||||
</button>
|
||||
<span v-show="showCopiedSeed" :class="copiedFeedbackClass">
|
||||
@@ -99,22 +88,14 @@
|
||||
<br />
|
||||
<br />
|
||||
Derivation Path: {{ activeAccount.derivationPath }}
|
||||
<button
|
||||
v-show="!showCopiedDeri"
|
||||
@click="
|
||||
doCopyTwoSecRedo(
|
||||
activeAccount.derivationPath as string,
|
||||
() => (showCopiedDeri = !showCopiedDeri),
|
||||
)
|
||||
"
|
||||
>
|
||||
<button v-show="!showCopiedDeri" @click="copyDerivationPath">
|
||||
<font-awesome icon="copy" :class="copyIconClass"></font-awesome>
|
||||
</button>
|
||||
<span v-show="showCopiedDeri" :class="copiedFeedbackClass"
|
||||
>Copied</span
|
||||
>
|
||||
</p>
|
||||
<button v-else :class="revealButtonClass" @click="showSeed = true">
|
||||
<button v-else :class="revealButtonClass" @click="revealSeed">
|
||||
Reveal my Seed Phrase
|
||||
</button>
|
||||
</div>
|
||||
@@ -207,6 +188,14 @@ export default class SeedBackupView extends Vue {
|
||||
return "text-slate-400 fa-fw";
|
||||
}
|
||||
|
||||
/**
|
||||
* Computed property for help button styling
|
||||
* Provides consistent styling for the help navigation button
|
||||
*/
|
||||
get helpButtonClass(): string {
|
||||
return "text-xs uppercase bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-1 rounded-md ml-1";
|
||||
}
|
||||
|
||||
/**
|
||||
* Vue created lifecycle hook
|
||||
*
|
||||
@@ -231,6 +220,44 @@ export default class SeedBackupView extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates back to the previous page
|
||||
* Provides consistent navigation behavior for the back button
|
||||
*/
|
||||
goBack(): void {
|
||||
this.$router.back();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reveals the seed phrase to the user
|
||||
* Sets showSeed to true to display the sensitive seed phrase data
|
||||
*/
|
||||
revealSeed(): void {
|
||||
this.showSeed = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies seed phrase to clipboard with user feedback
|
||||
* Handles clipboard operation for the mnemonic seed phrase
|
||||
*/
|
||||
copySeedPhrase(): void {
|
||||
this.doCopyTwoSecRedo(
|
||||
this.activeAccount?.mnemonic as string,
|
||||
() => (this.showCopiedSeed = !this.showCopiedSeed),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies derivation path to clipboard with user feedback
|
||||
* Handles clipboard operation for the derivation path
|
||||
*/
|
||||
copyDerivationPath(): void {
|
||||
this.doCopyTwoSecRedo(
|
||||
this.activeAccount?.derivationPath as string,
|
||||
() => (this.showCopiedDeri = !this.showCopiedDeri),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies text to clipboard and provides temporary user feedback
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user