-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
689 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ node_modules | |
dist/* | ||
dist | ||
src-tauri/license.html | ||
LICENSES_3RD_PARTY.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
<!-- SPDX-FileCopyrightText: Copyright (c) 2022-2024 trobonox <hello@trobo.dev> --> | ||
<!-- --> | ||
<!-- SPDX-License-Identifier: GPL-3.0-or-later --> | ||
<!-- | ||
Kanri is an offline Kanban board app made using Tauri and Nuxt. | ||
Copyright (C) 2022-2024 trobonox <[email protected]> | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. --> | ||
|
||
<!-- eslint-disable vue/no-template-shadow --> | ||
<template> | ||
<ComboboxRoot v-model="selectedLocale" class="relative"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!-- SPDX-FileCopyrightText: Copyright (c) 2022-2024 trobonox <hello@trobo.dev>, PwshLab --> | ||
<!-- --> | ||
<!-- SPDX-License-Identifier: GPL-3.0-or-later --> | ||
<!-- | ||
Kanri is an offline Kanban board app made using Tauri and Nuxt. | ||
Copyright (C) 2022-2024 trobonox <[email protected]> | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. --> | ||
|
||
<template> | ||
<nav | ||
class="flex h-screen flex-col items-center justify-between overflow-x-hidden overflow-y-auto px-8 pb-6 pt-4 my-2" | ||
> | ||
<section id="tabitem-list" class="flex flex-col items-center gap-3"> | ||
<PinnedItem | ||
v-for="board in pins" | ||
id="tabitem" | ||
:key="board.id" | ||
:board="board" | ||
/> | ||
</section> | ||
</nav> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import emitter from "@/utils/emitter"; | ||
import type { Board } from "@/types/kanban-types"; | ||
import PinnedItem from "./PinnedItem.vue"; | ||
|
||
const store = useTauriStore().store; | ||
const pins: Ref<Array<Board>> = ref([]); | ||
const boards: Ref<Array<Board>> = ref([]); | ||
|
||
onMounted(async () => { | ||
boards.value = (await store.get("boards")) || []; | ||
pins.value = (await store.get("pins")) || []; | ||
|
||
emitter.on("toggleBoardPin", onPinToggle); | ||
emitter.on("boardDeletion", onKanbanDelete); | ||
}); | ||
|
||
const onPinToggle = async (board: Board) => { | ||
const boardIsPinned = findObjectById(pins.value, board.id) ? true : false; | ||
if (boardIsPinned) pins.value = pins.value.filter((x) => x.id !== board.id); | ||
else pins.value = [board, ...pins.value]; | ||
|
||
store.set("pins", pins.value); | ||
}; | ||
|
||
const onKanbanDelete = async (board: Board) => { | ||
pins.value = pins.value.filter((x) => x.id !== board.id); | ||
store.set("pins", pins.value); | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<!-- SPDX-FileCopyrightText: Copyright (c) 2022-2024 trobonox <hello@trobo.dev>, PwshLab --> | ||
<!-- --> | ||
<!-- SPDX-License-Identifier: GPL-3.0-or-later --> | ||
<!-- | ||
Kanri is an offline Kanban board app made using Tauri and Nuxt. | ||
Copyright (C) 2022-2024 trobonox <[email protected]> | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. --> | ||
|
||
<template> | ||
<Tooltip v-if="isActivePin"> | ||
<template #trigger> | ||
<nuxt-link :to="'/kanban/' + props.board.id"> | ||
<div class="bg-elevation-3 transition-button rounded-md p-2"> | ||
<PhArticle class="size-7" /> | ||
</div> | ||
</nuxt-link> | ||
</template> | ||
|
||
<template #content> | ||
{{ props.board.title }} | ||
</template> | ||
</Tooltip> | ||
|
||
<Tooltip v-else> | ||
<template #trigger> | ||
<nuxt-link :to="'/kanban/' + props.board.id"> | ||
<div class="bg-elevation-2-hover transition-button rounded-md p-2"> | ||
<PhArticle class="size-7" /> | ||
</div> | ||
</nuxt-link> | ||
</template> | ||
|
||
<template #content> | ||
{{ props.board.title }} | ||
</template> | ||
</Tooltip> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import emitter from "@/utils/emitter"; | ||
import { PhArticle } from "@phosphor-icons/vue"; | ||
import type { Board } from "@/types/kanban-types"; | ||
|
||
const props = defineProps<{ | ||
board: Board; | ||
}>(); | ||
|
||
const isActivePin = ref(false); | ||
const router = useRouter(); | ||
|
||
onMounted(async () => { | ||
emitter.on("openKanbanPage", onNavigation); | ||
emitter.on("closeKanbanPage", onNavigation); | ||
|
||
onNavigation(); | ||
}); | ||
|
||
const onNavigation = () => { | ||
isActivePin.value = false; | ||
|
||
if (router.currentRoute.value.path.includes("/kanban/" + props.board.id)) { | ||
isActivePin.value = true; | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.