Removed unused Home view
This commit is contained in:
@@ -28,7 +28,6 @@ lms_approot_DATA = \
|
|||||||
approot/artist.xml \
|
approot/artist.xml \
|
||||||
approot/artists.xml \
|
approot/artists.xml \
|
||||||
approot/explore.xml \
|
approot/explore.xml \
|
||||||
approot/home.xml \
|
|
||||||
approot/login.xml \
|
approot/login.xml \
|
||||||
approot/mediaplayer.xml \
|
approot/mediaplayer.xml \
|
||||||
approot/messages.xml \
|
approot/messages.xml \
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<messages xmlns:if="Wt.WTemplate.conditions">
|
|
||||||
|
|
||||||
<message id="Lms.Home.template">
|
|
||||||
${tr:Lms.Home.welcome}
|
|
||||||
</message>
|
|
||||||
|
|
||||||
</messages>
|
|
||||||
|
|
||||||
@@ -53,9 +53,6 @@
|
|||||||
<message id="Lms.Auth.remember-me">Remember me</message>
|
<message id="Lms.Auth.remember-me">Remember me</message>
|
||||||
<message id="Lms.Auth.welcome">Welcome!</message>
|
<message id="Lms.Auth.welcome">Welcome!</message>
|
||||||
|
|
||||||
<!--Home-->
|
|
||||||
<message id="Lms.Home.welcome"><h2>Welcome!</h2></message>
|
|
||||||
|
|
||||||
<!--Explore-->
|
<!--Explore-->
|
||||||
<message id="Lms.Explore.add-filter">Add filter</message>
|
<message id="Lms.Explore.add-filter">Add filter</message>
|
||||||
<message id="Lms.Explore.artists">Artists</message>
|
<message id="Lms.Explore.artists">Artists</message>
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ lms_SOURCES = \
|
|||||||
$(srcdir)/metadata/TagLibParser.cpp \
|
$(srcdir)/metadata/TagLibParser.cpp \
|
||||||
$(srcdir)/scanner/MediaScanner.cpp \
|
$(srcdir)/scanner/MediaScanner.cpp \
|
||||||
$(srcdir)/ui/Auth.cpp \
|
$(srcdir)/ui/Auth.cpp \
|
||||||
$(srcdir)/ui/HomeView.cpp \
|
|
||||||
$(srcdir)/ui/LmsApplication.cpp \
|
$(srcdir)/ui/LmsApplication.cpp \
|
||||||
$(srcdir)/ui/MediaPlayer.cpp \
|
$(srcdir)/ui/MediaPlayer.cpp \
|
||||||
$(srcdir)/ui/PlayQueueView.cpp \
|
$(srcdir)/ui/PlayQueueView.cpp \
|
||||||
|
|||||||
@@ -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 "utils/Utils.hpp"
|
||||||
|
|
||||||
#include "explore/Explore.hpp"
|
#include "explore/Explore.hpp"
|
||||||
#include "HomeView.hpp"
|
|
||||||
#include "MediaPlayer.hpp"
|
#include "MediaPlayer.hpp"
|
||||||
#include "PlayQueueView.hpp"
|
#include "PlayQueueView.hpp"
|
||||||
#include "SettingsView.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() + "admin-initwizard");
|
||||||
messageResourceBundle().use(appRoot() + "artist");
|
messageResourceBundle().use(appRoot() + "artist");
|
||||||
messageResourceBundle().use(appRoot() + "artists");
|
messageResourceBundle().use(appRoot() + "artists");
|
||||||
messageResourceBundle().use(appRoot() + "home");
|
|
||||||
messageResourceBundle().use(appRoot() + "explore");
|
messageResourceBundle().use(appRoot() + "explore");
|
||||||
messageResourceBundle().use(appRoot() + "login");
|
messageResourceBundle().use(appRoot() + "login");
|
||||||
messageResourceBundle().use(appRoot() + "mediaplayer");
|
messageResourceBundle().use(appRoot() + "mediaplayer");
|
||||||
@@ -192,7 +190,7 @@ LmsApplication::createCluster(Database::Cluster::pointer cluster, bool canDelete
|
|||||||
void
|
void
|
||||||
LmsApplication::goHome()
|
LmsApplication::goHome()
|
||||||
{
|
{
|
||||||
setInternalPath("/home", true);
|
setInternalPath("/artists", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -205,8 +203,7 @@ LmsApplication::goHomeAndQuit()
|
|||||||
|
|
||||||
enum IdxRoot
|
enum IdxRoot
|
||||||
{
|
{
|
||||||
IdxHome = 0,
|
IdxExplore = 0,
|
||||||
IdxExplore,
|
|
||||||
IdxPlayQueue,
|
IdxPlayQueue,
|
||||||
IdxSettings,
|
IdxSettings,
|
||||||
IdxAdminDatabase,
|
IdxAdminDatabase,
|
||||||
@@ -224,7 +221,6 @@ handlePathChange(Wt::WStackedWidget* stack, bool isAdmin)
|
|||||||
bool admin;
|
bool admin;
|
||||||
} views[] =
|
} views[] =
|
||||||
{
|
{
|
||||||
{ "/home", IdxHome, false },
|
|
||||||
{ "/artists", IdxExplore, false },
|
{ "/artists", IdxExplore, false },
|
||||||
{ "/artist", IdxExplore, false },
|
{ "/artist", IdxExplore, false },
|
||||||
{ "/releases", IdxExplore, false },
|
{ "/releases", IdxExplore, false },
|
||||||
@@ -251,7 +247,7 @@ handlePathChange(Wt::WStackedWidget* stack, bool isAdmin)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wApp->setInternalPath("/home", true);
|
wApp->setInternalPath("/artists", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -281,7 +277,7 @@ LmsApplication::handleAuthEvent(void)
|
|||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
Wt::WNavigationBar* navbar = main->bindNew<Wt::WNavigationBar>("navbar-top");
|
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);
|
navbar->setResponsive(true);
|
||||||
|
|
||||||
Wt::WMenu* menu = navbar->addMenu(std::make_unique<Wt::WMenu>());
|
Wt::WMenu* menu = navbar->addMenu(std::make_unique<Wt::WMenu>());
|
||||||
@@ -344,7 +340,6 @@ LmsApplication::handleAuthEvent(void)
|
|||||||
// Order is important in mainStack, see IdxRoot!
|
// Order is important in mainStack, see IdxRoot!
|
||||||
Wt::WStackedWidget* mainStack = main->bindNew<Wt::WStackedWidget>("contents");
|
Wt::WStackedWidget* mainStack = main->bindNew<Wt::WStackedWidget>("contents");
|
||||||
|
|
||||||
mainStack->addNew<Home>();
|
|
||||||
Explore* explore = mainStack->addNew<Explore>();
|
Explore* explore = mainStack->addNew<Explore>();
|
||||||
PlayQueue* playqueue = mainStack->addNew<PlayQueue>();
|
PlayQueue* playqueue = mainStack->addNew<PlayQueue>();
|
||||||
mainStack->addNew<SettingsView>();
|
mainStack->addNew<SettingsView>();
|
||||||
|
|||||||
Reference in New Issue
Block a user