Skip to content

Commit dff3e58

Browse files
committed
feat: cleaned welcome page and help menu
1 parent ae33235 commit dff3e58

5 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/support/actions.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,15 @@ void init(QMainWindow* mw) {
454454
FA_ICON(0x3f), "Details", mw, []() { actions::show_details(); });
455455

456456
g_actions[Type::OPEN_HOME] =
457-
mw->addAction(FA_ICON(0xf0ac), "Homepage", mw, []() {
457+
mw->addAction(FA_ICON(0xf015), "Home", mw, []() {
458458
QDesktopServices::openUrl(QUrl{"https://redasm.dev"});
459459
});
460460

461+
g_actions[Type::OPEN_GITHUB] =
462+
mw->addAction(FAB_ICON(0xf113), "Source Code", mw, []() {
463+
QDesktopServices::openUrl(QUrl{"https://source.redasm.dev"});
464+
});
465+
461466
g_actions[Type::OPEN_DISCORD] =
462467
mw->addAction(FAB_ICON(0xf392), "Discord", mw, []() {
463468
QDesktopServices::openUrl(QUrl{"https://discord.redasm.dev"});
@@ -472,10 +477,9 @@ void init(QMainWindow* mw) {
472477
QDesktopServices::openUrl(QUrl{"https://infosec.exchange/@redasm"});
473478
});
474479

475-
g_actions[Type::OPEN_GITHUB] =
476-
mw->addAction(FAB_ICON(0xf113), "Report an Issue", mw, []() {
477-
QDesktopServices::openUrl(
478-
QUrl{"https://github.com/redasm-dev/redasm/issues"});
480+
g_actions[Type::OPEN_FEEDBACK] =
481+
mw->addAction(FA_ICON(0xf188), "Send feedback", mw, []() {
482+
QDesktopServices::openUrl(QUrl{"https://bugs.redasm.dev"});
479483
});
480484

481485
g_actions[Type::OPEN_ABOUT] =

src/support/actions.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ enum Type : quint8 {
2222
OPEN_DETAILS,
2323

2424
OPEN_HOME,
25+
OPEN_GITHUB,
2526
OPEN_DISCORD,
2627
OPEN_X,
2728
OPEN_MASTODON,
28-
OPEN_GITHUB,
29+
OPEN_FEEDBACK,
2930

3031
OPEN_SETTINGS,
3132
OPEN_ABOUT,

src/ui/mainwindow.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ struct MainWindow {
106106
this->actdevdecoder = this->mnudev->addAction("&Decoder/Encoder");
107107
this->actdevgraphs = this->mnudev->addAction("&Graphs");
108108

109-
this->mnuhelp->addAction(actions::get(actions::OPEN_ABOUT));
110-
this->mnuhelp->addSeparator();
111109
this->mnuhelp->addAction(actions::get(actions::OPEN_HOME));
112110
this->mnuhelp->addAction(actions::get(actions::OPEN_GITHUB));
111+
this->mnuhelp->addAction(actions::get(actions::OPEN_FEEDBACK));
112+
this->mnuhelp->addSeparator();
113+
this->mnuhelp->addAction(actions::get(actions::OPEN_ABOUT));
113114

114115
this->mnuedit->addAction(actions::get(actions::COPY));
115116
this->mnuedit->addAction(actions::get(actions::SELECT_ALL));

src/ui/welcomeview.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct WelcomeView {
1919
QPushButton* pbopen;
2020
QPushButton* pbsettings;
2121
QPushButton* pbabout;
22-
QToolButton* tbtnopenhome;
2322
QToolButton* tbtnopengithub;
2423
QToolButton* tbtnopendiscord;
2524
QToolButton* tbtnopenx;
@@ -93,20 +92,17 @@ struct WelcomeView {
9392
auto* grid = new QGridLayout();
9493
grid->setSpacing(8);
9594

96-
this->tbtnopenhome = new QToolButton(self);
97-
grid->addWidget(this->tbtnopenhome, 0, 0, 1, 1);
98-
9995
this->tbtnopengithub = new QToolButton(self);
100-
grid->addWidget(this->tbtnopengithub, 0, 1, 1, 1);
96+
grid->addWidget(this->tbtnopengithub, 0, 0, 1, 1);
10197

10298
this->tbtnopendiscord = new QToolButton(self);
103-
grid->addWidget(this->tbtnopendiscord, 0, 2, 1, 1);
99+
grid->addWidget(this->tbtnopendiscord, 0, 1, 1, 1);
104100

105101
this->tbtnopenx = new QToolButton(self);
106-
grid->addWidget(this->tbtnopenx, 0, 3, 1, 1);
102+
grid->addWidget(this->tbtnopenx, 0, 2, 1, 1);
107103

108104
this->tbtnopenmastodon = new QToolButton(self);
109-
grid->addWidget(this->tbtnopenmastodon, 0, 4, 1, 1);
105+
grid->addWidget(this->tbtnopenmastodon, 0, 3, 1, 1);
110106

111107
hbox1->addLayout(grid);
112108
hbox1->addItem(new QSpacerItem(40, 20, QSizePolicy::Expanding,

src/views/welcome.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ WelcomeView::WelcomeView(QWidget* parent): DashboardView{parent}, m_ui{this} {
5252
this->make_bordered(m_ui.pbsettings);
5353
this->make_bordered(m_ui.pbabout);
5454

55-
style_social_button(m_ui.tbtnopenhome, actions::OPEN_HOME);
5655
style_social_button(m_ui.tbtnopengithub, actions::OPEN_GITHUB);
5756
style_social_button(m_ui.tbtnopendiscord, actions::OPEN_DISCORD);
5857
style_social_button(m_ui.tbtnopenx, actions::OPEN_X);

0 commit comments

Comments
 (0)