Commit dbe497d
authored
131 refactor article (#133)
* feat(message-handler): enhance message handling for publish and account info
- Add new actions for handling publish requests, account info retrieval, and opening options page
- Implement popup creation for publishing and refreshing accounts
- Maintain current sync data for publish requests
* feat(publish): add publish component for handling content publishing
- Implement the Publish component to manage article, dynamic, podcast, and video processing
- Add functionality for image and file handling with blob URLs
- Integrate platform status updates and retry mechanism for publishing
- Enhance user notifications during the publishing process
* feat(sync): update SyncData interfaces and improve article processing
- Make injectUrl and extraConfig optional in SyncDataPlatform interface
- Update FileData interface to make type and size optional
- Refactor ArticleData to include htmlContent and make images optional
- Modify ArticleBaijiahao to process htmlContent instead of content for image handling
* refactor(sync): update article processing to use htmlContent
- Remove unused content state in ArticleTab component
- Update SyncData interface to include origin field for temporary storage
- Refactor article processing functions to handle htmlContent instead of content
- Adjust image handling in various article sync functions to use images array
* refactor(publish): improve tab management and error handling
- Replace platform status tracking with error handling for image and file processing
- Introduce functions for reloading and closing tabs, enhancing user interaction
- Update state management for published tabs and integrate error display in the UI
- Refactor publish component to streamline data handling and improve user notifications
* refactor(message-handler): improve tab creation and response handling
- Add focused option to popup creation based on request
- Refactor tab creation and script injection to use async/await for better error handling
- Enhance response structure for tab information after processing
* feat(refresh-accounts): update auto-close feature and improve state handling
- Change default state of autoClose to true for better user experience
- Refactor handleAutoCloseChange to use event parameter for clarity
- Update useEffect to handle undefined value for autoClose state
- Replace Button with Switch component for a more intuitive UI
* feat(localization): add new publishing messages and improve error handling
- Add localization messages for publishing content and related processes in English and Chinese
- Update error handling messages for content processing, image handling, and tab management
- Enhance user notifications during the publishing workflow
* feat(weixin): enhance article processing and image handling
- Add new fields to CropConfig and ShareImageInfo interfaces for better image management
- Update readInfo function to extract additional data (ticket and userName)
- Refactor getImageInfo to simplify image fetching and size retrieval
- Improve uploadImage function to handle image uploads more efficiently
- Introduce processContent function to manage image uploads within article content
- Update createArticle to support share image information and error handling1 parent 7c4688a commit dbe497d
File tree
17 files changed
+885
-233
lines changed- locales
- en
- zh_CN
- src
- background
- components/Sync
- sync
- article
- tabs
17 files changed
+885
-233
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
956 | 1001 | | |
957 | 1002 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
| 736 | + | |
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
930 | 975 | | |
931 | 976 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
96 | 81 | | |
97 | 82 | | |
98 | 83 | | |
| |||
114 | 99 | | |
115 | 100 | | |
116 | 101 | | |
| 102 | + | |
117 | 103 | | |
118 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
119 | 146 | | |
120 | 147 | | |
121 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
| |||
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
| 140 | + | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
| |||
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
156 | | - | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 156 | + | |
| 157 | + | |
165 | 158 | | |
166 | 159 | | |
167 | 160 | | |
| |||
205 | 198 | | |
206 | 199 | | |
207 | 200 | | |
208 | | - | |
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
| |||
236 | 228 | | |
237 | 229 | | |
238 | 230 | | |
239 | | - | |
240 | 231 | | |
241 | 232 | | |
242 | 233 | | |
| |||
261 | 252 | | |
262 | 253 | | |
263 | 254 | | |
264 | | - | |
265 | 255 | | |
266 | 256 | | |
267 | 257 | | |
| |||
294 | 284 | | |
295 | 285 | | |
296 | 286 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 287 | + | |
300 | 288 | | |
301 | 289 | | |
302 | 290 | | |
| |||
308 | 296 | | |
309 | 297 | | |
310 | 298 | | |
311 | | - | |
312 | 299 | | |
313 | 300 | | |
314 | 301 | | |
| |||
326 | 313 | | |
327 | 314 | | |
328 | 315 | | |
329 | | - | |
330 | 316 | | |
331 | 317 | | |
332 | | - | |
333 | | - | |
334 | 318 | | |
335 | 319 | | |
336 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | 11 | | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | | - | |
| 96 | + | |
100 | 97 | | |
101 | | - | |
| 98 | + | |
102 | 99 | | |
103 | 100 | | |
104 | 101 | | |
| |||
107 | 104 | | |
108 | 105 | | |
109 | 106 | | |
110 | | - | |
| 107 | + | |
111 | 108 | | |
112 | 109 | | |
113 | 110 | | |
| |||
167 | 164 | | |
168 | 165 | | |
169 | 166 | | |
170 | | - | |
171 | | - | |
| 167 | + | |
| 168 | + | |
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
| |||
183 | 180 | | |
184 | 181 | | |
185 | 182 | | |
186 | | - | |
| 183 | + | |
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
191 | | - | |
| 188 | + | |
| 189 | + | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
| |||
0 commit comments