Skip to content

Commit 3489012

Browse files
committed
update
1 parent ad352df commit 3489012

File tree

15 files changed

+226
-173
lines changed

15 files changed

+226
-173
lines changed

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
1. 进入后台 -> 系统 -> 博客设置 -> 评论设置
1212

13-
2.`评论模块 JS` 修改为:
14-
15-
- 旧版:`https://cdn.jsdelivr.net/gh/coortop/halo-comment-alex@0.0.6/dist/halo-comment.min.js`
16-
- 新版:`https://cdn.jsdelivr.net/gh/coortop/halo-comment-alex@latest/dist/halo-comment.min.js`
13+
2.`评论模块 JS` 修改为:`https://cdn.jsdelivr.net/gh/coortop/halo-comment-alex@latest/dist/halo-comment.min.js`
1714

1815
### 自定义配置
1916

dist/halo-comment.js

Lines changed: 26 additions & 25 deletions
Large diffs are not rendered by default.

dist/halo-comment.js.map

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/halo-comment.min.js

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

dist/halo-comment.min.js.map

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "halo-comment-alex",
3-
"version": "v1.0.9",
3+
"version": "v1.1.0",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
showUserAgent: true,
2424
gravatarSource: '//cdn.v2ex.com/gravatar',
2525
loadingStyle: 'default',
26-
darkMode: true
26+
darkMode: false
2727
}
2828
};
2929
}

src/components/Comment.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
</div>
7171
</template>
7272
<script>
73-
7473
import "./index";
7574
import commentApi from "../api/comment";
7675
import optionApi from "../api/option";

src/components/CommentEditor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
aria-required="true"
2020
tabindex="4"
2121
:placeholder="options.comment_content_placeholder || '撰写评论...'"
22+
:style="{'height': textareaHeight}"
2223
v-model="comment.content"
2324
></textarea>
2425
<div
2526
v-else
26-
class="markdown-body comment-preview"
27+
class="markdown-body comment-preview isPreview"
2728
v-html="renderedContent"
2829
></div>
2930
</div>
@@ -157,7 +158,6 @@
157158
tabindex="5"
158159
rel="nofollow noopener"
159160
type="button"
160-
@click="handleSubmitClick"
161161
>发表评论
162162
</button>
163163
</div>

src/components/CommentNode.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
v-else
3535
class="author-name"
3636
>{{ comment.author }}</a>
37+
<span v-if="comment.isAdmin" class="is-admin">博主</span>
3738
<span
3839
v-if="configs.showUserAgent"
3940
class="useragent-info"
@@ -226,4 +227,4 @@
226227
}
227228
}
228229
};
229-
</script>
230+
</script>

src/components/EmojiPicker/data/emojis.js

Lines changed: 101 additions & 101 deletions
Large diffs are not rendered by default.

src/components/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Vue from 'vue'
2-
32
import CommentEditor from './CommentEditor'
43
import CommentNode from './CommentNode'
54
import CommentLoading from './CommentLoading'
@@ -15,7 +14,7 @@ const _components = {
1514
const components = {}
1615

1716
Object.keys(_components).forEach(key => {
18-
components[key] = Vue.component(key, _components[key])
17+
components[key] = Vue.component(key, _components[key])
1918
})
2019

2120
export default components

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import App from './App.vue'
44
Vue.config.productionTip = false
55

66
new Vue({
7-
render: h => h(App),
7+
render: h => h(App),
88
}).$mount('#app')

src/styles/global.scss

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@
239239
.comment-textarea {
240240
position: relative;
241241
width: 100%;
242-
height: 162px;
243242

244243
label {
245244
font-weight: 400;
@@ -313,6 +312,12 @@
313312
}
314313
}
315314

315+
.comment-preview.isPreview {
316+
img.vemoji {
317+
max-width: 20px !important;
318+
}
319+
}
320+
316321
.comment-emoji-wrap {
317322
margin-bottom: 15px;
318323
}
@@ -574,28 +579,8 @@
574579
position: relative;
575580
margin: 0 auto;
576581
padding: 0;
577-
578-
&:hover {
579-
//.comment-reply {
580-
// display: block;
581-
//}
582-
}
583582
}
584583

585-
//.children {
586-
// .comment-body {
587-
// &:before {
588-
// content: "";
589-
// width: 2px;
590-
// height: 500%;
591-
// background: $color;
592-
// left: 23px;
593-
// top: -500%;
594-
// position: absolute;
595-
// }
596-
// }
597-
//}
598-
599584
.comment-avatar {
600585
position: relative;
601586
z-index: 1;
@@ -617,7 +602,7 @@
617602

618603
@media only screen and (max-width: 768px) {
619604
.useragent-info {
620-
display: block;
605+
//display: block;
621606
}
622607
}
623608

@@ -631,12 +616,20 @@
631616
font-weight: 700;
632617
margin-right: 10px;
633618
}
634-
}
635619

636-
.is-admin {
637-
margin-left: 4px;
638-
font-size: 14px;
639-
cursor: pointer;
620+
.is-admin {
621+
cursor: pointer;
622+
border: 1px solid #fb7299;
623+
min-width: 30px;
624+
display: inline-block;
625+
text-align: center;
626+
font-size: 12px;
627+
color: #fb7299;
628+
border-radius: 3px;
629+
font-weight: 400;
630+
margin: 0 10px 0 -5px;
631+
padding: 2px;
632+
}
640633
}
641634

642635
.comment-time {
@@ -666,6 +659,10 @@
666659
max-width: 50%;
667660
}
668661
}
662+
663+
img.vemoji {
664+
max-width: 20px !important;
665+
}
669666
}
670667

671668
.comment-content.markdown-body a {
@@ -736,7 +733,6 @@
736733
color: black;
737734
}
738735
}
739-
740736
}
741737

742738
@keyframes top20 {
@@ -978,4 +974,4 @@
978974
}
979975
}
980976
}
981-
}
977+
}

yarn.lock

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,20 @@
874874
resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
875875
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=
876876

877+
"@nuxt/opencollective@^0.3.0":
878+
version "0.3.0"
879+
resolved "https://registry.npm.taobao.org/@nuxt/opencollective/download/@nuxt/opencollective-0.3.0.tgz#11d8944dcf2d526e31660bb69570be03f8fb72b7"
880+
integrity sha1-EdiUTc8tUm4xZgu2lXC+A/j7crc=
881+
dependencies:
882+
chalk "^2.4.2"
883+
consola "^2.10.1"
884+
node-fetch "^2.6.0"
885+
886+
"@popperjs/core@^2.4.4":
887+
version "2.4.4"
888+
resolved "https://registry.npm.taobao.org/@popperjs/core/download/@popperjs/core-2.4.4.tgz#11d5db19bd178936ec89cd84519c4de439574398"
889+
integrity sha1-EdXbGb0XiTbsic2EUZxN5DlXQ5g=
890+
877891
"@soda/friendly-errors-webpack-plugin@^1.7.1":
878892
version "1.7.1"
879893
resolved "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz#706f64bcb4a8b9642b48ae3ace444c70334d615d"
@@ -1804,6 +1818,27 @@ boolbase@^1.0.0, boolbase@~1.0.0:
18041818
resolved "https://registry.npm.taobao.org/boolbase/download/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
18051819
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
18061820

1821+
bootstrap-vue@^2.16.0:
1822+
version "2.16.0"
1823+
resolved "https://registry.npm.taobao.org/bootstrap-vue/download/bootstrap-vue-2.16.0.tgz#07e7032ec9ffdd576470dc437da54f398ec16ba5"
1824+
integrity sha1-B+cDLsn/3VdkcNxDfaVPOY7Ba6U=
1825+
dependencies:
1826+
"@nuxt/opencollective" "^0.3.0"
1827+
bootstrap ">=4.5.0 <5.0.0"
1828+
popper.js "^1.16.1"
1829+
portal-vue "^2.1.7"
1830+
vue-functional-data-merge "^3.1.0"
1831+
1832+
"bootstrap@>=4.5.0 <5.0.0":
1833+
version "4.5.1"
1834+
resolved "https://registry.npm.taobao.org/bootstrap/download/bootstrap-4.5.1.tgz#f7322c7dd3e6376d430efc0c3f57e4d8005eb5b2"
1835+
integrity sha1-9zIsfdPmN21DDvwMP1fk2ABetbI=
1836+
1837+
bootstrap@^4.5.2:
1838+
version "4.5.2"
1839+
resolved "https://registry.npm.taobao.org/bootstrap/download/bootstrap-4.5.2.tgz?cache=0&sync_timestamp=1596731738098&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbootstrap%2Fdownload%2Fbootstrap-4.5.2.tgz#a85c4eda59155f0d71186b6e6ad9b875813779ab"
1840+
integrity sha1-qFxO2lkVXw1xGGtuatm4dYE3eas=
1841+
18071842
brace-expansion@^1.1.7:
18081843
version "1.1.11"
18091844
resolved "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -2460,6 +2495,11 @@ connect-history-api-fallback@^1.6.0:
24602495
resolved "https://registry.npm.taobao.org/connect-history-api-fallback/download/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
24612496
integrity sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=
24622497

2498+
consola@^2.10.1:
2499+
version "2.15.0"
2500+
resolved "https://registry.npm.taobao.org/consola/download/consola-2.15.0.tgz?cache=0&sync_timestamp=1596628279608&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconsola%2Fdownload%2Fconsola-2.15.0.tgz#40fc4eefa4d2f8ef2e2806147f056ea207fcc0e9"
2501+
integrity sha1-QPxO76TS+O8uKAYUfwVuogf8wOk=
2502+
24632503
console-browserify@^1.1.0:
24642504
version "1.2.0"
24652505
resolved "https://registry.npm.taobao.org/console-browserify/download/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336"
@@ -5625,6 +5665,11 @@ no-case@^2.2.0:
56255665
dependencies:
56265666
lower-case "^1.1.1"
56275667

5668+
node-fetch@^2.6.0:
5669+
version "2.6.0"
5670+
resolved "https://registry.npm.taobao.org/node-fetch/download/node-fetch-2.6.0.tgz?cache=0&sync_timestamp=1591866480128&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnode-fetch%2Fdownload%2Fnode-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
5671+
integrity sha1-5jNFY4bUqlWGP2dqerDaqP3ssP0=
5672+
56285673
node-forge@0.9.0:
56295674
version "0.9.0"
56305675
resolved "https://registry.npm.taobao.org/node-forge/download/node-forge-0.9.0.tgz#d624050edbb44874adca12bb9a52ec63cb782579"
@@ -6295,6 +6340,16 @@ pnp-webpack-plugin@^1.6.4:
62956340
dependencies:
62966341
ts-pnp "^1.1.6"
62976342

6343+
popper.js@^1.16.1:
6344+
version "1.16.1"
6345+
resolved "https://registry.npm.taobao.org/popper.js/download/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b"
6346+
integrity sha1-KiI8s9x7YhPXQOQDcr5A3kPmWxs=
6347+
6348+
portal-vue@^2.1.7:
6349+
version "2.1.7"
6350+
resolved "https://registry.npm.taobao.org/portal-vue/download/portal-vue-2.1.7.tgz#ea08069b25b640ca08a5b86f67c612f15f4e4ad4"
6351+
integrity sha1-6ggGmyW2QMoIpbhvZ8YS8V9OStQ=
6352+
62986353
portfinder@^1.0.26:
62996354
version "1.0.27"
63006355
resolved "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.27.tgz?cache=0&sync_timestamp=1595216124510&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fportfinder%2Fdownload%2Fportfinder-1.0.27.tgz#a41333c116b5e5f3d380f9745ac2f35084c4c758"
@@ -8387,6 +8442,11 @@ vue-eslint-parser@^5.0.0:
83878442
esquery "^1.0.1"
83888443
lodash "^4.17.11"
83898444

8445+
vue-functional-data-merge@^3.1.0:
8446+
version "3.1.0"
8447+
resolved "https://registry.npm.taobao.org/vue-functional-data-merge/download/vue-functional-data-merge-3.1.0.tgz#08a7797583b7f35680587f8a1d51d729aa1dc657"
8448+
integrity sha1-CKd5dYO381aAWH+KHVHXKaodxlc=
8449+
83908450
vue-hot-reload-api@^2.3.0:
83918451
version "2.3.4"
83928452
resolved "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz?cache=0&sync_timestamp=1589682714858&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-hot-reload-api%2Fdownload%2Fvue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"

0 commit comments

Comments
 (0)