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

fixing issue with iOS

parent a8f89424
No related branches found
No related tags found
No related merge requests found
No preview for this file type
# 0.1.30
_23rd October 2020_
### Changed
- Deployed a work around for switching between pre-made microcosms.
### Known Issues
- If you are in a microcosm and use URL scheme to create a new microcosm the data will not refresh until you create a new node or switch routes.
- iOS router
# 0.1.29
_16th October 2020_
### Changed
- name is now stored unless cleared meaning you can switch microcosms faster on any device
- name is now stored unless cleared meaning you can switch microcosms faster on any device.
# 0.1.28
......
{
"name": "nodenogg.in",
"version": "0.1.28",
"version": "0.1.30",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
<template>
<div id="app">
<navigation />
<router-view :key="$route.fullPath"></router-view>
<router-view />
</div>
</template>
......
<template>
<div ref="nodes" class="node">
<div v-if="this.currentroute.name == 'Home'">
<div v-if="this.currentroute.name == 'Organise'">
<vue-draggable-resizable
class="innernode"
:w="300"
......@@ -78,24 +78,25 @@
>Create or Rejoin a Microcosm</BaseButton
>
</div>
</div>
<div v-else>
<!-- </div> -->
<!-- <div v-else> -->
<h4>Loading...</h4>
</div>
</div>
</vue-draggable-resizable>
</div>
<div v-else>
<div class="nodes">
<div>
<vue-draggable-resizable> </vue-draggable-resizable>
<p id="nodeid" :inner-html.prop="nodetext | marked"></p>
<div v-if="name == false">
<input
type="text"
id="clientid"
v-model.trim="clientid"
placeholder="name"
autocorrect="off"
autocapitalize="none"
ref="objectname"
v-on:keyup.enter="setClient()"
autofocus
@focus="editTrue(true)"
......@@ -118,18 +119,17 @@
</div>
</div>
<div class="nodes">
<div class="content">
<p id="nodeid" :inner-html.prop="nodetext2 | marked"></p>
<div v-if="microcosm == false">
<input
id="microcosm"
type="text"
v-model.trim="localmicrocosm"
placeholder="microcosm name"
autocorrect="off"
ref="microcosm"
autocapitalize="none"
@focus="editTrue(true)"
ref="microcosm"
@blur="editTrue(false)"
v-on:keyup.enter="createMicrocosm(), letsGo()"
/>
......@@ -141,8 +141,8 @@
>Create or Rejoin a Microcosm</BaseButton
>
</div>
</div>
<div v-else>
<!-- </div> -->
<!-- <div v-else> -->
<h4>Loading...</h4>
</div>
</div>
......
import Vue from 'vue'
import VueRouter from 'vue-router'
import List from '../views/List.vue'
import Home from '../views/Home.vue'
import Cards from '../views/Cards.vue'
import List from '../views/List.vue'
import Discarded from '../views/Discarded.vue'
import Leave from '../views/Leave.vue'
import About from '../views/About.vue'
......@@ -69,5 +69,4 @@ const router = new VueRouter({
routes,
})
export default router
......@@ -173,6 +173,7 @@ const store = new Vuex.Store({
})
.catch(function (err) {
if (err.status == 404) {
var startup = '777'
// var uniqueid =
// Math.random().toString(36).substring(2, 15) +
// Math.random().toString(36).substring(2, 15)
......@@ -180,17 +181,17 @@ const store = new Vuex.Store({
_id: state.myclient,
_attachments: {},
nodes: [
// {
// // FIXME: these values are here as GET_ALL_NODES cant hunt a blank
// // this shouldnt need to be here though
// node_id: uniqueid,
// node_text: 'Ignore this node ' + state.myclient,
// node_owner: state.myclient,
// content_type: 'sheet',
// // NOTE: the first node is hidden due to a position not being created
// deleted: true,
// attachment_name: '',
// },
{
// FIXME: these values are here as GET_ALL_NODES cant hunt a blank
// this shouldnt need to be here though
node_id: startup,
node_text:
'## Welcome \n This node was automatically by the system as a workaround for an iOS and URL routing bug, just ignore for now please \n ## 🤦🏻‍♂️',
node_owner: state.myclient,
content_type: 'sheet',
// NOTE: the first node is also hidden due to a position not being created
deleted: true,
},
],
})
}
......
......@@ -30,24 +30,6 @@
</div>
<div v-else>
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
<!-- </div> -->
<NodesLayer
@editTrue="(e) => editTrue(e)"
v-for="value in myNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
......@@ -58,8 +40,6 @@ import Router from '@/router'
import CardsLayer from '@/components/CardsLayer'
import OtherCardslayer from '@/components/OtherCardslayer'
import OnBoard from '@/components/OnBoard'
import NodesLayer from '@/components/NodesLayer'
import OtherNodeslayer from '@/components/OtherNodeslayer'
import { mapState } from 'vuex'
......@@ -121,8 +101,6 @@ export default {
OtherCardslayer,
OnBoard,
OtherNodeslayer,
NodesLayer,
},
}
</script>
......
......@@ -13,24 +13,6 @@
</div>
<div v-else>
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
<!-- </div> -->
<NodesLayer
@editTrue="(e) => editTrue(e)"
v-for="value in myNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
......@@ -40,8 +22,7 @@
import Router from '@/router'
import DiscardLayer from '@/components/DiscardLayer'
import OnBoard from '@/components/OnBoard'
import NodesLayer from '@/components/NodesLayer'
import OtherNodeslayer from '@/components/OtherNodeslayer'
import { mapState } from 'vuex'
import { shortcutsMixin } from '@/components/mixins/shortcutsMixin.js'
......@@ -66,7 +47,7 @@ export default {
computed: {
...mapState({
myNodes: (state) => state.myNodes,
otherNodes: (state) => state.otherNodes,
shortcutstate: (state) => state.shortcutstate,
toolmode: (state) => state.ui.mode,
}),
......@@ -96,8 +77,6 @@ export default {
components: {
DiscardLayer,
OnBoard,
NodesLayer,
OtherNodeslayer,
},
}
</script>
......
......@@ -129,7 +129,7 @@ export default {
width: 2000,
height: 2000,
clientset: false,
listview: false,
// listview: false,
offline: false,
uploadready: false,
copyready: false,
......@@ -164,6 +164,7 @@ export default {
mounted() {
window.addEventListener('resize', this.handleResize)
this.handleResize()
console.log(this.clientset)
},
created() {
......
<template>
<div>
<div v-if="clientset">
<div id="listwrapper">
<h1 class="mobile">Your nodes - collect</h1>
<ListLayer
@editTrue="(e) => editTrue(e)"
v-for="value in myNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
<!-- <div class="btn-row">
<BaseButton class="new" buttonClass="action" @click="addNode()"
>Create Node</BaseButton
>
</div> -->
</div>
</div>
<div v-else>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
</template>
<script>
import ListLayer from '@/components/ListLayer'
import OnBoard from '@/components/OnBoard'
import { mapState } from 'vuex'
//import { shortcutsMixin } from '@/components/mixins/shortcutsMixin.js'
export default {
name: 'List',
//mixins: [shortcutsMixin],
data: function () {
return {
clientset: false,
}
},
props: {
nodeid: String,
nodetext: String,
deleted: Boolean,
},
computed: {
...mapState({
myNodes: (state) => state.myNodes,
//otherNodes: (state) => state.otherNodes,
// shortcutstate: (state) => state.shortcutstate,
// toolmode: (state) => state.ui.mode,
}),
},
// created() {
// if (typeof window !== 'undefined') {
// document.addEventListener('keydown', this.handleKeyPress)
// }
// },
// beforeDestroy() {
// if (typeof window !== 'undefined') {
// document.removeEventListener('keydown', this.handleKeyPress)
// }
// },
methods: {
clientAdded() {
this.clientset = !this.clientset
},
addNode() {
this.$store.dispatch('addNode')
},
editTrue(e) {
this.$store.dispatch('shortcutState', e)
},
},
components: {
ListLayer,
OnBoard,
},
}
</script>
<style lang="css" scoped>
.mobile {
margin-left: 1em;
font-size: 1em;
}
.new {
margin-bottom: 1em;
}
</style>
......@@ -2,7 +2,7 @@
<div>
<div v-if="clientset">
<div id="listwrapper">
<h1 class="mobile">Your nodes - list mode</h1>
<h1 class="mobile">Your nodes - collect</h1>
<ListLayer
@editTrue="(e) => editTrue(e)"
v-for="value in myNodes"
......@@ -19,36 +19,15 @@
</div>
</div>
<div v-else>
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
<!-- </div> -->
<NodesLayer
@editTrue="(e) => editTrue(e)"
v-for="value in myNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
</template>
<script>
import Router from '@/router'
import ListLayer from '@/components/ListLayer'
import OnBoard from '@/components/OnBoard'
import NodesLayer from '@/components/NodesLayer'
import OtherNodeslayer from '@/components/OtherNodeslayer'
import { mapState } from 'vuex'
......@@ -60,7 +39,6 @@ export default {
mixins: [shortcutsMixin],
data: function () {
return {
currentroute: Router.currentRoute,
clientset: false,
}
},
......@@ -74,9 +52,9 @@ export default {
computed: {
...mapState({
myNodes: (state) => state.myNodes,
otherNodes: (state) => state.otherNodes,
shortcutstate: (state) => state.shortcutstate,
toolmode: (state) => state.ui.mode,
//otherNodes: (state) => state.otherNodes,
// shortcutstate: (state) => state.shortcutstate,
// toolmode: (state) => state.ui.mode,
}),
},
......@@ -86,6 +64,10 @@ export default {
}
},
mounted() {
console.log(this.clientset)
},
beforeDestroy() {
if (typeof window !== 'undefined') {
document.removeEventListener('keydown', this.handleKeyPress)
......@@ -108,8 +90,6 @@ export default {
components: {
ListLayer,
OnBoard,
OtherNodeslayer,
NodesLayer,
},
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment