Compare commits
2 commits
4ee00885fe
...
9fb82dcfaa
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fb82dcfaa | |||
| a6b9646b87 |
7 changed files with 114 additions and 40 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
**/node_modules
|
||||
**/fftcg.db
|
||||
**/org.vue.*.json
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"favorite": 0,
|
||||
"type": "vue",
|
||||
"name": "frontend",
|
||||
"openDate": 1556529929207,
|
||||
"openDate": 1556789720710,
|
||||
"widgets": [
|
||||
{
|
||||
"id": "5sGiztidd",
|
||||
|
|
|
|||
|
|
@ -1,37 +1,11 @@
|
|||
<template>
|
||||
<v-app>
|
||||
<v-toolbar app>
|
||||
<v-toolbar-title class="headline text-uppercase">
|
||||
<span>Vuetify</span>
|
||||
<span class="font-weight-light">MATERIAL DESIGN</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat :to="{ path: '/' }">Home</v-btn>
|
||||
<v-btn flat :to="{ path: '/about' }">About</v-btn>
|
||||
<v-btn flat :to="{ path: '/game' }">Game</v-btn>
|
||||
<v-btn
|
||||
flat
|
||||
href="https://github.com/vuetifyjs/vuetify/releases/latest"
|
||||
target="_blank"
|
||||
>
|
||||
<span class="mr-2">Latest Release</span>
|
||||
<v-icon>open_in_new</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
<v-content>
|
||||
<router-view />
|
||||
</v-content>
|
||||
<router-view />
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
//
|
||||
}
|
||||
}
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
36
frontend/src/ExampleApp.vue
Normal file
36
frontend/src/ExampleApp.vue
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<v-app>
|
||||
<v-toolbar app>
|
||||
<v-toolbar-title class="headline text-uppercase">
|
||||
<span>Vuetify</span>
|
||||
<span class="font-weight-light">MATERIAL DESIGN</span>
|
||||
</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat :to="{ path: '/' }">Home</v-btn>
|
||||
<v-btn flat :to="{ path: '/about' }">About</v-btn>
|
||||
<v-btn
|
||||
flat
|
||||
href="https://github.com/vuetifyjs/vuetify/releases/latest"
|
||||
target="_blank"
|
||||
>
|
||||
<span class="mr-2">Latest Release</span>
|
||||
<v-icon>open_in_new</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
<v-content>
|
||||
<router-view />
|
||||
</v-content>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ExampleApp',
|
||||
data() {
|
||||
return {
|
||||
//
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
35
frontend/src/components/forms/Login.vue
Normal file
35
frontend/src/components/forms/Login.vue
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<template>
|
||||
<v-dialog v-model="dialog" width="500">
|
||||
<v-btn slot="activator" color="red lighten-2" dark>
|
||||
Login
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title class="headline grey lighten-2" primary-title>
|
||||
Log In
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Some form
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialog = false">
|
||||
Login
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "LoginForm"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
|
|
@ -1,21 +1,32 @@
|
|||
<template lang="html">
|
||||
<div ref="game"></div>
|
||||
<div ref="game" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Game',
|
||||
|
||||
mounted() {
|
||||
this.$nextTick(function() {
|
||||
// framework
|
||||
require('craftyjs/dist/crafty')
|
||||
try {
|
||||
// framework
|
||||
require('craftyjs/dist/crafty')
|
||||
|
||||
// initialize on ref="game"
|
||||
window.Crafty.init(this.$refs.game)
|
||||
// initialize on ref="game"
|
||||
window.Crafty.init(this.$refs.game)
|
||||
window.Crafty.stage.fullscreen = true
|
||||
|
||||
// load fftcg
|
||||
require('@/crafty/Game.coffee')
|
||||
// load fftcg
|
||||
require('@/crafty/Game.coffee')
|
||||
} catch (e) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
window.Crafty.stop(true)
|
||||
delete window.Crafty
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,31 @@
|
|||
<template>
|
||||
<HelloWorld />
|
||||
<v-container>
|
||||
<v-flex mb-4>
|
||||
<h1 class="display-2 font-weight-bold mb-3">
|
||||
Hello World!
|
||||
</h1>
|
||||
<p class="subheading font-weight-regular">
|
||||
App under development, please don't submit any valuable data!
|
||||
</p>
|
||||
</v-flex>
|
||||
|
||||
<LoginForm />
|
||||
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
import LoginForm from '@/components/forms/Login.vue'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
data() {
|
||||
return {
|
||||
dialog: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
HelloWorld
|
||||
LoginForm
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Reference in a new issue