Consolidate OptionalLinkTable and ToggleLinkTable into LinkTable
LinkTable now supports variant (list/table) and optional title toggle, replacing the need for separate components. Updates all consumers to use the unified API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<script setup>
|
||||
import { ref } from "vue";
|
||||
|
||||
import ToggleLinkTable from "@/components/util/ToggleLinkTable.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
|
||||
const links = [
|
||||
[
|
||||
@@ -245,11 +243,11 @@ const links = [
|
||||
class="a4page-portrait bdr-1 flex flex-row flex-wrap overflow-x-auto gap-1"
|
||||
>
|
||||
<div class="w-full h-fit">
|
||||
<ToggleLinkTable
|
||||
<LinkTable
|
||||
class="flex flex-col flex-wrap"
|
||||
v-for="link in links"
|
||||
:title="link[0]"
|
||||
:linkArr="link[1]"
|
||||
:items="link[1]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import AutoScroll from "@/components/util/AutoScroll.vue";
|
||||
import OptionalLinkTable from "@/components/util/OptionalLinkTable.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
import Header from "@/components/text/Header.vue";
|
||||
|
||||
import { useActivityStore } from "@/stores/activity";
|
||||
@@ -12,7 +12,7 @@ const activityStore = useActivityStore();
|
||||
<div class="flex flex-col items-center">
|
||||
<Header>Consumption</Header>
|
||||
<AutoScroll class="flex-1 w-full">
|
||||
<OptionalLinkTable class="w-full" :data="activityStore.activity" />
|
||||
<LinkTable variant="table" class="w-full" :items="activityStore.activity" />
|
||||
</AutoScroll>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import OptionalLinkTable from "@/components/util/OptionalLinkTable.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
import AutoScroll from "@/components/util/AutoScroll.vue";
|
||||
|
||||
import { useFavoritesStore } from "@/stores/favorites";
|
||||
@@ -12,9 +12,10 @@ const favoritesStore = useFavoritesStore();
|
||||
<div class="flex flex-col items-center">
|
||||
<Header>favs</Header>
|
||||
<AutoScroll class="w-full flex-1">
|
||||
<OptionalLinkTable
|
||||
<LinkTable
|
||||
variant="table"
|
||||
class="w-full"
|
||||
:data="favoritesStore.favorites"
|
||||
:items="favoritesStore.favorites"
|
||||
/>
|
||||
</AutoScroll>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import Header from "@/components/text/Header.vue";
|
||||
import OptionalLinkTable from "@/components/util/OptionalLinkTable.vue";
|
||||
import LinkTable from "@/components/util/LinkTable.vue";
|
||||
const gym = [
|
||||
{ name: "Row", type: "30 min" },
|
||||
{ name: "Run", type: "5k" },
|
||||
@@ -14,7 +14,7 @@ const gym = [
|
||||
<p>I'm not a gym geek</p>
|
||||
<p>4/7 days I do:</p>
|
||||
<div class="overflow-scroll w-full border-box">
|
||||
<OptionalLinkTable class="w-full" :data="gym" />
|
||||
<LinkTable variant="table" class="w-full" :items="gym" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -24,7 +24,7 @@ const social_links = [
|
||||
<RouterTable :linkArr="site_links" />
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
<LinkTable :linkArr="social_links" />
|
||||
<LinkTable :items="social_links" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user