Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
GyverLibs committed Aug 15, 2024
1 parent 778e139 commit 1799914
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Settings
version=1.0.9
version=1.0.10
author=AlexGyver <alex@alexgyver.ru>
maintainer=AlexGyver <alex@alexgyver.ru>
sentence=Simple UI webface builder for esp8266/esp32
Expand Down
7 changes: 5 additions & 2 deletions src/SettingsBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class SettingsBase {
typedef std::function<void(Updater& upd)> UpdateCallback;

public:
SettingsBase(const String& title = "", GyverDB* db = nullptr) : _title(title), _db(db) {}
SettingsBase(const String& title = "", GyverDB* db = nullptr) : _title(title), _db(db) {
useAutoUpdates(true);
}

// установить пароль на вебморду. Пустая строка "" чтобы отключить
void setPass(Text pass) {
Expand All @@ -43,9 +45,10 @@ class SettingsBase {
_db = db;
}

// использовать автоматические обновления из БД (при изменении записи новое значение отправится в браузер)
// использовать автоматические обновления из БД (при изменении записи новое значение отправится в браузер) (умолч. true)
void useAutoUpdates(bool use) {
_dbupdates = use;
if (_db) _db->useUpdates(use);
}

// обработчик билда
Expand Down

0 comments on commit 1799914

Please sign in to comment.