Skip to content
Snippets Groups Projects
Commit 45b5a0b0 authored by Adam Procter's avatar Adam Procter
Browse files

0.1.10

Added basic URL support. Syntax is baseurl.com/microcosm/microcosmname

If you have already assigned an object name on that device you will auto join, if you do not have one or localStorage is empty you will need to assign one.

microcosm and object name are now visible in the controlsLayer.vue component
parent b5251ec2
Branches offline
No related tags found
No related merge requests found
# 0.1.10
_7th April 2020_
### Added
- You can now visit a microcosm by using URL followed by https://baseurl.com/microcosm/**microcosmname**/ to direct someone to a specific microcosm, if they have used any microcosm before they will enter with there device/ object name. If they have not they need to assign a object name.
### Changed
- You can now see the microcosm you are connected to and your object name.
### Fixed
- Create/ Join a new microcosm now reloads URL dependant on whether in development or prodction enviroment
# 0.1.9 # 0.1.9
_26th March 2020_ _26th March 2020_
......
{ {
"name": "nodenogg.in", "name": "nodenogg.in",
"version": "0.1.9", "version": "0.1.10",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
...@@ -12,6 +12,11 @@ ...@@ -12,6 +12,11 @@
Delete my contributions (inc. attachments) permanently Delete my contributions (inc. attachments) permanently
</BaseButton> </BaseButton>
<BaseButton @click="handleConnection()">Online check</BaseButton>--> <BaseButton @click="handleConnection()">Online check</BaseButton>-->
<p class="who">
microcosm =
<b>{{ myMicrocosm }}</b> | object =
<b>{{ myClient }}</b>
</p>
</div> </div>
<!-- TEMP: This was old code for possible pop up panes --> <!-- TEMP: This was old code for possible pop up panes -->
<!-- <button on:click="popups.showPane = !popups.showPane"> --> <!-- <button on:click="popups.showPane = !popups.showPane"> -->
...@@ -28,12 +33,18 @@ ...@@ -28,12 +33,18 @@
<script> <script>
// This is for detecting offline issues // This is for detecting offline issues
var serverUrl = 'https://nodenogg.in' var serverUrl = 'https://nodenogg.in'
import { mapState } from 'vuex'
export default { export default {
mounted() { mounted() {
window.addEventListener('online', this.handleConnection) window.addEventListener('online', this.handleConnection)
window.addEventListener('offline', this.handleConnection) window.addEventListener('offline', this.handleConnection)
}, },
computed: mapState({
myMicrocosm: state => state.microcosm,
myClient: state => state.myclient
}),
methods: { methods: {
addNode() { addNode() {
this.$store.dispatch('addNode') this.$store.dispatch('addNode')
...@@ -48,7 +59,11 @@ export default { ...@@ -48,7 +59,11 @@ export default {
// Hardcoded as when I set a URL had parameters the reload fails // Hardcoded as when I set a URL had parameters the reload fails
//location.assign('https://alpha.nodenogg.in/') //location.assign('https://alpha.nodenogg.in/')
//location.assign('http://localhost:8080/') //location.assign('http://localhost:8080/')
location.reload()
location.assign(
process.env.VUE_APP_HTTP + '://' + process.env.VUE_APP_URL + '/'
)
// location.reload()
}, },
deleteClient() { deleteClient() {
...@@ -104,6 +119,10 @@ export default { ...@@ -104,6 +119,10 @@ export default {
user-select: none; user-select: none;
} }
.who {
color: white;
}
.btn-row { .btn-row {
position: relative; position: relative;
margin-bottom: 5px; margin-bottom: 5px;
......
...@@ -63,10 +63,12 @@ ...@@ -63,10 +63,12 @@
var delay = 100 var delay = 100
var delaytwo = 100 var delaytwo = 100
import Router from '@/router'
export default { export default {
data: function() { data: function() {
return { return {
localmicrocosm: '', localmicrocosm: Router.currentRoute.params.microcosm,
clientid: '', clientid: '',
parta: true, parta: true,
partb: false, partb: false,
......
<template> <template>
<div class="home"> <div class="home">
<div v-if="clientset"> <div v-if="clientset">
<p>
microcosm/
<b>{{ myMicrocosm }}</b> | client
<b>{{ myClient }}</b>
</p>
<OtherNodeslayer <OtherNodeslayer
v-for="value in otherNodes" v-for="value in otherNodes"
v-bind:key="value.node_id" v-bind:key="value.node_id"
...@@ -74,8 +68,6 @@ export default { ...@@ -74,8 +68,6 @@ export default {
ControlsLayer ControlsLayer
}, },
computed: mapState({ computed: mapState({
myMicrocosm: state => state.microcosm,
myClient: state => state.myclient,
myNodes: state => state.myNodes, myNodes: state => state.myNodes,
otherNodes: state => state.otherNodes, otherNodes: state => state.otherNodes,
shortcutstate: state => state.shortcutstate shortcutstate: state => state.shortcutstate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment