small refactor

This commit is contained in:
Dan Elbert 2018-04-03 20:26:31 -05:00
parent c13b3a09bd
commit d81818f2d4
13 changed files with 22 additions and 40 deletions

View File

@ -17,7 +17,6 @@
<script> <script>
import { mapMutations, mapState } from "vuex"; import { mapMutations, mapState } from "vuex";
import AppNavbar from "./AppNavbar";
import api from "../lib/Api"; import api from "../lib/Api";
export default { export default {
@ -78,7 +77,6 @@
}, },
components: { components: {
AppNavbar
} }
} }

View File

@ -20,7 +20,6 @@
<script> <script>
import AppIcon from "./AppIcon";
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
@ -53,7 +52,6 @@
}, },
components: { components: {
AppIcon
} }
} }

View File

@ -1,17 +1,16 @@
<template> <template>
<span ref="wrapper" class="rating" @click="handleClick" @mousemove="handleMousemove" @mouseleave="handleMouseleave"> <span ref="wrapper" class="rating" @click="handleClick" @mousemove="handleMousemove" @mouseleave="handleMouseleave">
<span class="set empty-set"> <span class="set empty-set">
<app-icon v-for="i in starCount" icon="star"></app-icon> <app-icon v-for="i in starCount" :key="i" icon="star"></app-icon>
</span> </span>
<span class="set filled-set" :style="filledStyle"> <span class="set filled-set" :style="filledStyle">
<app-icon v-for="i in starCount" icon="star"></app-icon> <app-icon v-for="i in starCount" :key="i" icon="star"></app-icon>
</span> </span>
</span> </span>
</template> </template>
<script> <script>
import AppIcon from "./AppIcon";
export default { export default {
props: { props: {
@ -67,7 +66,6 @@
}, },
components: { components: {
AppIcon
} }
} }

View File

@ -136,8 +136,6 @@
<script> <script>
import api from "../lib/Api"; import api from "../lib/Api";
import AppAutocomplete from "./AppAutocomplete";
import AppIcon from "./AppIcon";
export default { export default {
props: { props: {
@ -244,8 +242,6 @@
}, },
components: { components: {
AppAutocomplete,
AppIcon
} }
} }

View File

@ -91,7 +91,6 @@
import api from "../lib/Api"; import api from "../lib/Api";
import RecipeEditIngredientEditor from "./RecipeEditIngredientEditor"; import RecipeEditIngredientEditor from "./RecipeEditIngredientEditor";
import AppTagEditor from "./AppTagEditor";
export default { export default {
props: { props: {
@ -142,7 +141,6 @@
}, },
components: { components: {
AppTagEditor,
RecipeEditIngredientEditor RecipeEditIngredientEditor
} }
} }

View File

@ -35,7 +35,6 @@
<script> <script>
import AppModal from "./AppModal";
import RecipeEditIngredientItem from "./RecipeEditIngredientItem"; import RecipeEditIngredientItem from "./RecipeEditIngredientItem";
import { mapState } from "vuex"; import { mapState } from "vuex";
@ -194,7 +193,6 @@
}, },
components: { components: {
AppModal,
RecipeEditIngredientItem RecipeEditIngredientItem
} }
} }

View File

@ -46,8 +46,6 @@
<script> <script>
import AppAutocomplete from "./AppAutocomplete";
import AppIcon from "./AppIcon";
import api from "../lib/Api"; import api from "../lib/Api";
export default { export default {
@ -95,8 +93,6 @@
}, },
components: { components: {
AppAutocomplete,
AppIcon
} }
} }

View File

@ -63,8 +63,6 @@
import api from "../lib/Api"; import api from "../lib/Api";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import AppAutocomplete from "./AppAutocomplete";
export default { export default {
data() { data() {
return { return {
@ -119,7 +117,6 @@
}, },
components: { components: {
AppAutocomplete
} }
} }

View File

@ -53,8 +53,6 @@
import api from "../lib/Api"; import api from "../lib/Api";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import AppIcon from "./AppIcon";
import AppPager from "./AppPager";
export default { export default {
data() { data() {
@ -116,8 +114,6 @@
}, },
components: { components: {
AppIcon,
AppPager
} }
} }

View File

@ -72,10 +72,6 @@
import api from "../lib/Api"; import api from "../lib/Api";
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import AppDateTime from "./AppDateTime";
import AppIcon from "./AppIcon";
import AppPager from "./AppPager";
import AppRating from "./AppRating";
export default { export default {
data() { data() {
@ -178,10 +174,6 @@
}, },
components: { components: {
AppRating,
AppIcon,
AppDateTime,
AppPager
} }
} }

View File

@ -47,8 +47,6 @@
<script> <script>
import AppModal from "./AppModal";
import AppIcon from "./AppIcon";
import api from "../lib/Api"; import api from "../lib/Api";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
@ -88,8 +86,6 @@
}, },
components: { components: {
AppIcon,
AppModal
} }
} }

View File

@ -9,6 +9,25 @@ import router from '../router';
import '../lib/GlobalMixins'; import '../lib/GlobalMixins';
import App from '../components/App'; import App from '../components/App';
import AppAutocomplete from "../components/AppAutocomplete";
import AppDateTime from "../components/AppDateTime";
import AppIcon from "../components/AppIcon";
import AppModal from "../components/AppModal";
import AppNavbar from "../components/AppNavbar";
import AppPager from "../components/AppPager";
import AppRating from "../components/AppRating";
import AppTagEditor from "../components/AppTagEditor";
Vue.component("AppAutocomplete", AppAutocomplete);
Vue.component("AppDateTime", AppDateTime);
Vue.component("AppIcon", AppIcon);
Vue.component("AppModal", AppModal);
Vue.component("AppNavbar", AppNavbar);
Vue.component("AppPager", AppPager);
Vue.component("AppRating", AppRating);
Vue.component("AppTagEditor", AppTagEditor);
Vue.use(VueProgressBar, { Vue.use(VueProgressBar, {
// color: '#bffaf3', // color: '#bffaf3',
// failedColor: '#874b4b', // failedColor: '#874b4b',

View File

@ -1,7 +1,7 @@
// Bluma default overrides // Bluma default overrides
$green: #79A736; $green: #79A736;
$red: #FF0000; $red: #d4424e;
$primary: $green; $primary: $green;
$modal-content-width: 750px; $modal-content-width: 750px;