Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image fixes #66

Merged
merged 5 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/base/Author.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
size: 'sm',
});

const { fileUrl } = useFiles();

Check warning on line 12 in components/base/Author.vue

View workflow job for this annotation

GitHub Actions / Lint

'fileUrl' is assigned a value but never used. Allowed unused vars must match /^_/u
</script>
<template>
<div class="flex items-center flex-none group dark:text-gray-100">
Expand All @@ -24,7 +24,7 @@
},
'object-cover rounded-full dark:brightness-90',
]"
:src="fileUrl(author.image as string)"
:src="author.image as string"
/>
</div>

Expand Down
14 changes: 7 additions & 7 deletions components/base/FormCustom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Form } from '~/types';
import * as UForm from '#ui/components/forms/Form.vue';
import type { Form as FormType } from '~/types';
import Form from '#ui/components/forms/Form.vue';
import FormGroup from '#ui/components/forms/FormGroup.vue';
import Input from '#ui/components/forms/Input.vue';
import Textarea from '#ui/components/forms/Textarea.vue';
Expand Down Expand Up @@ -38,8 +38,8 @@
export default defineComponent({
props: {
schema: {
type: Array as PropType<Form['schema']>,
required: true,
type: Array as PropType<FormType['schema']>,
default: () => [],
},
state: {
type: Object,
Expand All @@ -53,8 +53,8 @@
},
},
setup(props) {
const groups = props.schema?.map((item) => {
const groups = props?.schema?.map((item) => {
const { name, label, placeholder, width, description } = item as { [key: string]: any };

Check warning on line 57 in components/base/FormCustom.ts

View workflow job for this annotation

GitHub Actions / Lint

'placeholder' is assigned a value but never used. Allowed unused vars must match /^_/u

Check warning on line 57 in components/base/FormCustom.ts

View workflow job for this annotation

GitHub Actions / Lint

'width' is assigned a value but never used. Allowed unused vars must match /^_/u

// @ts-ignore
const cssClass = widthClassMap[item.width] || 'md:col-span-6';
Expand All @@ -66,7 +66,7 @@
});

if (!groups) {
return () => null;
return;
}

// Add the submit button to the groups array
Expand All @@ -88,6 +88,6 @@
);

// @ts-ignore
return () => h(UForm, { state: props.state, validate: props.validate }, () => groups);
return () => h(Form, { state: props.state, validate: props.validate }, () => groups);
},
});
4 changes: 2 additions & 2 deletions components/base/VAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
size: 'md',
});

const { fileUrl } = useFiles();

Check warning on line 13 in components/base/VAvatar.vue

View workflow job for this annotation

GitHub Actions / Lint

'fileUrl' is assigned a value but never used. Allowed unused vars must match /^_/u
</script>
<template>
<div class="flex items-center flex-none group dark:text-gray-100">
<div class="mr-3">
<img
<NuxtImg
v-if="author.avatar"
:class="[
{
Expand All @@ -25,7 +25,7 @@
},
'object-cover rounded-full dark:brightness-90',
]"
:src="fileUrl(author.avatar as string)"
:src="author.avatar as string"
/>
</div>

Expand Down
Loading