void WebServerTask::setup() { mdns.begin(domain, WiFi.localIP()); SPIFFS.begin(); server.serveStatic("/settings/", SPIFFS, "/settings/index.html", "max-age=86400"); server.serveStatic("/settings/settings.js", SPIFFS, "/settings/settings.js", "max-age=86400"); server.on("/", [this]() { server.sendHeader("Location", "/settings/"); server.send(302); }); server.on("/settings/save", [this]() { handleSettingsSave(); }); server.on("/settings/get", [this]() { handleSettingsGet(); }); server.on("/debug/reset", [this]() { handleReset(); }); server.on("/debug/resetSettings", [this]() { handleResetSettings(); }); server.begin(); Serial.println("Web server is running at http://" + String(domain) + ".local"); }
OptionsWindow::OptionsWindow(ImageCache *i,QWidget *parent) : QDialog(parent),initialTheme(-1) { images = i; ui.setupUi(this); mediaObject = new Phonon::MediaObject(this); audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this); path = Phonon::createPath(mediaObject, audioOutput); numValidator=new QIntValidator(1,99999,this); ui.minTweets->setValidator(numValidator); ui.tweetPruneAge->setValidator(numValidator); ui.tabWidget->setCurrentIndex(0); QObject::connect(mediaObject,SIGNAL(finished()),this,SLOT(soundEnded())); QObject::connect(ui.save,SIGNAL(clicked()),this,SLOT(setOpts())); QObject::connect(ui.browse,SIGNAL(clicked()),this,SLOT(setFilePath())); QObject::connect(ui.mainbrowse,SIGNAL(clicked()),this,SLOT(setUserMainStylesheetPath())); QObject::connect(ui.textbrowse,SIGNAL(clicked()),this,SLOT(setUserTextStylesheetPath())); QObject::connect(ui.reloadstylesheet,SIGNAL(clicked()),this,SLOT(handleReloadUserStylesheet())); QObject::connect(ui.clear,SIGNAL(clicked()),this,SLOT(clearFilePath())); QObject::connect(ui.test,SIGNAL(clicked()),this,SLOT(testSound())); QObject::connect(ui.theme,SIGNAL(currentRowChanged(int)),this,SLOT(handleThemeChange(int))); QObject::connect(ui.twitteraccounts,SIGNAL(itemClicked(QListWidgetItem*)),this,SLOT(handleAccountClicked(QListWidgetItem*))); QObject::connect(ui.twitterUser,SIGNAL(textChanged(QString)),this,SLOT(twitterUserChanged(QString))); QObject::connect(ui.clearoauth,SIGNAL(clicked()),this,SLOT(handleClearOAuth())); QObject::connect(ui.clearlang,SIGNAL(clicked()),this,SLOT(handleClearLang())); QObject::connect(ui.resetsettings,SIGNAL(clicked()),this,SLOT(handleResetSettings())); QObject::connect(ui.removeallsettings,SIGNAL(clicked()),this,SLOT(handleRemoveAllSettings())); QObject::connect(ui.minrefreshtime,SIGNAL(sliderMoved(int)),this,SLOT(handleMinRefreshSliderMove(int))); mainWindow=(Ya_st*)parent; setObjectName("optionswindow"); // Populate languages QMap<QString,QString> lang = Translator::getLanguages(); QList<QString> keys = lang.keys(); for(int x=0;x<keys.size();x++) { ui.lang->addItem(lang.value(keys.at(x)),keys.at(x)); } // QMessageBox::information (0,"assdf",tr("<style>")+Ya_st::labelCSS+tr("</style><p>You can set a default filter that will apply to all tweet columns, for example you could filter out all occurances of a particular hash tag, or all messages sent from a particular client.</p><p>To show tweets with <b class=\"hi\">certain words</b> type <b class='type'>certain words</b>. To hide other salacious terms use -salacious.</p><p>For users use @Fred, and -@Barny.</p><p>For clients use @@yasst, and -@@Spambot.</p>")); }