Skip to content

Commit b83e9e8

Browse files
committed
Fix language code update condition and rename widget configurations for labor progress and sit reminder
1 parent dd737fd commit b83e9e8

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

public/widget.json

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -96,38 +96,38 @@
9696
]
9797
},
9898
{
99-
"name": "cn.widgetjs.widgets.sit_reminder",
99+
"name": "cn.widgetjs.widgets.labor_progress",
100100
"title": {
101-
"zh-CN": "久坐提醒"
101+
"zh-CN": "打工进度"
102102
},
103103
"description": {
104-
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
104+
"zh-CN": "打工人,打工魂"
105105
},
106106
"keywords": [
107107
"recommend"
108108
],
109109
"security": false,
110110
"permissions": [],
111111
"lang": "zh-CN",
112-
"width": 1,
112+
"width": 4,
113113
"height": 1,
114-
"maxWidth": 1,
114+
"maxWidth": 6,
115115
"webviewTag": false,
116-
"maxHeight": 1,
117-
"minWidth": 1,
116+
"maxHeight": 2,
117+
"minWidth": 3,
118118
"minHeight": 1,
119119
"movable": true,
120120
"singleton": false,
121121
"resizable": true,
122-
"path": "/widget/sit_reminder",
122+
"path": "/widget/labor_progress",
123123
"meta": {},
124-
"backgroundThrottling": false,
125-
"previewImage": "/images/preview_sit_reminder.png",
124+
"backgroundThrottling": true,
125+
"previewImage": "/images/preview_labor_progress.png",
126126
"categories": [
127-
"utilities"
127+
"fun"
128128
],
129-
"supportDeployMode": 65536,
130-
"configPagePath": "/widget/config/sit_reminder?frame=true&transparent=false",
129+
"supportDeployMode": 17,
130+
"configPagePath": "/widget/config/labor_progress?frame=true&transparent=false",
131131
"routes": [],
132132
"socialLinks": [
133133
{
@@ -178,38 +178,38 @@
178178
]
179179
},
180180
{
181-
"name": "cn.widgetjs.widgets.labor_progress",
181+
"name": "cn.widgetjs.widgets.dynamic_island",
182182
"title": {
183-
"zh-CN": "打工进度"
183+
"zh-CN": "久坐提醒"
184184
},
185185
"description": {
186-
"zh-CN": "打工人,打工魂"
186+
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
187187
},
188188
"keywords": [
189189
"recommend"
190190
],
191191
"security": false,
192192
"permissions": [],
193193
"lang": "zh-CN",
194-
"width": 4,
195-
"height": 1,
194+
"width": 6,
195+
"height": 4,
196196
"maxWidth": 6,
197197
"webviewTag": false,
198-
"maxHeight": 2,
199-
"minWidth": 3,
200-
"minHeight": 1,
198+
"maxHeight": 4,
199+
"minWidth": 6,
200+
"minHeight": 4,
201201
"movable": true,
202202
"singleton": false,
203203
"resizable": true,
204-
"path": "/widget/labor_progress",
204+
"path": "/widget/dynamic_island",
205205
"meta": {},
206206
"backgroundThrottling": true,
207-
"previewImage": "/images/preview_labor_progress.png",
207+
"previewImage": "/images/preview_sit_reminder.png",
208208
"categories": [
209-
"fun"
209+
"utilities"
210210
],
211-
"supportDeployMode": 17,
212-
"configPagePath": "/widget/config/labor_progress?frame=true&transparent=false",
211+
"supportDeployMode": 65536,
212+
"configPagePath": "/widget/config/dynamic_island?frame=true&transparent=false",
213213
"routes": [],
214214
"socialLinks": [
215215
{
@@ -219,7 +219,7 @@
219219
]
220220
},
221221
{
222-
"name": "cn.widgetjs.widgets.dynamic_island",
222+
"name": "cn.widgetjs.widgets.sit_reminder",
223223
"title": {
224224
"zh-CN": "久坐提醒"
225225
},
@@ -232,25 +232,25 @@
232232
"security": false,
233233
"permissions": [],
234234
"lang": "zh-CN",
235-
"width": 6,
236-
"height": 4,
237-
"maxWidth": 6,
235+
"width": 1,
236+
"height": 1,
237+
"maxWidth": 1,
238238
"webviewTag": false,
239-
"maxHeight": 4,
240-
"minWidth": 6,
241-
"minHeight": 4,
239+
"maxHeight": 1,
240+
"minWidth": 1,
241+
"minHeight": 1,
242242
"movable": true,
243243
"singleton": false,
244244
"resizable": true,
245-
"path": "/widget/dynamic_island",
245+
"path": "/widget/sit_reminder",
246246
"meta": {},
247-
"backgroundThrottling": true,
247+
"backgroundThrottling": false,
248248
"previewImage": "/images/preview_sit_reminder.png",
249249
"categories": [
250250
"utilities"
251251
],
252252
"supportDeployMode": 65536,
253-
"configPagePath": "/widget/config/dynamic_island?frame=true&transparent=false",
253+
"configPagePath": "/widget/config/sit_reminder?frame=true&transparent=false",
254254
"routes": [],
255255
"socialLinks": [
256256
{

src/composition/useAppConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function useLanguageConfig() {
3535
})
3636

3737
watch(languageCode, async (newValue) => {
38-
if (inited) {
38+
if (inited && newValue) {
3939
await AppApi.setLanguageCode(newValue as LanguageCode)
4040
}
4141
})

0 commit comments

Comments
 (0)