Commit e9f59be6 by Jonathan Thomas

Improving logout flow, to correctly set Projects = [], instead of null. Adding…

Improving logout flow, to correctly set Projects = [], instead of null. Adding Google Cloud icon to login page - updating icons to use SVG images.
parent 7255c426
......@@ -6,7 +6,7 @@
<script>
// @ is an alias to /src
import Projects from "../components/Projects";
import { mapGetters } from 'vuex'
import { mapGetters, mapMutations } from 'vuex'
export default {
name: 'Home',
......@@ -14,11 +14,15 @@ export default {
Projects
},
computed: {
...mapGetters(['isAuthenticated'])
...mapGetters(['isAuthenticated']),
},
methods: {
...mapMutations(['clearErrors'])
},
mounted() {
if (!this.isAuthenticated) {
// login failed, show login page
this.clearErrors()
this.$router.push('/login')
}
}
......
......@@ -7,9 +7,10 @@
<strong>User:</strong> demo-cloud, <strong>Password:</strong> demo-password
<p class="pt-3 fw-light">All demo projects are deleted every 12 hours, and are limited to 4 seconds in length.</p>
<div>
<p class="m-0"><strong>Spin up</strong> your instance (with no limitations):</p>
<a class="btn btn-lg btn-primary launch-instance" href="https://aws.amazon.com/marketplace/pp/B074H87FSJ/" target="_blank" style="margin: 5px; background-color: #ffffff;" title="Launch Instance: AWS"><img src="//cdn.openshot.org/static/img/icons/aws.png"></a>
<a class="btn btn-lg btn-primary launch-instance" href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/openshotstudiosllc.openshot-cloud-api" target="_blank" style="margin: 5px; background-color: #ffffff;" title="Launch Instance: Azure"><img src="//cdn.openshot.org/static/img/icons/azure.png"></a>
<p class="m-0"><strong>Launch</strong> an instance (with no limitations):</p>
<a class="btn btn-lg btn-primary launch-instance" href="https://aws.amazon.com/marketplace/pp/B074H87FSJ/" target="_blank" style="margin: 5px; background-color: #ffffff;" title="Launch Instance: AWS"><img src="//cdn.openshot.org/static/img/icons/aws.svg" height="24"></a>
<a class="btn btn-lg btn-primary launch-instance" href="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/openshotstudiosllc.openshot-cloud-api" target="_blank" style="margin: 5px; background-color: #ffffff;" title="Launch Instance: Azure"><img src="//cdn.openshot.org/static/img/icons/azure.svg" height="24"></a>
<a class="btn btn-lg btn-primary launch-instance" href="javascript:alert('Google Cloud - Coming Soon...')" style="margin: 5px; background-color: #ffffff;" title="Launch Instance: Google Cloud"><img src="//cdn.openshot.org/static/img/icons/google.svg" height="24"></a>
</div>
</div>
</div>
......
<template>
<p/>
</template>
<script>
import { mapMutations } from 'vuex'
......@@ -9,7 +13,7 @@ export default {
mounted() {
// Logout user
this.setUser(null)
this.setProjects(null)
this.setProjects([])
localStorage.removeItem('auth')
this.$router.push('/login')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment