Set printWidth to 100 for code files
This commit is contained in:
parent
2531e7d640
commit
b70903ef6f
6 changed files with 19 additions and 41 deletions
11
.prettierrc
11
.prettierrc
|
|
@ -1,4 +1,13 @@
|
||||||
{
|
{
|
||||||
|
"printWidth": 100,
|
||||||
"proseWrap": "always",
|
"proseWrap": "always",
|
||||||
"plugins": ["prettier-plugin-tailwindcss"]
|
"plugins": ["prettier-plugin-tailwindcss"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.md",
|
||||||
|
"options": {
|
||||||
|
"printWidth": 80
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,7 @@ window.addEventListener("keypress", (ev) => {
|
||||||
<div class="flex h-screen touch-pan-x touch-pan-y flex-col">
|
<div class="flex h-screen touch-pan-x touch-pan-y flex-col">
|
||||||
<CNavbar />
|
<CNavbar />
|
||||||
<div class="h-full overflow-auto p-1 pr-5">
|
<div class="h-full overflow-auto p-1 pr-5">
|
||||||
<CNote
|
<CNote v-if="ui.anchorId" :noteId="ui.anchorId" :path="''" :forceOpen="true" />
|
||||||
v-if="ui.anchorId"
|
|
||||||
:noteId="ui.anchorId"
|
|
||||||
:path="''"
|
|
||||||
:forceOpen="true"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useReposStore } from "@/stores/repos";
|
import { useReposStore } from "@/stores/repos";
|
||||||
import { autoUpdate, offset, size, useFloating } from "@floating-ui/vue";
|
import { autoUpdate, offset, size, useFloating } from "@floating-ui/vue";
|
||||||
import {
|
import { RiAddLine, RiArrowDropDownLine, RiArrowDropUpLine } from "@remixicon/vue";
|
||||||
RiAddLine,
|
|
||||||
RiArrowDropDownLine,
|
|
||||||
RiArrowDropUpLine,
|
|
||||||
} from "@remixicon/vue";
|
|
||||||
import { ref, useTemplateRef } from "vue";
|
import { ref, useTemplateRef } from "vue";
|
||||||
import CNavbarDropdownEntry from "./CNavbarDropdownEntry.vue";
|
import CNavbarDropdownEntry from "./CNavbarDropdownEntry.vue";
|
||||||
|
|
||||||
|
|
@ -52,9 +48,7 @@ function onSelectRepo(id: string) {
|
||||||
<span v-if="repos.selectedRepo" class="overflow-hidden overflow-ellipsis">
|
<span v-if="repos.selectedRepo" class="overflow-hidden overflow-ellipsis">
|
||||||
{{ repos.selectedRepo.name }}
|
{{ repos.selectedRepo.name }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else class="overflow-hidden overflow-ellipsis italic">
|
<span v-else class="overflow-hidden overflow-ellipsis italic"> no repo selected </span>
|
||||||
no repo selected
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div class="text-neutral-400">
|
<div class="text-neutral-400">
|
||||||
<RiArrowDropUpLine v-if="open" class="inline" />
|
<RiArrowDropUpLine v-if="open" class="inline" />
|
||||||
|
|
@ -63,11 +57,7 @@ function onSelectRepo(id: string) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Close dropdown when clicking outside it -->
|
<!-- Close dropdown when clicking outside it -->
|
||||||
<div
|
<div v-if="open" class="fixed left-0 top-0 z-10 h-screen w-screen" @click="open = false"></div>
|
||||||
v-if="open"
|
|
||||||
class="fixed left-0 top-0 z-10 h-screen w-screen"
|
|
||||||
@click="open = false"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- Dropdown -->
|
<!-- Dropdown -->
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -102,11 +102,7 @@ function onChildEditorFinish(text: string) {
|
||||||
:class="focused ? ['hover:bg-neutral-300'] : ['hover:bg-neutral-200']"
|
:class="focused ? ['hover:bg-neutral-300'] : ['hover:bg-neutral-200']"
|
||||||
@click.stop="toggleOpen()"
|
@click.stop="toggleOpen()"
|
||||||
>
|
>
|
||||||
<RiArrowDownSLine
|
<RiArrowDownSLine v-if="open && props.forceOpen" size="16px" class="text-neutral-400" />
|
||||||
v-if="open && props.forceOpen"
|
|
||||||
size="16px"
|
|
||||||
class="text-neutral-400"
|
|
||||||
/>
|
|
||||||
<RiArrowDownSLine v-else-if="open" size="16px" />
|
<RiArrowDownSLine v-else-if="open" size="16px" />
|
||||||
<RiArrowRightSLine v-else-if="mayOpen" size="16px" />
|
<RiArrowRightSLine v-else-if="mayOpen" size="16px" />
|
||||||
<RiArrowRightSLine v-else size="16px" class="text-neutral-400" />
|
<RiArrowRightSLine v-else size="16px" class="text-neutral-400" />
|
||||||
|
|
@ -114,10 +110,7 @@ function onChildEditorFinish(text: string) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Text -->
|
<!-- Text -->
|
||||||
<div
|
<div v-if="note && note.text.trim().length > 0" class="whitespace-pre-wrap">
|
||||||
v-if="note && note.text.trim().length > 0"
|
|
||||||
class="whitespace-pre-wrap"
|
|
||||||
>
|
|
||||||
{{ note.text }}
|
{{ note.text }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="note" class="font-light italic">empty</div>
|
<div v-else-if="note" class="font-light italic">empty</div>
|
||||||
|
|
@ -143,11 +136,7 @@ function onChildEditorFinish(text: string) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CNoteEditor
|
<CNoteEditor class="flex-1" @close="onChildEditorClose" @finish="onChildEditorFinish" />
|
||||||
class="flex-1"
|
|
||||||
@close="onChildEditorClose"
|
|
||||||
@finish="onChildEditorFinish"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Controls -->
|
<!-- Controls -->
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,7 @@ export const useNotesStore = defineStore("notes", () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function appendNewChildNote(
|
function appendNewChildNote(parentId: string, text: string): Note | undefined {
|
||||||
parentId: string,
|
|
||||||
text: string,
|
|
||||||
): Note | undefined {
|
|
||||||
const parent = notes.value.get(parentId);
|
const parent = notes.value.get(parentId);
|
||||||
if (parent === undefined) return undefined;
|
if (parent === undefined) return undefined;
|
||||||
const note = addNewNote(text);
|
const note = addNewNote(text);
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,7 @@ export const useReposStore = defineStore("repos", () => {
|
||||||
return values;
|
return values;
|
||||||
});
|
});
|
||||||
|
|
||||||
const repoIdsByName = computed<string[]>(() =>
|
const repoIdsByName = computed<string[]>(() => reposByName.value.map((it) => it.id));
|
||||||
reposByName.value.map((it) => it.id),
|
|
||||||
);
|
|
||||||
|
|
||||||
function addRepo(repo: Repo) {
|
function addRepo(repo: Repo) {
|
||||||
repos.value.set(repo.id, repo);
|
repos.value.set(repo.id, repo);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue