Fix minor issues
This commit is contained in:
parent
b60994a984
commit
fbff4a2466
|
@ -4,8 +4,7 @@
|
||||||
import ModalCard from './ModalCard.svelte';
|
import ModalCard from './ModalCard.svelte';
|
||||||
|
|
||||||
export let card: Card;
|
export let card: Card;
|
||||||
|
export let showModal = false;
|
||||||
let showModal = false;
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
<div class="modal" on:click|self|preventDefault={() => save(true)}>
|
<div class="modal" on:click|self={() => save(true)}>
|
||||||
<div class="content" on:click|stopPropagation>
|
<div class="content">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<input class="title" bind:value={newTitle} on:blur={() => save(false)} />
|
<input class="title" bind:value={newTitle} on:blur={() => save(false)} />
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
|
|
|
@ -40,13 +40,13 @@
|
||||||
cards.reload();
|
cards.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let openModalCard: Card | null = null;
|
||||||
|
|
||||||
async function addCard() {
|
async function addCard() {
|
||||||
const card = await Card.create(project);
|
const card = await Card.create(project);
|
||||||
|
|
||||||
if (!card) return;
|
if (!card) return;
|
||||||
|
|
||||||
await card.updateTitle(`untitled ${card.id}`);
|
|
||||||
|
|
||||||
if ($currentView?.filters && $currentView.filters.length > 0) {
|
if ($currentView?.filters && $currentView.filters.length > 0) {
|
||||||
for (const projectTag of $projectTags) {
|
for (const projectTag of $projectTags) {
|
||||||
for (const filter of $currentView.filters) {
|
for (const filter of $currentView.filters) {
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
{#if $cards}
|
{#if $cards}
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
{#if $currentView.primaryTag}
|
{#if $currentView.primaryTag}
|
||||||
{#each $currentView.primaryTag.options as option}
|
{#each $currentView.primaryTag.options as option (option.id)}
|
||||||
<Column
|
<Column
|
||||||
{option}
|
{option}
|
||||||
primaryTag={$currentView.primaryTag}
|
primaryTag={$currentView.primaryTag}
|
||||||
|
@ -111,7 +111,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
transition: all 0.3s ease-in-out;
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
||||||
@media (min-width: 800px) {
|
@media (min-width: 800px) {
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import Project from '$lib/types/Project';
|
import Project from '$lib/types/Project';
|
||||||
import View, { views } from '$lib/types/View';
|
import View, { views } from '$lib/types/View';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { get } from 'svelte/store';
|
|
||||||
import EditIcon from '../icons/EditIcon.svelte';
|
import EditIcon from '../icons/EditIcon.svelte';
|
||||||
import MenuOpener from '../icons/MenuOpener.svelte';
|
import MenuOpener from '../icons/MenuOpener.svelte';
|
||||||
import ViewIcon from '../icons/ViewIcon.svelte';
|
import ViewIcon from '../icons/ViewIcon.svelte';
|
||||||
|
@ -232,10 +231,10 @@
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.inEdit {
|
input.inEdit {
|
||||||
background-color: #fff5;
|
background-color: #fff5;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default class Project {
|
||||||
}
|
}
|
||||||
|
|
||||||
static async create(): Promise<Project | null> {
|
static async create(): Promise<Project | null> {
|
||||||
const id = await projectsApi.create('untitled');
|
const id = await projectsApi.create('New project');
|
||||||
|
|
||||||
if (!id) return null;
|
if (!id) return null;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import projectsApi from '$lib/api/projectsApi';
|
||||||
|
import Project, { projects } 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 Project, { projects } from '$lib/types/Project';
|
|
||||||
import projectsApi from '$lib/api/projectsApi';
|
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await projectsApi.getAll();
|
await projectsApi.getAll();
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<h2>Projects</h2>
|
<h2>Projects</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{#if $projects}
|
{#if $projects}
|
||||||
{#each $projects as project}
|
{#each $projects as project (project.id)}
|
||||||
<SelectProject {project} />
|
<SelectProject {project} />
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue