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

Missing imports, and new import method for Vuetify #396

Merged
merged 2 commits into from
Dec 11, 2023
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
12 changes: 0 additions & 12 deletions components/MainNav.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<script lang="ts" setup>
import { useDisplay } from 'vuetify';
import { ToolboxItems } from '~/data/models/generic';
import {
VAppBar,
VBtn,
VDivider,
VMenu,
VList,
VListItem,
VListItemTitle,
VNavigationDrawer,
VListSubheader,
VImg,
} from 'vuetify/components';
const { lgAndUp } = useDisplay();
const showDrawer = ref(false);
</script>
Expand Down
13 changes: 2 additions & 11 deletions components/NeedleTable.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
<script>
<script lang="ts" setup>
import needlesTables from '~/data/suggestedNeedles.json';

export default defineComponent({
data() {
return {
pagination: {},
tables: needlesTables,
};
},
});
const tables = ref(needlesTables);
</script>

<template>
Expand All @@ -18,7 +10,6 @@
<div class="card">
<div class="card-header">
<h2 class="card-header-title">
<i :class="table.icon"></i>
<span class="pl-2">{{ table.title }}</span>
</h2>
</div>
Expand Down
12 changes: 4 additions & 8 deletions components/RecentVideos.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup lang="ts">
const { data: videos, pending, error } = await useFetch('/api/youtube/videos');
</script>

<template>
<v-row>
<h3 class="fancy-font-bold is-size-3 has-text-centered pb-5">Recent Videos</h3>
Expand Down Expand Up @@ -31,11 +35,3 @@
</v-row>
</v-row>
</template>

<script setup lang="ts">
import { VCol, VRow } from 'vuetify/components/VGrid';
import { VCard, VCardTitle, VCardSubtitle } from 'vuetify/components/VCard';
import { VImg } from 'vuetify/components/VImg';
import { VSkeletonLoader } from 'vuetify/components/VSkeletonLoader';
const { data: videos, pending, error } = await useFetch('/api/youtube/videos');
</script>
7 changes: 1 addition & 6 deletions components/RegistrySubmission.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<script lang="ts" setup>
import { VTextField } from 'vuetify/components/VTextField';
import { VSelect } from 'vuetify/components/VSelect';
import { VTextarea } from 'vuetify/components/VTextarea';
import { VForm } from 'vuetify/components/VForm';
</script>
<script lang="ts" setup></script>

<template>
<div class="card">
Expand Down
8 changes: 4 additions & 4 deletions components/Stats.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script lang="ts" setup>
const { data: stats, pending, error } = await useFetch('/api/youtube/stats');
</script>

<template>
<div class="card mb-5">
<nav class="level py-4">
Expand Down Expand Up @@ -38,10 +42,6 @@
</div>
</template>

<script lang="ts" setup>
const { data: stats, pending, error } = await useFetch('/api/youtube/stats');
</script>

<style lang="scss" scoped>
.card {
box-shadow:
Expand Down
9 changes: 0 additions & 9 deletions components/WheelCard.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<script lang="ts" setup>
import type { IWheelsData } from '~/data/models/wheels';
import { VCard, VCardText, VCardItem } from 'vuetify/components/VCard';
import { VIcon } from 'vuetify/components/VIcon';
import { VImg } from 'vuetify/components/VImg';
import { VBtn } from 'vuetify/components/VBtn';
import { VExpansionPanel, VExpansionPanels, VExpansionPanelText } from 'vuetify/components/VExpansionPanel';
import { VList, VListItem } from 'vuetify/components/VList';
import { VRow, VCol } from 'vuetify/components/VGrid';
import { VDivider } from 'vuetify/components/VDivider';
import { VCarousel, VCarouselItem } from 'vuetify/components/VCarousel';

defineProps({
wheel: {
Expand Down
8 changes: 1 addition & 7 deletions components/WheelGrid.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
<script lang="ts" setup>
import { VCol, VRow } from 'vuetify/components/VGrid';
import { VDataIterator } from 'vuetify/components/VDataIterator';
import { VSkeletonLoader } from 'vuetify/components/VSkeletonLoader';
import { VBtnToggle } from 'vuetify/components/VBtnToggle';
import { VTextField } from 'vuetify/components/VTextField';
import { VBtn } from 'vuetify/components/VBtn';
const size = ref('ten');
const search = ref('');
let page = ref(1);

let { data: wheels, pending, error }: any = await useFetch(() => `/api/wheels/${size.value}`);
let page = ref(1);
</script>

<template>
Expand Down
14 changes: 0 additions & 14 deletions components/WheelSubmit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
},
});
import type { IWheelsData } from '~/data/models/wheels';
import { VStepper } from 'vuetify/components/VStepper';
import { VSkeletonLoader } from 'vuetify/components/VSkeletonLoader';
import { VCol, VContainer, VRow } from 'vuetify/components/VGrid';
import { VCard } from 'vuetify/components/VCard';
import { VForm } from 'vuetify/components/VForm';
import { VLabel } from 'vuetify/components/VLabel';
import { VTextField } from 'vuetify/components/VTextField';
import { VFileInput } from 'vuetify/components/VFileInput';
import { VSelect } from 'vuetify/components/VSelect';
import { VAvatar } from 'vuetify/components/VAvatar';
import { VIcon } from 'vuetify/components/VIcon';
import { VImg } from 'vuetify/components/VImg';
import { VProgressCircular } from 'vuetify/components/VProgressCircular';
import { VList, VListItem, VListSubheader } from 'vuetify/components/VList';
import { humanFileSize } from '~/data/models/helper-utils';
import { useRecaptchaToken } from '~/composables/recaptcha';
const wheel = ref();
Expand Down
13 changes: 13 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';

export default defineNuxtConfig({
/*
** Headers of the page
Expand Down Expand Up @@ -88,6 +90,12 @@ export default defineNuxtConfig({
'nuxt-simple-robots',
'@nuxt/image',
['nuxt-gtag', { id: 'G-FBH0E64HM1' }],
(_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', (config) => {
// @ts-expect-error
config.plugins.push(vuetify({ autoImport: true }));
});
},
],

robots: {
Expand Down Expand Up @@ -127,6 +135,11 @@ export default defineNuxtConfig({
define: {
'process.env.DEBUG': false,
},
vue: {
template: {
transformAssetUrls,
},
},
},

pwa: {
Expand Down
Loading