Skip to content

Commit

Permalink
Merge pull request #1 from leherkom/tauri-v2-migration
Browse files Browse the repository at this point in the history
Tauri v2 Migration (wip)
  • Loading branch information
leherkom authored Jan 21, 2025
2 parents 799915b + 43f51fc commit dde8069
Show file tree
Hide file tree
Showing 39 changed files with 7,147 additions and 2,653 deletions.
6 changes: 3 additions & 3 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
</template>

<script setup>
import { appWindow } from "@tauri-apps/api/window";
import { show } from "@tauri-apps/api/app";
import {
attachConsole,
trace,
debug,
info,
warn,
error,
} from "tauri-plugin-log-api";
} from "@tauri-apps/plugin-log";

onMounted(async () => {
setTimeout(() => {
appWindow.show();
show();
}, 50);

await attachConsole();
Expand Down
2 changes: 1 addition & 1 deletion components/kanban/BoardPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->
<script setup lang="ts">
import type { Board } from "@/types/kanban-types";

import { convertFileSrc } from "@tauri-apps/api/tauri";
import { convertFileSrc } from "@tauri-apps/api/core";

const props = defineProps<{
board: Board;
Expand Down
6 changes: 2 additions & 4 deletions components/modal/CustomBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->
class="w-full"
max="20"
min="0"
oninput="rangeValue.innerText = this.value"
type="range"
/>
</div>
Expand All @@ -93,7 +92,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->
class="w-full"
max="100"
min="0"
oninput="rangeValue.innerText = this.value"
type="range"
/>
</div>
Expand All @@ -114,8 +112,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -->

<script setup lang="ts">
import { XMarkIcon } from "@heroicons/vue/24/solid";
import { open } from "@tauri-apps/api/dialog";
import { convertFileSrc } from "@tauri-apps/api/tauri";
import { open } from "@tauri-apps/plugin-dialog";
import { convertFileSrc } from "@tauri-apps/api/core";
import { ref } from "vue";

const emit = defineEmits([
Expand Down
4 changes: 2 additions & 2 deletions components/modal/Help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,12 @@ import Modal from "@/components/Modal.vue";
import versionInfo from "@/version_info.json";
import { XMarkIcon } from "@heroicons/vue/24/solid";
import { BookOpenIcon } from "@heroicons/vue/24/outline";
import { platform } from "@tauri-apps/api/os";
import { platform } from "@tauri-apps/plugin-os";

const osType = ref("");

onMounted(async () => {
osType.value = await platform();
osType.value = platform();
});

defineEmits<{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
158 changes: 79 additions & 79 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"name": "kanri",
"private": true,
"version": "0.8.0",
"description": "Offline-first Kanban board desktop app",
"author": "trobonox <[email protected]>",
"license": "GPL-3.0",
"type": "module",
"scripts": {
"init:armv7": "docker build . -t rust_cross_compile/armv7 -f Dockerfile.armv7",
"init:arm64": "docker build . -t rust_cross_compile/arm64 -f Dockerfile.arm64",
"build:armv7": "nuxt generate && docker run -t -v `pwd`:/app rust_cross_compile/armv7",
"build:arm64": "nuxt generate && docker run -t -v `pwd`:/app rust_cross_compile/arm64",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"lint": "eslint \"**/*.{js,ts,vue}\"",
"lint:fix": "eslint --fix \"**/*.{js,ts,vue}\\",
"format": "prettier --write \\\"**/*.{ts,vue,css}\\\"",
"test:unit": "vitest",
"test:unit:watch": "vitest --watch",
"test": "yarn test:unit"
},
"devDependencies": {
"@eslint/js": "^9.12.0",
"@nuxt/eslint": "^0.7.0",
"@nuxt/test-utils": "^3.14.3",
"@nuxtjs/tailwindcss": "6.12.2",
"@tauri-apps/cli": "1.6.3",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.7",
"@vue/test-utils": "^2.4.6",
"@vueuse/components": "^11.0.3",
"@vueuse/core": "^11.0.3",
"@vueuse/nuxt": "^11.0.3",
"eslint": "9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tailwindcss": "^3.8.0",
"jsdom": "^25.0.1",
"nuxt": "3.14.1592",
"postcss-custom-properties": "14.0.4",
"prettier": "^3.3.3",
"rollup-plugin-license": "^3.0.1",
"typescript": "^5.6.3",
"vitest": "^2.1.2"
},
"dependencies": {
"@eslint/eslintrc": "^3.1.0",
"@heroicons/vue": "2.2.0",
"@nuxtjs/i18n": "^8.5.5",
"@paralleldrive/cuid2": "^2.1.0",
"@phosphor-icons/vue": "^2.1.6",
"@pinia/nuxt": "0.9.0",
"@popperjs/core": "^2.11.8",
"@tauri-apps/api": "1.6.0",
"@tiptap/extension-bubble-menu": "^2.8.0",
"@tiptap/extension-text-align": "^2.8.0",
"@tiptap/extension-text-style": "^2.8.0",
"@tiptap/extension-typography": "2.10.3",
"@tiptap/pm": "2.10.3",
"@tiptap/starter-kit": "2.10.3",
"@tiptap/vue-3": "2.10.3",
"@vojtechlanka/vue-tags-input": "^3",
"mitt": "3.0.1",
"pinia": "2.3.0",
"radix-vue": "1.9.11",
"tauri-plugin-autostart-api": "github:tauri-apps/tauri-plugin-autostart#6e4666fe3462f0534e90ed6bc075394dff1a1bde",
"tauri-plugin-log-api": "https://github.com/tauri-apps/tauri-plugin-log#v1",
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store#0b7079b8c55bf25f6d9d9e8c57812d03b48a9788",
"v-calendar": "^3.1.2",
"vue-dragscroll": "^4.0.5",
"vue3-smooth-dnd": "0.0.6",
"zod": "^3.20.6"
},
"resolutions": {
"vite": "^5.4.8"
}
}
{
"name": "kanri",
"private": true,
"version": "0.8.0",
"description": "Offline-first Kanban board desktop app",
"author": "trobonox <[email protected]>",
"license": "GPL-3.0",
"type": "module",
"scripts": {
"init:armv7": "docker build . -t rust_cross_compile/armv7 -f Dockerfile.armv7",
"init:arm64": "docker build . -t rust_cross_compile/arm64 -f Dockerfile.arm64",
"build:armv7": "nuxt generate && docker run -t -v `pwd`:/app rust_cross_compile/armv7",
"build:arm64": "nuxt generate && docker run -t -v `pwd`:/app rust_cross_compile/arm64",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"lint": "eslint . --fix"
},
"devDependencies": {
"@nuxt/eslint": "^0.7.3",
"@nuxt/eslint-config": "^0.7.3",
"@nuxtjs/i18n": "^9.1.1",
"@nuxtjs/tailwindcss": "^6.12.2",
"@tauri-apps/cli": "^2.1.0",
"@types/node": "^22.10.2",
"@vue/compiler-sfc": "^3.3.0",
"@vueuse/components": "^12.0.0",
"@vueuse/core": "^12.0.0",
"@vueuse/nuxt": "^12.0.0",
"eslint": "9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-tailwindcss": "^3.8.0",
"nuxt": "^3.14.1592",
"postcss": "^8.4",
"postcss-custom-properties": "^14.0.4",
"prettier": "^3.4.2",
"rollup": "^4.28.1",
"rollup-plugin-license": "^3.0.1",
"tailwindcss": "^3.4.0",
"typescript": "^5.4.5"
},
"dependencies": {
"@eslint/eslintrc": "^3.1.0",
"@heroicons/vue": "2.1.5",
"@paralleldrive/cuid2": "^2.1.0",
"@phosphor-icons/vue": "^2.1.6",
"@pinia/nuxt": "0.5.5",
"@popperjs/core": "^2.11.8",
"@tauri-apps/api": "^2.0.0",
"@tauri-apps/plugin-autostart": "^2.0.0",
"@tauri-apps/plugin-dialog": "~2",
"@tauri-apps/plugin-fs": "^2.0.0",
"@tauri-apps/plugin-log": "^2.2.0",
"@tauri-apps/plugin-os": "^2.0.0",
"@tauri-apps/plugin-store": "^2.0.0",
"@tiptap/core": "^2.10.3",
"@tiptap/extension-bubble-menu": "^2.10.3",
"@tiptap/extension-text-align": "^2.10.3",
"@tiptap/extension-text-style": "^2.10.3",
"@tiptap/extension-typography": "^2.10.3",
"@tiptap/pm": "^2.10.3",
"@tiptap/starter-kit": "^2.10.3",
"@tiptap/vue-3": "^2.10.3",
"@vojtechlanka/vue-tags-input": "^3",
"mitt": "3.0.1",
"pinia": "2.2.4",
"radix-vue": "1.9.7",
"v-calendar": "^3.1.2",
"vue": "^3.5.13",
"vue-dragscroll": "^4.0.5",
"vue3-smooth-dnd": "0.0.6",
"zod": "^3.20.6"
},
"resolutions": {
"vite": "^5.4.8"
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
4 changes: 2 additions & 2 deletions pages/import.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ import {
trelloJsonSchema,
} from "@/types/json-schemas";
import emitter from "@/utils/emitter";
import { ask, message, open, save } from "@tauri-apps/api/dialog";
import { readTextFile, writeTextFile } from "@tauri-apps/api/fs";
import { ask, message, open, save } from "@tauri-apps/plugin-dialog";
import { readTextFile, writeTextFile } from "@tauri-apps/plugin-fs";
import { useI18n } from "vue-i18n";
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import { ZodError, z } from "zod";
Expand Down
6 changes: 3 additions & 3 deletions pages/kanban/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ import { PhotoIcon } from "@heroicons/vue/24/outline";
import { EllipsisHorizontalIcon, PlusIcon } from "@heroicons/vue/24/solid";
import { PhHashStraight } from "@phosphor-icons/vue";

import { save } from "@tauri-apps/api/dialog";
import { writeTextFile } from "@tauri-apps/api/fs";
import { convertFileSrc } from "@tauri-apps/api/tauri";
import { save } from "@tauri-apps/plugin-dialog";
import { writeTextFile } from "@tauri-apps/plugin-fs";
import { convertFileSrc } from "@tauri-apps/api/core";
import { useConfirmDialog } from "@vueuse/core";
//@ts-expect-error this library doesn't have types
import { Container, Draggable } from "vue3-smooth-dnd";
Expand Down
6 changes: 3 additions & 3 deletions pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ import {
SwatchIcon,
} from "@heroicons/vue/24/outline";

import { message, open, save } from "@tauri-apps/api/dialog";
import { readTextFile, writeTextFile } from "@tauri-apps/api/fs";
import { disable, enable, isEnabled } from "tauri-plugin-autostart-api";
import { message, open, save } from "@tauri-apps/plugin-dialog";
import { readTextFile, writeTextFile } from "@tauri-apps/plugin-fs";
import { disable, enable, isEnabled } from "@tauri-apps/plugin-autostart";

import { useI18n } from "vue-i18n";

Expand Down
2 changes: 1 addition & 1 deletion plugins/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { error } from "tauri-plugin-log-api";
import { error } from "@tauri-apps/plugin-log";

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.hook("vue:error", (err, instance, info) => {
Expand Down
83 changes: 83 additions & 0 deletions src-tauri/.kanri.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"colors": {
"accent": "#2150c0",
"accentDarker": "#17367d",
"bgPrimary": "#111112",
"elevation1": "#1b1b1d",
"elevation2": "#27272a",
"elevation3": "#333338",
"text": "#f4f4f5",
"textButtons": "#f1f5f9",
"textD1": "#e4e4e7",
"textD2": "#d4d4d8",
"textD3": "#a1a1aa",
"textD4": "#71717a"
},
"animationsEnabled": true,
"columnZoomLevel": 0,
"displayColumnCardCountEnabled": true,
"activeTheme": "dark",
"boardSortingOption": "default",
"boards": [
{
"columns": [
{
"cards": [
{
"id": "izky9tk3tavdabrkfxcva29q",
"name": "awfawf"
},
{
"id": "js3pfbqqie0d0aacdelix07e",
"name": "awd"
}
],
"id": "kpntde037vd378amsmuitn4c",
"title": "Todo"
},
{
"cards": [],
"id": "np0fvjvccgoi1ic3jhgzvs71",
"title": "Work in progressawf"
},
{
"cards": [
{
"color": "bg-red-600",
"id": "cpe1g4m1e82ymtab4m6ac59n",
"name": "awawfwa"
}
],
"id": "w34i8matswzbza5l576exgbw",
"title": "Done"
}
],
"id": "z6c0gws1bcqa4yba124jypux",
"lastEdited": "2024-10-11T08:49:06.538Z",
"title": "paowkd"
},
{
"columns": [
{
"cards": [],
"id": "a7euqct5eherubt5jcf95rfz",
"title": "Todo"
},
{
"cards": [],
"id": "sftyanfqerv63c5ijkq52tfz",
"title": "Work in progress"
},
{
"cards": [],
"id": "biz35b7hzlet4uyg1mnwxb5y",
"title": "Done"
}
],
"id": "kwtzu8ez7eb97f61egjjaf3u",
"lastEdited": "2024-10-11T08:48:46.004Z",
"title": "aawwdw"
}
],
"lastInstalledVersion": "0.8.0"
}
Loading

0 comments on commit dde8069

Please sign in to comment.