light mode improvments

This commit is contained in:
Dovi Cowan 2023-11-02 17:48:16 +00:00
parent 7158cbcbc8
commit 0091bfdcf7
Signed by: dcowan
GPG key ID: CC4A4CB950D7E579
4 changed files with 21 additions and 14 deletions

View file

@ -43,7 +43,7 @@
{/each} {/each}
<p class="mt-3"> <p class="mt-3">
<Link <Link
class="text-blue-400 dark:bg-gray-600 bg-gray-400 border p-1 rounded" class="dark:bg-gray-600 bg-gray-400 text-white border p-1 mt-2 rounded"
to="/lists/create">Create new list</Link to="/lists/create">Create new list</Link
> >
</p> </p>

View file

@ -21,12 +21,17 @@
e.preventDefault(); e.preventDefault();
database database
.createDocument(import.meta.env.VITE_APPWRITE_DB_ID, "lists", ID.unique(), { .createDocument(
title: listname, import.meta.env.VITE_APPWRITE_DB_ID,
require_logged_in: !!requireLoggedIn, "lists",
owner_id: loggedInUser["$id"], ID.unique(),
list_type: list_type {
}) title: listname,
require_logged_in: !!requireLoggedIn,
owner_id: loggedInUser["$id"],
list_type: list_type,
},
)
.then((r) => { .then((r) => {
teams.create(r["$id"], listname, ["owner"]).then((r) => { teams.create(r["$id"], listname, ["owner"]).then((r) => {
let permissions = [ let permissions = [
@ -98,7 +103,7 @@
><br /> ><br />
<button <button
class="dark:bg-gray-600 hover:bg-gray-500 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 text-white hover:bg-gray-500 bg-gray-400 border p-1 mt-2 rounded"
type="submit">Create</button type="submit">Create</button
> >
</fieldset> </fieldset>

View file

@ -82,7 +82,9 @@
<div class="m-1"> <div class="m-1">
{member.userName} - {member.userEmail} {member.userName} - {member.userEmail}
{#if rolesIndex(member, "owner") !== -1} {#if rolesIndex(member, "owner") !== -1}
<span class="border p-1">List Admin</span> <span class="border p-1 border-black dark:border-white"
>List Admin</span
>
{/if} {/if}
{#if member.confirm == false} {#if member.confirm == false}
<span class="border p-1">Pending</span> <span class="border p-1">Pending</span>

View file

@ -197,24 +197,24 @@
{#if perakim[perekIndex(i)].taken == false} {#if perakim[perekIndex(i)].taken == false}
<button <button
on:click={() => takePerek(i)} on:click={() => takePerek(i)}
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded text-white"
>Take</button >Take</button
> >
{:else if perakim[perekIndex(i)].taken_by == loggedInUser["$id"] && perakim[perekIndex(i)].completed !== true} {:else if perakim[perekIndex(i)].taken_by == loggedInUser["$id"] && perakim[perekIndex(i)].completed !== true}
<button <button
on:click={() => untakePerek(i)} on:click={() => untakePerek(i)}
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded text-white"
>Untake</button >Untake</button
> >
<button <button
on:click={() => completePerek(i)} on:click={() => completePerek(i)}
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded text-white"
>Complete</button >Complete</button
> >
{:else if perakim[perekIndex(i)].taken_by == loggedInUser["$id"] && perakim[perekIndex(i)].completed == true} {:else if perakim[perekIndex(i)].taken_by == loggedInUser["$id"] && perakim[perekIndex(i)].completed == true}
<button <button
on:click={() => uncompletePerek(i)} on:click={() => uncompletePerek(i)}
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded text-white"
>Uncomplete</button >Uncomplete</button
> >
{:else if perakim[perekIndex(i)].completed == false} {:else if perakim[perekIndex(i)].completed == false}
@ -225,7 +225,7 @@
{:else} {:else}
<button <button
on:click={() => takeNewPerek(i)} on:click={() => takeNewPerek(i)}
class="dark:bg-gray-600 bg-gray-400 border p-1 mt-2 rounded" class="dark:bg-gray-600 bg-gray-400 text-white border p-1 mt-2 rounded"
>Take</button >Take</button
> >
{/if}<br /> {/if}<br />