mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-21 15:04:25 +01:00
Started migration of frontend to vuetify
This commit is contained in:
19
src/index.ts
19
src/index.ts
@@ -11,6 +11,25 @@ import {createApp} from 'vue'
|
||||
// @ts-ignore
|
||||
import App from './App.vue'
|
||||
|
||||
|
||||
import 'vuetify/lib/styles/main.sass';
|
||||
import { createVuetify } from 'vuetify';
|
||||
|
||||
// TODO: Only import the components and directives that are actually used
|
||||
// @ts-ignore
|
||||
import * as components from 'vuetify/lib/components';
|
||||
// @ts-ignore
|
||||
import * as directives from 'vuetify/lib/directives';
|
||||
|
||||
const vuetify = createVuetify({
|
||||
components,
|
||||
directives,
|
||||
theme: {
|
||||
defaultTheme: window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light',
|
||||
}
|
||||
});
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(vuetify)
|
||||
app.config.compilerOptions.isCustomElement = tag => tag === 'model-viewer'
|
||||
app.mount('body')
|
||||
Reference in New Issue
Block a user