Skip to content

Commit 1146332

Browse files
committed
merge client source code
1 parent 153f27b commit 1146332

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3040
-160
lines changed

components.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,48 @@ export {}
88
declare module '@vue/runtime-core' {
99
export interface GlobalComponents {
1010
DatePickerDialog: typeof import('./src/components/DatePickerDialog.vue')['default']
11+
ElAlert: typeof import('element-plus/es')['ElAlert']
12+
ElAvatar: typeof import('element-plus/es')['ElAvatar']
13+
ElButton: typeof import('element-plus/es')['ElButton']
14+
ElCard: typeof import('element-plus/es')['ElCard']
15+
ElCarousel: typeof import('element-plus/es')['ElCarousel']
16+
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
17+
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
18+
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
19+
ElCol: typeof import('element-plus/es')['ElCol']
20+
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
21+
ElDialog: typeof import('element-plus/es')['ElDialog']
22+
ElDivider: typeof import('element-plus/es')['ElDivider']
23+
ElForm: typeof import('element-plus/es')['ElForm']
24+
ElFormItem: typeof import('element-plus/es')['ElFormItem']
25+
ElImage: typeof import('element-plus/es')['ElImage']
26+
ElInput: typeof import('element-plus/es')['ElInput']
27+
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
28+
ElOption: typeof import('element-plus/es')['ElOption']
29+
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
30+
ElRadio: typeof import('element-plus/es')['ElRadio']
31+
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
32+
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
33+
ElRow: typeof import('element-plus/es')['ElRow']
34+
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
35+
ElSelect: typeof import('element-plus/es')['ElSelect']
36+
ElSwitch: typeof import('element-plus/es')['ElSwitch']
37+
ElTable: typeof import('element-plus/es')['ElTable']
38+
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
39+
ElTabPane: typeof import('element-plus/es')['ElTabPane']
40+
ElTabs: typeof import('element-plus/es')['ElTabs']
41+
ElTag: typeof import('element-plus/es')['ElTag']
42+
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
43+
ElTooltip: typeof import('element-plus/es')['ElTooltip']
44+
FontSelector: typeof import('./src/components/FontSelector.vue')['default']
1145
LunarDatePicker: typeof import('./src/components/LunarDatePicker.vue')['default']
1246
RouterLink: typeof import('vue-router')['RouterLink']
1347
RouterView: typeof import('vue-router')['RouterView']
1448
SolarDatePicker: typeof import('./src/components/SolarDatePicker.vue')['default']
1549
TimePicker: typeof import('./src/components/TimePicker.vue')['default']
1650
TimePickerDialog: typeof import('./src/components/TimePickerDialog.vue')['default']
1751
}
52+
export interface ComponentCustomProperties {
53+
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
54+
}
1855
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8"/>
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
5+
<link rel="icon" type="image/svg+xml" href="/favicon.ico"/>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
77
<title>Widget</title>
88
</head>

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
},
1717
"dependencies": {
1818
"@icon-park/vue-next": "^1.4.2",
19+
"@lobehub/icons": "^1.76.0",
1920
"@vueuse/core": "^9.4.0",
2021
"@vueuse/integrations": "^10.5.0",
2122
"@vueuse/motion": "2.0.0-beta.12",
2223
"@vueuse/router": "^9.9.0",
2324
"@widget-js/core": "^24.1.1-beta.34",
2425
"@widget-js/vue3": "^24.1.1-beta.33",
26+
"@widget-js/web-api": "workspace:*",
2527
"animate.css": "^4.1.1",
2628
"axios": "^1.6.0",
2729
"color": "^4.2.3",
@@ -36,11 +38,11 @@
3638
"lyric-resolver": "^0.1.6",
3739
"nanoid": "^4.0.2",
3840
"pinia": "^2.1.6",
39-
"rrule": "^2.7.2",
40-
"sortablejs": "^1.15.0",
41-
"vue": "^3.3.4",
41+
"qs": "^6.11.2",
42+
"semver": "^7.6.0",
43+
"vue": "^3.5.13",
4244
"vue-demi": "^0.14.5",
43-
"vue-i18n": "^9.2.2",
45+
"vue-i18n": "10.0.5",
4446
"vue-router": "^4.2.4",
4547
"vue-scroll-picker": "^1.1.3"
4648
},
@@ -65,7 +67,6 @@
6567
"postcss": "^8.4.21",
6668
"raw-loader": "^4.0.2",
6769
"sass": "^1.56.0",
68-
"sass-loader": "^12.0.0",
6970
"simple-git-hooks": "^2.9.0",
7071
"style-loader": "^3.3.1",
7172
"ts-loader": "^8.3.0",

public/favicon.ico

10.5 KB
Binary file not shown.

public/widget.json

Lines changed: 57 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,54 @@
4646
],
4747
"supportDeployMode": 17,
4848
"configPagePath": "/widget/config/wave_progress?frame=true&transparent=false&width=600&height=390",
49-
"routes": []
49+
"routes": [],
50+
"socialLinks": [
51+
{
52+
"name": "github",
53+
"link": "https://github.com/widget-js/widgets"
54+
}
55+
]
5056
},
5157
{
52-
"name": "cn.widgetjs.widgets.todo_list",
58+
"name": "cn.widgetjs.widgets.sit_reminder",
5359
"title": {
54-
"zh-CN": "待办事项"
60+
"zh-CN": "久坐提醒"
5561
},
5662
"description": {
57-
"zh-CN": "TODO待办事项"
63+
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
5864
},
5965
"keywords": [
6066
"recommend"
6167
],
6268
"security": false,
6369
"permissions": [],
6470
"lang": "zh-CN",
65-
"width": 4,
66-
"height": 4,
67-
"maxWidth": 8,
71+
"width": 1,
72+
"height": 1,
73+
"maxWidth": 1,
6874
"webviewTag": false,
69-
"maxHeight": 10,
70-
"minWidth": 3,
71-
"minHeight": 3,
75+
"maxHeight": 1,
76+
"minWidth": 1,
77+
"minHeight": 1,
7278
"movable": true,
7379
"singleton": false,
7480
"resizable": true,
75-
"path": "/widget/todo_list",
81+
"path": "/widget/sit_reminder",
7682
"meta": {},
77-
"backgroundThrottling": true,
78-
"previewImage": "/images/preview_todo_list.png",
83+
"backgroundThrottling": false,
84+
"previewImage": "/images/preview_sit_reminder.png",
7985
"categories": [
80-
"productivity"
86+
"utilities"
8187
],
82-
"supportDeployMode": 17,
83-
"configPagePath": "/widget/config/todo_list?frame=true&transparent=false&width=600&height=500",
84-
"routes": []
88+
"supportDeployMode": 65536,
89+
"configPagePath": "/widget/config/sit_reminder?frame=true&transparent=false",
90+
"routes": [],
91+
"socialLinks": [
92+
{
93+
"name": "github",
94+
"link": "https://github.com/widget-js/widgets"
95+
}
96+
]
8597
},
8698
{
8799
"name": "cn.widgetjs.widgets.time_progress",
@@ -116,42 +128,13 @@
116128
],
117129
"supportDeployMode": 17,
118130
"configPagePath": "/widget/config/time_progress?frame=true&transparent=false&width=600&height=400",
119-
"routes": []
120-
},
121-
{
122-
"name": "cn.widgetjs.widgets.sit_reminder",
123-
"title": {
124-
"zh-CN": "久坐提醒"
125-
},
126-
"description": {
127-
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
128-
},
129-
"keywords": [
130-
"recommend"
131-
],
132-
"security": false,
133-
"permissions": [],
134-
"lang": "zh-CN",
135-
"width": 1,
136-
"height": 1,
137-
"maxWidth": 1,
138-
"webviewTag": false,
139-
"maxHeight": 1,
140-
"minWidth": 1,
141-
"minHeight": 1,
142-
"movable": true,
143-
"singleton": false,
144-
"resizable": true,
145-
"path": "/widget/sit_reminder",
146-
"meta": {},
147-
"backgroundThrottling": false,
148-
"previewImage": "/images/preview_sit_reminder.png",
149-
"categories": [
150-
"utilities"
151-
],
152-
"supportDeployMode": 65536,
153-
"configPagePath": "/widget/config/sit_reminder?frame=true&transparent=false",
154-
"routes": []
131+
"routes": [],
132+
"socialLinks": [
133+
{
134+
"name": "github",
135+
"link": "https://github.com/widget-js/widgets"
136+
}
137+
]
155138
},
156139
{
157140
"name": "cn.widgetjs.widgets.phone_reminder",
@@ -186,7 +169,13 @@
186169
],
187170
"supportDeployMode": 65536,
188171
"configPagePath": "/widget/config/phone_reminder?frame=true&transparent=false",
189-
"routes": []
172+
"routes": [],
173+
"socialLinks": [
174+
{
175+
"name": "github",
176+
"link": "https://github.com/widget-js/widgets"
177+
}
178+
]
190179
},
191180
{
192181
"name": "cn.widgetjs.widgets.labor_progress",
@@ -221,7 +210,13 @@
221210
],
222211
"supportDeployMode": 17,
223212
"configPagePath": "/widget/config/labor_progress?frame=true&transparent=false",
224-
"routes": []
213+
"routes": [],
214+
"socialLinks": [
215+
{
216+
"name": "github",
217+
"link": "https://github.com/widget-js/widgets"
218+
}
219+
]
225220
},
226221
{
227222
"name": "cn.widgetjs.widgets.dynamic_island",
@@ -256,77 +251,13 @@
256251
],
257252
"supportDeployMode": 65536,
258253
"configPagePath": "/widget/config/dynamic_island?frame=true&transparent=false",
259-
"routes": []
260-
},
261-
{
262-
"name": "cn.widgetjs.widgets.countdown",
263-
"title": {
264-
"zh-CN": "倒计时"
265-
},
266-
"description": {
267-
"zh-CN": "简单的倒计时组件,支持农历"
268-
},
269-
"keywords": [
270-
"recommend"
271-
],
272-
"security": false,
273-
"permissions": [],
274-
"lang": "zh-CN",
275-
"width": 2,
276-
"height": 2,
277-
"maxWidth": 4,
278-
"webviewTag": false,
279-
"maxHeight": 4,
280-
"minWidth": 2,
281-
"minHeight": 2,
282-
"movable": true,
283-
"singleton": false,
284-
"resizable": true,
285-
"path": "/widget/countdown",
286-
"meta": {},
287-
"backgroundThrottling": true,
288-
"previewImage": "/images/preview_countdown.png",
289-
"categories": [
290-
"countdown"
291-
],
292-
"supportDeployMode": 17,
293-
"configPagePath": "/widget/config/countdown?frame=true&transparent=false&width=600&height=500",
294-
"routes": []
295-
},
296-
{
297-
"name": "cn.widgetjs.widgets.birthday_list",
298-
"title": {
299-
"zh-CN": "生日列表"
300-
},
301-
"description": {
302-
"zh-CN": "自动倒计时的生日列表"
303-
},
304-
"keywords": [
305-
"recommend"
306-
],
307-
"security": false,
308-
"permissions": [],
309-
"lang": "zh-CN",
310-
"width": 4,
311-
"height": 4,
312-
"maxWidth": 4,
313-
"webviewTag": false,
314-
"maxHeight": 6,
315-
"minWidth": 3,
316-
"minHeight": 3,
317-
"movable": true,
318-
"singleton": false,
319-
"resizable": true,
320-
"path": "/widget/birthday_list",
321-
"meta": {},
322-
"backgroundThrottling": true,
323-
"previewImage": "/images/preview_birthday_list.png",
324-
"categories": [
325-
"countdown"
326-
],
327-
"supportDeployMode": 17,
328-
"configPagePath": "/widget/config/birthday_list?frame=true&transparent=false",
329-
"routes": []
254+
"routes": [],
255+
"socialLinks": [
256+
{
257+
"name": "github",
258+
"link": "https://github.com/widget-js/widgets"
259+
}
260+
]
330261
}
331262
],
332263
"pages": []

src/App.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
<script setup>
2+
import { useAppLanguage } from '@widget-js/vue3'
3+
import { i18n } from '@/i18n/i18n'
4+
5+
useAppLanguage({
6+
onLoad: (lang) => {
7+
i18n.global.locale.value = lang
8+
},
9+
onChange: (lang) => {
10+
i18n.global.locale.value = lang
11+
},
12+
})
13+
</script>
14+
115
<template>
216
<router-view />
317
</template>

src/api/WebWidgetApi.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Pagination, WebWidget, WidgetSearchOptions } from '@widget-js/web-api'
2+
import { widgetServerApi } from '@/api/axios'
3+
4+
export class WebWidgetApi {
5+
static search(options: WidgetSearchOptions): Promise<Pagination<WebWidget>> {
6+
return widgetServerApi.get('/widget', { params: options })
7+
}
8+
}

0 commit comments

Comments
 (0)