forked from jsnbuchanan/crowd-funder-for-time-pwa
refactor: migrate interfaces to dedicated directory
Reorganizes TypeScript interfaces into a modular structure: - Create dedicated interfaces directory with specialized files - Split interfaces by domain (claims, common, limits, records, user) - Update imports in endorserServer.ts to use new interface locations - Replace 'any' types with 'unknown' for better type safety - Add proper type imports and exports This improves code organization and maintainability by: - Centralizing interface definitions - Reducing file size of endorserServer.ts - Making interface relationships more explicit - Improving type safety with stricter types
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
class="border border-r-0 border-slate-400 bg-slate-200 px-4 py-2"
|
||||
@click="amountInput === '0' ? null : decrement()"
|
||||
>
|
||||
<fa icon="chevron-left" />
|
||||
<font-awesome icon="chevron-left" />
|
||||
</div>
|
||||
<input
|
||||
id="inputGivenAmount"
|
||||
@@ -33,7 +33,7 @@
|
||||
class="rounded-r border border-slate-400 bg-slate-200 px-4 py-2"
|
||||
@click="increment()"
|
||||
>
|
||||
<fa icon="chevron-right" />
|
||||
<font-awesome icon="chevron-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 flex justify-center">
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
<p class="text-center mb-2 mt-6 italic">
|
||||
Sign & Send to publish to the world
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="circle-info"
|
||||
class="pl-2 text-blue-500 cursor-pointer"
|
||||
@click="explainData()"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
class="text-lg text-center p-2 leading-none absolute right-0 -top-1"
|
||||
@click="cancel"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]"></fa>
|
||||
<font-awesome icon="xmark" class="w-[1em]"></font-awesome>
|
||||
</div>
|
||||
</h1>
|
||||
<span class="mt-2 flex justify-between">
|
||||
@@ -16,7 +16,7 @@
|
||||
class="rounded-l border border-slate-400 bg-slate-200 px-4 py-2 flex"
|
||||
@click="prevIdea()"
|
||||
>
|
||||
<fa icon="chevron-left" class="m-auto" />
|
||||
<font-awesome icon="chevron-left" class="m-auto" />
|
||||
</span>
|
||||
|
||||
<div class="m-2">
|
||||
@@ -45,7 +45,7 @@
|
||||
class="text-center 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-1.5 py-2 rounded-md mt-4"
|
||||
@click="nextIdeaPastContacts()"
|
||||
>
|
||||
Skip Contacts <fa icon="forward" />
|
||||
Skip Contacts <font-awesome icon="forward" />
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
@@ -57,7 +57,7 @@
|
||||
class="rounded-r border border-slate-400 bg-slate-200 px-4 py-2 flex"
|
||||
@click="nextIdea()"
|
||||
>
|
||||
<fa icon="chevron-right" class="m-auto" />
|
||||
<font-awesome icon="chevron-right" class="m-auto" />
|
||||
</span>
|
||||
</span>
|
||||
<button
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-xl font-bold capitalize">{{ roleName }} Details</h2>
|
||||
<button @click="close" class="text-gray-500 hover:text-gray-700">
|
||||
<fa icon="times" />
|
||||
<font-awesome icon="times" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
target="_blank"
|
||||
class="text-blue-500"
|
||||
>
|
||||
<fa icon="arrow-up-right-from-square" class="fa-fw" />
|
||||
<font-awesome icon="arrow-up-right-from-square" class="fa-fw" />
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
class="text-lg text-center px-2 py-0.5 leading-none absolute right-0 top-0 text-white"
|
||||
@click="close()"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]"></fa>
|
||||
<font-awesome icon="xmark" class="w-[1em]"></font-awesome>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="text-center mt-8">
|
||||
<div>
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="camera"
|
||||
class="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-2 py-2 rounded-md"
|
||||
@click="openPhotoDialog()"
|
||||
@@ -34,14 +34,14 @@
|
||||
<input type="text" v-model="imageUrl" class="border-2" />
|
||||
</span>
|
||||
<span class="ml-2">
|
||||
<fa
|
||||
<font-awesome
|
||||
v-if="imageUrl"
|
||||
icon="check"
|
||||
class="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-2 py-2 rounded-md cursor-pointer"
|
||||
@click="acceptUrl"
|
||||
/>
|
||||
<!-- so that there's no shifting when it becomes visible -->
|
||||
<fa v-else icon="check" class="text-white bg-white px-2 py-2" />
|
||||
<font-awesome v-else icon="check" class="text-white bg-white px-2 py-2" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
class="text-white text-2xl p-2 rounded-full hover:bg-white/10"
|
||||
@click="close"
|
||||
>
|
||||
<fa icon="xmark" />
|
||||
<font-awesome icon="xmark" />
|
||||
</button>
|
||||
|
||||
<!-- Mobile share button -->
|
||||
@@ -17,7 +17,7 @@
|
||||
class="text-white text-xl p-2 rounded-full hover:bg-white/10"
|
||||
@click="handleShare"
|
||||
>
|
||||
<fa icon="ellipsis" />
|
||||
<font-awesome icon="ellipsis" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
v-if="isLoading"
|
||||
class="mt-16 text-center text-4xl bg-slate-400 text-white w-14 py-2.5 rounded-full mx-auto"
|
||||
>
|
||||
<fa icon="spinner" class="fa-spin-pulse" />
|
||||
<font-awesome icon="spinner" class="fa-spin-pulse" />
|
||||
</div>
|
||||
|
||||
<!-- Members List -->
|
||||
@@ -33,13 +33,13 @@
|
||||
<span
|
||||
class="mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"
|
||||
>
|
||||
<fa icon="plus" class="text-sm" />
|
||||
<font-awesome icon="plus" class="text-sm" />
|
||||
</span>
|
||||
/
|
||||
<span
|
||||
class="mx-2 min-w-[24px] min-h-[24px] w-6 h-6 flex items-center justify-center rounded-full bg-blue-100 text-blue-600"
|
||||
>
|
||||
<fa icon="minus" class="text-sm" />
|
||||
<font-awesome icon="minus" class="text-sm" />
|
||||
</span>
|
||||
to add/remove them to/from the meeting.
|
||||
</span>
|
||||
@@ -54,7 +54,7 @@
|
||||
<span
|
||||
class="mx-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600"
|
||||
>
|
||||
<fa icon="circle-user" class="text-xl" />
|
||||
<font-awesome icon="circle-user" class="text-xl" />
|
||||
</span>
|
||||
to add them to your contacts.
|
||||
</span>
|
||||
@@ -67,7 +67,7 @@
|
||||
class="w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors"
|
||||
title="Refresh members list"
|
||||
>
|
||||
<fa icon="rotate" :class="{ 'fa-spin': isLoading }" />
|
||||
<font-awesome icon="rotate" :class="{ 'fa-spin': isLoading }" />
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
@@ -87,7 +87,7 @@
|
||||
class="ml-2 w-8 h-8 flex items-center justify-center rounded-full bg-green-100 text-green-600 hover:bg-green-200 hover:text-green-800 transition-colors"
|
||||
title="Add as contact"
|
||||
>
|
||||
<fa icon="circle-user" class="text-xl" />
|
||||
<font-awesome icon="circle-user" class="text-xl" />
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
@@ -100,7 +100,7 @@
|
||||
class="ml-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors"
|
||||
title="Contact info"
|
||||
>
|
||||
<fa icon="circle-info" class="text-base" />
|
||||
<font-awesome icon="circle-info" class="text-base" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex">
|
||||
@@ -117,7 +117,7 @@
|
||||
member.member.admitted ? 'Remove member' : 'Admit member'
|
||||
"
|
||||
>
|
||||
<fa
|
||||
<font-awesome
|
||||
:icon="member.member.admitted ? 'minus' : 'plus'"
|
||||
class="text-sm"
|
||||
/>
|
||||
@@ -127,7 +127,7 @@
|
||||
class="mr-2 mb-2 w-6 h-6 flex items-center justify-center rounded-full bg-slate-100 text-slate-500 hover:bg-slate-200 hover:text-slate-800 transition-colors"
|
||||
title="Admission info"
|
||||
>
|
||||
<fa icon="circle-info" class="text-base" />
|
||||
<font-awesome icon="circle-info" class="text-base" />
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
@@ -142,7 +142,7 @@
|
||||
class="w-8 h-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 hover:text-blue-800 transition-colors"
|
||||
title="Refresh members list"
|
||||
>
|
||||
<fa icon="rotate" :class="{ 'fa-spin': isLoading }" />
|
||||
<font-awesome icon="rotate" :class="{ 'fa-spin': isLoading }" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@click="decrement()"
|
||||
v-if="amountInput !== '0'"
|
||||
>
|
||||
<fa icon="chevron-left" />
|
||||
<font-awesome icon="chevron-left" />
|
||||
</div>
|
||||
<input
|
||||
data-testId="inputOfferAmount"
|
||||
@@ -33,7 +33,7 @@
|
||||
class="rounded-r border border-slate-400 bg-slate-200 px-4 py-2"
|
||||
@click="increment()"
|
||||
>
|
||||
<fa icon="chevron-right" />
|
||||
<font-awesome icon="chevron-right" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 flex justify-center">
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class="text-lg text-center leading-none absolute right-0 -top-1"
|
||||
@click="onClickClose(true)"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]" />
|
||||
<font-awesome icon="xmark" class="w-[1em]" />
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</span>
|
||||
click on the
|
||||
<span class="bg-green-600 text-white rounded-full">
|
||||
<fa icon="plus" class="fa-fw" />
|
||||
<font-awesome icon="plus" class="fa-fw" />
|
||||
</span>
|
||||
button to express your appreciation for... whatever -- maybe thanks for
|
||||
showing you all these fascinating stories of
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<p class="mt-4 flex items-center">
|
||||
The
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="house-chimney"
|
||||
class="ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"
|
||||
/>
|
||||
@@ -84,7 +84,7 @@
|
||||
class="text-lg text-center leading-none absolute right-0 -top-1"
|
||||
@click="onClickClose(true)"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]" />
|
||||
<font-awesome icon="xmark" class="w-[1em]" />
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
<p class="mt-4 flex items-center">
|
||||
The
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="magnifying-glass"
|
||||
class="ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"
|
||||
/>
|
||||
@@ -141,14 +141,14 @@
|
||||
class="text-lg text-center leading-none absolute right-0 -top-1"
|
||||
@click="onClickClose(true)"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]" />
|
||||
<font-awesome icon="xmark" class="w-[1em]" />
|
||||
</div>
|
||||
</h1>
|
||||
|
||||
<p class="relative">
|
||||
Now you can take a turn: click on the
|
||||
<span class="bg-green-600 text-white rounded-full">
|
||||
<fa icon="plus" class="fa-fw" />
|
||||
<font-awesome icon="plus" class="fa-fw" />
|
||||
</span>
|
||||
button to throw out projects of your own... anything you'd like to see
|
||||
happen. If your first idea doesn't catch anyone, try, try again... and
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
<p class="mt-4 flex items-center">
|
||||
The
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="hand"
|
||||
class="ml-1 mr-1 text-lg text-white bg-slate-400 px-2 py-2 rounded"
|
||||
/>
|
||||
@@ -168,7 +168,7 @@
|
||||
By the way, one good way to get to know your neighbors and their
|
||||
interests is to offer time directly to them. You can do this on the
|
||||
contacts screen
|
||||
<fa icon="users" class="text-slate-500" />
|
||||
<font-awesome icon="users" class="text-slate-500" />
|
||||
which is a great way to get to know a neighbor's interests.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
class="text-lg text-center px-2 py-0.5 leading-none absolute right-0 top-0 text-white"
|
||||
@click="close()"
|
||||
>
|
||||
<fa icon="xmark" class="w-[1em]"></fa>
|
||||
<font-awesome icon="xmark" class="w-[1em]"></font-awesome>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="uploading" class="flex justify-center">
|
||||
<fa
|
||||
<font-awesome
|
||||
icon="spinner"
|
||||
class="fa-spin fa-3x text-center block px-12 py-12"
|
||||
/>
|
||||
@@ -93,7 +93,7 @@
|
||||
@click="takeImage()"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"
|
||||
>
|
||||
<fa icon="camera" class="w-[1em]"></fa>
|
||||
<font-awesome icon="camera" class="w-[1em]"></font-awesome>
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,7 +103,7 @@
|
||||
@click="swapMirrorClass()"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"
|
||||
>
|
||||
<fa icon="left-right" class="w-[1em]"></fa>
|
||||
<font-awesome icon="left-right" class="w-[1em]"></font-awesome>
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="numDevices > 1" class="absolute bottom-2 right-4">
|
||||
@@ -111,7 +111,7 @@
|
||||
@click="switchCamera()"
|
||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"
|
||||
>
|
||||
<fa icon="rotate" class="w-[1em]"></fa>
|
||||
<font-awesome icon="rotate" class="w-[1em]"></font-awesome>
|
||||
</button>
|
||||
</div>
|
||||
</camera>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</p>
|
||||
<p v-else class="text-lg mb-4">
|
||||
Waiting for system initialization, which may take up to 5 seconds...
|
||||
<fa icon="spinner" spin />
|
||||
<font-awesome icon="spinner" spin />
|
||||
</p>
|
||||
|
||||
<div v-if="serviceWorkerReady && vapidKey">
|
||||
@@ -69,8 +69,8 @@
|
||||
class="rounded-r border border-slate-400 bg-slate-200 text-center text-blue-500 mt-2 px-2 py-2 w-20"
|
||||
@click="hourAm = !hourAm"
|
||||
>
|
||||
<span v-if="hourAm"> AM <fa icon="chevron-down" /> </span>
|
||||
<span v-else> PM <fa icon="chevron-up" /> </span>
|
||||
<span v-if="hourAm"> AM <font-awesome icon="chevron-down" /> </span>
|
||||
<span v-else> PM <font-awesome icon="chevron-up" /> </span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
>
|
||||
<router-link :to="{ name: 'home' }" class="block text-center py-2 px-1">
|
||||
<div class="flex flex-col items-center">
|
||||
<fa icon="house-chimney" class="fa-fw" />
|
||||
<font-awesome icon="house-chimney" class="fa-fw" />
|
||||
<span class="text-xs mt-1">feed</span>
|
||||
</div>
|
||||
</router-link>
|
||||
@@ -32,7 +32,7 @@
|
||||
class="block text-center py-2 px-1"
|
||||
>
|
||||
<div class="flex flex-col items-center">
|
||||
<fa icon="magnifying-glass" class="fa-fw" />
|
||||
<font-awesome icon="magnifying-glass" class="fa-fw" />
|
||||
<span class="text-xs mt-1">search</span>
|
||||
</div>
|
||||
</router-link>
|
||||
@@ -51,7 +51,7 @@
|
||||
class="block text-center py-2 px-1"
|
||||
>
|
||||
<div class="flex flex-col items-center">
|
||||
<fa icon="hand" class="fa-fw" />
|
||||
<font-awesome icon="hand" class="fa-fw" />
|
||||
<span class="text-xs mt-1">your work</span>
|
||||
</div>
|
||||
</router-link>
|
||||
@@ -70,7 +70,7 @@
|
||||
class="block text-center py-2 px-1"
|
||||
>
|
||||
<div class="flex flex-col items-center">
|
||||
<fa icon="users" class="fa-fw" />
|
||||
<font-awesome icon="users" class="fa-fw" />
|
||||
<span class="text-xs mt-1">contacts</span>
|
||||
</div>
|
||||
</router-link>
|
||||
@@ -89,7 +89,7 @@
|
||||
class="block text-center py-2 px-1"
|
||||
>
|
||||
<div class="flex flex-col items-center">
|
||||
<fa icon="circle-user" class="fa-fw" />
|
||||
<font-awesome icon="circle-user" class="fa-fw" />
|
||||
<!--
|
||||
We used to say "account", so we'll keep that in the code,
|
||||
but it isn't accurate because we don't hold anything for them.
|
||||
|
||||
Reference in New Issue
Block a user