diff --git a/packages/main/db.ts b/packages/main/db.ts index 145493a..7e9e724 100644 --- a/packages/main/db.ts +++ b/packages/main/db.ts @@ -1,14 +1,10 @@ import { safeStorage } from "electron"; import Store from "electron-store"; import { v4 as uuid } from "uuid"; +import { Timeline } from "../shared/types/Store"; export type StoreSchema = { - timeline: { - id: string; // uuid - userId: string; - channel: string; - options: string; - }[]; + timeline: Timeline[]; instance: { id: string; // uuid type: "misskey" | "mastodon"; diff --git a/packages/main/tsconfig.json b/packages/main/tsconfig.json index 4082f16..fd09a8b 100644 --- a/packages/main/tsconfig.json +++ b/packages/main/tsconfig.json @@ -1,3 +1,9 @@ { - "extends": "../../tsconfig.json" + "extends": "../../tsconfig.json", + "compilerOptions": { + "paths": { + "@/shared/*": ["../shared/*"] + } + }, + "include": ["**/*.ts"] } diff --git a/packages/main/vite.config.ts b/packages/main/vite.config.ts index 31695d2..0ccf502 100644 --- a/packages/main/vite.config.ts +++ b/packages/main/vite.config.ts @@ -15,7 +15,7 @@ export default defineConfig({ sourcemap: true, emptyOutDir: true, rollupOptions: { - external: ["electron", "sqlite3", ...builtinModules, ...Object.keys(pkg.dependencies || {})], + external: ["electron", ...builtinModules, ...Object.keys(pkg.dependencies || {})], }, commonjsOptions: { ignoreGlobal: false, diff --git a/packages/mutation-types.ts b/packages/mutation-types.ts deleted file mode 100644 index 7993a4f..0000000 --- a/packages/mutation-types.ts +++ /dev/null @@ -1,58 +0,0 @@ -export const CONNECT_STATE = 'CONNECT_STATE'; -export const CONNECT_COMMIT = 'CONNECT_COMMIT'; -export const CONNECT_SCREEN = 'CONNECT_SCREEN'; - -export const DROP_FILE = 'DROP_FILE'; - -export const VIDEO_SELECT = 'VIDEO_SELECT'; -export const PAUSE_FILE = 'PAUSE_FILE'; -export const RESUME_FILE = 'RESUME_FILE'; -export const REMOVE_QUEUE = 'REMOVE_QUEUE'; -export const CLEAR_QUEUES = 'CLEAR_QUEUES'; -export const SORT_QUEUE = 'SORT_QUEUE'; -export const VIDEO_TIMEUPDATE = 'VIDEO_TIMEUPDATE'; -export const VIDEO_CANPLAY = 'VIDEO_CANPLAY'; -export const VIDEO_SEEK = 'VIDEO_SEEK'; -export const VIDEO_PLAYED = 'VIDEO_PLAYED'; -export const VIDEO_PAUSED = 'VIDEO_PAUSED'; -export const VIDEO_ENDED = 'VIDEO_ENDED'; - -// Settings -export const SET_MODE = 'SET_MODE'; -export const SET_OPACITY = 'SET_OPACITY'; -export const SET_HIDE_ON_TASKBAR = 'SET_HIDE_ON_TASKBAR'; -export const SET_CLICKTHROUGH = 'SET_CLICKTHROUGH'; -export const TOGGLE_RESIZE = 'TOGGLE_RESIZE'; -export const START_RESIZE = 'START_RESIZE'; -export const END_RESIZE = 'END_RESIZE'; -export const SET_FULLSCREEN = 'SET_FULLSCREEN'; -export const TOGGLE_SETTINGS = 'TOGGLE_SETTINGS'; -export const OPEN_WEBVIEW = 'OPEN_WEBVIEW'; -export const CLOSE_WEBVIEW = 'CLOSE_WEBVIEW'; - -// Browser Actions -export const BROWSER_VIEW_EVENT = 'BROWSER_VIEW_EVENT'; -export const SET_URL = 'SET_URL'; -export const BROWSER_RELOAD = 'BROWSER_RELOAD'; -export const BROWSER_BACK = 'BROWSER_BACK'; -export const BROWSER_FORWARD = 'BROWSER_FORWARD'; -export const BROWSER_CAN_GO_BACK = 'BROWSER_FORWARD'; -export const BROWSER_CAN_GO_FORWARD = 'BROWSER_FORWARD'; - -export const RESET = 'RESET'; -export const QUIT = 'QUIT'; - -export const WINDOW_TRANSPARENT_ON = 'WINDOW_TRANSPARENT_ON'; -export const WINDOW_TRANSPARENT_OFF = 'WINDOW_TRANSPARENT_OFF'; - -// VideoList -export const VIDEO_LIST_TOGGLE = 'VIDEO_LIST_TOGGLE'; -export const VIDEO_LIST_ADD_FILES = 'VIDEO_LIST_ADD_FILE'; -export const VIDEO_VIEW_EVENT = 'VIDEO_VIEW_EVENT'; -export const VIDEO_BACK = 'VIDEO_BACK'; -export const VIDEO_PLAY = 'VIDEO_PLAY'; -export const VIDEO_PAUSE = 'VIDEO_PAUSE'; -export const VIDEO_FORWARD = 'VIDEO_FORWARD'; - -// Video Monitor -export const SET_VIDEO_SOURCE = 'SET_VIDEO_SOURCE'; diff --git a/packages/renderer/src/components/Post.vue b/packages/renderer/src/components/Post.vue index 081d08e..94dade4 100644 --- a/packages/renderer/src/components/Post.vue +++ b/packages/renderer/src/components/Post.vue @@ -39,6 +39,7 @@ const postAtttachments = computed(() => { }); const openPost = () => { + console.log(new URL(`/notes/${props.post.id}`, timelineStore.currentInstance?.url).toString()); ipcSend("open-url", { url: new URL(`/notes/${props.post.id}`, timelineStore.currentInstance?.url).toString() }); }; @@ -84,14 +85,6 @@ const isMyReaction = (reaction: string, myReaction?: string) => {