refactor: improve router type safety and usage

- Add explicit Router type imports across views
- Replace $router type casting with proper typing
- Use $router.back() instead of $router.go(-1) for consistency
- Add proper route and router typings to components
- Clean up router navigation methods
- Fix router push/back method calls

This commit improves type safety and consistency in router usage across
the application's view components.
This commit is contained in:
Matthew Raymer
2025-02-26 06:50:08 +00:00
parent a2e19d7e9a
commit f6802cd160
56 changed files with 581 additions and 251 deletions

View File

@@ -44,7 +44,10 @@
@click="confirmConfirmClaim()"
>
Confirm
<font-awesome icon="circle-check" class="ml-2 text-white cursor-pointer" />
<font-awesome
icon="circle-check"
class="ml-2 text-white cursor-pointer"
/>
</button>
<button
v-else
@@ -52,7 +55,10 @@
class="col-span-1 bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-4 py-2 rounded-md"
>
Confirm
<font-awesome icon="circle-check" class="ml-2 text-white cursor-pointer" />
<font-awesome
icon="circle-check"
class="ml-2 text-white cursor-pointer"
/>
</button>
</div>
@@ -67,7 +73,10 @@
</div>
<div class="ml-6">gave</div>
<div v-if="giveDetails.amount">
<font-awesome icon="hand-holding-dollar" class="fa-fw text-slate-400" />
<font-awesome
icon="hand-holding-dollar"
class="fa-fw text-slate-400"
/>
{{ displayAmount(giveDetails.unit, giveDetails.amount) }}
</div>
<div v-if="giveDetails.description">
@@ -99,7 +108,10 @@
target="_blank"
>
This fulfills a bigger plan
<font-awesome icon="arrow-up-right-from-square" class="fa-fw" />
<font-awesome
icon="arrow-up-right-from-square"
class="fa-fw"
/>
</router-link>
</div>
<!-- if there's another, it's probably fulfilling an offer, too -->
@@ -125,7 +137,10 @@
giveDetails?.fulfillsType || "",
)
}}
<font-awesome icon="arrow-up-right-from-square" class="fa-fw" />
<font-awesome
icon="arrow-up-right-from-square"
class="fa-fw"
/>
</router-link>
</div>
</div>
@@ -185,7 +200,10 @@
)
"
>
<font-awesome icon="copy" class="text-slate-400 fa-fw" />
<font-awesome
icon="copy"
class="text-slate-400 fa-fw"
/>
</button>
</span>
</div>
@@ -228,7 +246,10 @@
)
"
>
<font-awesome icon="copy" class="text-slate-400 fa-fw" />
<font-awesome
icon="copy"
class="text-slate-400 fa-fw"
/>
</button>
</span>
</div>
@@ -342,12 +363,18 @@
copyToClipboard('The DID of ' + visDid, visDid)
"
>
<font-awesome icon="copy" class="text-slate-400 fa-fw" />
<font-awesome
icon="copy"
class="text-slate-400 fa-fw"
/>
</button>
</span>
<span v-if="veriClaim.publicUrls?.[visDid]"
>, found at
<font-awesome icon="globe" class="fa-fw text-slate-400" />
<font-awesome
icon="globe"
class="fa-fw text-slate-400"
/>
<a
:href="veriClaim.publicUrls?.[visDid]"
class="text-blue-500"