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",
|
||||
"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">
|
||||
<CNavbar />
|
||||
<div class="h-full overflow-auto p-1 pr-5">
|
||||
<CNote
|
||||
v-if="ui.anchorId"
|
||||
:noteId="ui.anchorId"
|
||||
:path="''"
|
||||
:forceOpen="true"
|
||||
/>
|
||||
<CNote v-if="ui.anchorId" :noteId="ui.anchorId" :path="''" :forceOpen="true" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { useReposStore } from "@/stores/repos";
|
||||
import { autoUpdate, offset, size, useFloating } from "@floating-ui/vue";
|
||||
import {
|
||||
RiAddLine,
|
||||
RiArrowDropDownLine,
|
||||
RiArrowDropUpLine,
|
||||
} from "@remixicon/vue";
|
||||
import { RiAddLine, RiArrowDropDownLine, RiArrowDropUpLine } from "@remixicon/vue";
|
||||
import { ref, useTemplateRef } from "vue";
|
||||
import CNavbarDropdownEntry from "./CNavbarDropdownEntry.vue";
|
||||
|
||||
|
|
@ -52,9 +48,7 @@ function onSelectRepo(id: string) {
|
|||
<span v-if="repos.selectedRepo" class="overflow-hidden overflow-ellipsis">
|
||||
{{ repos.selectedRepo.name }}
|
||||
</span>
|
||||
<span v-else class="overflow-hidden overflow-ellipsis italic">
|
||||
no repo selected
|
||||
</span>
|
||||
<span v-else class="overflow-hidden overflow-ellipsis italic"> no repo selected </span>
|
||||
|
||||
<div class="text-neutral-400">
|
||||
<RiArrowDropUpLine v-if="open" class="inline" />
|
||||
|
|
@ -63,11 +57,7 @@ function onSelectRepo(id: string) {
|
|||
</div>
|
||||
|
||||
<!-- Close dropdown when clicking outside it -->
|
||||
<div
|
||||
v-if="open"
|
||||
class="fixed left-0 top-0 z-10 h-screen w-screen"
|
||||
@click="open = false"
|
||||
></div>
|
||||
<div v-if="open" class="fixed left-0 top-0 z-10 h-screen w-screen" @click="open = false"></div>
|
||||
|
||||
<!-- Dropdown -->
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -102,11 +102,7 @@ function onChildEditorFinish(text: string) {
|
|||
:class="focused ? ['hover:bg-neutral-300'] : ['hover:bg-neutral-200']"
|
||||
@click.stop="toggleOpen()"
|
||||
>
|
||||
<RiArrowDownSLine
|
||||
v-if="open && props.forceOpen"
|
||||
size="16px"
|
||||
class="text-neutral-400"
|
||||
/>
|
||||
<RiArrowDownSLine v-if="open && props.forceOpen" size="16px" class="text-neutral-400" />
|
||||
<RiArrowDownSLine v-else-if="open" size="16px" />
|
||||
<RiArrowRightSLine v-else-if="mayOpen" size="16px" />
|
||||
<RiArrowRightSLine v-else size="16px" class="text-neutral-400" />
|
||||
|
|
@ -114,10 +110,7 @@ function onChildEditorFinish(text: string) {
|
|||
</div>
|
||||
|
||||
<!-- Text -->
|
||||
<div
|
||||
v-if="note && note.text.trim().length > 0"
|
||||
class="whitespace-pre-wrap"
|
||||
>
|
||||
<div v-if="note && note.text.trim().length > 0" class="whitespace-pre-wrap">
|
||||
{{ note.text }}
|
||||
</div>
|
||||
<div v-else-if="note" class="font-light italic">empty</div>
|
||||
|
|
@ -143,11 +136,7 @@ function onChildEditorFinish(text: string) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<CNoteEditor
|
||||
class="flex-1"
|
||||
@close="onChildEditorClose"
|
||||
@finish="onChildEditorFinish"
|
||||
/>
|
||||
<CNoteEditor class="flex-1" @close="onChildEditorClose" @finish="onChildEditorFinish" />
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@ export const useNotesStore = defineStore("notes", () => {
|
|||
});
|
||||
}
|
||||
|
||||
function appendNewChildNote(
|
||||
parentId: string,
|
||||
text: string,
|
||||
): Note | undefined {
|
||||
function appendNewChildNote(parentId: string, text: string): Note | undefined {
|
||||
const parent = notes.value.get(parentId);
|
||||
if (parent === undefined) return undefined;
|
||||
const note = addNewNote(text);
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ export const useReposStore = defineStore("repos", () => {
|
|||
return values;
|
||||
});
|
||||
|
||||
const repoIdsByName = computed<string[]>(() =>
|
||||
reposByName.value.map((it) => it.id),
|
||||
);
|
||||
const repoIdsByName = computed<string[]>(() => reposByName.value.map((it) => it.id));
|
||||
|
||||
function addRepo(repo: Repo) {
|
||||
repos.value.set(repo.id, repo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue