10 Commits
0.8.0 ... 0.8.1

Author SHA1 Message Date
Daniel J. Summers
63d25ec57e 0.8.1 2017-09-25 22:48:54 -05:00
Daniel J. Summers
f085c47c6e Moved trim to blur event (#6) 2017-09-25 22:41:01 -05:00
Daniel J. Summers
3a0ac7ce97 Added "date from now" component (#4)
Also moved page title component to new "common" component directory
2017-09-25 22:34:25 -05:00
Daniel J. Summers
51ec649e7f Renamed Dashboard to Journal (#2) 2017-09-25 21:28:08 -05:00
Daniel J. Summers
647e79c59c Added "Docs" link to menu 2017-09-24 21:59:31 -05:00
Daniel J. Summers
19e16c819e Added alpha-level docs 2017-09-24 21:34:47 -05:00
Daniel J. Summers
79aa097f26 Merge branch 'master' of https://github.com/danieljsummers/myPrayerJournal 2017-09-24 19:42:07 -05:00
Daniel J. Summers
e11087e3e3 Added test document 2017-09-24 19:41:31 -05:00
Daniel J. Summers
ff5cebf251 Set theme jekyll-theme-architect 2017-09-24 19:39:27 -05:00
Daniel J. Summers
c44e40a4fd Added docs folder 2017-09-24 19:37:54 -05:00
16 changed files with 142 additions and 30 deletions

1
docs/_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-architect

34
docs/index.md Normal file
View File

@@ -0,0 +1,34 @@
# Caveats
_myPrayerJournal is currently alpha software. There likely will be errors, the way things work may change, and parts of the application are unfinished or need polish. I **will** do my best to not lose any data, though; it is backed up the way other DJS Consulting sites have their data backed up. Throughout this document, current gotchas will be called out with italic text, like this notice._
# Finding the Site
The application is at <https://prayerjournal.me>.
# Signing Up
myPrayerJournal uses login services using Google or Microsoft accounts. The only information the application stores in its database is your user Id token it receives from these services, so there are no permissions you should have to accept from these provider other than establishing that you can log on with that account. Because of this, you'll want to pick the same one each time; the tokens between the two accounts are different, even if you use the same e-mail address to log on to both.
# Adding a Request
To add a request, click the "Add a New Request" button in your "Journal". Then, enter the text of the request as you see fit; there is no right or wrong way, and you are the only person who will see the text you enter. When you save the request, it will go to the bottom of the list of requests.
# Praying for Requests
The first button for each request has a checkmark icon; clicking this button will mark the request as "Prayed" and move it to the bottom of the list. This allows you, if you're praying through your requests, to start at the top (with the request that it's been the longest since you've prayed) and click the button as you pray; when the request goes to the bottom of the list, the next will move up to the top.
# Editing Requests
The second button for each request has a pencil icon. This allows you to edit the text of the request, pretty much the same way you entered it; it starts with the current text, and you can add to it, modify it, or completely replace it. By default, updates will go in with an "Updated" status; you have the option to also mark this update as "Prayed" or "Answered." Answered requests will drop off the journal list. _(There is currently no way to see answered requests once they have been answered; this functionality is planned soon.)_
# Viewing a Request and Its History
myPrayerJournal tracks all of the actions related to a request; the third button, with the document icon, will show you the entire history, including the text as it changed, and all the times "Prayed" was recorded.
# Known Issues
See [the GitHub issues list](https://github.com/danieljsummers/myPrayerJournal/issues) for the most up-to-date list.
- _There is no way to view "Answered" requests; the absence of this functionality is a big reason this is still considered alpha. Going back through requests to see how God has answered them is an encouraging benefit of taking the time to journal._
- _If you try to do something an get an error notification instead of a green checkmark, try logging off and logging back on again. The site currently doesn't check to see if your session has expired, but the server with which it's communicating does._

View File

@@ -1,7 +1,7 @@
{ {
"name": "my-prayer-journal-api", "name": "my-prayer-journal-api",
"private": true, "private": true,
"version": "0.8.0", "version": "0.8.1",
"description": "Server API for myPrayerJournal", "description": "Server API for myPrayerJournal",
"main": "index.js", "main": "index.js",
"author": "Daniel J. Summers <daniel@djs-consulting.com>", "author": "Daniel J. Summers <daniel@djs-consulting.com>",

View File

@@ -1,6 +1,6 @@
{ {
"name": "my-prayer-journal", "name": "my-prayer-journal",
"version": "0.8.0", "version": "0.8.1",
"description": "myPrayerJournal - Front End", "description": "myPrayerJournal - Front End",
"author": "Daniel J. Summers <daniel@djs-consulting.com>", "author": "Daniel J. Summers <daniel@djs-consulting.com>",
"private": true, "private": true,

View File

@@ -5,7 +5,7 @@
router-view router-view
vue-progress-bar vue-progress-bar
footer footer
p.text-right: i myPrayerJournal v0.8.0 p.text-right: i myPrayerJournal v0.8.1
</template> </template>
<script> <script>

View File

@@ -67,7 +67,7 @@ export default class AuthService {
this.userInfo(authResult.accessToken) this.userInfo(authResult.accessToken)
.then(user => { .then(user => {
store.commit(mutations.USER_LOGGED_ON, user) store.commit(mutations.USER_LOGGED_ON, user)
router.replace('/dashboard') router.replace('/journal')
}) })
} }
}) })

View File

@@ -1,6 +1,6 @@
<template lang="pug"> <template lang="pug">
article article
page-title(title="Welcome!" hideOnPage="true") page-title(title='Welcome!' hideOnPage='true')
p &nbsp; p &nbsp;
p. p.
myPrayerJournal is a place where individuals can record their prayer requests, record that they prayed for them, myPrayerJournal is a place where individuals can record their prayer requests, record that they prayed for them,
@@ -15,7 +15,7 @@ article
<script> <script>
'use strict' 'use strict'
import PageTitle from './PageTitle.vue' import PageTitle from './common/PageTitle.vue'
export default { export default {
name: 'home', name: 'home',

View File

@@ -1,14 +1,15 @@
<template lang="pug"> <template lang="pug">
article article
page-title(:title="title") page-title(:title='title')
p(v-if="isLoadingJournal") Loading your prayer journal... p(v-if='isLoadingJournal') Loading your prayer journal...
template(v-if="!isLoadingJournal") template(v-if='!isLoadingJournal')
new-request new-request
el-row el-row
el-col(:span='4'): strong Actions el-col(:span='4'): strong Actions
el-col(:span='16'): strong Request el-col(:span='16'): strong Request
el-col(:span='4'): strong As Of el-col(:span='4'): strong As Of
request-list-item(v-for="request in journal" :request="request" :key="request.requestId") request-list-item(v-if='journal.length > 0' v-for='request in journal' :request='request' :key='request.requestId')
p.text-center(v-if='journal.length === 0'): em No requests found; click the "Add a New Request" button to add one
</template> </template>
<script> <script>
@@ -16,14 +17,14 @@ article
import { mapState } from 'vuex' import { mapState } from 'vuex'
import PageTitle from './PageTitle' import PageTitle from './common/PageTitle'
import NewRequest from './request/NewRequest' import NewRequest from './request/NewRequest'
import RequestListItem from './request/RequestListItem' import RequestListItem from './request/RequestListItem'
import actions from '@/store/action-types' import actions from '@/store/action-types'
export default { export default {
name: 'dashboard', name: 'journal',
components: { components: {
PageTitle, PageTitle,
NewRequest, NewRequest,
@@ -31,7 +32,7 @@ export default {
}, },
computed: { computed: {
title () { title () {
return `${this.user.given_name}'s Dashboard` return `${this.user.given_name}'s Prayer Journal`
}, },
...mapState(['user', 'journal', 'isLoadingJournal']) ...mapState(['user', 'journal', 'isLoadingJournal'])
}, },

View File

@@ -1,12 +1,13 @@
<template lang="pug"> <template lang="pug">
el-menu(theme="dark" mode="horizontal" class="mpj-top-nav" router=true) el-menu(theme='dark' mode='horizontal' class='mpj-top-nav' router='true')
el-menu-item(index="/") el-menu-item(index='/')
span(style="font-weight:100;") my span(style='font-weight:100;') my
span(style="font-weight:600;") Prayer span(style='font-weight:600;') Prayer
span(style="font-weight:700;") Journal span(style='font-weight:700;') Journal
el-menu-item(v-if="isAuthenticated" index="/dashboard") Dashboard el-menu-item(v-if='isAuthenticated' index='/journal') Journal
el-menu-item(v-if="isAuthenticated" index="3"): a(@click.stop="logOff()") Log Off el-menu-item(v-if='isAuthenticated' index='3'): a(@click.stop='logOff()') Log Off
el-menu-item(v-if="!isAuthenticated" index="4"): a(@click.stop="logOn()") Log On el-menu-item(v-if='!isAuthenticated' index='4'): a(@click.stop='logOn()') Log On
el-menu-item(index='5'): a(href='https://danieljsummers.github.io/myPrayerJournal/' target='_blank' @click.stop='') Docs
</template> </template>
<script> <script>
@@ -36,10 +37,14 @@ export default {
} }
</script> </script>
<style scoped> <style>
.mpj-top-nav { .mpj-top-nav {
position: fixed; position: fixed;
top: 0px; top: 0px;
width: 100%; width: 100%;
} }
.mpj-top-nav a:link,
.mpj-top-nav a:visited {
text-decoration: none;
}
</style> </style>

View File

@@ -0,0 +1,45 @@
<script>
'use strict'
import moment from 'moment'
export default {
name: 'date-from-now',
props: {
tag: {
type: String,
default: 'span'
},
value: {
type: Number,
default: 0
},
interval: {
type: Number,
default: 10000
}
},
data () {
return {
fromNow: moment(this.value).fromNow(),
intervalId: null
}
},
mounted () {
this.intervalId = setInterval(this.updateFromNow, this.interval)
this.$watch('value', this.updateFromNow)
},
beforeDestroy () {
clearInterval(this.intervalId)
},
methods: {
updateFromNow () {
let newFromNow = moment(this.value).fromNow()
if (newFromNow !== this.fromNow) this.fromNow = newFromNow
}
},
render (createElement) {
return createElement(this.tag, this.fromNow)
}
}
</script>

View File

@@ -1,11 +1,20 @@
<template lang="pug"> <template lang="pug">
h2.mpj-page-title(v-if="!hideOnPage" v-html="title") h2.mpj-page-title(v-if='!hideOnPage' v-html='title')
</template> </template>
<script> <script>
export default { export default {
name: 'page-title', name: 'page-title',
props: [ 'title', 'hideOnPage' ], props: {
title: {
type: String,
required: true
},
hideOnPage: {
type: Boolean,
default: false
}
},
created () { created () {
document.title = `${this.title} « myPrayerJournal` document.title = `${this.title} « myPrayerJournal`
}, },

View File

@@ -4,7 +4,7 @@ span
el-dialog(title='Edit Prayer Request' :visible.sync='editVisible') el-dialog(title='Edit Prayer Request' :visible.sync='editVisible')
el-form(:model='form' :label-position='top') el-form(:model='form' :label-position='top')
el-form-item(label='Prayer Request') el-form-item(label='Prayer Request')
el-input(type='textarea' v-model.trim='form.requestText' :rows='10') el-input(type='textarea' v-model='form.requestText' :rows='10' @blur="trimText()")
el-form-item(label='Also Mark As') el-form-item(label='Also Mark As')
el-radio-group(v-model='form.status') el-radio-group(v-model='form.status')
el-radio-button(label='Updated') Updated el-radio-button(label='Updated') Updated
@@ -42,6 +42,9 @@ export default {
openDialog () { openDialog () {
this.editVisible = true this.editVisible = true
}, },
trimText () {
this.form.requestText = this.form.requestText.trim()
},
async saveRequest () { async saveRequest () {
await this.$store.dispatch(actions.UPDATE_REQUEST, { await this.$store.dispatch(actions.UPDATE_REQUEST, {
progress: this.$Progress, progress: this.$Progress,

View File

@@ -4,7 +4,7 @@ div
el-dialog(title='Add a New Prayer Request' :visible.sync='showNewVisible') el-dialog(title='Add a New Prayer Request' :visible.sync='showNewVisible')
el-form(:model='form' :label-position='top') el-form(:model='form' :label-position='top')
el-form-item(label='Prayer Request') el-form-item(label='Prayer Request')
el-input(type='textarea' v-model.trim='form.requestText' :rows='10') el-input(type='textarea' v-model='form.requestText' :rows='10' @blur='trimText()')
span.dialog-footer(slot='footer') span.dialog-footer(slot='footer')
el-button(@click='closeDialog()') Cancel el-button(@click='closeDialog()') Cancel
el-button(type='primary' @click='saveRequest()') Save el-button(type='primary' @click='saveRequest()') Save
@@ -34,6 +34,9 @@ export default {
openDialog () { openDialog () {
this.showNewVisible = true this.showNewVisible = true
}, },
trimText () {
this.form.requestText = this.form.requestText.trim()
},
async saveRequest () { async saveRequest () {
await this.$store.dispatch(actions.ADD_REQUEST, { await this.$store.dispatch(actions.ADD_REQUEST, {
progress: this.$Progress, progress: this.$Progress,

View File

@@ -5,7 +5,7 @@ el-row.journal-request
edit-request(:request='request') edit-request(:request='request')
full-request(:request='request') full-request(:request='request')
el-col(:span='16'): p {{ text }} el-col(:span='16'): p {{ text }}
el-col(:span='4'): p {{ asOf }} el-col(:span='4'): p: date-from-now(:value='request.asOf')
</template> </template>
<script> <script>
@@ -13,6 +13,7 @@ el-row.journal-request
import moment from 'moment' import moment from 'moment'
import DateFromNow from '../common/DateFromNow'
import EditRequest from './EditRequest' import EditRequest from './EditRequest'
import FullRequest from './FullRequest' import FullRequest from './FullRequest'
@@ -21,7 +22,11 @@ import actions from '@/store/action-types'
export default { export default {
name: 'request-list-item', name: 'request-list-item',
props: [ 'request' ], props: [ 'request' ],
data () {
return { interval: null }
},
components: { components: {
DateFromNow,
EditRequest, EditRequest,
FullRequest FullRequest
}, },

View File

@@ -1,14 +1,20 @@
<template lang="pug"> <template lang="pug">
article
pageTitle(title='Logging On')
p Logging you on... p Logging you on...
</template> </template>
<script> <script>
'use strict' 'use strict'
import PageTitle from '../common/PageTitle'
import AuthService from '@/auth/AuthService' import AuthService from '@/auth/AuthService'
export default { export default {
name: 'log-on', name: 'log-on',
components: {
PageTitle
},
created () { created () {
this.$Progress.start() this.$Progress.start()
new AuthService().handleAuthentication(this.$store, this.$router) new AuthService().handleAuthentication(this.$store, this.$router)

View File

@@ -1,8 +1,8 @@
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import Dashboard from '@/components/Dashboard'
import Home from '@/components/Home' import Home from '@/components/Home'
import Journal from '@/components/Journal'
import LogOn from '@/components/user/LogOn' import LogOn from '@/components/user/LogOn'
Vue.use(Router) Vue.use(Router)
@@ -11,7 +11,7 @@ export default new Router({
mode: 'history', mode: 'history',
routes: [ routes: [
{ path: '/', name: 'Home', component: Home }, { path: '/', name: 'Home', component: Home },
{ path: '/dashboard', name: 'Dashboard', component: Dashboard }, { path: '/journal', name: 'Journal', component: Journal },
{ path: '/user/log-on', name: 'LogOn', component: LogOn } { path: '/user/log-on', name: 'LogOn', component: LogOn }
] ]
}) })