mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 18:43:56 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,38 @@
|
||||
'use strict';
|
||||
'require form';
|
||||
'require fs';
|
||||
'require view';
|
||||
'require uci';
|
||||
'require ui';
|
||||
'require tools.widgets as widgets'
|
||||
|
||||
|
||||
return view.extend({
|
||||
render: function(data) {
|
||||
var m, s, o
|
||||
|
||||
m = new form.Map('telegrambot', _('TelegramBot'), _('Telegram bot for router with firmware Lede/Openwrt.'));
|
||||
s = m.section(form.TypedSection, 'telegram_bot', null);
|
||||
s.anonymous = true;
|
||||
|
||||
o = s.option(form.Flag, 'enabled', _('Enable'), _('Enable Bot'));
|
||||
o.rmempty = true;
|
||||
|
||||
o = s.option(form.Value, 'bot_token', _('Bot Token'), _('Token ID your Telegram Bot'));
|
||||
o.password = true;
|
||||
|
||||
o = s.option(form.Value, 'chat_id', _('Chat ID'), _('Chat ID your Telegram'));
|
||||
|
||||
o = s.option(form.Value, 'timeout', _('Delay'), _('Time Out respone Bot in sec.'));
|
||||
|
||||
o = s.option(form.Value, 'polling_time', _('Polling Time'), _('Polling Time in sec.'));
|
||||
|
||||
o = s.option(form.Value, 'plugins', _('Plugins'), _('Path to plugins directory.'));
|
||||
o.default = ('/usr/lib/telegrambot/plugins');
|
||||
|
||||
o = s.option(form.Value, 'log_file', _('Log File'), _('Log File'));
|
||||
o.default = ('/tmp/telegrambot.log');
|
||||
|
||||
return m.render();
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user