feat(ManagedPackPage): add link to the Modrinth's pack page

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-11-11 18:29:32 -03:00
parent d4979974b4
commit 7f5dea28bb
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469
2 changed files with 9 additions and 3 deletions

View File

@ -68,8 +68,8 @@ void ManagedPackPage::openedImpl()
{ {
ui->packName->setText(m_inst->getManagedPackName()); ui->packName->setText(m_inst->getManagedPackName());
ui->packVersion->setText(m_inst->getManagedPackVersionName()); ui->packVersion->setText(m_inst->getManagedPackVersionName());
ui->packOrigin->setText(tr("Website: %1 | Pack ID: %2 | Version ID: %3") ui->packOrigin->setText(tr("Website: <a href=%1>%2</a> | Pack ID: %3 | Version ID: %4")
.arg(displayName(), m_inst->getManagedPackID(), m_inst->getManagedPackVersionID())); .arg(url(), displayName(), m_inst->getManagedPackID(), m_inst->getManagedPackVersionID()));
parseManagedPack(); parseManagedPack();
} }
@ -224,7 +224,7 @@ void ModrinthManagedPackPage::parseManagedPack()
QString ModrinthManagedPackPage::url() const QString ModrinthManagedPackPage::url() const
{ {
return {}; return "https://modrinth.com/mod/" + m_inst->getManagedPackID();
} }
void ModrinthManagedPackPage::suggestVersion() void ModrinthManagedPackPage::suggestVersion()

View File

@ -96,6 +96,12 @@
<property name="text"> <property name="text">
<string notr="true">placeholder</string> <string notr="true">placeholder</string>
</property> </property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property> </property>