You've already forked obsidian-visualiser
Change shared files naming. Rework tree structure and item management rendering.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { hasPermissions } from "#shared/auth.util";
|
||||
import { hasPermissions } from "#shared/auth";
|
||||
|
||||
declare module 'nitropack'
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { projectFilesTable } from '~/db/schema';
|
||||
import { hasPermissions } from '#shared/auth.util';
|
||||
import { hasPermissions } from '~~/shared/auth';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const session = await getUserSession(e);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { hasPermissions } from "#shared/auth.util";
|
||||
import { hasPermissions } from "#shared/auth";
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { and, eq, notInArray } from "drizzle-orm";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { hasPermissions } from "#shared/auth.util";
|
||||
import { hasPermissions } from "#shared/auth";
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { and, eq, notInArray } from "drizzle-orm";
|
||||
import { z } from "zod";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { hasPermissions } from '#shared/auth.util';
|
||||
import { hasPermissions } from '~~/shared/auth';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const session = await getUserSession(e);
|
||||
|
||||
@@ -2,8 +2,8 @@ import { eq } from 'drizzle-orm';
|
||||
import { z } from 'zod/v4';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { campaignTable } from '~/db/schema';
|
||||
import { CampaignValidation } from '#shared/campaign.util';
|
||||
import { cryptURI } from '#shared/general.util';
|
||||
import { CampaignValidation } from '~~/shared/campaign';
|
||||
import { cryptURI } from '~~/shared/general';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const body = await readValidatedBody(e, CampaignValidation.extend({ id: z.unknown(), }).safeParse);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { eq } from 'drizzle-orm';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { campaignTable } from '~/db/schema';
|
||||
import { CampaignValidation } from '#shared/campaign.util';
|
||||
import { CampaignValidation } from '~~/shared/campaign';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const params = getRouterParam(e, "id");
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { eq, SQL, type Operators } from 'drizzle-orm';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { characterTable, userPermissionsTable } from '~/db/schema';
|
||||
import { hasPermissions } from '#shared/auth.util';
|
||||
import { group } from '#shared/general.util';
|
||||
import { hasPermissions } from '~~/shared/auth';
|
||||
import { group } from '~~/shared/general';
|
||||
import type { Character, MainStat, TrainingLevel } from '~/types/character';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { z } from 'zod/v4';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { characterAbilitiesTable, characterLevelingTable, characterTable, characterTrainingTable } from '~/db/schema';
|
||||
import { CharacterValidation } from '#shared/character.util';
|
||||
import { CharacterValidation } from '~~/shared/character';
|
||||
import { type Ability, type MainStat } from '~/types/character';
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { campaignCharactersTable, campaignMembersTable, campaignTable, characterAbilitiesTable, characterChoicesTable, characterLevelingTable, characterTable, characterTrainingTable, usersTable } from '~/db/schema';
|
||||
import { group } from '#shared/general.util';
|
||||
import { group } from '~~/shared/general';
|
||||
import type { Character, MainStat, TrainingLevel } from '~/types/character';
|
||||
import { and, eq, exists, getTableColumns, isNotNull, or, sql } from 'drizzle-orm';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { eq } from 'drizzle-orm';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { characterAbilitiesTable, characterChoicesTable, characterLevelingTable, characterTable, characterTrainingTable } from '~/db/schema';
|
||||
import { CharacterValidation } from '#shared/character.util';
|
||||
import { CharacterValidation } from '~~/shared/character';
|
||||
import { type Ability, type MainStat } from '~/types/character';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { eq } from 'drizzle-orm';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { characterTable } from '~/db/schema';
|
||||
import { CharacterNotesValidation } from '#shared/character.util';
|
||||
import { CharacterNotesValidation } from '~~/shared/character';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const id = getRouterParam(e, "id");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { eq } from 'drizzle-orm';
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { characterTable } from '~/db/schema';
|
||||
import { CharacterVariablesValidation } from '#shared/character.util';
|
||||
import { CharacterVariablesValidation } from '~~/shared/character';
|
||||
import type { CharacterVariables } from '~/types/character';
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { hasPermissions } from '#shared/auth.util';
|
||||
import { hasPermissions } from '~~/shared/auth';
|
||||
import { projectContentTable, projectFilesTable } from '~/db/schema';
|
||||
import { eq } from 'drizzle-orm';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import useDatabase from '~/composables/useDatabase';
|
||||
import { hasPermissions } from "#shared/auth.util";
|
||||
import { hasPermissions } from "#shared/auth";
|
||||
import { eq, sql } from "drizzle-orm";
|
||||
import { projectFilesTable } from "~/db/schema";
|
||||
import { Project } from "~/schemas/project";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { dom, type VirtualNode } from "#shared/dom.virtual.util";
|
||||
import { dom, type VirtualNode } from "#shared/dom.virtual";
|
||||
|
||||
export default function(content: VirtualNode[])
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { dom, text } from "#shared/dom.virtual.util";
|
||||
import { dom, text } from "#shared/dom.virtual";
|
||||
|
||||
export default function(data: any)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { dom, text } from "#shared/dom.virtual.util";
|
||||
import { format } from "#shared/general.util";
|
||||
import { dom, text } from "#shared/dom.virtual";
|
||||
import { format } from "#shared/general";
|
||||
|
||||
export default function(data: any)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { and, eq, sql } from "drizzle-orm";
|
||||
import useDatabase from "~/composables/useDatabase";
|
||||
import { campaignMembersTable, campaignTable } from "~/db/schema";
|
||||
import { decryptURI } from "#shared/general.util";
|
||||
import { decryptURI } from "#shared/general";
|
||||
|
||||
export default defineEventHandler(async (e) => {
|
||||
const link = getRouterParam(e, "link");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SocketMessage } from "#shared/websocket.util";
|
||||
import type { SocketMessage } from "#shared/websocket";
|
||||
|
||||
export default defineWebSocketHandler({
|
||||
message(peer, message) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import useDatabase from "~/composables/useDatabase";
|
||||
import { extname, basename } from 'node:path';
|
||||
import type { CanvasColor, CanvasContent } from "~/types/canvas";
|
||||
import type { FileType, ProjectContent } from "#shared/content.util";
|
||||
import { getID, parsePath } from "#shared/general.util";
|
||||
import type { FileType, ProjectContent } from "#shared/content";
|
||||
import { getID, parsePath } from "#shared/general";
|
||||
import { projectContentTable, projectFilesTable } from "~/db/schema";
|
||||
|
||||
const typeMapping: Record<string, FileType> = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { defu } from 'defu'
|
||||
import { createHooks } from 'hookable'
|
||||
import { useRuntimeConfig } from '#imports'
|
||||
import type { UserSession, UserSessionRequired } from '~/types/auth'
|
||||
import type { CompatEvent } from '~~/shared/websocket.util'
|
||||
import type { CompatEvent } from '~~/shared/websocket'
|
||||
|
||||
export interface SessionHooks {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user