forked from jsnbuchanan/crowd-funder-for-time-pwa
style: reorder v-model and v-bind directives
Changes: - Move v-model directives before other attributes - Move v-bind directives before event handlers - Reorder attributes for better readability - Fix template attribute ordering across components - Improve eslint rules - add default vite config for testing (handles nostr error too) This follows Vue.js style guide recommendations for attribute ordering and improves template consistency.
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
<h1 class="text-center text-lg font-light relative px-7">
|
||||
<!-- Back -->
|
||||
<button
|
||||
@click="$router.back()"
|
||||
class="text-lg text-center px-2 py-1 absolute -left-2 -top-1"
|
||||
@click="$router.back()"
|
||||
>
|
||||
<font-awesome icon="chevron-left" class="fa-fw"></font-awesome>
|
||||
</button>
|
||||
@@ -21,9 +21,9 @@
|
||||
{{ name }}
|
||||
<button
|
||||
v-if="activeDid === issuer || activeDid === agentDid"
|
||||
@click="onEditClick()"
|
||||
title="Edit"
|
||||
data-testId="editClaimButton"
|
||||
@click="onEditClick()"
|
||||
>
|
||||
<font-awesome icon="pen" class="text-sm text-blue-500 ml-2 mb-1" />
|
||||
</button>
|
||||
@@ -37,10 +37,10 @@
|
||||
<div class="pb-4 flex gap-4">
|
||||
<div class="pt-1">
|
||||
<ProjectIcon
|
||||
:entityId="projectId"
|
||||
:iconSize="64"
|
||||
:imageUrl="imageUrl"
|
||||
:linkToFull="true"
|
||||
:entity-id="projectId"
|
||||
:icon-size="64"
|
||||
:image-url="imageUrl"
|
||||
:link-to-full="true"
|
||||
class="block border border-slate-300 rounded-md max-h-16 max-w-16"
|
||||
/>
|
||||
</div>
|
||||
@@ -113,7 +113,7 @@
|
||||
target="_blank"
|
||||
class="underline text-blue-500"
|
||||
>
|
||||
{{ domainForWebsite(this.url) }}
|
||||
{{ domainForWebsite(url) }}
|
||||
<font-awesome
|
||||
icon="arrow-up-right-from-square"
|
||||
class="fa-fw"
|
||||
@@ -129,22 +129,22 @@
|
||||
{{ truncatedDesc }}
|
||||
<a
|
||||
v-if="description.length >= truncateLength"
|
||||
@click="expandText"
|
||||
class="uppercase text-xs font-semibold text-slate-700"
|
||||
@click="expandText"
|
||||
>... Read More</a
|
||||
>
|
||||
</div>
|
||||
<div v-else>
|
||||
{{ description }}
|
||||
<a
|
||||
@click="collapseText"
|
||||
class="uppercase text-xs font-semibold text-slate-700"
|
||||
@click="collapseText"
|
||||
>- Read Less</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a @click="onClickLoadClaim(projectId)" class="cursor-pointer">
|
||||
<a class="cursor-pointer" @click="onClickLoadClaim(projectId)">
|
||||
<font-awesome icon="file-lines" class="pl-2 pt-1 text-blue-500" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -163,8 +163,8 @@
|
||||
<div class="text-center">
|
||||
<div v-for="plan in fulfillersToThis" :key="plan.handleId">
|
||||
<button
|
||||
@click="onClickLoadProject(plan.handleId)"
|
||||
class="text-blue-500"
|
||||
@click="onClickLoadProject(plan.handleId)"
|
||||
>
|
||||
{{ plan.name }}
|
||||
</button>
|
||||
@@ -184,8 +184,8 @@
|
||||
<!-- centering because long, wrapped project names didn't left align with blank or "text-left" -->
|
||||
<div class="text-center">
|
||||
<button
|
||||
@click="onClickLoadProject(fulfilledByThis.handleId)"
|
||||
class="text-blue-500"
|
||||
@click="onClickLoadProject(fulfilledByThis.handleId)"
|
||||
>
|
||||
{{ fulfilledByThis.name }}
|
||||
</button>
|
||||
@@ -230,7 +230,7 @@
|
||||
>
|
||||
<EntityIcon
|
||||
:contact="contact"
|
||||
:iconSize="64"
|
||||
:icon-size="64"
|
||||
class="mx-auto border border-blue-300 rounded-md mb-1 cursor-pointer"
|
||||
/>
|
||||
<h3
|
||||
@@ -242,14 +242,14 @@
|
||||
<li>
|
||||
<span
|
||||
v-if="allContacts.length >= 5"
|
||||
@click="onClickAllContactsGifting()"
|
||||
class="flex align-bottom text-xs text-blue-500 mt-12 cursor-pointer"
|
||||
@click="onClickAllContactsGifting()"
|
||||
>
|
||||
... or someone else...
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<GiftedDialog ref="giveDialogToThis" :toProjectId="this.projectId" />
|
||||
<GiftedDialog ref="giveDialogToThis" :to-project-id="projectId" />
|
||||
</div>
|
||||
|
||||
<!-- Offers & Gifts to & from this -->
|
||||
@@ -260,8 +260,8 @@
|
||||
<div class="text-center">
|
||||
<button
|
||||
data-testId="offerButton"
|
||||
@click="openOfferDialog()"
|
||||
class="block w-full 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 rounded-md"
|
||||
@click="openOfferDialog()"
|
||||
>
|
||||
Offer to this (maybe with conditions)...
|
||||
</button>
|
||||
@@ -269,15 +269,15 @@
|
||||
</div>
|
||||
<OfferDialog
|
||||
ref="customOfferDialog"
|
||||
:projectId="this.projectId"
|
||||
:projectName="this.name"
|
||||
:project-id="projectId"
|
||||
:project-name="name"
|
||||
/>
|
||||
|
||||
<h3 class="text-lg font-bold mb-3 mt-4">Offered To This Idea</h3>
|
||||
|
||||
<div v-if="offersToThis.length === 0">
|
||||
(None yet. Wanna
|
||||
<span @click="openOfferDialog()" class="cursor-pointer text-blue-500"
|
||||
<span class="cursor-pointer text-blue-500" @click="openOfferDialog()"
|
||||
>offer something... especially if others join you</span
|
||||
>?)
|
||||
</div>
|
||||
@@ -316,8 +316,8 @@
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<a
|
||||
@click="onClickLoadClaim(offer.jwtId as string)"
|
||||
class="cursor-pointer"
|
||||
@click="onClickLoadClaim(offer.jwtId as string)"
|
||||
>
|
||||
<font-awesome
|
||||
icon="file-lines"
|
||||
@@ -347,8 +347,8 @@
|
||||
<div v-if="activeDid && isRegistered">
|
||||
<div class="text-center">
|
||||
<button
|
||||
@click="openGiftDialogToProject()"
|
||||
class="block w-full 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-1rounded-md"
|
||||
@click="openGiftDialogToProject()"
|
||||
>
|
||||
Given To This...
|
||||
</button>
|
||||
@@ -443,17 +443,14 @@
|
||||
<div v-if="activeDid && isRegistered">
|
||||
<div class="text-center">
|
||||
<button
|
||||
@click="openGiftDialogFromProject()"
|
||||
class="block w-full 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 rounded-md"
|
||||
@click="openGiftDialogFromProject()"
|
||||
>
|
||||
Given By This...
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<GiftedDialog
|
||||
ref="giveDialogFromThis"
|
||||
:fromProjectId="this.projectId"
|
||||
/>
|
||||
<GiftedDialog ref="giveDialogFromThis" :from-project-id="projectId" />
|
||||
|
||||
<h3 class="text-lg font-bold mb-3 mt-4">
|
||||
Benefitted From This Project
|
||||
|
||||
Reference in New Issue
Block a user