From b94f5776eec7bfdd716dfe1af181bc075dc49d45 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 6 Nov 2016 02:31:32 +0100 Subject: [PATCH] UI mockup --- app/components/colorSpan.vue | 20 +++++++++++ app/components/eventTypesNav.vue | 30 ++++++++++++++++ app/components/publicDayPicker.vue | 33 ++++++++++++++++++ app/components/publicSlotPicker.vue | 33 ++++++++++++++++++ app/routes.js | 23 +++++++++++-- app/views/dashboardView.vue | 38 ++++++--------------- app/views/index.js | 5 ++- app/views/publicDaySelectionView.vue | 35 +++++++++++++++++++ app/views/publicSlotSelectedView.vue | 3 ++ app/views/publicSlotSelectionView.vue | 36 ++++++++++++++++++++ app/views/publicView.vue | 49 ++++++++++++++++++++++++++- package.json | 4 ++- 12 files changed, 277 insertions(+), 32 deletions(-) create mode 100644 app/components/colorSpan.vue create mode 100644 app/components/eventTypesNav.vue create mode 100644 app/components/publicDayPicker.vue create mode 100644 app/components/publicSlotPicker.vue create mode 100644 app/views/publicDaySelectionView.vue create mode 100644 app/views/publicSlotSelectedView.vue create mode 100644 app/views/publicSlotSelectionView.vue diff --git a/app/components/colorSpan.vue b/app/components/colorSpan.vue new file mode 100644 index 0000000..be451f7 --- /dev/null +++ b/app/components/colorSpan.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/app/components/eventTypesNav.vue b/app/components/eventTypesNav.vue new file mode 100644 index 0000000..95ab4c9 --- /dev/null +++ b/app/components/eventTypesNav.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/app/components/publicDayPicker.vue b/app/components/publicDayPicker.vue new file mode 100644 index 0000000..aef4a50 --- /dev/null +++ b/app/components/publicDayPicker.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/app/components/publicSlotPicker.vue b/app/components/publicSlotPicker.vue new file mode 100644 index 0000000..300b181 --- /dev/null +++ b/app/components/publicSlotPicker.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/app/routes.js b/app/routes.js index 4a7ed71..0a65ebb 100644 --- a/app/routes.js +++ b/app/routes.js @@ -1,13 +1,32 @@ -import { publicView, dashboardView } from './views' +import { publicView, publicDaySelectionView, publicSlotSelectionView, publicSlotSelectedView, dashboardView } from './views' export default [ { path: '/public/:hash', - component: publicView + name: 'publicView', + component: publicView, + children: [ + { + path: '', + name: 'publicDaySelectionView', + component: publicDaySelectionView + }, + { + path: ':day', + name: 'publicSlotSelectionView', + component: publicSlotSelectionView + }, + { + path: ':day/:slot', + name: 'publicSlotSelectedView', + component: publicSlotSelectedView + } + ] }, { path: '/dashboard', alias: '/', + name: 'dashboard', component: dashboardView } ] diff --git a/app/views/dashboardView.vue b/app/views/dashboardView.vue index 43b8941..37989d7 100644 --- a/app/views/dashboardView.vue +++ b/app/views/dashboardView.vue @@ -2,13 +2,7 @@ div h1 {{ 'My RSVPs' }} - nav(class='horizontalMenu') - ul - li(v-for="(eventType, hash) in eventTypes") - a(v-bind:href="'/public/' + eventType.hash") - span(v-bind:style="{ 'background-color': eventType.color }" class='colorSpan') - | New {{ eventType.length }} mins meeting - button New event type + event-types-nav(v-bind:eventTypes="eventTypes") ul li(v-for="(RSVPItemsForDay, day) in RSVPItems") @@ -17,7 +11,7 @@ table tr(v-for="(RSVPItem, index) in RSVPItemsForDay") td - span(v-bind:style="{ 'background-color': eventTypes[RSVPItem.eventTypeHash].color }" class='colorSpan') + colorSpan(v-bind:color="eventTypes[RSVPItem.eventTypeHash].color") span {{ RSVPItem.startTime }} - {{ RSVPItem.endTime }} td template(v-for="(member, index) in RSVPItem.members") @@ -37,6 +31,8 @@ option(selected) {{ '-' }} option {{ 'Accept' }} option {{ 'Discard' }} + p + em Times are in your computer local timezone. diff --git a/app/views/index.js b/app/views/index.js index a98bf3f..a025ae2 100644 --- a/app/views/index.js +++ b/app/views/index.js @@ -1,4 +1,7 @@ import publicView from './publicView.vue' +import publicDaySelectionView from './publicDaySelectionView.vue' +import publicSlotSelectionView from './publicSlotSelectionView.vue' +import publicSlotSelectedView from './publicSlotSelectedView.vue' import dashboardView from './dashboardView.vue' -export { publicView, dashboardView } +export { publicView, publicDaySelectionView, publicSlotSelectionView, publicSlotSelectedView, dashboardView } diff --git a/app/views/publicDaySelectionView.vue b/app/views/publicDaySelectionView.vue new file mode 100644 index 0000000..299852b --- /dev/null +++ b/app/views/publicDaySelectionView.vue @@ -0,0 +1,35 @@ + + + diff --git a/app/views/publicSlotSelectedView.vue b/app/views/publicSlotSelectedView.vue new file mode 100644 index 0000000..f9facf3 --- /dev/null +++ b/app/views/publicSlotSelectedView.vue @@ -0,0 +1,3 @@ + diff --git a/app/views/publicSlotSelectionView.vue b/app/views/publicSlotSelectionView.vue new file mode 100644 index 0000000..81c2286 --- /dev/null +++ b/app/views/publicSlotSelectionView.vue @@ -0,0 +1,36 @@ + + + diff --git a/app/views/publicView.vue b/app/views/publicView.vue index 2567aa6..b0d6630 100644 --- a/app/views/publicView.vue +++ b/app/views/publicView.vue @@ -1,4 +1,51 @@ + + + + diff --git a/package.json b/package.json index 56539ee..ce8fd0f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "lint": "standard 'app/**/*.js' 'webpack.config.js'", "clean": "rimraf dist/*", "watch:prod": "cross-env NODE_ENV=production webpack -p --progress --colors --watch", - "watch:dev": "cross-env NODE_ENV=development webpack --progress --colors --watch" + "watch:dev": "cross-env NODE_ENV=development webpack --progress --colors --watch", + "serve": "http-server dist" }, "contributors": [ "Phyks (Lucas Verney)" @@ -41,6 +42,7 @@ "cross-env": "^3.1.3", "css-loader": "^0.25.0", "debug-loader": "0.0.1", + "http-server": "^0.9.0", "pug": "^2.0.0-beta6", "pug-cli": "^1.0.0-alpha6", "pug-loader": "^2.3.0",