Skip to content

Commit e9cdc30

Browse files
committed
remove vue-simple-spinner
1 parent 8e20c30 commit e9cdc30

18 files changed

+47
-34
lines changed

dist/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bundle.js.gz

-1.9 KB
Binary file not shown.

dist/content.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/content.js.gz

-1.95 KB
Binary file not shown.

dist/summary.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/summary.js.gz

-1.92 KB
Binary file not shown.

dist/trend.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/trend.js.gz

-1.96 KB
Binary file not shown.

dist/widget.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/widget.js.gz

-1.94 KB
Binary file not shown.

package-lock.json

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hivemind-widget",
3-
"version": "1.4.1",
3+
"version": "1.4.2",
44
"description": "Web component widget for hivemind",
55
"author": "Irfan Vigma Taufik",
66
"email": "[email protected]",
@@ -9,9 +9,8 @@
99
"main": "./dist/bundle.js",
1010
"scripts": {
1111
"test": "echo \"Error: no test specified\" && exit 1",
12-
"postinstall": "npm run build",
12+
"prepare": "npm run build",
1313
"build": "rimraf dist && cross-env NODE_ENV=production rollup -c",
14-
"prepublish": "npm run build",
1514
"dev": "rollup -c -w"
1615
},
1716
"repository": {
@@ -36,7 +35,6 @@
3635
"rollup-watch": "^4.3.1",
3736
"vue": "^2.2.6",
3837
"vue-custom-element": "^1.1.0",
39-
"vue-simple-spinner": "^1.2.8",
4038
"vuetrend": "^0.2.3"
4139
}
4240
}

src/components/Spinner.vue

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<template>
2+
<div class="hivemind-loading">
3+
<div class="hivemind-spinner"></div>
4+
<div class="hivemind-spinner-text">Loading..</div>
5+
</div>
6+
</template>
7+
8+
<script>
9+
export default {}
10+
</script>
11+
12+
<style>
13+
.hivemind-spinner {
14+
transition: all 0.3s linear;
15+
margin: 0 auto;
16+
border-radius: 100%;
17+
border: 4px solid #eee;
18+
border-top: 4px solid #059B85;
19+
width: 32px;
20+
height: 32px;
21+
animation: hivemind-spinner-spin 0.8s linear infinite;
22+
}
23+
.hivemind-spinner-text {
24+
margin-top: 25px;
25+
font-size: 16px;
26+
text-align: center;
27+
color: #555;
28+
}
29+
@keyframes hivemind-spinner-spin {
30+
0% { transform: rotate(0deg); }
31+
100% { transform: rotate(360deg); }
32+
}
33+
</style>

src/components/Widget.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
import Api from '../libraries/api'
33
import Error from './Error.vue'
4-
import Spinner from 'vue-simple-spinner'
4+
import Spinner from './Spinner.vue'
55
66
export default {
77
components: {

src/widgets/Content.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
<h3 class="hivemind-title" v-text="config.title"></h3>
88
</div>
99
<div class="hivemind-body">
10-
<div class="hivemind-loading" v-if="loading">
11-
<spinner :spacing="10" :line-fg-color="config.color" message="loading"></spinner>
12-
</div>
10+
<spinner v-if="loading"></spinner>
1311
<div class="hivemind-content" v-else>
1412
<error v-if="error" :message="error"></error>
1513
<ul :class="config.posts.class" v-else>

src/widgets/Summary.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
<h3 class="hivemind-title" v-text="settings.title"></h3>
88
</div>
99
<div class="hivemind-body">
10-
<div class="hivemind-loading" v-if="loading">
11-
<spinner :spacing="10" message="loading"></spinner>
12-
</div>
10+
<spinner v-if="loading"></spinner>
1311
<div class="hivemind-content" v-else>
1412
<error v-if="error" :message="error"></error>
1513
<div class="hivemind-chart" v-else>

src/widgets/Trend.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
<h3 class="hivemind-title" v-text="settings.title"></h3>
88
</div>
99
<div class="hivemind-body">
10-
<div class="hivemind-loading" v-if="loading">
11-
<spinner :spacing="10" message="loading"></spinner>
12-
</div>
10+
<spinner v-if="loading"></spinner>
1311
<div class="hivemind-content" v-else>
1412
<error v-if="error" :message="error"></error>
1513
<table class="hivemind-trend" v-else>

src/widgets/Widget.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<template>
22
<div :class="css.widget.class">
3-
<div class="hivemind-loading" v-if="loading">
4-
<spinner
5-
spacing="25"
6-
message="loading.."
7-
line-fg-color="#059B85"
8-
font-size="16"></spinner>
9-
</div>
3+
<spinner v-if="loading"></spinner>
104
<template v-else>
115
<error v-if="error" :message="error"></error>
126
<template v-else>
@@ -35,7 +29,7 @@
3529
</template>
3630

3731
<script>
38-
import Spinner from 'vue-simple-spinner'
32+
import Spinner from '../components/Spinner.vue'
3933
import Error from '../components/Error.vue'
4034
import Stories from '../components/Stories.vue'
4135
import Summary from '../components/Summary.vue'

0 commit comments

Comments
 (0)