@waline/client 2.14.3 → 2.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +339 -0
- package/dist/comment.cjs +1 -1
- package/dist/comment.js +1 -1
- package/dist/comment.mjs +1 -1
- package/dist/component.mjs +1 -1
- package/dist/legacy.umd.js +1 -1
- package/dist/pageview.cjs +1 -1
- package/dist/pageview.js +1 -1
- package/dist/pageview.mjs +1 -1
- package/dist/shim.cjs +1 -1
- package/dist/shim.mjs +1 -1
- package/dist/waline-meta.css +1 -1
- package/dist/waline-meta.css.map +1 -1
- package/dist/waline.cjs +1 -1
- package/dist/waline.css +1 -1
- package/dist/waline.css.map +1 -1
- package/dist/waline.js +1 -1
- package/dist/waline.mjs +1 -1
- package/package.json +16 -17
- package/src/components/ArticleReaction.vue +7 -14
- package/src/components/WalineComment.vue +28 -362
- package/src/styles/card.scss +17 -13
- package/src/styles/emoji.scss +1 -1
- package/src/styles/gif.scss +1 -1
- package/src/styles/highlight.scss +1 -0
- package/src/styles/layout.scss +15 -15
- package/src/styles/meta.scss +1 -1
- package/src/styles/normalize.scss +7 -3
- package/src/styles/panel.scss +3 -3
- package/src/styles/reaction.scss +29 -12
- package/src/styles/user-list.scss +3 -3
- package/src/utils/config.ts +2 -2
package/src/styles/layout.scss
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
span.wl-tex {
|
|
21
21
|
display: inline-block;
|
|
22
22
|
|
|
23
|
-
margin-
|
|
23
|
+
margin-inline-end: 0.25em;
|
|
24
24
|
padding: 2px 4px;
|
|
25
25
|
border-radius: 0.2em;
|
|
26
26
|
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
padding: 0.5em 0;
|
|
75
75
|
color: var(--waline-light-grey);
|
|
76
76
|
font-size: var(--waline-info-font-size);
|
|
77
|
-
text-align:
|
|
77
|
+
text-align: end;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.wl-meta-head {
|
|
@@ -84,22 +84,22 @@
|
|
|
84
84
|
padding: 0.375em;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
.wl-sort {
|
|
88
88
|
margin: 0;
|
|
89
89
|
list-style-type: none;
|
|
90
|
-
}
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
91
|
+
li {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
color: var(--waline-info-color);
|
|
94
|
+
font-size: 0.75em;
|
|
95
|
+
cursor: pointer;
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
97
|
+
&.active {
|
|
98
|
+
color: var(--waline-theme-color);
|
|
99
|
+
}
|
|
102
100
|
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
+ li {
|
|
102
|
+
margin-inline-start: 1em;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
105
|
}
|
package/src/styles/meta.scss
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
[data-waline] {
|
|
2
2
|
font-size: var(--waline-font-size);
|
|
3
|
-
text-align:
|
|
3
|
+
text-align: start;
|
|
4
|
+
|
|
5
|
+
[dir='rtl'] & {
|
|
6
|
+
direction: rtl;
|
|
7
|
+
}
|
|
4
8
|
|
|
5
9
|
* {
|
|
6
10
|
box-sizing: content-box;
|
|
@@ -88,7 +92,7 @@
|
|
|
88
92
|
blockquote {
|
|
89
93
|
margin: 0.5em 0;
|
|
90
94
|
padding: 0.5em 0 0.5em 1em;
|
|
91
|
-
border-
|
|
95
|
+
border-inline-start: 8px solid var(--waline-bq-color);
|
|
92
96
|
color: var(--waline-dark-grey);
|
|
93
97
|
|
|
94
98
|
> p {
|
|
@@ -98,7 +102,7 @@
|
|
|
98
102
|
|
|
99
103
|
ol,
|
|
100
104
|
ul {
|
|
101
|
-
margin-
|
|
105
|
+
margin-inline-start: 1.25em;
|
|
102
106
|
padding: 0;
|
|
103
107
|
}
|
|
104
108
|
|
package/src/styles/panel.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.wl-close {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: -4px;
|
|
10
|
-
|
|
10
|
+
inset-inline-end: -4px;
|
|
11
11
|
|
|
12
12
|
padding: 0;
|
|
13
13
|
border: none;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
.wl-logout-btn {
|
|
29
29
|
position: absolute;
|
|
30
30
|
top: -10px;
|
|
31
|
-
|
|
31
|
+
inset-inline-end: -10px;
|
|
32
32
|
|
|
33
33
|
padding: 3px;
|
|
34
34
|
border: none;
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
button {
|
|
278
|
-
margin-
|
|
278
|
+
margin-inline-start: 0.75em;
|
|
279
279
|
|
|
280
280
|
svg {
|
|
281
281
|
display: block;
|
package/src/styles/reaction.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.wl-reaction {
|
|
2
2
|
margin-bottom: 1.75em;
|
|
3
3
|
text-align: center;
|
|
4
|
+
overflow-x: auto;
|
|
4
5
|
|
|
5
6
|
img {
|
|
6
7
|
width: 100%;
|
|
@@ -8,7 +9,14 @@
|
|
|
8
9
|
transition: all 250ms ease-in-out;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
.reaction-title {
|
|
13
|
+
margin: 16px auto;
|
|
14
|
+
font-size: 18px;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.reaction-list {
|
|
19
|
+
padding: 8px;
|
|
12
20
|
display: flex;
|
|
13
21
|
flex-direction: row;
|
|
14
22
|
gap: 16px;
|
|
@@ -17,9 +25,13 @@
|
|
|
17
25
|
margin: 0;
|
|
18
26
|
|
|
19
27
|
list-style-type: none;
|
|
28
|
+
|
|
29
|
+
@media (max-width: 580px) {
|
|
30
|
+
gap: 12px;
|
|
31
|
+
}
|
|
20
32
|
}
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
.reaction-item {
|
|
23
35
|
display: flex;
|
|
24
36
|
flex-direction: column;
|
|
25
37
|
align-items: center;
|
|
@@ -30,28 +42,33 @@
|
|
|
30
42
|
transform: scale(1.15);
|
|
31
43
|
}
|
|
32
44
|
|
|
33
|
-
&.active
|
|
34
|
-
|
|
45
|
+
&.active {
|
|
46
|
+
.reaction-votes {
|
|
35
47
|
background: var(--waline-theme-color);
|
|
36
48
|
color: var(--waline-bgcolor);
|
|
37
49
|
}
|
|
38
50
|
|
|
39
|
-
|
|
51
|
+
.reaction-text {
|
|
40
52
|
color: var(--waline-theme-color);
|
|
41
53
|
}
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
.reaction-img {
|
|
46
58
|
position: relative;
|
|
47
59
|
width: 42px;
|
|
48
60
|
height: 42px;
|
|
61
|
+
|
|
62
|
+
@media (max-width: 580px) {
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
}
|
|
49
66
|
}
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
.reaction-loading {
|
|
52
69
|
position: absolute;
|
|
53
70
|
top: -4px;
|
|
54
|
-
|
|
71
|
+
inset-inline-end: -5px;
|
|
55
72
|
|
|
56
73
|
width: 18px;
|
|
57
74
|
height: 18px;
|
|
@@ -59,10 +76,10 @@
|
|
|
59
76
|
color: var(--waline-theme-color);
|
|
60
77
|
}
|
|
61
78
|
|
|
62
|
-
|
|
79
|
+
.reaction-votes {
|
|
63
80
|
position: absolute;
|
|
64
|
-
top: -
|
|
65
|
-
|
|
81
|
+
top: -9px;
|
|
82
|
+
inset-inline-end: -9px;
|
|
66
83
|
|
|
67
84
|
min-width: 1em;
|
|
68
85
|
padding: 2px;
|
|
@@ -77,7 +94,7 @@
|
|
|
77
94
|
line-height: 1;
|
|
78
95
|
}
|
|
79
96
|
|
|
80
|
-
|
|
97
|
+
.reaction-text {
|
|
81
98
|
font-size: 0.875em;
|
|
82
99
|
}
|
|
83
100
|
}
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
|
|
40
|
-
margin-
|
|
40
|
+
margin-inline-end: 10px;
|
|
41
41
|
border-radius: 4px;
|
|
42
42
|
|
|
43
43
|
line-height: 0;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
.wl-user-badge {
|
|
52
52
|
position: absolute;
|
|
53
|
-
|
|
53
|
+
inset-inline-end: 0;
|
|
54
54
|
bottom: 0;
|
|
55
55
|
|
|
56
56
|
min-width: 0.7em;
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
display: inline-block;
|
|
77
77
|
vertical-align: text-top;
|
|
78
78
|
|
|
79
|
-
margin-
|
|
79
|
+
margin-inline-start: 0.5em;
|
|
80
80
|
padding: 0 0.3em;
|
|
81
81
|
border: 1px solid var(--waline-badge-color);
|
|
82
82
|
border-radius: 4px;
|
package/src/utils/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export const getConfig = ({
|
|
|
68
68
|
serverURL,
|
|
69
69
|
|
|
70
70
|
path = location.pathname,
|
|
71
|
-
lang = navigator.language,
|
|
71
|
+
lang = typeof navigator === 'undefined' ? 'en-US' : navigator.language,
|
|
72
72
|
locale,
|
|
73
73
|
emoji = defaultEmoji,
|
|
74
74
|
meta = ['nick', 'mail', 'link'],
|
|
@@ -99,7 +99,7 @@ export const getConfig = ({
|
|
|
99
99
|
imageUploader: fallback(imageUploader, defaultUploadImage),
|
|
100
100
|
highlighter: fallback(highlighter, defaultHighlighter),
|
|
101
101
|
texRenderer: fallback(texRenderer, defaultTexRenderer),
|
|
102
|
-
lang,
|
|
102
|
+
lang: Object.keys(defaultLocales).includes(lang) ? lang : 'en-US',
|
|
103
103
|
dark,
|
|
104
104
|
emoji: typeof emoji === 'boolean' ? (emoji ? defaultEmoji : []) : emoji,
|
|
105
105
|
pageSize,
|