This commit is contained in:
2024-10-29 19:49:24 +02:00
commit 11eb888b9c
42 changed files with 7877 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Plugins
Plugins are a way to extend the functionality of your Vue application. Use this folder for registering plugins that you want to use globally.
+17
View File
@@ -0,0 +1,17 @@
import axios from 'axios';
const $ax = axios.create({
baseURL: '/api/'
})
export default {
install: (app, options) => {
app.config.globalProperties.$api = {
gameObject:{
async save(data){
return await $ax.put('/game-object', data);
}
}
}
}
}
+21
View File
@@ -0,0 +1,21 @@
/**
* plugins/index.js
*
* Automatically included in `./src/main.js`
*/
// Plugins
import vuetify from './vuetify'
import lang from './lang'
import pinia from '@/stores'
import router from '@/router'
import api from './api'
export function registerPlugins (app) {
app
.use(vuetify)
.use(router)
.use(pinia)
.use(api)
.use(lang)
}
+29
View File
@@ -0,0 +1,29 @@
const lang = {
bg: {
createGameObject: 'Добавяне на игрови обект',
name: 'Име',
fieldRequired: 'Полето е задължително',
objectType: 'Тип обект',
objectFile: 'Файл',
panorama2d: 'Панорамна снимка',
environment3d: 'Околна среда',
object3d: 'Триизмерен обект',
object2d: 'Двумерен обект (изображение)',
audio: 'Аудио',
player3d: 'Играч',
saveAndPreview: 'Запис и преглед',
captureThumbnail: 'Capture thumbnail',
publish: 'Публикуване'
},
en: {
}
}
export default {
install: (app, options) => {
// inject a globally available $translate() method
app.config.globalProperties.$l = lang.bg
}
}
+44
View File
@@ -0,0 +1,44 @@
/**
* plugins/vuetify.js
*
* Framework documentation: https://vuetifyjs.com`
*/
// Styles
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
// Composables
import { createVuetify } from 'vuetify'
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
defaults:{
global:{
// density:'comfortable'
//variant: 'outlined'
},
VCardActions:{
VBtn: { variant: 'elevated' },
},
VSelect: {
variant: 'outlined'
},
VTextField: {
variant: 'outlined'
},
VFileInput: {
variant: 'outlined'
}
},
theme: {
themes: {
light: {
colors: {
// primary: '#1867C0',
// secondary: '#5CBBF6',
},
},
},
},
})