Skip to content

Commit

Permalink
remove vue-simple-spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
davigmacode committed Nov 20, 2017
1 parent 8e20c30 commit e9cdc30
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 34 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

Binary file modified dist/bundle.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/content.js

Large diffs are not rendered by default.

Binary file modified dist/content.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/summary.js

Large diffs are not rendered by default.

Binary file modified dist/summary.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/trend.js

Large diffs are not rendered by default.

Binary file modified dist/trend.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/widget.js

Large diffs are not rendered by default.

Binary file modified dist/widget.js.gz
Binary file not shown.
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hivemind-widget",
"version": "1.4.1",
"version": "1.4.2",
"description": "Web component widget for hivemind",
"author": "Irfan Vigma Taufik",
"email": "[email protected]",
Expand All @@ -9,9 +9,8 @@
"main": "./dist/bundle.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "npm run build",
"prepare": "npm run build",
"build": "rimraf dist && cross-env NODE_ENV=production rollup -c",
"prepublish": "npm run build",
"dev": "rollup -c -w"
},
"repository": {
Expand All @@ -36,7 +35,6 @@
"rollup-watch": "^4.3.1",
"vue": "^2.2.6",
"vue-custom-element": "^1.1.0",
"vue-simple-spinner": "^1.2.8",
"vuetrend": "^0.2.3"
}
}
33 changes: 33 additions & 0 deletions src/components/Spinner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<template>
<div class="hivemind-loading">
<div class="hivemind-spinner"></div>
<div class="hivemind-spinner-text">Loading..</div>
</div>
</template>

<script>
export default {}
</script>

<style>
.hivemind-spinner {
transition: all 0.3s linear;
margin: 0 auto;
border-radius: 100%;
border: 4px solid #eee;
border-top: 4px solid #059B85;
width: 32px;
height: 32px;
animation: hivemind-spinner-spin 0.8s linear infinite;
}
.hivemind-spinner-text {
margin-top: 25px;
font-size: 16px;
text-align: center;
color: #555;
}
@keyframes hivemind-spinner-spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
2 changes: 1 addition & 1 deletion src/components/Widget.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import Api from '../libraries/api'
import Error from './Error.vue'
import Spinner from 'vue-simple-spinner'
import Spinner from './Spinner.vue'
export default {
components: {
Expand Down
4 changes: 1 addition & 3 deletions src/widgets/Content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<h3 class="hivemind-title" v-text="config.title"></h3>
</div>
<div class="hivemind-body">
<div class="hivemind-loading" v-if="loading">
<spinner :spacing="10" :line-fg-color="config.color" message="loading"></spinner>
</div>
<spinner v-if="loading"></spinner>
<div class="hivemind-content" v-else>
<error v-if="error" :message="error"></error>
<ul :class="config.posts.class" v-else>
Expand Down
4 changes: 1 addition & 3 deletions src/widgets/Summary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<h3 class="hivemind-title" v-text="settings.title"></h3>
</div>
<div class="hivemind-body">
<div class="hivemind-loading" v-if="loading">
<spinner :spacing="10" message="loading"></spinner>
</div>
<spinner v-if="loading"></spinner>
<div class="hivemind-content" v-else>
<error v-if="error" :message="error"></error>
<div class="hivemind-chart" v-else>
Expand Down
4 changes: 1 addition & 3 deletions src/widgets/Trend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
<h3 class="hivemind-title" v-text="settings.title"></h3>
</div>
<div class="hivemind-body">
<div class="hivemind-loading" v-if="loading">
<spinner :spacing="10" message="loading"></spinner>
</div>
<spinner v-if="loading"></spinner>
<div class="hivemind-content" v-else>
<error v-if="error" :message="error"></error>
<table class="hivemind-trend" v-else>
Expand Down
10 changes: 2 additions & 8 deletions src/widgets/Widget.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<template>
<div :class="css.widget.class">
<div class="hivemind-loading" v-if="loading">
<spinner
spacing="25"
message="loading.."
line-fg-color="#059B85"
font-size="16"></spinner>
</div>
<spinner v-if="loading"></spinner>
<template v-else>
<error v-if="error" :message="error"></error>
<template v-else>
Expand Down Expand Up @@ -35,7 +29,7 @@
</template>

<script>
import Spinner from 'vue-simple-spinner'
import Spinner from '../components/Spinner.vue'
import Error from '../components/Error.vue'
import Stories from '../components/Stories.vue'
import Summary from '../components/Summary.vue'
Expand Down

0 comments on commit e9cdc30

Please sign in to comment.