Add a tags field to the Android and desktop uploaders
Each photo card gains a free-text tags input, sent as a raw comma-separated `tags` form field on upload. The server normalizes it (parseTags), so the clients stay dumb — no tag parsing on-device. - Android: PickedItem.tags + setTags; threaded through UploadQueue → UploadWorker → UploadClient's multipart. - Desktop: a tags QLineEdit per PhotoItemWidget; UploadClient.upload sends it.
This commit is contained in:
1 parent
a42abfab48
commit
faa1e01c59
11 files changed
+43
-3
No files matched your search
@@ -47,6 +47,10 @@ PhotoItemWidget::PhotoItemWidget(QString sourcePath, QWidget *parent)
|
||||
m_date->setDisplayFormat(QStringLiteral("yyyy-MM-dd"));
|
||||
fields->addWidget(m_date);
|
||||
|
||||
m_tags = new QLineEdit;
|
||||
m_tags->setPlaceholderText(QStringLiteral("tags (comma-separated)"));
|
||||
fields->addWidget(m_tags);
|
||||
|
||||
m_statusLabel = new QLabel;
|
||||
m_statusLabel->setOpenExternalLinks(true);
|
||||
m_statusLabel->setWordWrap(true);
|
||||
@@ -70,6 +74,11 @@ QString PhotoItemWidget::date() const
|
||||
return m_date->date().toString(QStringLiteral("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
QString PhotoItemWidget::tags() const
|
||||
{
|
||||
return m_tags->text();
|
||||
}
|
||||
|
||||
void PhotoItemWidget::setStatus(Status status, const QString &message, const QString &url)
|
||||
{
|
||||
m_status = status;
|
||||
@@ -79,6 +88,7 @@ void PhotoItemWidget::setStatus(Status status, const QString &message, const QSt
|
||||
const bool editable = status == Status::Pending || status == Status::Error;
|
||||
m_caption->setEnabled(editable);
|
||||
m_date->setEnabled(editable);
|
||||
m_tags->setEnabled(editable);
|
||||
m_remove->setEnabled(status != Status::Preparing && status != Status::Uploading);
|
||||
|
||||
switch (status) {
|
||||
|
||||
Reference in new issue
Block a user