fix: 🐛 Various bugfixes

This commit is contained in:
Jesse Wierzbinski 2024-05-11 23:23:38 -10:00
parent 52c1f1c57f
commit 6d2b607f2b
No known key found for this signature in database
10 changed files with 76 additions and 111 deletions

View file

@ -1,5 +1,8 @@
<template> <template>
<NuxtPwaAssets /> <NuxtPwaAssets />
<PwaTransparentImage image="/logo.webp" />
<PwaAppleImage image="/logo.webp" />
<PwaMaskableImage image="/logo.webp" />
<Loading /> <Loading />
<NuxtLayout> <NuxtLayout>
<NuxtPage /> <NuxtPage />

View file

@ -9,7 +9,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ButtonHTMLAttributes } from "vue"; import type { ButtonHTMLAttributes } from "vue";
interface Props extends /* @vue-ignore */ ButtonHTMLAttributes { } interface Props extends /* @vue-ignore */ ButtonHTMLAttributes {}
defineProps< defineProps<
Props & { Props & {

View file

@ -11,7 +11,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { ButtonHTMLAttributes } from "vue"; import type { ButtonHTMLAttributes } from "vue";
interface Props extends /* @vue-ignore */ ButtonHTMLAttributes { } interface Props extends /* @vue-ignore */ ButtonHTMLAttributes {}
defineProps< defineProps<
Props & { Props & {

View file

@ -11,7 +11,8 @@
<script lang="ts" setup> <script lang="ts" setup>
const loading = ref(true); const loading = ref(true);
const estimatedProgress = (duration: number, elapsed: number) => (2 / Math.PI * 100) * Math.atan(elapsed / duration * 100 / 50); const estimatedProgress = (duration: number, elapsed: number) =>
(2 / Math.PI) * 100 * Math.atan(((elapsed / duration) * 100) / 50);
const progress = ref(0); const progress = ref(0);
const timeAtStart = performance.now(); const timeAtStart = performance.now();

View file

@ -233,7 +233,7 @@ const signOut = async () => {
tokenData.value.access_token, tokenData.value.access_token,
tokenData.value.access_token, tokenData.value.access_token,
) )
.catch(() => { }); .catch(() => {});
tokenData.value = null; tokenData.value = null;
me.value = null; me.value = null;

View file

@ -13,8 +13,8 @@ export const useAccount = (
watchEffect(() => { watchEffect(() => {
if (toValue(accountId)) if (toValue(accountId))
ref(client) toValue(client)
.value?.getAccount(toValue(accountId) ?? "") ?.getAccount(toValue(accountId) ?? "")
.then((res) => { .then((res) => {
output.value = res.data; output.value = res.data;
}); });

View file

@ -65,26 +65,6 @@ export const useParsedContent = (
link.outerHTML = await renderToString(renderedMention); link.outerHTML = await renderToString(renderedMention);
} }
// Highlight code blocks
/* const codeBlocks = contentHtml.querySelectorAll("pre code");
for (const codeBlock of codeBlocks) {
const code = codeBlock.textContent;
if (!code) {
continue;
}
const highligher = await getShikiHighlighter();
const newCode = highligher.highlight(code, {});
// Replace parent pre tag with highlighted code
const parent = codeBlock.parentElement;
if (!parent) {
continue;
}
parent.outerHTML = newCode;
}*/
result.value = contentHtml.innerHTML; result.value = contentHtml.innerHTML;
}, },
{ immediate: true }, { immediate: true },

View file

@ -6,7 +6,6 @@ export default defineNuxtConfig({
"@vueuse/nuxt", "@vueuse/nuxt",
"nuxt-headlessui", "nuxt-headlessui",
"@nuxt/fonts", "@nuxt/fonts",
//"nuxt-shiki",
"@vee-validate/nuxt", "@vee-validate/nuxt",
"nuxt-security", "nuxt-security",
"@vite-pwa/nuxt", "@vite-pwa/nuxt",
@ -67,24 +66,6 @@ export default defineNuxtConfig({
}, },
keepalive: true, keepalive: true,
}, },
/* shiki: {
defaultTheme: "rose-pine",
bundledLangs: [
"javascript",
"typescript",
"html",
"css",
"json",
"python",
"toml",
"rust",
"sql",
"scss",
"bash",
"shell",
"yaml",
],
}, */
nitro: { nitro: {
preset: "bun", preset: "bun",
minify: true, minify: true,

View file

@ -1,68 +1,68 @@
{ {
"name": "lysand-fe", "name": "lysand-fe",
"private": true, "private": true,
"type": "module", "type": "module",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"author": { "author": {
"email": "contact@cpluspatch.com", "email": "contact@cpluspatch.com",
"name": "CPlusPatch", "name": "CPlusPatch",
"url": "https://cpluspatch.com" "url": "https://cpluspatch.com"
}, },
"maintainers": [ "maintainers": [
{ {
"email": "contact@cpluspatch.com", "email": "contact@cpluspatch.com",
"name": "CPlusPatch", "name": "CPlusPatch",
"url": "https://cpluspatch.com" "url": "https://cpluspatch.com"
} }
], ],
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/lysand-org/lysand-fe.git" "url": "git+https://github.com/lysand-org/lysand-fe.git"
}, },
"scripts": { "scripts": {
"build": "nuxt build", "build": "nuxt build",
"dev": "nuxt dev --https --https.cert config/lysand-fe.localhost.pem --https.key config/lysand-fe.localhost-key.pem --host lysand-fe.localhost", "dev": "nuxt dev --https --https.cert config/lysand-fe.localhost.pem --https.key config/lysand-fe.localhost-key.pem --host lysand-fe.localhost",
"generate": "nuxt generate", "generate": "nuxt generate",
"preview": "nuxt preview", "preview": "nuxt preview",
"postinstall": "nuxt prepare" "postinstall": "nuxt prepare"
}, },
"dependencies": { "dependencies": {
"@nuxt/fonts": "^0.7.0", "@nuxt/fonts": "^0.7.0",
"@tailwindcss/typography": "^0.5.12", "@tailwindcss/typography": "^0.5.12",
"@vee-validate/nuxt": "^4.12.6", "@vee-validate/nuxt": "^4.12.6",
"@vee-validate/zod": "^4.12.6", "@vee-validate/zod": "^4.12.6",
"@vite-pwa/nuxt": "^0.7.0", "@vite-pwa/nuxt": "^0.7.0",
"c12": "^1.10.0", "c12": "^1.10.0",
"html-to-text": "^9.0.5", "html-to-text": "^9.0.5",
"iconify-icon": "^2.1.0", "iconify-icon": "^2.1.0",
"megalodon": "^10.0.0", "megalodon": "^10.0.0",
"mitt": "^3.0.1", "mitt": "^3.0.1",
"nuxt": "^3.11.2", "nuxt": "^3.11.2",
"nuxt-headlessui": "^1.2.0", "nuxt-headlessui": "^1.2.0",
"nuxt-security": "^2.0.0-beta.0", "nuxt-security": "^2.0.0-beta.0",
"nuxt-shiki": "^0.3.0", "nuxt-shiki": "^0.3.0",
"overlayscrollbars": "^2.8.0", "overlayscrollbars": "^2.8.0",
"overlayscrollbars-vue": "^0.5.9", "overlayscrollbars-vue": "^0.5.9",
"shiki": "^1.3.0", "shiki": "^1.3.0",
"vue": "^3.4.21", "vue": "^3.4.21",
"vue-router": "^4.3.0", "vue-router": "^4.3.0",
"zod": "^3.23.0" "zod": "^3.23.0"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^1.6.4", "@biomejs/biome": "^1.6.4",
"@nuxtjs/seo": "^2.0.0-rc.10", "@nuxtjs/seo": "^2.0.0-rc.10",
"@nuxtjs/tailwindcss": "^6.11.4", "@nuxtjs/tailwindcss": "^6.11.4",
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@types/html-to-text": "^9.0.4", "@types/html-to-text": "^9.0.4",
"@vue-email/nuxt": "^0.8.19" "@vue-email/nuxt": "^0.8.19"
}, },
"trustedDependencies": [ "trustedDependencies": [
"@biomejs/biome", "@biomejs/biome",
"@fortawesome/fontawesome-common-types", "@fortawesome/fontawesome-common-types",
"@fortawesome/free-regular-svg-icons", "@fortawesome/free-regular-svg-icons",
"@fortawesome/free-solid-svg-icons", "@fortawesome/free-solid-svg-icons",
"esbuild", "esbuild",
"json-editor-vue", "json-editor-vue",
"vue-demi" "vue-demi"
] ]
} }

BIN
public/logo.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB