Removed unused Home view
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Emeric Poupon
|
||||
*
|
||||
* This file is part of LMS.
|
||||
*
|
||||
* LMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "HomeView.hpp"
|
||||
|
||||
#include <Wt/WTemplate.h>
|
||||
|
||||
#include "utils/Logger.hpp"
|
||||
|
||||
#include "LmsApplication.hpp"
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
|
||||
Home::Home()
|
||||
: Wt::WContainerWidget()
|
||||
{
|
||||
auto t = std::make_unique<Wt::WTemplate>(Wt::WString::tr("Lms.Home.template"));
|
||||
t->addFunction("tr", &Wt::WTemplate::Functions::tr);
|
||||
|
||||
this->addWidget(std::move(t));
|
||||
}
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Emeric Poupon
|
||||
*
|
||||
* This file is part of LMS.
|
||||
*
|
||||
* LMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* LMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Wt/WContainerWidget.h>
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
class Home : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
Home();
|
||||
|
||||
private:
|
||||
|
||||
void displayFilter(void);
|
||||
void displayContents(void);
|
||||
|
||||
};
|
||||
|
||||
} // namespace UserInterface
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "explore/Explore.hpp"
|
||||
#include "HomeView.hpp"
|
||||
#include "MediaPlayer.hpp"
|
||||
#include "PlayQueueView.hpp"
|
||||
#include "SettingsView.hpp"
|
||||
@@ -94,7 +93,6 @@ LmsApplication::LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnecti
|
||||
messageResourceBundle().use(appRoot() + "admin-initwizard");
|
||||
messageResourceBundle().use(appRoot() + "artist");
|
||||
messageResourceBundle().use(appRoot() + "artists");
|
||||
messageResourceBundle().use(appRoot() + "home");
|
||||
messageResourceBundle().use(appRoot() + "explore");
|
||||
messageResourceBundle().use(appRoot() + "login");
|
||||
messageResourceBundle().use(appRoot() + "mediaplayer");
|
||||
@@ -192,7 +190,7 @@ LmsApplication::createCluster(Database::Cluster::pointer cluster, bool canDelete
|
||||
void
|
||||
LmsApplication::goHome()
|
||||
{
|
||||
setInternalPath("/home", true);
|
||||
setInternalPath("/artists", true);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -205,8 +203,7 @@ LmsApplication::goHomeAndQuit()
|
||||
|
||||
enum IdxRoot
|
||||
{
|
||||
IdxHome = 0,
|
||||
IdxExplore,
|
||||
IdxExplore = 0,
|
||||
IdxPlayQueue,
|
||||
IdxSettings,
|
||||
IdxAdminDatabase,
|
||||
@@ -224,7 +221,6 @@ handlePathChange(Wt::WStackedWidget* stack, bool isAdmin)
|
||||
bool admin;
|
||||
} views[] =
|
||||
{
|
||||
{ "/home", IdxHome, false },
|
||||
{ "/artists", IdxExplore, false },
|
||||
{ "/artist", IdxExplore, false },
|
||||
{ "/releases", IdxExplore, false },
|
||||
@@ -251,7 +247,7 @@ handlePathChange(Wt::WStackedWidget* stack, bool isAdmin)
|
||||
}
|
||||
}
|
||||
|
||||
wApp->setInternalPath("/home", true);
|
||||
wApp->setInternalPath("/artists", true);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -281,7 +277,7 @@ LmsApplication::handleAuthEvent(void)
|
||||
|
||||
// Navbar
|
||||
Wt::WNavigationBar* navbar = main->bindNew<Wt::WNavigationBar>("navbar-top");
|
||||
navbar->setTitle("LMS", Wt::WLink(Wt::LinkType::InternalPath, "/home"));
|
||||
navbar->setTitle("LMS", Wt::WLink(Wt::LinkType::InternalPath, "/artists"));
|
||||
navbar->setResponsive(true);
|
||||
|
||||
Wt::WMenu* menu = navbar->addMenu(std::make_unique<Wt::WMenu>());
|
||||
@@ -344,7 +340,6 @@ LmsApplication::handleAuthEvent(void)
|
||||
// Order is important in mainStack, see IdxRoot!
|
||||
Wt::WStackedWidget* mainStack = main->bindNew<Wt::WStackedWidget>("contents");
|
||||
|
||||
mainStack->addNew<Home>();
|
||||
Explore* explore = mainStack->addNew<Explore>();
|
||||
PlayQueue* playqueue = mainStack->addNew<PlayQueue>();
|
||||
mainStack->addNew<SettingsView>();
|
||||
|
||||
Reference in New Issue
Block a user