Commit a44ba5d2 authored by Adam Procter's avatar Adam Procter
Browse files

tidy up otherNodes view

starting markdown support
parent 76ad0e82
# 0.2.3
_3rd September 2021_
## Fixed
- nodes are now correctly colored in the Cards view
# 0.2.2
_2nd September 2021_
......
......@@ -8,13 +8,13 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"core-js": "^3.16.4",
"core-js": "^3.17.2",
"freeze-dry": "^0.2.5",
"marked": "^3.0.2",
"pouchdb": "^7.2.2",
"vue": "^3.2.6",
"vue": "^3.2.8",
"vue-router": "^4.0.0",
"vue3-swatches": "^1.0.2",
"vue3-swatches": "^1.0.3",
"vuex": "^4.0.0"
},
"devDependencies": {
......@@ -23,7 +23,7 @@
"@vue/cli-plugin-router": "^4.5.12",
"@vue/cli-plugin-vuex": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"@vue/compiler-sfc": "^3.2.6",
"@vue/compiler-sfc": "^3.2.8",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
......
......@@ -45,7 +45,9 @@
<button @click.prevent="discardNode(nodes.node_id)">Discard</button>
</template>
<template v-else>
<p class="readmode" :id="nodes.node_id">{{ nodes.node_text }}</p>
<p class="readmode" :id="nodes.node_id">
{{ nodes.node_text }}
</p>
<button @click.prevent="toggleMode(nodes.node_id)">Edit</button>
</template>
</form>
......@@ -56,7 +58,7 @@
// @ is an alias to /src
import { mapState } from 'vuex'
import VSwatches from 'vue3-swatches'
// import marked from 'marked'
import marked from 'marked'
export default {
name: 'MyNodes',
......@@ -85,6 +87,9 @@ export default {
...mapState({
myNodes: (state) => state.myNodes,
}),
markdowntoHTML() {
return marked(this.markdown)
},
},
watch: {
......
......@@ -3,9 +3,12 @@
class="nodes"
v-for="(nodes, index) in otherNodes.otherNodes"
:key="index"
:style="{
backgroundColor: nodes.node_color,
}"
>
<p class="readmode" :id="nodes.id">
{{ nodes.text }}
<p class="readmode" :id="nodes.node_id">
{{ nodes.node_text }}
</p>
</div>
</template>
......@@ -14,8 +17,6 @@
// @ is an alias to /src
import { mapState } from 'vuex'
// import marked from 'marked'
export default {
name: 'OtherNodes',
......@@ -42,7 +43,6 @@ export default {
<style scoped>
.nodes {
width: 95%;
background-color: rgb(155, 194, 216);
margin-top: 1em;
margin-left: 0.5em;
......
......@@ -15,7 +15,6 @@ export const mutations = {
})
.then(function (doc) {
state.allNodes = doc.rows
})
.catch(function (err) {
console.log(err)
......@@ -31,10 +30,10 @@ export const mutations = {
if (state.allNodes[i].id != deviceName) {
for (j = 0; j < Object.keys(state.allNodes[i].doc.nodes).length; j++) {
const newNode = {
id: state.allNodes[i].doc.nodes[j].node_id,
text: state.allNodes[i].doc.nodes[j].node_text,
deleted: state.allNodes[i].doc.nodes[j].node_deleted,
color: state.allNodes[i].doc.nodes[j].node_color,
node_id: state.allNodes[i].doc.nodes[j].node_id,
node_text: state.allNodes[i].doc.nodes[j].node_text,
node_deleted: state.allNodes[i].doc.nodes[j].node_deleted,
node_color: state.allNodes[i].doc.nodes[j].node_color,
}
state.otherNodes.push(newNode)
}
......
......@@ -1282,35 +1282,38 @@
semver "^6.1.0"
strip-ansi "^6.0.0"
"@vue/compiler-core@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.6.tgz#7162bb0670273f04566af0d353009187ab577915"
"@vue/compiler-core@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.8.tgz#13b2386bdb03455c9f6c6af2f3468561a5ae5b1d"
integrity sha512-Sx8qJ030+QM/NakUrkQuUGCeDEb+0d0AgFOl5W4qRvR6e+YgLnW2ew0jREf4T1hak9Fdk8Edl67StECHrhEuew==
dependencies:
"@babel/parser" "^7.15.0"
"@babel/types" "^7.15.0"
"@vue/shared" "3.2.6"
"@vue/shared" "3.2.8"
estree-walker "^2.0.2"
source-map "^0.6.1"
"@vue/compiler-dom@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.6.tgz#3764d7fe1a696e39fb2a3c9d638da0749e369b2d"
"@vue/compiler-dom@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.8.tgz#69bc9e08928a12295c31299067f18d87301981a9"
integrity sha512-nxBW6k8FMWQ74294CRbqR+iEJRO5vIjx85I3YCOyZFD6FsDHyFL60g76TcJzucp+F2XXIDaYz+A+F4gQlDatjw==
dependencies:
"@vue/compiler-core" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/compiler-core" "3.2.8"
"@vue/shared" "3.2.8"
"@vue/compiler-sfc@^3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.6.tgz#d6ab7410cff57081ab627b15a1ea51a1072c7cf1"
"@vue/compiler-sfc@^3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.8.tgz#23699f69d38b1c32ec54f8b470f3e6375ffc6b6e"
integrity sha512-XClueQAXoWtN2EToKgfYH9FCL70Ac4bxx6OZFZzxYSg1bei8IB9srJP1UOfnJb2IpnM1heikAz1dp1HI1wHcyQ==
dependencies:
"@babel/parser" "^7.15.0"
"@babel/types" "^7.15.0"
"@types/estree" "^0.0.48"
"@vue/compiler-core" "3.2.6"
"@vue/compiler-dom" "3.2.6"
"@vue/compiler-ssr" "3.2.6"
"@vue/ref-transform" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/compiler-core" "3.2.8"
"@vue/compiler-dom" "3.2.8"
"@vue/compiler-ssr" "3.2.8"
"@vue/ref-transform" "3.2.8"
"@vue/shared" "3.2.8"
consolidate "^0.16.0"
estree-walker "^2.0.2"
hash-sum "^2.0.0"
......@@ -1322,12 +1325,13 @@
postcss-selector-parser "^6.0.4"
source-map "^0.6.1"
"@vue/compiler-ssr@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.6.tgz#cadcf199859fa00739f4275b4c85970e4b0abe7d"
"@vue/compiler-ssr@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.8.tgz#99733532f44d77144ce1e3b853f2fa08ba394e7a"
integrity sha512-QqyiFRiIl55W0abDNQ6cNG/7iIfBHmbXVtssUAjX3IlI87ELeT0xackmrCyTSnfIX12ixljg9AN0COIZwlvt5A==
dependencies:
"@vue/compiler-dom" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/compiler-dom" "3.2.8"
"@vue/shared" "3.2.8"
"@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.1.2":
version "3.2.0"
......@@ -1358,40 +1362,45 @@
version "1.1.2"
resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz#ceb924b4ecb3b9c43871c7a429a02f8423e621ab"
"@vue/reactivity@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.6.tgz#b8993fa6f48545178e588e25a9c9431a1c1b7d50"
"@vue/reactivity@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.8.tgz#b27200ccfaa06f312ac467b12a38161377c557ed"
integrity sha512-/Hj3Uz28SG+xB5SDWPOXUs0emvHkq82EmTgk44/plTVFeswCZ3i3Hd7WmsrPT4rGajlDKd5uqMmW0ith1ED0FA==
dependencies:
"@vue/shared" "3.2.6"
"@vue/shared" "3.2.8"
"@vue/ref-transform@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.6.tgz#30b5f1fa77daf9894bc23e6a5a0e3586a4a796b8"
"@vue/ref-transform@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/ref-transform/-/ref-transform-3.2.8.tgz#a527047bab43ce50ef3d400ce71312ab30f825dc"
integrity sha512-9LdADd4JM3klt+b2qNT8a7b7JvBETNBy2Btv5rDzyPrAVS4Vrw+1WWay6gZBgnxfJ9TPSvG8f/9zu6gNGHmJLA==
dependencies:
"@babel/parser" "^7.15.0"
"@vue/compiler-core" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/compiler-core" "3.2.8"
"@vue/shared" "3.2.8"
estree-walker "^2.0.2"
magic-string "^0.25.7"
"@vue/runtime-core@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.6.tgz#376baeef7fe02a62377d46d0d0a8ab9510db1d8e"
"@vue/runtime-core@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.8.tgz#8a2342c0baa0fee192f819a3bdc19547d7430b88"
integrity sha512-hwzXLGw1njBEY5JSyRXIIdCtzMFFF6F38WcKMmoIE3p7da30jEbWt8EwwrBomjT8ZbqzElOGlewBcnXNOiiIUg==
dependencies:
"@vue/reactivity" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/reactivity" "3.2.8"
"@vue/shared" "3.2.8"
"@vue/runtime-dom@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.6.tgz#0f74dbca84d56c222fbfbd53415b260386859a3b"
"@vue/runtime-dom@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.8.tgz#c6631b507049d39844b0434e81df1aa79efcc6cb"
integrity sha512-A/aRrlGLJ5y4Z7eNbnO/xHwx2RiPijQo7D3OIwESroG3HNP+dpuoqamajo5TXS9ZGjbMOih82COoe7xb9P4BZw==
dependencies:
"@vue/runtime-core" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/runtime-core" "3.2.8"
"@vue/shared" "3.2.8"
csstype "^2.6.8"
"@vue/shared@3.2.6":
version "3.2.6"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.6.tgz#2c22bae88fe2b7b59fa68a9c9c4cd60bae2c1794"
"@vue/shared@3.2.8":
version "3.2.8"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.8.tgz#2f918e330aeb3f56ab1031ca60a5b30672512457"
integrity sha512-E2DQQnG7Qr4GwTs3GlfPPlHliGVADoufTnhpwfoViw7JlyLMmYtjfnTwM6nXAwvSJWiF7D+7AxpnWBBT3VWo6Q==
"@vue/web-component-wrapper@^1.2.0":
version "1.3.0"
......@@ -2566,9 +2575,10 @@ core-js-compat@^3.6.5, core-js-compat@^3.9.0, core-js-compat@^3.9.1:
browserslist "^4.16.6"
semver "7.0.0"
core-js@^3.16.4:
version "3.16.4"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.16.4.tgz#0fb1029a554fc2688c0963d7c900e188188a78e0"
core-js@^3.17.2:
version "3.17.2"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.17.2.tgz#f960eae710dc62c29cca93d5332e3660e289db10"
integrity sha512-XkbXqhcXeMHPRk2ItS+zQYliAMilea2euoMsnpRRdDad6b2VY6CQQcwz1K8AnWesfw4p165RzY0bTnr3UrbYiA==
core-js@^3.6.5:
version "3.12.1"
......@@ -7668,18 +7678,19 @@ vue-template-es2015-compiler@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz#1ee3bc9a16ecbf5118be334bb15f9c46f82f5825"
vue3-swatches@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/vue3-swatches/-/vue3-swatches-1.0.2.tgz#118b06c6c47d51ce1d2b18c588f13b90fea897fd"
integrity sha512-XxopqMhNSfxorsIqTwW+2A544DvBOC3w6f6vDdPQNbuaJ3Sm9iqchzGAI9o37M6eRxByOplBWQ/i6ZPBGTIabw==
vue3-swatches@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/vue3-swatches/-/vue3-swatches-1.0.3.tgz#73d690b958007de685b05364271ac811dbed87a3"
integrity sha512-FqLHsIT46slSA2kjt5MpAcY+UJVk74WRhWda+5pii9+PQJmO3syTZK6sP+eQJCiIjb/1IAJv+aIdVfLaKa4RIQ==
vue@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.6.tgz#c71445078751f458648fd8fb3a2da975507d03d2"
vue@^3.2.8:
version "3.2.8"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.8.tgz#9124e4c31ebc9c592b2b9f293df5c9a88a78e944"
integrity sha512-x7lwdnOSkceHQUXRVVHBaZzcp6v7M2CYtSZH75zZaT1mTjB4plC4KZHKP/5jAvdqOLBHZGwDSMkWXm3YbAufrA==
dependencies:
"@vue/compiler-dom" "3.2.6"
"@vue/runtime-dom" "3.2.6"
"@vue/shared" "3.2.6"
"@vue/compiler-dom" "3.2.8"
"@vue/runtime-dom" "3.2.8"
"@vue/shared" "3.2.8"
vuex@^4.0.0:
version "4.0.2"
......
Supports Markdown
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