Fixed format

This commit is contained in:
emeric
2024-09-13 17:48:23 +02:00
parent cb182c3cfe
commit 24bf83d540
2 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -66,8 +66,8 @@ namespace lms::ui
db::ObjectPtr<db::User> getUser();
db::UserId getUserId() const;
bool isUserAuthStrong() const; // user must be logged in prior this call
db::UserType getUserType() const; // user must be logged in prior this call
bool isUserAuthStrong() const; // user must be logged in prior this call
db::UserType getUserType() const; // user must be logged in prior this call
std::string_view getUserLoginName() const; // user must be logged in prior this call
// Proxified scanner events
+8 -8
View File
@@ -55,7 +55,7 @@ namespace lms::ui
auto transaction{ LmsApp->getDbSession().createReadTransaction() };
db::ClusterType::find(LmsApp->getDbSession(), [&](const db::ClusterType::pointer& clusterType) {
typeModel->add(Wt::WString::fromUTF8(std::string{ clusterType->getName() }), clusterType->getId());
});
});
}
typeModel->add(Wt::WString::tr("Lms.Explore.media-library"), MediaLibraryTag{});
@@ -78,7 +78,7 @@ namespace lms::ui
{
db::MediaLibrary::find(session, [&](const db::MediaLibrary::pointer& library) {
valueModel->add(Wt::WString::fromUTF8(std::string{ library->getName() }), library->getId());
});
});
}
else if (const db::ClusterTypeId * clusterTypeId{ std::get_if<db::ClusterTypeId>(&type) })
{
@@ -88,7 +88,7 @@ namespace lms::ui
db::Cluster::find(session, params, [&](const db::Cluster::pointer& cluster) {
valueModel->add(Wt::WString::fromUTF8(std::string{ cluster->getName() }), cluster->getId());
});
});
}
return valueModel;
@@ -125,12 +125,12 @@ namespace lms::ui
// TODO
LmsApp->getModalManager().dispose(dialogPtr);
});
});
Wt::WPushButton* cancelBtn{ dialog->bindNew<Wt::WPushButton>("cancel-btn", Wt::WString::tr("Lms.cancel")) };
cancelBtn->clicked().connect([=] {
LmsApp->getModalManager().dispose(dialogPtr);
});
});
typeCombo->activated().connect([valueCombo, typeModel](int row) {
const TypeVariant type{ typeModel->getValue(row) };
@@ -138,7 +138,7 @@ namespace lms::ui
const std::shared_ptr<ValueModel> valueModel{ createValueModel(type) };
valueCombo->clear();
valueCombo->setModel(valueModel);
});
});
typeCombo->activated().emit(0); // force emit to refresh the type combo model
@@ -181,7 +181,7 @@ namespace lms::ui
_filters->removeWidget(filter);
_clusterIds.erase(std::remove_if(std::begin(_clusterIds), std::end(_clusterIds), [clusterId](db::ClusterId id) { return id == clusterId; }), std::end(_clusterIds));
_sigUpdated.emit();
});
});
emitFilterAddedNotification();
}
@@ -214,7 +214,7 @@ namespace lms::ui
_mediaLibraryFilter = nullptr;
_sigUpdated.emit();
state::writeValue<db::MediaLibraryId::ValueType>("filters_media_library_id", std::nullopt);
});
});
emitFilterAddedNotification();
}