chore: rename Gallery to EntityList

feat/axum
Tomáš Mládek 2023-09-07 15:40:20 +02:00
parent a4c915f73f
commit 257044e66d
5 changed files with 25 additions and 25 deletions

View File

@ -16,7 +16,7 @@
import { i18n } from "../i18n";
import EntryList from "./widgets/EntryList.svelte";
import api from "../lib/api";
import Gallery from "./widgets/Gallery.svelte";
import EntityList from "./widgets/EntityList.svelte";
import { ATTR_IN, ATTR_LABEL, ATTR_KEY, ATTR_OF } from "upend/constants";
import InspectGroups from "./InspectGroups.svelte";
import InspectTypeEditor from "./InspectTypeEditor.svelte";
@ -257,11 +257,11 @@
],
},
{
name: "Gallery",
name: "EntityList",
icon: "image",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries
.filter((e) => e.value.t == "Address")
@ -279,7 +279,7 @@
icon: "list-check",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
thumbnails: false,
@ -288,11 +288,11 @@
],
},
{
name: "Gallery",
name: "EntityList",
icon: "image",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
thumbnails: true,

View File

@ -119,7 +119,7 @@
</script>
<div
class="gallery style-{style}"
class="entitylist style-{style}"
class:has-thumbnails={thumbnails}
bind:clientWidth
>
@ -167,22 +167,22 @@
gap: 4px;
}
.gallery.has-thumbnails .items {
.entitylist.has-thumbnails .items {
gap: 1rem;
}
:global(.gallery.style-grid .items) {
:global(.entitylist.style-grid .items) {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
:global(.gallery.style-flex .items) {
:global(.entitylist.style-flex .items) {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
}
:global(.gallery.style-list .items) {
:global(.entitylist.style-list .items) {
display: flex;
flex-direction: column;
align-items: stretch;

View File

@ -1,5 +1,5 @@
import type { Meta, StoryObj } from "@storybook/svelte";
import Gallery from "../components/widgets/Gallery.svelte";
import EntityList from "../components/widgets/EntityList.svelte";
import {
imageAddress,
imageVerticalAddress,
@ -8,9 +8,9 @@ import {
} from "./common";
import RouterDecorator from "./RouterDecorator.svelte";
const meta: Meta<Gallery> = {
title: "Widgets/Gallery",
component: Gallery,
const meta: Meta<EntityList> = {
title: "Widgets/EntityList",
component: EntityList,
tags: ["autodocs"],
args: {
entities: [
@ -25,7 +25,7 @@ const meta: Meta<Gallery> = {
};
export default meta;
type Story = StoryObj<Gallery>;
type Story = StoryObj<EntityList>;
export const Thumbnails: Story = {
args: {

View File

@ -1,6 +1,6 @@
<script lang="ts">
import EntryList from "../components/widgets/EntryList.svelte";
import Gallery from "../components/widgets/Gallery.svelte";
import EntityList from "../components/widgets/EntityList.svelte";
import type { Widget } from "../components/EntryView.svelte";
import { Link } from "svelte-navigator";
import { UpListing } from "upend";
@ -106,11 +106,11 @@
],
},
{
name: "Gallery",
name: "EntityList",
icon: "image",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
sort: false,
@ -138,11 +138,11 @@
],
},
{
name: "Gallery",
name: "EntityList",
icon: "image",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
sort: false,

View File

@ -11,7 +11,7 @@
import { query as queryFn } from "../lib/entity";
import EntryView, { type Widget } from "../components/EntryView.svelte";
import api from "../lib/api";
import Gallery from "../components/widgets/Gallery.svelte";
import EntityList from "../components/widgets/EntityList.svelte";
import { matchSorter } from "match-sorter";
import { ATTR_LABEL } from "upend/constants";
const navigate = useNavigate();
@ -70,7 +70,7 @@
icon: "list-ul",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
sort: false,
@ -80,11 +80,11 @@
],
},
{
name: "Gallery",
name: "EntityList",
icon: "image",
components: ({ entries }) => [
{
component: Gallery,
component: EntityList,
props: {
entities: entries.map((e) => e.entity),
sort: false,