updates
This commit is contained in:
9
Makefile
9
Makefile
@@ -1,2 +1,11 @@
|
||||
pretty:
|
||||
npx prettier --write "./src/**/*.(ts|vue)"
|
||||
|
||||
check:
|
||||
npm run type-check && npm run lint
|
||||
|
||||
local: check
|
||||
npm run local
|
||||
|
||||
deploy: check
|
||||
npm run deploy
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"lint": "eslint ./src --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"format": "prettier --write src/",
|
||||
"local": "npm run build && firebase serve --only hosting",
|
||||
"deploy": "npm run build && firebase deploy --only hosting:contexted-v3"
|
||||
|
||||
@@ -111,7 +111,7 @@ const topBarHeightWithSafeArea = computed(() => `calc(${topBarHeight}px + var(--
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<UIModal :open="passphraseRequired" :persistent="true">
|
||||
<UIModal :open="passphraseRequired" persistent>
|
||||
<template #title>Enter your passphrase</template>
|
||||
<template #default="{ close }">
|
||||
<div>
|
||||
|
||||
@@ -45,7 +45,7 @@ const handleKeypress = (event: { [key: string]: number }) => {
|
||||
defineExpose({ handleKeypress })
|
||||
</script>
|
||||
<template>
|
||||
<UIMenu class="border-[1px] p-2 text-[0.875rem] text-black shadow-md" :compact="true">
|
||||
<UIMenu class="border-[1px] p-2 text-[0.875rem] text-black shadow-md" compact>
|
||||
<UIMenuItem :active="!activeResult" @click="emit('createLink', props.autocompleteText)">
|
||||
<span class="flex-grow">{{ props.autocompleteText }}</span>
|
||||
<i class="fas fa-plus-circle ml-auto text-white" />
|
||||
|
||||
@@ -6,7 +6,7 @@ const props = defineProps<{
|
||||
</script>
|
||||
<template>
|
||||
<UIMenu class="mt-3 rounded-xl border-[1px] px-3 py-3" v-if="props.references.length > 0">
|
||||
<UIMenuItem :title="true">
|
||||
<UIMenuItem title>
|
||||
<span>References</span>
|
||||
<UIBadge variant="outline" class="ml-2">{{ props.references.length }}</UIBadge>
|
||||
</UIMenuItem>
|
||||
|
||||
@@ -38,7 +38,7 @@ const confirmModals: ModalOptions[] = [
|
||||
]
|
||||
|
||||
const emit = defineEmits<{
|
||||
execute: [actionType: ActionKey, close?: () => void]
|
||||
execute: [actionType: ActionKey, close?: () => Promise<void>]
|
||||
}>()
|
||||
|
||||
const openModal = async (open: () => void, modal: ModalOptions) => {
|
||||
@@ -58,12 +58,7 @@ const openModal = async (open: () => void, modal: ModalOptions) => {
|
||||
<UIButtonGroup class="flex items-center" v-if="!props.note.isRoot">
|
||||
<UIModal v-for="confirmModal in confirmModals" :key="confirmModal.key">
|
||||
<template #activator="{ open }">
|
||||
<UIButton
|
||||
size="sm"
|
||||
@click="openModal(open, confirmModal)"
|
||||
:join="true"
|
||||
@mousedown="vibrate"
|
||||
>
|
||||
<UIButton size="sm" @click="openModal(open, confirmModal)" @mousedown="vibrate" join>
|
||||
<i :class="confirmModal.icon" />
|
||||
</UIButton>
|
||||
</template>
|
||||
|
||||
@@ -66,7 +66,7 @@ const resultsRefs = ref<InstanceType<typeof SearchResult>[]>([])
|
||||
@keydown="handleKeydown"
|
||||
/>
|
||||
<div class="z-1000 absolute left-0 right-0 top-[100%]" v-if="active">
|
||||
<UIMenu :compact="true" class="mt-1 w-full rounded-md bg-base-100 p-2 text-black shadow">
|
||||
<UIMenu compact class="mt-1 w-full rounded-md bg-base-100 p-2 text-black shadow">
|
||||
<div class="max-h-[320px] w-full overflow-y-auto">
|
||||
<template v-if="results.length > 0">
|
||||
<SearchResult
|
||||
|
||||
@@ -24,7 +24,7 @@ const searchActive = ref<boolean>(false)
|
||||
// const authUI: any = inject('firebaseAuthUI')
|
||||
// const authPending = ref<boolean>(authUI.isPendingRedirect())
|
||||
|
||||
const handleSignIn = async (close: () => Promise<boolean>) => {
|
||||
const handleSignIn = async (close: () => Promise<void>) => {
|
||||
await close()
|
||||
// authPending.value = false
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ const emit = defineEmits<{
|
||||
</script>
|
||||
<template>
|
||||
<label
|
||||
class="dui-btn-ghost dui-btn-sm dui-btn-circle dui-btn relative inline-grid cursor-pointer select-none place-content-center"
|
||||
class="dui-btn-ghost dui-btn dui-btn-sm dui-btn-circle relative inline-grid cursor-pointer select-none place-content-center"
|
||||
>
|
||||
<input type="checkbox" @click="emit('toggleSideBar')" :checked="!props.sideBarCollapsed" />
|
||||
<svg
|
||||
|
||||
@@ -7,7 +7,7 @@ import { vibrate } from '@/composables/useHaptics'
|
||||
<UIDropdown class="search-active-hide">
|
||||
<template #activator>
|
||||
<UIButton
|
||||
:dropdown="true"
|
||||
dropdown
|
||||
size="sm"
|
||||
variant="outline"
|
||||
class="topbar-button text-white"
|
||||
|
||||
@@ -3,7 +3,7 @@ import { preferredNotesSource } from '@/composables/useSettings'
|
||||
import { signOut as firebaseSignOut } from '@/composables/useFirebase'
|
||||
import { clearEncryptionKeys } from '@/composables/useEncryption'
|
||||
|
||||
const signOut = async (close: () => Promise<boolean>) => {
|
||||
const signOut = async (close: () => Promise<void>) => {
|
||||
await close()
|
||||
await firebaseSignOut()
|
||||
preferredNotesSource.value = null
|
||||
|
||||
@@ -273,17 +273,19 @@ const links = computed(() => {
|
||||
</script>
|
||||
<template>
|
||||
<div class="flex h-full flex-grow flex-col">
|
||||
<UITabs>
|
||||
<UITab
|
||||
v-for="mindmap in mindmaps"
|
||||
:key="mindmap.id"
|
||||
:active="mindmap.id === selectedMindmap?.id"
|
||||
@click="selectedMindmap = mindmap"
|
||||
>
|
||||
<i class="fas fa-fw fa-home root mr-1" v-if="mindmap.isRoot" />
|
||||
{{ mindmap.notes.length }} notes
|
||||
</UITab>
|
||||
</UITabs>
|
||||
<div class="flex">
|
||||
<UITabs>
|
||||
<UITab
|
||||
v-for="mindmap in mindmaps"
|
||||
:key="mindmap.id"
|
||||
:active="mindmap.id === selectedMindmap?.id"
|
||||
@click="selectedMindmap = mindmap"
|
||||
>
|
||||
<i class="fas fa-fw fa-home root mr-1" v-if="mindmap.isRoot" />
|
||||
{{ mindmap.notes.length }} notes
|
||||
</UITab>
|
||||
</UITabs>
|
||||
</div>
|
||||
<div id="mindmap" ref="mindmapElement" class="h-full"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -30,7 +30,7 @@ const updateNoteContent = (content: string) => {
|
||||
|
||||
const references = computed<Note[]>(() => getNoteReferences(props.note))
|
||||
|
||||
const handleAction = async (action: string, closeModal: () => Promise<Boolean>) => {
|
||||
const handleAction = async (action: 'delete' | 'setRoot', closeModal?: () => Promise<void>) => {
|
||||
switch (action) {
|
||||
case 'delete':
|
||||
if (closeModal) await closeModal()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<slot name="activator" tabindex="0"></slot>
|
||||
<ul
|
||||
tabindex="0"
|
||||
class="dui-menu-compact dui-dropdown-content dui-menu rounded-box mt-1 w-52 bg-base-100 p-2 text-base-content shadow"
|
||||
class="dui-menu-compact dui-dropdown-content dui-menu mt-1 w-52 rounded-box bg-base-100 p-2 text-base-content shadow"
|
||||
>
|
||||
<slot name="items"></slot>
|
||||
</ul>
|
||||
|
||||
@@ -31,9 +31,9 @@ const modal = ref<HTMLElement | null>(null)
|
||||
const modalBox = ref(null)
|
||||
|
||||
const open = () => (show.value = true)
|
||||
const close = (): Promise<boolean> => {
|
||||
const close = (): Promise<void> => {
|
||||
return new Promise((resolve) => {
|
||||
modal.value?.addEventListener('transitionend', () => resolve(true))
|
||||
modal.value?.addEventListener('transitionend', () => resolve())
|
||||
show.value = false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<template>
|
||||
<div class="dui-tabs dui-tabs-md dui-tabs-lifted"><slot></slot></div>
|
||||
<div class="dui-tabs dui-tabs-boxed dui-tabs-md"><slot></slot></div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user