Skip to content

Commit

Permalink
Merge pull request #135 from socialblue/vue3-vite-app
Browse files Browse the repository at this point in the history
Introduce vue3 vite app
  • Loading branch information
mbroersen committed Jul 11, 2023
2 parents 1b7bc06 + 53a1bed commit 305109e
Show file tree
Hide file tree
Showing 70 changed files with 3,107 additions and 11,298 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build
docs
vendor
coverage
Expand Down
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
return [
'cache' => [
'key' => env('QUERY_ADVISER_CACHE_KEY', 'query_adviser_recent'),
'ttl' => env('QUERY_ADVISER_CACHE_TTL', 3600),
'ttl' => env('QUERY_ADVISER_CACHE_TTL', 25200),
'max_entries' => env('QUERY_ADVISER_CACHE_MAX_ENTRIES', 10000),
'display_key' => env('QUERY_ADVISER_CACHE_DISPLAY_KEY', 'query_adviser_display'),
'session_id' => env('QUERY_ADVISER_CACHE_SESSION_ID', 'query_advisor_sessions_id'),
Expand Down
9,320 changes: 448 additions & 8,872 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
{
"private": true,
"scripts": {
"development": "mix",
"build": "npm run production",
"production": "mix --production",
"watch": "mix watch"
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"bulma": "^0.9.4",
"bulma-extensions": "^6.2.7",
"cross-env": "^5.2.1",
"laravel-mix": "^6.0.49",
"node-sass": "^7.0.3",
"postcss": "^8.4.16",
"resolve-url-loader": "^4.0.0",
"sass": "^1.56.2",
"sass-loader": "^12.6.0",
"sql-formatter": "^12.0.3",
"sql-highlight": "^4.2.1",
"v-clipboard": "^2.2.3",
"vue": "^2.7.14",
"vue-loader": "^15.10.1",
"vue-router": "^3.6.5",
"vue-template-compiler": "^2.7.14"
"@vitejs/plugin-vue": "^4.2.3",
"laravel-vite-plugin": "^0.7.8",
"sass": "^1.63.6",
"vite": "^4.4.3"
},
"dependencies": {}
"dependencies": {
"sql-formatter": "^12.2.3",
"sql-highlight": "^4.3.3",
"vue": "^3.3.4",
"vue-router": "^4.2.4"
}
}
26 changes: 26 additions & 0 deletions public/build/assets/app-381aa937.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/build/assets/app-f8d133f2.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"resources/app/app.css": {
"file": "assets/app-f8d133f2.css",
"src": "resources/app/app.css"
},
"resources/app/app.js": {
"css": [
"assets/app-f8d133f2.css"
],
"file": "assets/app-381aa937.js",
"isEntry": true,
"src": "resources/app/app.js"
}
}
2 changes: 0 additions & 2 deletions public/css/app.css

This file was deleted.

2 changes: 0 additions & 2 deletions public/js/app.js

This file was deleted.

5 changes: 0 additions & 5 deletions public/js/app.js.LICENSE.txt

This file was deleted.

4 changes: 0 additions & 4 deletions public/mix-manifest.json

This file was deleted.

9 changes: 9 additions & 0 deletions resources/app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { createApp } from 'vue';
import router from "./routes/web";
import layoutMain from "./layouts/main.vue";

const app = createApp(layoutMain);
app.use(router);
app.mount('#app')

export default app;
64 changes: 64 additions & 0 deletions resources/app/layouts/main.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<script setup>
import { RouterView } from "vue-router";
import IconSheet from "../modules/default/components/icon-sheet.vue";
import PageFooter from "../modules/default/components/page-footer.vue";
defineProps({
msg: String,
});
</script>

<template>
<main class="laravel-query-adviser">
<router-view />
<page-footer />
<icon-sheet />
</main>
</template>

<style lang="scss">
body, html {
padding: 0;
margin: 0;
}
* {
box-sizing: border-box;
}
.laravel-query-adviser {
color: #4a4a4a;
font-size: 1em;
display: flex;
font-weight: 400;
line-height: 1.5;
font-family: "Roboto Condensed", serif;
flex-direction: column;
min-height: 100vh;
max-height: 100vh;
.container {
flex-grow: 1;
margin: 0 auto;
position: relative;
width: auto;
max-width: 1344px;
padding: 2px 20px;
}
h1 {
color: #363636;
font-size: 2rem;
font-weight: 600;
line-height: 1.125rem;
}
h2 {
color: #363636;
font-size: 14px;
font-weight: 600;
line-height: 14px;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export function serverInfo() {
return fetch(`${defaultApiPath}/server-info`)
.then((response) => response.json());
}

60 changes: 60 additions & 0 deletions resources/app/modules/default/components/button-icon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<template>
<div class="button" :title="title" v-on:click="emit">
<span class="icon">
<span class="material-icons">{{ icon }}</span>
</span>
</div>
</template>

<script setup>
defineProps({
title: {
type: String
},
icon : {
type: String,
default: 'close'
}
})
const emits = defineEmits(['button:click'])
function emit() {
emits('button:click');
}
</script>

<style lang="scss">
.button {
font-size: 12px;
line-height: 20px;
transition: all .2s;
text-align: center;
justify-content: center;
white-space: nowrap;
background-color: rgba(233,233,233, 0.5);
display: flex;
border-radius: 6px;
margin-right: 6px;
&:hover {
cursor: pointer;
}
.icon {
margin-right: 14px;
margin-left: 14px;
margin-top: 2px;
.material-icons {
font-size: 12px;
}
}
&:hover {
background-color: rgba(233,233,233, 0.9);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,7 @@
</svg>
</template>

<script>
export default {
name: 'iconSheet',
}
<script setup>
</script>

<style scoped>
Expand Down
39 changes: 39 additions & 0 deletions resources/app/modules/default/components/loader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<div class="loader-container">
<span class="material-symbols-outlined loader">
progress_activity
</span>
</div>
</template>

<style lang="scss">
.loader-container {
position: relative;
height: 40px;
width: 100%;
overflow: hidden;
padding: 4px;
text-align: center;
.loader {
font-size: 32px;
font-weight: 900;
color: #333;
animation: loader_spin 1s linear infinite;
transform-origin: 50% 50%;
}
}
@keyframes loader_spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
Loading

0 comments on commit 305109e

Please sign in to comment.