diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0b391188093b0c397268af5fae15f12d239e67..a4d7f05eea929bdd3cfcf9aac1e136e3527bc0b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 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 _26th March 2020_ diff --git a/app/package.json b/app/package.json index 0eda5a19154e9b6b1913f1c2d05b0b61ecda34cc..d5c6f7a27699b215c3f098772784294dfba9dc0a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "nodenogg.in", - "version": "0.1.9", + "version": "0.1.10", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/app/src/components/ControlsLayer.vue b/app/src/components/ControlsLayer.vue index fe2dd1831ff81c3440ed7f3a621c2424c7e509c1..b3f2b65f5bc29eecd669be9d64d9470bae06edf2 100644 --- a/app/src/components/ControlsLayer.vue +++ b/app/src/components/ControlsLayer.vue @@ -12,6 +12,11 @@ Delete my contributions (inc. attachments) permanently </BaseButton> <BaseButton @click="handleConnection()">Online check</BaseButton>--> + <p class="who"> + microcosm = + <b>{{ myMicrocosm }}</b> | object = + <b>{{ myClient }}</b> + </p> </div> <!-- TEMP: This was old code for possible pop up panes --> <!-- <button on:click="popups.showPane = !popups.showPane"> --> @@ -28,12 +33,18 @@ <script> // This is for detecting offline issues var serverUrl = 'https://nodenogg.in' +import { mapState } from 'vuex' export default { mounted() { window.addEventListener('online', this.handleConnection) window.addEventListener('offline', this.handleConnection) }, + + computed: mapState({ + myMicrocosm: state => state.microcosm, + myClient: state => state.myclient + }), methods: { addNode() { this.$store.dispatch('addNode') @@ -48,7 +59,11 @@ export default { // Hardcoded as when I set a URL had parameters the reload fails //location.assign('https://alpha.nodenogg.in/') //location.assign('http://localhost:8080/') - location.reload() + + location.assign( + process.env.VUE_APP_HTTP + '://' + process.env.VUE_APP_URL + '/' + ) + // location.reload() }, deleteClient() { @@ -104,6 +119,10 @@ export default { user-select: none; } +.who { + color: white; +} + .btn-row { position: relative; margin-bottom: 5px; diff --git a/app/src/components/OnBoard.vue b/app/src/components/OnBoard.vue index 3a8c35b15cd0514182559a963b9c8ddf1a8165fc..2aba6ede815a33a7bae5278ce8bff57de0308dbf 100644 --- a/app/src/components/OnBoard.vue +++ b/app/src/components/OnBoard.vue @@ -63,10 +63,12 @@ var delay = 100 var delaytwo = 100 +import Router from '@/router' + export default { data: function() { return { - localmicrocosm: '', + localmicrocosm: Router.currentRoute.params.microcosm, clientid: '', parta: true, partb: false, diff --git a/app/src/views/Home.vue b/app/src/views/Home.vue index 135141ae66a871de1b7b89d3c15e717be21d357c..5d8d2ea230c9243b1f004b32845e1443ebe39502 100644 --- a/app/src/views/Home.vue +++ b/app/src/views/Home.vue @@ -1,12 +1,6 @@ <template> <div class="home"> <div v-if="clientset"> - <p> - microcosm/ - <b>{{ myMicrocosm }}</b> | client - <b>{{ myClient }}</b> - </p> - <OtherNodeslayer v-for="value in otherNodes" v-bind:key="value.node_id" @@ -74,8 +68,6 @@ export default { ControlsLayer }, computed: mapState({ - myMicrocosm: state => state.microcosm, - myClient: state => state.myclient, myNodes: state => state.myNodes, otherNodes: state => state.otherNodes, shortcutstate: state => state.shortcutstate