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:
@@ -18,11 +18,11 @@
|
||||
:style="{ visibility: isSearchVisible ? 'visible' : 'hidden' }"
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
v-model="searchTerms"
|
||||
type="text"
|
||||
placeholder="Search…"
|
||||
class="block w-full rounded-l border border-r-0 border-slate-400 px-3 py-2"
|
||||
v-on:keyup.enter="searchSelected()"
|
||||
@keyup.enter="searchSelected()"
|
||||
/>
|
||||
<button
|
||||
class="px-4 rounded-r bg-slate-200 border border-l-0 border-slate-400"
|
||||
@@ -39,6 +39,7 @@
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
:class="computedProjectsTabStyleClassNames()"
|
||||
@click="
|
||||
projects = [];
|
||||
userProfiles = [];
|
||||
@@ -46,7 +47,6 @@
|
||||
isPeopleActive = false;
|
||||
searchSelected();
|
||||
"
|
||||
v-bind:class="computedProjectsTabStyleClassNames()"
|
||||
>
|
||||
Projects
|
||||
</a>
|
||||
@@ -54,6 +54,7 @@
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
:class="computedPeopleTabStyleClassNames()"
|
||||
@click="
|
||||
projects = [];
|
||||
userProfiles = [];
|
||||
@@ -61,7 +62,6 @@
|
||||
isPeopleActive = true;
|
||||
searchSelected();
|
||||
"
|
||||
v-bind:class="computedPeopleTabStyleClassNames()"
|
||||
>
|
||||
People
|
||||
</a>
|
||||
@@ -75,6 +75,7 @@
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
:class="computedLocalTabStyleClassNames()"
|
||||
@click="
|
||||
projects = [];
|
||||
userProfiles = [];
|
||||
@@ -85,7 +86,6 @@
|
||||
tempSearchBox = null;
|
||||
searchLocal();
|
||||
"
|
||||
v-bind:class="computedLocalTabStyleClassNames()"
|
||||
>
|
||||
Nearby
|
||||
<!-- restore when the links don't jump around for different numbers
|
||||
@@ -101,6 +101,7 @@
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
:class="computedMappedTabStyleClassNames()"
|
||||
@click="
|
||||
projects = [];
|
||||
userProfiles = [];
|
||||
@@ -111,7 +112,6 @@
|
||||
searchTerms = '';
|
||||
tempSearchBox = null;
|
||||
"
|
||||
v-bind:class="computedMappedTabStyleClassNames()"
|
||||
>
|
||||
<!-- search is triggered when map component gets to "ready" state -->
|
||||
Mapped
|
||||
@@ -120,6 +120,7 @@
|
||||
<li>
|
||||
<a
|
||||
href="#"
|
||||
:class="computedRemoteTabStyleClassNames()"
|
||||
@click="
|
||||
projects = [];
|
||||
userProfiles = [];
|
||||
@@ -130,7 +131,6 @@
|
||||
tempSearchBox = null;
|
||||
searchAll();
|
||||
"
|
||||
v-bind:class="computedRemoteTabStyleClassNames()"
|
||||
>
|
||||
Anywhere
|
||||
<!-- restore when the links don't jump around for different numbers
|
||||
@@ -179,8 +179,8 @@
|
||||
|
||||
<!-- Loading Animation -->
|
||||
<div
|
||||
class="fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"
|
||||
v-if="isLoading"
|
||||
class="fixed left-6 bottom-24 text-center text-4xl leading-none bg-slate-400 text-white w-14 py-2.5 rounded-full"
|
||||
>
|
||||
<font-awesome icon="spinner" class="fa-spin-pulse"></font-awesome>
|
||||
</div>
|
||||
@@ -205,19 +205,19 @@
|
||||
<!-- Projects List -->
|
||||
<template v-if="isProjectsActive">
|
||||
<li
|
||||
class="border-b border-slate-300"
|
||||
v-for="project in projects"
|
||||
:key="project.handleId"
|
||||
class="border-b border-slate-300"
|
||||
>
|
||||
<a
|
||||
@click="onClickLoadItem(project.handleId)"
|
||||
class="block py-4 flex gap-4 cursor-pointer"
|
||||
@click="onClickLoadItem(project.handleId)"
|
||||
>
|
||||
<div>
|
||||
<ProjectIcon
|
||||
:entityId="project.handleId"
|
||||
:iconSize="48"
|
||||
:imageUrl="project.image"
|
||||
:entity-id="project.handleId"
|
||||
:icon-size="48"
|
||||
:image-url="project.image"
|
||||
class="block border border-slate-300 rounded-md max-h-12 max-w-12"
|
||||
/>
|
||||
</div>
|
||||
@@ -246,13 +246,13 @@
|
||||
<!-- Profiles List -->
|
||||
<template v-else>
|
||||
<li
|
||||
class="border-b border-slate-300"
|
||||
v-for="profile in userProfiles"
|
||||
:key="profile.issuerDid"
|
||||
class="border-b border-slate-300"
|
||||
>
|
||||
<a
|
||||
@click="onClickLoadItem(profile?.rowId || '')"
|
||||
class="block py-4 flex gap-4 cursor-pointer"
|
||||
@click="onClickLoadItem(profile?.rowId || '')"
|
||||
>
|
||||
<div class="grow">
|
||||
<div class="text-sm">
|
||||
|
||||
Reference in New Issue
Block a user