Include user's operating system information in the About page (#3663)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Minor: Added quotation marks in the permitted/blocked Automod messages for clarity. (#3654)
|
- Minor: Added quotation marks in the permitted/blocked Automod messages for clarity. (#3654)
|
||||||
- Minor: Adjust large stream thumbnail to 16:9 (#3655)
|
- Minor: Adjust large stream thumbnail to 16:9 (#3655)
|
||||||
- Minor: Fixed being unable to load Twitch Usercards from the `/mentions` tab. (#3623)
|
- Minor: Fixed being unable to load Twitch Usercards from the `/mentions` tab. (#3623)
|
||||||
|
- Minor: Add information about the user's operating system in the About page. (#3663)
|
||||||
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
|
- Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646)
|
||||||
- Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662)
|
- Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662)
|
||||||
|
|
||||||
|
|||||||
@@ -85,16 +85,35 @@ AboutPage::AboutPage()
|
|||||||
auto versionInfo = layout.emplace<QGroupBox>("Version");
|
auto versionInfo = layout.emplace<QGroupBox>("Version");
|
||||||
{
|
{
|
||||||
auto version = Version::instance();
|
auto version = Version::instance();
|
||||||
QString text = QString("%1 (commit %2%3)")
|
QString osInfo = QSysInfo::prettyProductName() +
|
||||||
.arg(version.fullVersion())
|
", kernel: " + QSysInfo::kernelVersion();
|
||||||
.arg("<a "
|
if (version.isFlatpak())
|
||||||
"href=\"https://github.com/Chatterino/"
|
{
|
||||||
"chatterino2/commit/" +
|
osInfo += ", running from Flatpak";
|
||||||
version.commitHash() + "\">" +
|
}
|
||||||
version.commitHash() + "</a>")
|
|
||||||
.arg(Modes::instance().isNightly
|
QString commitHashLink =
|
||||||
? ", built on " + version.dateOfBuild()
|
QString("<a "
|
||||||
: "");
|
"href=\"https://github.com/Chatterino/chatterino2/"
|
||||||
|
"commit/%1\">%1</a>")
|
||||||
|
.arg(version.commitHash());
|
||||||
|
|
||||||
|
QString nightlyBuildInfo;
|
||||||
|
if (Modes::instance().isNightly)
|
||||||
|
{
|
||||||
|
nightlyBuildInfo =
|
||||||
|
QString(", built on %1").arg(version.dateOfBuild());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString supportedOS;
|
||||||
|
if (!version.isSupportedOS())
|
||||||
|
{
|
||||||
|
supportedOS = "(unsupported OS)";
|
||||||
|
}
|
||||||
|
|
||||||
|
QString text = QString("%1 (commit %2%3) running on %4 %5")
|
||||||
|
.arg(version.fullVersion(), commitHashLink,
|
||||||
|
nightlyBuildInfo, osInfo, supportedOS);
|
||||||
|
|
||||||
auto versionLabel = versionInfo.emplace<QLabel>(text);
|
auto versionLabel = versionInfo.emplace<QLabel>(text);
|
||||||
versionLabel->setOpenExternalLinks(true);
|
versionLabel->setOpenExternalLinks(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user