@waline/client 2.5.0 → 2.5.1
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/component.esm.js +1 -1
- package/dist/component.esm.js.map +1 -1
- package/dist/component.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/dist/pageview.cjs.js +1 -1
- package/dist/pageview.esm.js +1 -1
- package/dist/pageview.js +1 -1
- package/dist/shim.esm.js +1 -1
- package/dist/shim.esm.js.map +1 -1
- package/dist/shim.js +1 -1
- package/dist/shim.js.map +1 -1
- package/dist/waline.cjs.js +1 -1
- package/dist/waline.cjs.js.map +1 -1
- package/dist/waline.css +1 -1
- package/dist/waline.css.map +1 -1
- package/dist/waline.esm.js +1 -1
- package/dist/waline.esm.js.map +1 -1
- package/dist/waline.js +1 -1
- package/dist/waline.js.map +1 -1
- package/package.json +19 -20
- package/src/components/CommentBox.vue +30 -42
- package/src/components/CommentCard.vue +1 -1
- package/src/components/ImageWall.vue +152 -0
- package/src/composables/like.ts +1 -1
- package/src/init.ts +2 -7
- package/src/styles/emoji.scss +92 -94
- package/src/styles/gif.scss +58 -139
- package/src/styles/index.scss +3 -0
- package/src/styles/panel.scss +0 -6
- package/src/utils/fetchGif.ts +1 -0
- package/src/utils/throttle.ts +5 -6
package/src/styles/gif.scss
CHANGED
|
@@ -1,151 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
input {
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
|
|
32
|
-
width: 100%;
|
|
33
|
-
margin-bottom: 10px;
|
|
34
|
-
padding: 3px 5px;
|
|
35
|
-
border: var(--waline-border);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
img {
|
|
39
|
-
display: block;
|
|
40
|
-
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
|
|
43
|
-
width: 100%;
|
|
44
|
-
border-width: 2px;
|
|
45
|
-
border-style: solid;
|
|
46
|
-
border-color: #fff;
|
|
47
|
-
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
|
|
50
|
-
&:hover {
|
|
51
|
-
border-color: var(--waline-theme-color);
|
|
52
|
-
border-radius: 2px;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.wl-gif-waterfall {
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
max-height: 800px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
button {
|
|
62
|
-
display: inline-block;
|
|
63
|
-
vertical-align: middle;
|
|
64
|
-
|
|
65
|
-
width: 2em;
|
|
66
|
-
margin: 0.125em;
|
|
67
|
-
padding: 0;
|
|
68
|
-
border-width: 0;
|
|
69
|
-
|
|
70
|
-
background: transparent;
|
|
71
|
-
|
|
72
|
-
font-size: inherit;
|
|
73
|
-
line-height: 2;
|
|
74
|
-
text-align: center;
|
|
75
|
-
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
|
|
78
|
-
&:hover {
|
|
79
|
-
background: var(--waline-bgcolor-hover);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.wl-gif {
|
|
84
|
-
display: inline-block;
|
|
85
|
-
vertical-align: middle;
|
|
86
|
-
max-width: 1.5em;
|
|
87
|
-
max-height: 1.5em;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.wl-tab-wrapper {
|
|
91
|
-
overflow-y: auto;
|
|
92
|
-
max-height: 145px;
|
|
93
|
-
padding: 0.5em;
|
|
94
|
-
|
|
95
|
-
&::-webkit-scrollbar {
|
|
96
|
-
width: 6px;
|
|
97
|
-
height: 6px;
|
|
98
|
-
}
|
|
1
|
+
.wl-gif-popup {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 100%;
|
|
4
|
+
left: 1.25em;
|
|
5
|
+
z-index: 10;
|
|
6
|
+
|
|
7
|
+
width: calc(100% - 3em);
|
|
8
|
+
padding: 0.75em 0.75em 0.25em;
|
|
9
|
+
border: var(--waline-border);
|
|
10
|
+
border-radius: 6px;
|
|
11
|
+
|
|
12
|
+
background: var(--waline-bgcolor);
|
|
13
|
+
box-shadow: var(--waline-box-shadow);
|
|
14
|
+
|
|
15
|
+
opacity: 0;
|
|
16
|
+
visibility: hidden;
|
|
17
|
+
|
|
18
|
+
transition: transform 0.2s ease-out, opacity 0.2s ease-out;
|
|
19
|
+
transform: scale(0.9, 0.9);
|
|
20
|
+
transform-origin: 0 0;
|
|
21
|
+
|
|
22
|
+
&.display {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
visibility: visible;
|
|
25
|
+
transform: none;
|
|
26
|
+
}
|
|
99
27
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
border-radius: 6px;
|
|
103
|
-
background: rgb(0 0 0 / 10%);
|
|
104
|
-
}
|
|
28
|
+
input {
|
|
29
|
+
box-sizing: border-box;
|
|
105
30
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
}
|
|
31
|
+
width: 100%;
|
|
32
|
+
margin-bottom: 10px;
|
|
33
|
+
padding: 3px 5px;
|
|
34
|
+
border: var(--waline-border);
|
|
35
|
+
}
|
|
113
36
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
height: 2em;
|
|
117
|
-
padding: 0 6px 1px;
|
|
37
|
+
img {
|
|
38
|
+
display: block;
|
|
118
39
|
|
|
119
|
-
|
|
120
|
-
content: ' ';
|
|
40
|
+
box-sizing: border-box;
|
|
121
41
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
z-index: 2;
|
|
42
|
+
width: 100%;
|
|
43
|
+
border-width: 2px;
|
|
44
|
+
border-style: solid;
|
|
45
|
+
border-color: #fff;
|
|
127
46
|
|
|
128
|
-
|
|
47
|
+
cursor: pointer;
|
|
129
48
|
|
|
130
|
-
|
|
131
|
-
|
|
49
|
+
&:hover {
|
|
50
|
+
border-color: var(--waline-theme-color);
|
|
51
|
+
border-radius: 2px;
|
|
132
52
|
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
133
55
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
&.active {
|
|
140
|
-
z-index: 3;
|
|
56
|
+
.wl-gallery {
|
|
57
|
+
max-height: 80vh;
|
|
58
|
+
display: flex;
|
|
59
|
+
overflow-y: auto;
|
|
60
|
+
}
|
|
141
61
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
62
|
+
.wl-gallery-column {
|
|
63
|
+
height: -webkit-max-content;
|
|
64
|
+
height: -moz-max-content;
|
|
65
|
+
height: max-content;
|
|
146
66
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
67
|
+
flex: 1;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
151
70
|
}
|
package/src/styles/index.scss
CHANGED
package/src/styles/panel.scss
CHANGED
package/src/utils/fetchGif.ts
CHANGED
|
@@ -56,6 +56,7 @@ export const fetchGif = ({
|
|
|
56
56
|
|
|
57
57
|
return fetch(`${baseUrl}?${query.toString()}`, {
|
|
58
58
|
headers: {
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
59
60
|
'Content-Type': 'application/json',
|
|
60
61
|
},
|
|
61
62
|
}).then((resp) => resp.json() as Promise<FetchGifResponse>);
|
package/src/utils/throttle.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const throttle = (
|
|
2
2
|
func: (...args: any[]) => void,
|
|
3
3
|
timeout = 300
|
|
4
|
-
): (...args: []) => void {
|
|
4
|
+
): ((...args: []) => void) => {
|
|
5
5
|
let timer: number | null;
|
|
6
|
+
|
|
6
7
|
return (...args: []): void => {
|
|
7
|
-
if (timer)
|
|
8
|
-
clearTimeout(timer);
|
|
9
|
-
}
|
|
8
|
+
if (timer) clearTimeout(timer);
|
|
10
9
|
|
|
11
10
|
timer = window.setTimeout(() => {
|
|
12
11
|
func(...args);
|
|
13
12
|
timer = null;
|
|
14
13
|
}, timeout);
|
|
15
14
|
};
|
|
16
|
-
}
|
|
15
|
+
};
|