mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
update onion URL to new server, fix forum listing
This commit is contained in:
parent
24ff2b7120
commit
9c58913ee2
6 changed files with 15 additions and 14 deletions
|
@ -246,7 +246,8 @@ target_link_libraries(wowlet PUBLIC
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
${Iconv_LIBRARIES}
|
${Iconv_LIBRARIES}
|
||||||
/usr/local/lib/libunbound.a
|
${UNBOUND_LIBRARIES}
|
||||||
|
# /usr/local/lib/libunbound.a
|
||||||
${EXTRA_LIBRARIES})
|
${EXTRA_LIBRARIES})
|
||||||
|
|
||||||
# Link Qt libraries
|
# Link Qt libraries
|
||||||
|
|
|
@ -554,10 +554,10 @@ void AppContext::onWSForum(const QJsonArray& forum_data) {
|
||||||
for (auto &&entry: forum_data) {
|
for (auto &&entry: forum_data) {
|
||||||
auto obj = entry.toObject();
|
auto obj = entry.toObject();
|
||||||
auto forumPost = new ForumPost(
|
auto forumPost = new ForumPost(
|
||||||
obj.value("title").toString(),
|
obj.value("thread").toString(),
|
||||||
obj.value("author").toString(),
|
obj.value("member_name").toString(),
|
||||||
obj.value("permalink").toString(),
|
obj.value("permalink").toString(),
|
||||||
obj.value("comments").toInt());
|
obj.value("member_name").toString());
|
||||||
QSharedPointer<ForumPost> r = QSharedPointer<ForumPost>(forumPost);
|
QSharedPointer<ForumPost> r = QSharedPointer<ForumPost>(forumPost);
|
||||||
l.append(r);
|
l.append(r);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
QString tmpTxDescription;
|
QString tmpTxDescription;
|
||||||
|
|
||||||
// https://git.wownero.com/wowlet/wowlet-backend/
|
// https://git.wownero.com/wowlet/wowlet-backend/
|
||||||
QString backendHost = "6wku2m4zrv6j666crlo7lzofv6ud6enzllyhou3ijeigpukymi37caad.onion";
|
QString backendHost = "l3hkasj5nnrh24yzj4acj5dgqlscq56o5xjvvqsftj55fkonqly5aiid.onion";
|
||||||
unsigned int backendPort = 80;
|
unsigned int backendPort = 80;
|
||||||
bool backendTLS = false;
|
bool backendTLS = false;
|
||||||
QString backendWSUrl;
|
QString backendWSUrl;
|
||||||
|
|
|
@ -56,15 +56,15 @@ QVariant ForumModel::data(const QModelIndex &index, int role) const
|
||||||
return post->title;
|
return post->title;
|
||||||
case Author:
|
case Author:
|
||||||
return post->author;
|
return post->author;
|
||||||
case Comments:
|
case DateAdded:
|
||||||
return QString::number(post->comments);
|
return post->date_added;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (role == Qt::TextAlignmentRole) {
|
else if (role == Qt::TextAlignmentRole) {
|
||||||
switch(index.column()) {
|
switch(index.column()) {
|
||||||
case Comments:
|
case DateAdded:
|
||||||
return Qt::AlignRight;
|
return Qt::AlignRight;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
@ -85,8 +85,8 @@ QVariant ForumModel::headerData(int section, Qt::Orientation orientation, int ro
|
||||||
return QString("Forum Post");
|
return QString("Forum Post");
|
||||||
case Author:
|
case Author:
|
||||||
return QString("Author");
|
return QString("Author");
|
||||||
case Comments:
|
case DateAdded:
|
||||||
return QString("Comments");
|
return QString("Date");
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ public:
|
||||||
{
|
{
|
||||||
Title = 0,
|
Title = 0,
|
||||||
Author,
|
Author,
|
||||||
Comments,
|
DateAdded,
|
||||||
COUNT
|
COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
struct ForumPost {
|
struct ForumPost {
|
||||||
ForumPost(const QString &title, const QString &author, const QString &permalink, int comments)
|
ForumPost(const QString &title, const QString &author, const QString &permalink, const QString date_added)
|
||||||
: title(title), author(author), permalink(permalink), comments(comments){};
|
: title(title), author(author), permalink(permalink), date_added(date_added){};
|
||||||
|
|
||||||
QString title;
|
QString title;
|
||||||
QString author;
|
QString author;
|
||||||
QString permalink;
|
QString permalink;
|
||||||
int comments;
|
QString date_added;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //WOWLET_FORUMPOST_H
|
#endif //WOWLET_FORUMPOST_H
|
||||||
|
|
Loading…
Reference in a new issue