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

more tests for iOS

parent 4e479a9f
No related branches found
No related tags found
No related merge requests found
VUE_APP_COUCH_HTTP=http VUE_APP_COUCH_HTTP=http
VUE_APP_COUCH_USER=auto-admin VUE_APP_COUCH_USER=auto-admin
VUE_APP_COUCH_PASS=testing@ VUE_APP_COUCH_PASS=testing@
VUE_APP_COUCH_URL=127.0.0.1:5984/ VUE_APP_COUCH_URL=192.168.1.179:5984/
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
} }
</script> </script>
<style> <style>
@import url('https://rsms.me/inter/inter.css'); /* @import url('https://rsms.me/inter/inter.css'); */
body { body {
padding: 0; padding: 0;
margin: 0; margin: 0;
......
<template> <template>
<div> <div>
<div v-for="(nodes, index) in $options.myArray" v-bind:key="index"> <div v-for="(nodes, index) in nodes_filtered" v-bind:key="index">
<form <form
class="nodes" class="nodes"
:style="{ :style="{
backgroundColor: nodes.color, backgroundColor: nodes.color,
}" }"
> >
<template v-if="nodes.read_mode == false"> <!-- <template v-if="nodes.read_mode == false"> -->
<textarea <textarea
@focus="editTrue(true)" @focus="editTrue(true)"
@blur="editTrue(false)" @blur="editTrue(false)"
autofocus autofocus
v-model="nodes.node_text" v-model="nodes.node_text"
@input="editNode" @input="editNode"
:id="nodes.node_id" :id="nodes.node_id"
v-focus placeholder="Type your thoughts and ideas here! (auto saved every keystroke)"
ref="textentry" ></textarea>
placeholder="Type your thoughts and ideas here! (auto saved every keystroke)" <p class="info">*markdown supported &amp; autosaves</p>
></textarea> <!-- </template> -->
<p class="info">*markdown supported &amp; autosaves</p> <!-- <template v-else> -->
</template> <!-- <p :id="nodes.node_id" :inner-html.prop="nodes.node_text | marked"></p> -->
<template v-else> <!-- </template> -->
<p
:id="nodes.node_id"
:inner-html.prop="nodes.node_text | marked"
></p>
</template>
<div class="btn-row">
<SvgButton
buttonClass="nodes"
@click.prevent="deleteFlag(nodes.node_id), updateNodes()"
/>
<SvgButton2
buttonClass="nodes"
@click.prevent="
readFlag(nodes.node_id, nodes.read_mode), updateNodes()
"
/>
<v-swatches
v-model="color"
@input="chooseColor(color, nodes.node_id)"
:swatches="swatches"
:shapes="shapes"
show-border
show-fallback
fallback-input-type="color"
>
<SvgButton3 buttonClass="nodes" @click.prevent slot="trigger" />
</v-swatches>
</div>
<div class="allemoji">
<div
class="eachemoji"
v-for="(emojis, index) in configEmoji"
:key="index"
>
<template v-if="emojis.node_id == nodes.node_id">{{
emojis.emoji_text
}}</template>
</div>
</div>
</form> </form>
</div> </div>
</div> </div>
...@@ -71,11 +30,11 @@ ...@@ -71,11 +30,11 @@
<script> <script>
import { mapState } from 'vuex' import { mapState } from 'vuex'
import marked from 'marked' import marked from 'marked'
import SvgButton from '@/components/SvgButton' // import SvgButton from '@/components/SvgButton'
import SvgButton2 from '@/components/SvgButton2' // import SvgButton2 from '@/components/SvgButton2'
import SvgButton3 from '@/components/SvgButton3' // import SvgButton3 from '@/components/SvgButton3'
import VSwatches from 'vue-swatches' // import VSwatches from 'vue-swatches'
import 'vue-swatches/dist/vue-swatches.css' //import 'vue-swatches/dist/vue-swatches.css'
var readmode var readmode
export default { export default {
...@@ -99,6 +58,7 @@ export default { ...@@ -99,6 +58,7 @@ export default {
localreadmode: false, localreadmode: false,
myArray: null, myArray: null,
update: false, update: false,
dummyArray: null,
} }
}, },
...@@ -109,7 +69,7 @@ export default { ...@@ -109,7 +69,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
myNodes: (state) => state.myNodes, myNodes: (state) => state.myNodes,
configPositions: (state) => state.configPositions, // configPositions: (state) => state.configPositions,
configEmoji: (state) => state.configEmoji, configEmoji: (state) => state.configEmoji,
// toolmode: (state) => state.ui.mode, // toolmode: (state) => state.ui.mode,
}), }),
...@@ -122,18 +82,19 @@ export default { ...@@ -122,18 +82,19 @@ export default {
}, },
mounted() { mounted() {
setTimeout(this.loadData, 500) //setTimeout(this.loadData, 500)
//alert(this.nodes_filtered)
const unwatch = this.$watch('nodes_filtered', (value) => { const unwatch = this.$watch('nodes_filtered', (value) => {
this.$options.myArray = this.nodes_filtered // this.$forceUpdate()
this.$forceUpdate()
// this.focusInput() // this.focusInput()
// ignore falsy values // ignore falsy values
if (!value) return if (!value) return
// stop watching when nodes_filtered[] is not empty // stop watching when nodes_filtered[] is not empty
if (value && value.length) unwatch() if (value && value.length) unwatch()
Object.freeze(this.nodes_filtered)
//setTimeout(this.loadData, 500)
// this.myArray = this.nodes_filtered
// process value here // process value here
}) })
}, },
...@@ -158,14 +119,15 @@ export default { ...@@ -158,14 +119,15 @@ export default {
methods: { methods: {
chooseColor(color, nodeid) { chooseColor(color, nodeid) {
this.$store.dispatch('colorNode', { nodeid, color }) this.$store.dispatch('colorNode', { nodeid, color })
this.$options.myArray = this.nodes_filtered // this.$options.myArray = this.nodes_filtered
}, },
updateNodes() { updateNodes() {
this.update = !this.update this.update = !this.update
}, },
loadData() { loadData() {
this.$options.myArray = this.nodes_filtered alert('log')
this.$forceUpdate() //this.myArray = this.nodes_filtered
// this.$forceUpdate()
}, },
editNode(e) { editNode(e) {
var nodeid = e.target.id var nodeid = e.target.id
...@@ -197,10 +159,10 @@ export default { ...@@ -197,10 +159,10 @@ export default {
}, },
}, },
components: { components: {
SvgButton, // SvgButton,
SvgButton2, // SvgButton2,
SvgButton3, // SvgButton3,
VSwatches, // VSwatches,
}, },
} }
</script> </script>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<script> <script>
// This is for detecting offline issues // This is for detecting offline issues
var serverUrl = 'http://127.0.0.1:5984' var serverUrl = 'http://192.168.1.179:5984'
import { mapState } from 'vuex' import { mapState } from 'vuex'
export default { export default {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment