generated from Klectr/KTemplate
Compare commits
2 Commits
f436b11102
...
f9d0315bd7
Author | SHA1 | Date | |
---|---|---|---|
f9d0315bd7 | |||
fee06527a8 |
@ -32,6 +32,7 @@
|
|||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"typescript-eslint": "^8.11.0",
|
"typescript-eslint": "^8.11.0",
|
||||||
"vite": "^5.0.0",
|
"vite": "^5.0.0",
|
||||||
|
"vite-plugin-checker": "^0.8.0",
|
||||||
"vite-plugin-eslint": "^1.8.1",
|
"vite-plugin-eslint": "^1.8.1",
|
||||||
"vite-plugin-kaioken": "^0.13.1"
|
"vite-plugin-kaioken": "^0.13.1"
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { NotesSigal } from "../../signals"
|
import { NotesSigal } from "../../signals"
|
||||||
import notes from "../../signals/notes"
|
import notes from "../../signals/notes"
|
||||||
|
import { CardTypes } from "../../types"
|
||||||
import { updateLocalStorage } from "../../utils/localStorage"
|
import { updateLocalStorage } from "../../utils/localStorage"
|
||||||
import { Tooltip } from "./Tooltip"
|
import { Tooltip } from "./Tooltip"
|
||||||
import { defaultClassName } from "./utils"
|
import { defaultClassName } from "./utils"
|
||||||
@ -7,7 +8,7 @@ import { defaultClassName } from "./utils"
|
|||||||
export function StickyNoteButton() {
|
export function StickyNoteButton() {
|
||||||
function _handleClick(e: MouseEvent) {
|
function _handleClick(e: MouseEvent) {
|
||||||
NotesSigal.default.addNote({
|
NotesSigal.default.addNote({
|
||||||
type: "note",
|
type: CardTypes.NOTES,
|
||||||
title: "New Note",
|
title: "New Note",
|
||||||
contents: "",
|
contents: "",
|
||||||
position: {
|
position: {
|
||||||
@ -19,7 +20,7 @@ export function StickyNoteButton() {
|
|||||||
h: 200
|
h: 200
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
updateLocalStorage("notes", notes.notes.value)
|
updateLocalStorage(CardTypes.NOTES, notes.notes)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -3,13 +3,14 @@ import { TextSignal } from "../../signals";
|
|||||||
import texts from "../../signals/texts";
|
import texts from "../../signals/texts";
|
||||||
import { updateLocalStorage } from "../../utils/localStorage";
|
import { updateLocalStorage } from "../../utils/localStorage";
|
||||||
import { defaultClassName } from "./utils";
|
import { defaultClassName } from "./utils";
|
||||||
|
import { CardTypes } from "../../types";
|
||||||
|
|
||||||
export function TextButton() {
|
export function TextButton() {
|
||||||
|
|
||||||
function _handleClick(e: MouseEvent) {
|
function _handleClick(e: MouseEvent) {
|
||||||
TextSignal.default.addText({
|
TextSignal.default.addText({
|
||||||
fontSize: 84,
|
fontSize: 84,
|
||||||
type: "texts",
|
type: CardTypes.TEXTS,
|
||||||
title: "New Note",
|
title: "New Note",
|
||||||
contents: "todo: fill me",
|
contents: "todo: fill me",
|
||||||
position: {
|
position: {
|
||||||
@ -21,7 +22,7 @@ export function TextButton() {
|
|||||||
h: 100
|
h: 100
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
updateLocalStorage("texts", texts.texts).notify()
|
updateLocalStorage(CardTypes.TEXTS, texts.texts).notify()
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,4 +1 @@
|
|||||||
export * from "./CanvasItem"
|
|
||||||
export * from "./CanvasControls"
|
|
||||||
export * from "./InfinateCanvas"
|
export * from "./InfinateCanvas"
|
||||||
export * from "./CardSelector"
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { defineConfig } from "vite"
|
import { defineConfig } from "vite"
|
||||||
import kaioken from "vite-plugin-kaioken"
|
import kaioken from "vite-plugin-kaioken"
|
||||||
import eslint from "vite-plugin-eslint"
|
import eslint from "vite-plugin-eslint"
|
||||||
|
import checker from "vite-plugin-checker"
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -8,13 +9,16 @@ export default defineConfig({
|
|||||||
kaioken(),
|
kaioken(),
|
||||||
eslint({
|
eslint({
|
||||||
cache: true,
|
cache: true,
|
||||||
exclude: ["src-tauri/**/*"],
|
ignorePatterns: ["src-tauri"],
|
||||||
emitError: true,
|
emitError: true,
|
||||||
emitWarning: true,
|
emitWarning: true,
|
||||||
failOnError: false,
|
failOnError: false,
|
||||||
failOnWarning: false,
|
failOnWarning: false,
|
||||||
lintOnStart: true,
|
lintOnStart: true,
|
||||||
}),
|
}),
|
||||||
|
checker({
|
||||||
|
typescript: true,
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user