artalk 2.1.6 → 2.1.9

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.
@@ -102,6 +102,12 @@
102
102
  color: #fff;
103
103
  }
104
104
 
105
+ .atk-pinned-badge {
106
+ .badge();
107
+ color: #fff;
108
+ background: #f44336;
109
+ }
110
+
105
111
  .atk-ua {
106
112
  .badge()
107
113
  }
@@ -206,6 +212,8 @@
206
212
  display: flex;
207
213
  flex-direction: row;
208
214
  align-items: center;
215
+ flex-wrap: wrap;
216
+ margin-bottom: -15px;
209
217
 
210
218
  & > span {
211
219
  color: var(--at-color-meta);
@@ -214,6 +222,7 @@
214
222
  display: inline-flex;
215
223
  cursor: pointer;
216
224
  user-select: none;
225
+ margin-bottom: 15px;
217
226
 
218
227
  &.atk-error, &.atk-error:hover {
219
228
  color: var(--at-color-red);
@@ -7,6 +7,72 @@
7
7
  padding: 10px 10px 5px 10px;
8
8
  border-bottom: 1px solid var(--at-color-border);
9
9
 
10
+ .atk-text {
11
+ display: inline-block;
12
+ }
13
+
14
+ /* 下拉选择层 */
15
+ .atk-dropdown-wrap {
16
+ position: relative;
17
+ cursor: pointer;
18
+
19
+ .atk-arrow-down-icon {
20
+ cursor: pointer;
21
+ vertical-align: middle;
22
+ border-top: 5px solid var(--at-color-grey);
23
+ border-left: 3px solid transparent;
24
+ border-right: 3px solid transparent;
25
+ margin-top: -1px;
26
+ margin-left: 0.4rem;
27
+ display: inline-block;
28
+ }
29
+
30
+ &:hover {
31
+ .atk-dropdown {
32
+ display: block;
33
+ }
34
+ }
35
+
36
+ .atk-dropdown {
37
+ z-index: 888;
38
+ display: none;
39
+ height: auto !important;
40
+ max-height: calc(100vh - 2.7rem);
41
+ overflow-y: auto;
42
+ position: absolute;
43
+ top: 100%;
44
+ right: 0;
45
+ width: 100%;
46
+ background-color: var(--at-color-bg);
47
+ padding: 0.6rem 0;
48
+ border: 1px solid var(--at-color-border);
49
+ text-align: center;
50
+ border-radius: 0.25rem;
51
+ white-space: nowrap;
52
+ margin: 0;
53
+ list-style: none;
54
+ }
55
+
56
+ .atk-dropdown-item {
57
+ span, a {
58
+ display: block;
59
+ line-height: 2rem;
60
+ position: relative;
61
+ border-bottom: none;
62
+ font-weight: 400;
63
+ padding: 0 1.5rem;
64
+
65
+ &:hover {
66
+ color: var(--at-color-main);
67
+ }
68
+ }
69
+
70
+ &.active span, a {
71
+ color: var(--at-color-main);
72
+ }
73
+ }
74
+ }
75
+
10
76
  .atk-comment-count {
11
77
  font-size: 15px;
12
78
 
@@ -61,7 +127,10 @@
61
127
  & > .atk-list-body {
62
128
  min-height: 150px;
63
129
 
64
- & > .atk-list-comments-wrap {
130
+ .atk-list-comments-wrap {
131
+ .atk-main-editor {
132
+ margin-top: -1px;
133
+ }
65
134
  }
66
135
  }
67
136
 
package/tsconfig.json CHANGED
@@ -21,7 +21,8 @@
21
21
  "paths": {
22
22
  "~/*": ["./*"],
23
23
  "@/*": ["./src/*"]
24
- }
24
+ },
25
+ "types": ["vite/client"]
25
26
  },
26
27
  "include": ["./src", "./types"]
27
28
  }
@@ -80,6 +80,12 @@ export default interface ArtalkConfig {
80
80
  /** 显示 UA 徽标 */
81
81
  uaBadge?: boolean
82
82
 
83
+ /** 评论列表排序功能 (显示 Dropdown) */
84
+ listSort?: boolean
85
+
86
+ /** 图片上传功能 */
87
+ imgUpload?: boolean
88
+
83
89
  /** 版本检测 */
84
90
  versionCheck?: boolean
85
91
  }
@@ -29,6 +29,9 @@ export interface CommentData {
29
29
  /** 是否待审 */
30
30
  is_pending?: boolean
31
31
 
32
+ /** 是否置顶 */
33
+ is_pinned?: boolean
34
+
32
35
  /** 是否为管理员 */
33
36
  is_admin?: boolean
34
37
 
@@ -84,6 +87,9 @@ export interface ListData {
84
87
 
85
88
  /** API 版本 */
86
89
  api_version: ApiVersionData
90
+
91
+ /** 后端配置 */
92
+ conf: any // TODO
87
93
  }
88
94
 
89
95
  export interface PageData {
package/types/event.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface EventPayloadMap {
8
8
  'editor-submit': undefined // 编辑器提交时
9
9
  'editor-submitted': undefined // 编辑器提交后
10
10
  'user-changed': LocalUser // 本地用户数据变更时
11
+ 'conf-updated': undefined // Artalk 配置变更时
11
12
 
12
13
  // List 操作(外部:不建议 listen,仅 trigger)
13
14
  'list-reload': undefined // 重新加载 List
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />