forked from element-plus/element-plus
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(notification): migrated notification module from plugins to buil…
…t-in
- Loading branch information
Showing
29 changed files
with
1,284 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
const notification: LViewsNotification = { | ||
navActions: { | ||
new: { | ||
label: 'New Notification', | ||
tooltip: 'Create a new notification', | ||
}, | ||
}, | ||
settings: { | ||
form: { | ||
name: 'Name', | ||
description: 'Description', | ||
type: 'Type', | ||
enabled: 'Enabled', | ||
title: 'Title', | ||
template: 'Template', | ||
templateContent: 'Template Content', | ||
mail: { | ||
smtp: { | ||
server: 'SMTP Server', | ||
port: 'SMTP Port', | ||
user: 'SMTP User', | ||
password: 'SMTP Password', | ||
sender: { | ||
email: 'Sender Email', | ||
identity: 'Sender Identity', | ||
}, | ||
}, | ||
to: 'To', | ||
cc: 'CC', | ||
}, | ||
mobile: { | ||
webhook: 'Webhook', | ||
}, | ||
}, | ||
type: { | ||
mail: 'Mail', | ||
mobile: 'Mobile', | ||
}, | ||
}, | ||
triggers: { | ||
models: { | ||
tags: 'Tags', | ||
nodes: 'Nodes', | ||
projects: 'Projects', | ||
spiders: 'Spiders', | ||
tasks: 'Tasks', | ||
jobs: 'Jobs', | ||
schedules: 'Schedules', | ||
users: 'Users', | ||
settings: 'Settings', | ||
tokens: 'Tokens', | ||
variables: 'Variables', | ||
task_stats: 'Task Stats', | ||
plugins: 'Plugins', | ||
spider_stats: 'Spider Stats', | ||
data_sources: 'Data Sources', | ||
data_collections: 'Data Collections', | ||
passwords: 'Passwords', | ||
}, | ||
}, | ||
tabs: { | ||
overview: 'Overview', | ||
triggers: 'Triggers', | ||
template: 'Template', | ||
}, | ||
}; | ||
|
||
export default notification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
const notification: LViewsNotification = { | ||
navActions: { | ||
new: { | ||
label: '新建通知', | ||
tooltip: '创建一个新的通知', | ||
}, | ||
}, | ||
settings: { | ||
form: { | ||
name: '名称', | ||
description: '描述', | ||
type: '类型', | ||
enabled: '是否启用', | ||
title: '标题', | ||
template: '模板', | ||
templateContent: '模板内容', | ||
mail: { | ||
smtp: { | ||
server: 'SMTP 服务器', | ||
port: 'SMTP 端口', | ||
user: 'SMTP 用户', | ||
password: 'SMTP 密码', | ||
sender: { | ||
email: '发件人邮箱', | ||
identity: '发件人身份', | ||
}, | ||
}, | ||
to: '收件人', | ||
cc: '抄送', | ||
}, | ||
mobile: { | ||
webhook: 'Webhook', | ||
}, | ||
}, | ||
type: { | ||
mail: '邮件', | ||
mobile: '移动端', | ||
}, | ||
}, | ||
triggers: { | ||
models: { | ||
tags: '标签', | ||
nodes: '节点', | ||
projects: '项目', | ||
spiders: '爬虫', | ||
tasks: '任务', | ||
jobs: '作业', | ||
schedules: '调度', | ||
users: '用户', | ||
settings: '设置', | ||
tokens: '令牌', | ||
variables: '变量', | ||
task_stats: '任务统计', | ||
plugins: '插件', | ||
spider_stats: '爬虫统计', | ||
data_sources: '数据源', | ||
data_collections: '数据集', | ||
passwords: '密码', | ||
} | ||
}, | ||
tabs: { | ||
overview: '概览', | ||
triggers: '触发器', | ||
template: '模板', | ||
}, | ||
}; | ||
|
||
export default notification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
interface LViewsNotification { | ||
navActions: LNavActions; | ||
settings: { | ||
form: { | ||
name: string; | ||
description: string; | ||
type: string; | ||
enabled: string; | ||
title: string; | ||
template: string; | ||
templateContent: string; | ||
mail: { | ||
smtp: { | ||
server: string; | ||
port: string; | ||
user: string; | ||
password: string; | ||
sender: { | ||
email: string; | ||
identity: string; | ||
}; | ||
}; | ||
to: string; | ||
cc: string; | ||
}; | ||
mobile: { | ||
webhook: string; | ||
}; | ||
}; | ||
type: { | ||
mail: string; | ||
mobile: string; | ||
}; | ||
}; | ||
triggers: { | ||
models: { | ||
tags: string; | ||
nodes: string; | ||
projects: string; | ||
spiders: string; | ||
tasks: string; | ||
jobs: string; | ||
schedules: string; | ||
users: string; | ||
settings: string; | ||
tokens: string; | ||
variables: string; | ||
task_stats: string; | ||
plugins: string; | ||
spider_stats: string; | ||
data_sources: string; | ||
data_collections: string; | ||
passwords: string; | ||
}; | ||
}; | ||
tabs: { | ||
overview: string; | ||
triggers: string; | ||
template: string; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export declare global { | ||
interface NotificationSetting extends BaseModel { | ||
type?: string; | ||
name?: string; | ||
description?: string; | ||
enabled?: boolean; | ||
global?: boolean; | ||
title?: string; | ||
template?: string; | ||
triggers?: string[]; | ||
targets?: NotificationSettingTarget[]; | ||
mail?: NotificationSettingMail; | ||
mobile?: NotificationSettingMobile; | ||
} | ||
|
||
interface NotificationSettingMail { | ||
server?: string; | ||
port?: string; | ||
user?: string; | ||
password?: string; | ||
sender_email?: string; | ||
sender_identity?: string; | ||
to?: string; | ||
cc?: string; | ||
} | ||
|
||
interface NotificationSettingMobile { | ||
webhook?: string; | ||
} | ||
|
||
interface NotificationSettingTarget extends BaseModel { | ||
model?: string; | ||
} | ||
|
||
interface NotificationSettingTrigger { | ||
name?: string; | ||
event?: string; | ||
} | ||
} |
Oops, something went wrong.