Refactor components

This commit is contained in:
Brieuc Dubois 2024-01-05 03:15:01 +01:00
parent 63517ecbf4
commit 9d0990e096
26 changed files with 33 additions and 36 deletions

View File

@ -3,7 +3,7 @@
import currentModalCard from '$lib/stores/currentModalCard'; import currentModalCard from '$lib/stores/currentModalCard';
import project_tags from '$lib/stores/projectTags'; import project_tags from '$lib/stores/projectTags';
import type Card from '$lib/types/Card'; import type Card from '$lib/types/Card';
import ModalCard from './modal_card.svelte'; import ModalCard from './ModalCard.svelte';
export let card: Card; export let card: Card;
</script> </script>

View File

@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import CloseIcon from '$lib/components/icons/closeIcon.svelte'; import CloseIcon from '$lib/components/icons/CloseIcon.svelte';
import TrashIcon from '$lib/components/icons/TrashIcon.svelte';
import ModalTags from '$lib/components/tags/ModalTags.svelte';
import cards from '$lib/stores/cards'; import cards from '$lib/stores/cards';
import currentModalCard from '$lib/stores/currentModalCard'; import currentModalCard from '$lib/stores/currentModalCard';
import type Card from '$lib/types/Card'; import type Card from '$lib/types/Card';
import TrashIcon from '../../icons/trashIcon.svelte';
import ModalTags from './modal_tags.svelte';
export let card: Card; export let card: Card;

View File

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 271 B

View File

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

View File

Before

Width:  |  Height:  |  Size: 632 B

After

Width:  |  Height:  |  Size: 632 B

View File

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 469 B

View File

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 752 B

View File

@ -1,3 +0,0 @@
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 6L15 12L9 18" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 217 B

View File

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
export let isOpen = false; export let isOpen = false;
export let choices: { id: number; value: string }[] = []; export let choices: { id: number; value: string }[] = [];

View File

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
export let isOpen = false; export let isOpen = false;
export let choices: { id: number; value: string }[] = []; export let choices: { id: number; value: string }[] = [];

View File

@ -7,8 +7,8 @@
import { createCardTagApi, deleteCardTagApi, updateCardTagApi } from '../../api/cards'; import { createCardTagApi, deleteCardTagApi, updateCardTagApi } from '../../api/cards';
import { updateTagAPI as updateTagOptionAPI } from '../../api/tags'; import { updateTagAPI as updateTagOptionAPI } from '../../api/tags';
import projectTags from '../../stores/projectTags'; import projectTags from '../../stores/projectTags';
import AddIcon from '../icons/addIcon.svelte'; import CardComponent from '../card/Card.svelte';
import CardComponent from './card/card.svelte'; import AddIcon from '../icons/AddIcon.svelte';
export let projectId: number; export let projectId: number;
export let optionId: number | null = null; export let optionId: number | null = null;

View File

@ -1,12 +1,12 @@
<script lang="ts"> <script lang="ts">
import GroupMenu from '$lib/components/menu/GroupMenu.svelte';
import SortMenu from '$lib/components/menu/SortMenu.svelte';
import cards from '$lib/stores/cards'; import cards from '$lib/stores/cards';
import currentView from '$lib/stores/currentView'; import currentView from '$lib/stores/currentView';
import projectTags from '$lib/stores/projectTags';
import views from '$lib/stores/views'; import views from '$lib/stores/views';
import type Project from '$lib/types/Project'; import type Project from '$lib/types/Project';
import type View from '$lib/types/View'; import type View from '$lib/types/View';
import projectTags from '../../stores/projectTags';
import GroupMenu from './card/header/menus/group_menu.svelte';
import SortMenu from './card/header/menus/sort_menu.svelte';
export let project: Project; export let project: Project;
export let view: View; export let view: View;

View File

@ -5,8 +5,8 @@
import type Project from '$lib/types/Project'; import type Project from '$lib/types/Project';
import type View from '$lib/types/View'; import type View from '$lib/types/View';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import Column from './column.svelte'; import Column from './Column.svelte';
import Header from './header.svelte'; import Header from './Header.svelte';
export let project: Project; export let project: Project;

View File

@ -5,10 +5,10 @@
import type View from '$lib/types/View'; import type View from '$lib/types/View';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { get } from 'svelte/store'; import { get } from 'svelte/store';
import projectTags from '../stores/projectTags'; import projectTags from '../../stores/projectTags';
import EditIcon from './icons/editIcon.svelte'; import EditIcon from '../icons/EditIcon.svelte';
import MenuOpener from './icons/menu_opener.svelte'; import MenuOpener from '../icons/MenuOpener.svelte';
import ViewIcon from './icons/viewIcon.svelte'; import ViewIcon from '../icons/ViewIcon.svelte';
export let project: Project; export let project: Project;

View File

@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import AddIcon from '$lib/components/icons/addIcon.svelte'; import AddIcon from '$lib/components/icons/AddIcon.svelte';
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
import project_tags from '$lib/stores/projectTags'; import project_tags from '$lib/stores/projectTags';
import { toastAlert } from '$lib/utils/toasts'; import { toastAlert } from '$lib/utils/toasts';
import { tick } from 'svelte'; import { tick } from 'svelte';
import ModalTagTypes from './modal_tag_types.svelte'; import ModalTagTypes from './ModalTagTypes.svelte';
export let projectId: number; export let projectId: number;

View File

@ -2,8 +2,8 @@
import type Card from '$lib/types/Card'; import type Card from '$lib/types/Card';
import type MeTag from '$lib/types/MeTag'; import type MeTag from '$lib/types/MeTag';
import type TagValue from '$lib/types/TagValue'; import type TagValue from '$lib/types/TagValue';
import ModalTagTitle from './modal_tag/modal_tag_title.svelte'; import ModalTagTitle from './ModalTagTitle.svelte';
import ModalTagValue from './modal_tag/modal_tag_value.svelte'; import ModalTagValue from './ModalTagValue.svelte';
export let projectTag: MeTag; export let projectTag: MeTag;
export let tagValue: TagValue | undefined; export let tagValue: TagValue | undefined;

View File

@ -1,10 +1,10 @@
<script lang="ts"> <script lang="ts">
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
import project_tags from '$lib/stores/projectTags'; import project_tags from '$lib/stores/projectTags';
import type MeTag from '$lib/types/MeTag'; import type MeTag from '$lib/types/MeTag';
import { toastAlert } from '$lib/utils/toasts'; import { toastAlert } from '$lib/utils/toasts';
import { tick } from 'svelte'; import { tick } from 'svelte';
import ModalTagTypes from './modal_tag_types.svelte'; import ModalTagTypes from './ModalTagTypes.svelte';
export let projectTag: MeTag; export let projectTag: MeTag;

View File

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
import { getTagTypeFromId, tagTypes } from '$lib/utils/tagTypes'; import { getTagTypeFromId, tagTypes } from '$lib/utils/tagTypes';
export let type: number; export let type: number;

View File

@ -3,7 +3,7 @@
import type MeTag from '$lib/types/MeTag'; import type MeTag from '$lib/types/MeTag';
import type TagValue from '$lib/types/TagValue'; import type TagValue from '$lib/types/TagValue';
import { getTagTypeFromId } from '$lib/utils/tagTypes'; import { getTagTypeFromId } from '$lib/utils/tagTypes';
import SelectTags from './select_tags.svelte'; import SelectTags from './SelectTags.svelte';
export let projectTag: MeTag; export let projectTag: MeTag;
export let tagValue: TagValue | undefined; export let tagValue: TagValue | undefined;

View File

@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import ProjectTags from '$lib/stores/projectTags'; import ProjectTags from '$lib/stores/projectTags';
import type Card from '$lib/types/Card'; import type Card from '$lib/types/Card';
import ModalTag from './modal_tag.svelte'; import ModalNewTag from './ModalNewTag.svelte';
import ModalNewTag from './modal_tag/modal_new_tag.svelte'; import ModalTag from './ModalTag.svelte';
export let card: Card; export let card: Card;
</script> </script>

View File

@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import { updateCardTagApi } from '$lib/api/cards'; import { updateCardTagApi } from '$lib/api/cards';
import TrashIcon from '$lib/components/icons/trashIcon.svelte'; import TrashIcon from '$lib/components/icons/TrashIcon.svelte';
import Menu from '$lib/components/utils/menu.svelte'; import Menu from '$lib/components/menu/Menu.svelte';
import cards from '$lib/stores/cards'; import cards from '$lib/stores/cards';
import project_tags from '$lib/stores/projectTags'; import project_tags from '$lib/stores/projectTags';
import type Card from '$lib/types/Card'; import type Card from '$lib/types/Card';

View File

@ -2,7 +2,7 @@
import type Project from '$lib/types/Project'; import type Project from '$lib/types/Project';
import { SvelteToast } from '@zerodevx/svelte-toast'; import { SvelteToast } from '@zerodevx/svelte-toast';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import SelectProject from '../lib/components/projects/selectProject.svelte'; import SelectProject from '../lib/components/projects/SelectProject.svelte';
import api, { processError } from '../lib/utils/api'; import api, { processError } from '../lib/utils/api';
import { toastAlert } from '../lib/utils/toasts'; import { toastAlert } from '../lib/utils/toasts';

View File

@ -1,8 +1,8 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'; import { page } from '$app/stores';
import { getProjectAPI } from '$lib/api/projects'; import { getProjectAPI } from '$lib/api/projects';
import ProjectComponent from '$lib/components/project/project.svelte'; import ProjectComponent from '$lib/components/project/Project.svelte';
import Sidebar from '$lib/components/sidebar.svelte'; import Sidebar from '$lib/components/project/Sidebar.svelte';
import type Project from '$lib/types/Project'; import type Project from '$lib/types/Project';
import { SvelteToast } from '@zerodevx/svelte-toast'; import { SvelteToast } from '@zerodevx/svelte-toast';
import { onMount } from 'svelte'; import { onMount } from 'svelte';