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

0.1.19

updated to mobile (previously list view)
fixed IPFS support for media
updated packages
Slightly out of sync with Master now which I will need to address 
parent 67a292ee
No related branches found
No related tags found
No related merge requests found
# 0.1.19
_13th July 2020_
### Changes
- List view has be renamed mobile view and works better on smaller devices. Allow for quick capture of ideas whislt using a smaller screen (not perfect but better than before)
### Fixed
- IPFS Media is working (updated code for 0.49.0)
# 0.1.18
_2nd July 2020_
......
{
"name": "nodenogg.in",
"version": "0.1.18",
"version": "0.1.19",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......
......@@ -9,12 +9,12 @@
ref="fileInput"
@change="onFileSelected"
/>
<!-- <h1>{{ status }}</h1>
<h1>{{ status }}</h1>
<h2>ID: {{ id }}</h2>
<h2>Agent version: {{ agentVersion }}</h2> -->
<!--
<h2>Agent version: {{ agentVersion }}</h2>
<button type="button" @click="saveIPFS">Upload</button>
<button type="button" @click="getIPFS">Get IPFS</button> -->
<button type="button" @click="getIPFS">Get IPFS</button>
<!-- {{ uploadready }} -->
<textarea id="ipfshash" v-model="copytext"></textarea>
<div class="btn-row">
......@@ -103,13 +103,8 @@ export default {
async saveIPFS() {
try {
for await (const result of node.add(this.selectedFile)) {
//console.log(result.cid.string)
this.fileContents = result
// console.log(this.fileContents.path)
// node.swarm.peers().then((a) => console.log(a))
this.getIPFS()
}
this.fileContents = await node.add(this.selectedFile)
this.getIPFS()
} catch (err) {
// Set error status text.
this.status = `Error: ${err}`
......@@ -153,7 +148,7 @@ export default {
</script>
<style lang="css" scoped>
.fileInput {
/* .fileInput {
display: none;
}
......@@ -163,5 +158,5 @@ textarea {
height: 0px;
width: 0px;
padding: 0px;
}
} */
</style>
......@@ -113,33 +113,39 @@ export default {
<style scoped>
nav {
position: fixed;
bottom: 1em;
left: 1em;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
button {
border: none;
width: 50px;
height: 50px;
padding: 0;
margin: 0;
margin-top: 1em;
background: white;
border-radius: 25px;
display: flex;
align-items: center;
justify-content: center;
color: white;
outline: none;
box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.1);
margin-right: 10px;
display: none;
}
button.active {
background: rgb(30, 30, 30);
@media (min-width: 450px) {
nav {
position: fixed;
bottom: 1em;
left: 1em;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
}
button {
border: none;
width: 50px;
height: 50px;
padding: 0;
margin: 0;
margin-top: 1em;
background: white;
border-radius: 25px;
display: flex;
align-items: center;
justify-content: center;
color: white;
outline: none;
box-shadow: 0px 0px 0px 2px rgba(0, 0, 0, 0.1);
margin-right: 10px;
}
button.active {
background: rgb(30, 30, 30);
}
}
</style>
......@@ -133,7 +133,7 @@ export default {
if (!this.interaction.origin) {
return
}
// console.log('touch')
//console.log(e.touches.length)
e.preventDefault()
const isPinchAction =
e.touches.length == 2 && this.interaction.origin.points.length > 1
......
......@@ -13,6 +13,11 @@ export const routes = [
name: 'Home',
component: Home,
},
{
path: '/mobile',
name: 'Mobile',
component: List,
},
{
path: '/about',
name: 'About',
......@@ -22,11 +27,6 @@ export const routes = [
component: () =>
import(/* webpackChunkName: "about" */ '../views/About.vue'),
},
{
path: '/list',
name: 'List Test',
component: List,
},
// {
// path: '/test',
......
......@@ -2,7 +2,6 @@
<div id="listwrapper">
<!-- <div v-for="(posvalue, index) in configPositions" v-bind:key="index"> -->
<h1 class="mobile">Your nodes - list mode</h1>
<h2>Testing Only</h2>
<!-- <OffLine
v-for="value in myNodes"
v-bind:key="value.node_id"
......@@ -10,79 +9,92 @@
v-bind:nodetext="value.node_text"
@editTrue="(e) => editTrue(e)"
/> -->
<div v-if="clientset">
<div class="btn-row">
<BaseButton class="new" buttonClass="action" @click="addNode()"
>Create Node</BaseButton
>
</div>
<form>
<div>
<p id="nodeid" :inner-html.prop="nodetext1 | marked"></p>
<input
type="text"
v-model.trim="clientid"
placeholder="device name"
autocorrect="off"
autocapitalize="none"
ref="objectname"
v-on:keyup.enter="setClient()"
@focus="editTrue(true)"
@blur="editTrue(false)"
/>
<div class="btn-row">
<BaseButton buttonClass="special" @click="setClient()"
>Store</BaseButton
>
<form>
<!-- <div v-if="posvalue.read_mode == false"> -->
<div
v-for="value in myNodes.slice().reverse()"
v-bind:key="value.node_id"
>
<textarea
@focus="editTrue(true)"
@blur="editTrue(false)"
autofocus
@input="editNode"
v-model="value.node_text"
:id="nodeid"
ref="nodetext"
placeholder="Idea goes here!"
></textarea>
</div>
</div>
</form>
<form>
<div>
<p id="nodeid" :inner-html.prop="nodetext2 | marked"></p>
<input
type="text"
v-model.trim="localmicrocosm"
placeholder="microcosm name"
autocorrect="off"
autocapitalize="none"
autofocus
v-on:keyup.enter="createMicrocosm()"
@focus="editTrue(true)"
@blur="editTrue(false)"
/>
<div class="btn-row">
<BaseButton buttonClass="special" @click="createMicrocosm(), letsGo()"
>Create Microcosm</BaseButton
>
</form>
</div>
<!-- // onboarding for list view -->
<div v-else>
<form>
<div>
<p id="nodeid" :inner-html.prop="nodetext1 | marked"></p>
<div v-if="name == false">
<input
type="text"
v-model.trim="clientid"
placeholder="device name"
autocorrect="off"
autocapitalize="none"
ref="objectname"
v-on:keyup.enter="setClient()"
@focus="editTrue(true)"
@blur="editTrue(false)"
/>
<div class="btn-row">
<BaseButton buttonClass="special" @click="setClient()"
>Store</BaseButton
>
</div>
</div>
<div v-else>
<h4>Saved</h4>
</div>
</div>
</div>
</form>
<div class="btn-row">
<BaseButton class="new" buttonClass="action" @click="addNode()"
>Create Node</BaseButton
>
</form>
<form>
<div>
<p id="nodeid" :inner-html.prop="nodetext2 | marked"></p>
<div v-if="microcosm == false">
<input
type="text"
v-model.trim="localmicrocosm"
placeholder="microcosm name"
autocorrect="off"
autocapitalize="none"
autofocus
v-on:keyup.enter="createMicrocosm()"
@focus="editTrue(true)"
@blur="editTrue(false)"
/>
<div class="btn-row">
<BaseButton
buttonClass="special"
@click="createMicrocosm(), letsGo()"
>Create Microcosm</BaseButton
>
</div>
</div>
<div v-else>
<h4>Loading...</h4>
</div>
</div>
</form>
</div>
<form>
<!-- <div v-if="posvalue.read_mode == false"> -->
<div
v-for="value in myNodes.slice().reverse()"
v-bind:key="value.node_id"
>
<textarea
@focus="editTrue(true)"
@blur="editTrue(false)"
autofocus
@input="editNode"
v-model="value.node_text"
:id="nodeid"
ref="nodetext"
placeholder="Idea goes here!"
></textarea>
</div>
<!-- </div> -->
<!-- <div v-if="posvalue.read_mode == true">
<p class="read" :id="nodeid" :inner-html.prop="nodetext | marked"></p>
</div> -->
</form>
<ModeToolbar />
</div>
<!-- </div> -->
......@@ -108,9 +120,10 @@ export default {
offline: false,
nodetext1:
'## What shall we call you ? 💥 \n First we need to connect this device to your ideas. This name is what allows you to create and edit your nodes and can be anything you like and this name is always anonymous.',
nodetext2:
'## Start those engines ! 🏎 \n Now you can create your own microcosm to store your ideas and ask people to join you, either just tell them the name of the microcosm or share the alpha.nodenogg.in URL and add the ending; </br><em><b>/microcosm/nameofyourmicrocosm</b></em>',
name: false,
microcosm: false,
}
},
......@@ -145,6 +158,7 @@ export default {
this.createMicrocosm()
this.setClient()
this.letsGo()
this.clientset = 'true'
}
},
......@@ -165,13 +179,16 @@ export default {
createMicrocosm() {
this.$store.dispatch('createMicrocosm', this.localmicrocosm)
localStorage.setItem('mylastMicrocosm', this.localmicrocosm)
this.microcosm = true
},
setClient() {
this.$store.dispatch('setClient', this.clientid),
localStorage.setItem('myNNClient', this.clientid)
this.name = true
},
letsGo() {
this.clientset = !this.clientset
this.$emit('clientAdded')
},
......
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