Skip to content

Commit

Permalink
Merge branch 'development' of github.com:bryce-mcmath/traderu into de…
Browse files Browse the repository at this point in the history
…velopment
  • Loading branch information
jlangy committed Apr 2, 2020
2 parents ee80c1c + 9e7dd53 commit d85448b
Show file tree
Hide file tree
Showing 20 changed files with 96 additions and 200 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ static
/tests/e2e/videos/
/tests/e2e/screenshots/
*.zip
coverage


# local env files
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ _To add an issue, start a new one [here.](https://github.com/bryce-mcmath/trader
### Planned

- General robustness, more consistent patterns and clean up
- Use GZip with requests that recieve text-based JSON payload
- Market close and open
- Order duration algorithm, enable option
- Limit orders, and associated algorithm
- Limit orders, and associated algorithm, enable option
- Portfolio settings toggles are permanently changed on save
- Limit on number of accounts per user
- Push notifications
Expand Down
1 change: 1 addition & 0 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="description" content="Stock and crypto trading simulator" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link
href="https://fonts.googleapis.com/css2?family=Oswald:wght@300;700&family=Quicksand:wght@300;400;600&display=swap"
Expand Down
4 changes: 3 additions & 1 deletion client/public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "TraderU",
"short_name": "TraderU",
"start_url": "http://www.traderu.io",
"icons": [
{
"src": "/android-chrome-192x192.png",
Expand All @@ -14,5 +15,6 @@
}
],
"background_color": "#f1f3f7",
"display": "fullscreen"
"display": "fullscreen",
"theme_color": "#2a2a2a"
}
51 changes: 26 additions & 25 deletions client/src/components/footer_nav_button/FooterNavButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,40 @@
{ 'footer-nav-button--dark': dark },
{ 'footer-nav-button--active': active }
]"
:aria-label="`link to ${link}`"
>
<i :class="icon + ' footer-nav-button__icon'"></i>
</v-btn>
</template>

<script>
export default {
name: 'FooterNavButton',
props: {
label: {
type: String,
default: 'fas fa-question'
},
dark: {
type: Boolean,
default: false
},
icon: {
type: String,
default: 'fas fa-question'
},
link: {
type: String,
default: '/'
},
active: {
type: Boolean,
default: false
}
export default {
name: 'FooterNavButton',
props: {
label: {
type: String,
default: 'fas fa-question'
},
dark: {
type: Boolean,
default: false
},
icon: {
type: String,
default: 'fas fa-question'
},
link: {
type: String,
default: '/'
},
active: {
type: Boolean,
default: false
}
};
}
};
</script>

<style scoped lang="scss">
@import 'footer_nav_button';
@import 'footer_nav_button';
</style>
49 changes: 26 additions & 23 deletions client/src/components/info-list/InfoList.vue
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
<template>
<v-list
v-bind:class="['info-list', { 'info-list--dark': dark }]"
:dark="dark"
>
<v-card class="info-list__card">
<h2><i class="fas fa-user-plus"></i>Register for free</h2>
<v-list v-bind:class="['info-list', { 'info-list--dark': dark }]" :dark="dark">
<v-card role="note" class="info-list__card">
<h2>
<i class="fas fa-user-plus"></i>Register for free
</h2>
<p>Create an account for free today and start trading instantly.</p>
</v-card>
<v-card class="info-list__card">
<h2><i class="fa fa-chart-line"></i>Create a portfolio</h2>
<v-card role="note" class="info-list__card">
<h2>
<i class="fa fa-chart-line"></i>Create a portfolio
</h2>
<p>Create one or more portfolios to see what could have been.</p>
</v-card>
<v-card class="info-list__card">
<h2><i class="fas fa-balance-scale-left"></i>Trade assets</h2>
<v-card role="note" class="info-list__card">
<h2>
<i class="fas fa-balance-scale-left"></i>Trade assets
</h2>
<p>
Choose from over a hundred stocks and cryptocurrencies. With more on the
way!
</p>
</v-card>
<v-card class="info-list__card">
<h2><i class="fas fa-trophy"></i>Compete with friends</h2>
<p>
Track your portfolios performance against others.
</p>
<v-card role="note" class="info-list__card">
<h2>
<i class="fas fa-trophy"></i>Compete with friends
</h2>
<p>Track your portfolios performance against others.</p>
</v-card>
</v-list>
</template>

<script>
export default {
name: 'InfoList',
computed: {
dark() {
return this.$store.state.ui.dark;
}
export default {
name: 'InfoList',
computed: {
dark() {
return this.$store.state.ui.dark;
}
};
}
};
</script>

<style scoped lang="scss">
@import 'info_list';
@import 'info_list';
</style>
6 changes: 3 additions & 3 deletions client/src/components/info_slider/InfoSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
</v-window>

<v-card-actions class="slide-controls">
<v-btn text @click="prev">
<v-btn aria-label="previous" text @click="prev">
<v-icon>mdi-chevron-left</v-icon>
</v-btn>
<v-item-group v-model="onboarding" class="text-center" mandatory>
<v-item v-for="n in length" :key="`btn-${n}`" v-slot:default="{ active, toggle }">
<v-btn :input-value="active" icon @click="toggle">
<v-btn :aria-label="`slide-photo-${n}`" :input-value="active" icon @click="toggle">
<v-icon>mdi-record</v-icon>
</v-btn>
</v-item>
</v-item-group>
<v-btn text @click="next">
<v-btn aria-label="next" text @click="next">
<v-icon>mdi-chevron-right</v-icon>
</v-btn>
</v-card-actions>
Expand Down
39 changes: 20 additions & 19 deletions client/src/components/navbar/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,39 @@
:options="{ left: 'fas fa-moon', right: 'fas fa-sun' }"
data-cy="toggle-dark-mode"
></VuemorphicToggle>
<img class="brand" v-if="!dark" src="@/assets/logo.png" />
<img class="brand" v-if="dark" src="@/assets/logo--dark-mode.png" />
<img class="brand" alt="traderu" v-if="!dark" src="@/assets/logo.png" />
<img class="brand" alt="traderu" v-if="dark" src="@/assets/logo--dark-mode.png" />
<v-app-bar-nav-icon
@click="this.toggleDrawer"
v-bind:class="{ 'v-btn--icon--active': pressed }"
data-cy="toggle-nav-drawer"
aria-label="navigation-drawer"
></v-app-bar-nav-icon>
</nav>
</template>

<script lang="ts">
import Vue from 'vue';
import VuemorphicToggle from '@/components/vuemorphic_toggle/VuemorphicToggle.vue';
import { mapMutations } from 'vuex';
import Vue from 'vue';
import VuemorphicToggle from '@/components/vuemorphic_toggle/VuemorphicToggle.vue';
import { mapMutations } from 'vuex';
export default Vue.extend({
name: 'Navbar',
components: { VuemorphicToggle },
computed: {
pressed() {
return this.$store.state.ui.showDrawer;
},
dark() {
return this.$store.state.ui.dark;
}
export default Vue.extend({
name: 'Navbar',
components: { VuemorphicToggle },
computed: {
pressed() {
return this.$store.state.ui.showDrawer;
},
methods: {
...mapMutations(['toggleDrawer', 'toggleDarkMode'])
dark() {
return this.$store.state.ui.dark;
}
});
},
methods: {
...mapMutations(['toggleDrawer', 'toggleDarkMode'])
}
});
</script>

<style lang="scss" scoped>
@import 'navbar';
@import 'navbar';
</style>
6 changes: 4 additions & 2 deletions client/src/components/register_dialog/RegisterDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ export default Vue.extend({
});
}
},
mounted() {
this.getLocation();
watch: {
registerDialog: function() {
if (this.registerDialog) this.getLocation();
}
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion client/src/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default new Vuex.Store({
commit('setAjaxInProgress', false);
},

async setRankingsData({ commit, state }) {
async setRankingsData({ commit }) {
commit('setAjaxInProgress', true);
fetchRankingsData()
.then(rankData => {
Expand Down
30 changes: 0 additions & 30 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<<<<<<< HEAD
<coverage generated="1585753364537" clover="3.2.0">
<project timestamp="1585753364538" name="All files">
<metrics statements="435" coveredstatements="157" conditionals="113" coveredconditionals="3" methods="99" coveredmethods="1" elements="647" coveredelements="161" complexity="0" loc="435" ncloc="435" packages="7" files="27" classes="27"/>
Expand Down Expand Up @@ -128,22 +127,6 @@
<line num="21" count="0" type="stmt"/>
<line num="23" count="0" type="stmt"/>
<line num="26" count="1" type="stmt"/>
=======
<coverage generated="1585860511683" clover="3.2.0">
<project timestamp="1585860511683" name="All files">
<metrics statements="19" coveredstatements="18" conditionals="10" coveredconditionals="7" methods="9" coveredmethods="8" elements="38" coveredelements="33" complexity="0" loc="19" ncloc="19" packages="3" files="3" classes="3"/>
<package name="footer_nav">
<metrics statements="7" coveredstatements="7" conditionals="6" coveredconditionals="6" methods="2" coveredmethods="2"/>
<file name="FooterNav.vue" path="/home/jon/lighthouse/projects/traderu/client/src/components/footer_nav/FooterNav.vue">
<metrics statements="7" coveredstatements="7" conditionals="6" coveredconditionals="6" methods="2" coveredmethods="2"/>
<line num="39" count="1" type="stmt"/>
<line num="48" count="5" type="stmt"/>
<line num="51" count="5" type="stmt"/>
<line num="52" count="6" type="cond" truecount="2" falsecount="0"/>
<line num="53" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="54" count="5" type="cond" truecount="2" falsecount="0"/>
<line num="55" count="1" type="stmt"/>
>>>>>>> feature/tests
</file>
</package>
<package name="navbar">
Expand All @@ -152,7 +135,6 @@
<metrics statements="5" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<line num="22" count="1" type="stmt"/>
<line num="23" count="1" type="stmt"/>
<<<<<<< HEAD
</file>
<file name="getAllStocks.ts" path="C:\Users\bryce\Documents\repos\traderu\server\src\db\selects\getAllStocks.ts">
<metrics statements="4" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
Expand Down Expand Up @@ -518,18 +500,6 @@
<line num="44" count="0" type="stmt"/>
<line num="46" count="0" type="stmt"/>
<line num="47" count="0" type="stmt"/>
=======
<line num="24" count="1" type="stmt"/>
<line num="31" count="2" type="stmt"/>
<line num="34" count="2" type="stmt"/>
</file>
</package>
<package name="vuemorphic_toggle">
<metrics statements="7" coveredstatements="6" conditionals="4" coveredconditionals="1" methods="5" coveredmethods="4"/>
<file name="VuemorphicToggle.vue" path="/home/jon/lighthouse/projects/traderu/client/src/components/vuemorphic_toggle/VuemorphicToggle.vue">
<metrics statements="7" coveredstatements="6" conditionals="4" coveredconditionals="1" methods="5" coveredmethods="4"/>
<line num="59" count="1" type="stmt"/>
>>>>>>> feature/tests
<line num="65" count="1" type="stmt"/>
<line num="69" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="75" count="0" type="cond" truecount="0" falsecount="2"/>
Expand Down
6 changes: 0 additions & 6 deletions coverage/coverage-final.json

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions coverage/lcov-report/FooterNav.vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,7 @@ <h1><a href="index.html">All files</a> FooterNav.vue</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
<<<<<<< HEAD
at Wed Apr 01 2020 08:02:35 GMT-0700 (Pacific Daylight Time)
=======
at Thu Apr 02 2020 12:30:23 GMT-0700 (Pacific Daylight Time)
>>>>>>> feature/tests
</div>
</div>
<script src="prettify.js"></script>
Expand Down
Loading

0 comments on commit d85448b

Please sign in to comment.