Skip to content

Commit

Permalink
Added community discord to about page
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Mar 26, 2024
1 parent be1a12b commit 2782f5a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
3 changes: 2 additions & 1 deletion app_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"newsWebsite": "https://librumreader.com/news",
"companyEmail": "contact@librumreader.com",
"githubLink": "https://github.com/Librum-Reader/Librum",
"feedbackLink": "https://forms.gle/bzmMgN4ucmtzAM1XA"
"feedbackLink": "https://forms.gle/bzmMgN4ucmtzAM1XA",
"discord": "https://discord.gg/3jevn8N9K3"
}
5 changes: 5 additions & 0 deletions src/adapters/controllers/app_info_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ QString AppInfoController::getFeedbackLink() const
return m_appInfoService->getInfo("feedbackLink");
}

QString AppInfoController::getDiscord() const
{
return m_appInfoService->getInfo("discord");
}

QString AppInfoController::getCurrentQtVersion() const
{
return qVersion();
Expand Down
1 change: 1 addition & 0 deletions src/adapters/controllers/app_info_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ADAPTERS_EXPORT AppInfoController : public IAppInfoController
QString getCompanyEmail() const override;
QString getGithubLink() const override;
QString getFeedbackLink() const override;
QString getDiscord() const override;
QString getCurrentQtVersion() const override;
QString getOperatingSystem() const override;
void updateApplication() override;
Expand Down
2 changes: 2 additions & 0 deletions src/adapters/interfaces/controllers/i_app_info_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ADAPTERS_EXPORT IAppInfoController : public QObject
Q_PROPERTY(QString companyEmail READ getCompanyEmail CONSTANT)
Q_PROPERTY(QString githubLink READ getGithubLink CONSTANT)
Q_PROPERTY(QString feedbackLink READ getFeedbackLink CONSTANT)
Q_PROPERTY(QString discord READ getDiscord CONSTANT)
Q_PROPERTY(QString currentQtVersion READ getCurrentQtVersion CONSTANT)
Q_PROPERTY(QString operatingSystem READ getOperatingSystem CONSTANT)
Q_PROPERTY(int systemFontSize READ getSystemFontSize CONSTANT)
Expand All @@ -50,6 +51,7 @@ class ADAPTERS_EXPORT IAppInfoController : public QObject
virtual QString getCompanyEmail() const = 0;
virtual QString getGithubLink() const = 0;
virtual QString getFeedbackLink() const = 0;
virtual QString getDiscord() const = 0;
virtual QString getCurrentQtVersion() const = 0;
virtual QString getOperatingSystem() const = 0;
virtual double getSystemFontSize() const = 0;
Expand Down
35 changes: 22 additions & 13 deletions src/presentation/settings/MAboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -149,67 +149,76 @@ MFlickWrapper {
Label {
Layout.topMargin: 18
//: Keep it capitalized
text: qsTr("COMPANY NAME")
text: qsTr("WEBSITE")
color: Style.colorLightText
font.pointSize: Fonts.size10dot25
font.weight: Font.Bold
}

Label {
Layout.topMargin: 1
text: AppInfoController.companyName
text: AppInfoController.website
color: Style.colorBasePurple
font.pointSize: Fonts.size13dot5
opacity: websiteLinkArea.pressed ? 0.8 : 1

MouseArea {
id: websiteLinkArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor

onClicked: Qt.openUrlExternally(
AppInfoController.website)
}
}

Label {
Layout.topMargin: 12
//: Keep it capitalized
text: qsTr("WEBSITE")
text: qsTr("CONTACT")
color: Style.colorLightText
font.pointSize: Fonts.size10dot25
font.weight: Font.Bold
}

Label {
text: AppInfoController.website
Layout.topMargin: 1
text: AppInfoController.companyEmail
color: Style.colorBasePurple
opacity: emailLinkArea.pressed ? 0.8 : 1
font.pointSize: Fonts.size13dot5
opacity: websiteLinkArea.pressed ? 0.8 : 1

MouseArea {
id: websiteLinkArea
id: emailLinkArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor

onClicked: Qt.openUrlExternally(
AppInfoController.website)
"mailto:" + AppInfoController.companyEmail)
}
}

Label {
Layout.topMargin: 12
//: Keep it capitalized
text: qsTr("CONTACT")
text: qsTr("DISCORD")
color: Style.colorLightText
font.pointSize: Fonts.size10dot25
font.weight: Font.Bold
}

Label {
Layout.topMargin: 1
text: AppInfoController.companyEmail
text: AppInfoController.discord
color: Style.colorBasePurple
opacity: emailLinkArea.pressed ? 0.8 : 1
font.pointSize: Fonts.size13dot5

MouseArea {
id: emailLinkArea
id: discordLinkArea
anchors.fill: parent
cursorShape: Qt.PointingHandCursor

onClicked: Qt.openUrlExternally(
"mailto:" + AppInfoController.companyEmail)
AppInfoController.discord)
}
}

Expand Down

0 comments on commit 2782f5a

Please sign in to comment.