Add an about tab in the web user interface.

This commit is contained in:
Andreas Öman 2008-10-11 11:37:03 +00:00
parent ffeeffb63e
commit f851f518d3
3 changed files with 47 additions and 2 deletions

View file

@ -45,6 +45,7 @@
#include "epg.h"
extern const char *htsversion;
extern const char *htsversion_full;
static void
extjs_load(htsbuf_queue_t *hq, const char *script)
@ -153,6 +154,37 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque)
}
/**
*
*/
static int
page_about(http_connection_t *hc, const char *remain, void *opaque)
{
htsbuf_queue_t *hq = &hc->hc_reply;
htsbuf_qprintf(hq,
"<center>"
"<div class=\"about-title\">"
"HTS Tvheadend %s"
"</div><br>"
"&copy; 2006 - 2008 Andreas \303\226man, et al.<br><br>"
"<img src=\"docresources/tvheadendlogo.png\"><br>"
"<a href=\"http://hts.lonelycoder.com/\">"
"http://hts.lonelycoder.com/</a><br><br>"
"Based on software from "
"<a href=\"http://www.ffmpeg.org/\">FFmpeg</a> and "
"<a href=\"http://www.extjs.org/\">ExtJS</a>.<br>"
"<br>"
"Build %s"
"</center>",
htsversion,
htsversion_full);
http_output_html(hc);
return 0;
}
/**
*
*/
@ -1201,6 +1233,7 @@ extjs_dvrlist(http_connection_t *hc, const char *remain, void *opaque)
void
extjs_start(void)
{
http_path_add("/about.html", NULL, page_about, ACCESS_WEB_INTERFACE);
http_path_add("/extjs.html", NULL, extjs_root, ACCESS_WEB_INTERFACE);
http_path_add("/tablemgr", NULL, extjs_tablemgr, ACCESS_WEB_INTERFACE);
http_path_add("/dvbtree", NULL, extjs_dvbtree, ACCESS_WEB_INTERFACE);

View file

@ -149,4 +149,9 @@
.hts-doc-text img {
padding: 10px;
}
.about-title {
font:normal 24px verdana;
font-weight: bold;
}

View file

@ -58,10 +58,17 @@ function accessUpdate(o) {
tvheadend.rootTabPanel.add(tvheadend.confpanel);
}
tvheadend.aboutPanel = new Ext.Panel({
border: false,
layout:'fit',
title:'About',
autoLoad: '/about.html'
});
tvheadend.rootTabPanel.add(tvheadend.aboutPanel);
tvheadend.rootTabPanel.doLayout();
console.log(o);
}
/**