Add empty tabs to fill.
This commit is contained in:
@@ -9,7 +9,7 @@ find_package(Wt REQUIRED)
|
|||||||
find_package(Groove REQUIRED)
|
find_package(Groove REQUIRED)
|
||||||
find_package(TagLib REQUIRED)
|
find_package(TagLib REQUIRED)
|
||||||
|
|
||||||
add_executable(arbitrateor src/main.cpp src/WebInterface.cpp src/GroovePlayer.cpp src/ui/LoginInterface.cpp src/ui/PlayerInterface.cpp src/ui/TrackDetails.cpp src/ui/RequestInterface.cpp)
|
add_executable(arbitrateor src/main.cpp src/WebInterface.cpp src/GroovePlayer.cpp src/ui/LoginInterface.cpp src/ui/PlayerInterface.cpp src/ui/TrackDetails.cpp src/ui/RequestInterface.cpp src/ui/UploadInterface.cpp src/ui/AdminInterface.cpp)
|
||||||
target_link_libraries(arbitrateor ${Wt_LIBRARIES} ${GROOVE_LIBRARY} ${GROOVE_FINGERPRINT_LIBRARY} ${GROOVE_PLAYER_LIBRARY} ${TAGLIB_LIBRARY} pthread boost_system stdc++fs) #TODO get threading links based on platform. Remove gcc experimental fs when official c++17 exists.
|
target_link_libraries(arbitrateor ${Wt_LIBRARIES} ${GROOVE_LIBRARY} ${GROOVE_FINGERPRINT_LIBRARY} ${GROOVE_PLAYER_LIBRARY} ${TAGLIB_LIBRARY} pthread boost_system stdc++fs) #TODO get threading links based on platform. Remove gcc experimental fs when official c++17 exists.
|
||||||
|
|
||||||
install(TARGETS arbitrateor RUNTIME DESTINATION bin)
|
install(TARGETS arbitrateor RUNTIME DESTINATION bin)
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ WebInterface::WebInterface(const Wt::WEnvironment& env) : Wt::WApplication(env)
|
|||||||
root()->addWidget(priv_int->loginUI);
|
root()->addWidget(priv_int->loginUI);
|
||||||
priv_int->loginUI->animateShow(Wt::WAnimation(Wt::WAnimation::AnimationEffect::SlideInFromTop));
|
priv_int->loginUI->animateShow(Wt::WAnimation(Wt::WAnimation::AnimationEffect::SlideInFromTop));
|
||||||
priv_int->loginUI->checkSessionValidity();
|
priv_int->loginUI->checkSessionValidity();
|
||||||
|
if(currentUser.isAdmin) priv_int->playerUI->mainDisplay->addTab(priv_int->playerUI->adminPane, "Admin", Wt::WTabWidget::LazyLoading);
|
||||||
notificationSlot.setJavaScript(getNotificationJs(""));
|
notificationSlot.setJavaScript(getNotificationJs(""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
25
src/ui/AdminInterface.cpp
Normal file
25
src/ui/AdminInterface.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "AdminInterface.h"
|
||||||
|
|
||||||
|
AdminInterface::AdminInterface(WebInterface* app)
|
||||||
|
{
|
||||||
|
this->app = app;
|
||||||
|
}
|
||||||
33
src/ui/AdminInterface.h
Normal file
33
src/ui/AdminInterface.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ADMININTERFACE_H
|
||||||
|
#define ADMININTERFACE_H
|
||||||
|
|
||||||
|
#include <Wt/WContainerWidget>
|
||||||
|
#include "../WebInterface.h"
|
||||||
|
|
||||||
|
class AdminInterface : public Wt::WContainerWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AdminInterface(WebInterface* app);
|
||||||
|
WebInterface* app;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ADMININTERFACE_H
|
||||||
@@ -67,6 +67,8 @@ PlayerInterface::PlayerInterface(WebInterface* app)
|
|||||||
|
|
||||||
mainDisplay = new Wt::WTabWidget();
|
mainDisplay = new Wt::WTabWidget();
|
||||||
requestPane = new RequestInterface(app);
|
requestPane = new RequestInterface(app);
|
||||||
|
uploadPane = new UploadInterface(app);
|
||||||
|
adminPane = new AdminInterface(app);
|
||||||
|
|
||||||
voteMetaContainer = new Wt::WContainerWidget();
|
voteMetaContainer = new Wt::WContainerWidget();
|
||||||
voteMetaLayout = new Wt::WVBoxLayout();
|
voteMetaLayout = new Wt::WVBoxLayout();
|
||||||
@@ -123,6 +125,7 @@ PlayerInterface::PlayerInterface(WebInterface* app)
|
|||||||
interfaceLayout->addWidget(mainDisplay);
|
interfaceLayout->addWidget(mainDisplay);
|
||||||
mainDisplay->addTab(voteMetaContainer,"Up Next",Wt::WTabWidget::PreLoading);
|
mainDisplay->addTab(voteMetaContainer,"Up Next",Wt::WTabWidget::PreLoading);
|
||||||
mainDisplay->addTab(requestPane, "Make Request", Wt::WTabWidget::LazyLoading);
|
mainDisplay->addTab(requestPane, "Make Request", Wt::WTabWidget::LazyLoading);
|
||||||
|
mainDisplay->addTab(uploadPane, "Upload Track", Wt::WTabWidget::LazyLoading);
|
||||||
playControlWidget->addStyleClass("panel");
|
playControlWidget->addStyleClass("panel");
|
||||||
playControlWidget->addStyleClass("panel-default");
|
playControlWidget->addStyleClass("panel-default");
|
||||||
playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("gainsboro"));
|
playControlWidget->decorationStyle().setBackgroundColor(Wt::WColor("gainsboro"));
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
#include <Wt/WTimer>
|
#include <Wt/WTimer>
|
||||||
#include "TrackDetails.h"
|
#include "TrackDetails.h"
|
||||||
#include "RequestInterface.h"
|
#include "RequestInterface.h"
|
||||||
|
#include "UploadInterface.h"
|
||||||
|
#include "AdminInterface.h"
|
||||||
#include <Wt/WPanel>
|
#include <Wt/WPanel>
|
||||||
|
|
||||||
class PlayerInterface : public Wt::WContainerWidget
|
class PlayerInterface : public Wt::WContainerWidget
|
||||||
@@ -57,6 +59,8 @@ public:
|
|||||||
//TabView
|
//TabView
|
||||||
Wt::WTabWidget* mainDisplay;
|
Wt::WTabWidget* mainDisplay;
|
||||||
RequestInterface* requestPane;
|
RequestInterface* requestPane;
|
||||||
|
UploadInterface* uploadPane;
|
||||||
|
AdminInterface* adminPane;
|
||||||
|
|
||||||
//Vote Controls
|
//Vote Controls
|
||||||
Wt::WContainerWidget* voteMetaContainer;
|
Wt::WContainerWidget* voteMetaContainer;
|
||||||
|
|||||||
25
src/ui/UploadInterface.cpp
Normal file
25
src/ui/UploadInterface.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "UploadInterface.h"
|
||||||
|
|
||||||
|
UploadInterface::UploadInterface(WebInterface* app)
|
||||||
|
{
|
||||||
|
this->app = app;
|
||||||
|
}
|
||||||
33
src/ui/UploadInterface.h
Normal file
33
src/ui/UploadInterface.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com>
|
||||||
|
*
|
||||||
|
* This program 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef UPLOADINTERFACE_H
|
||||||
|
#define UPLOADINTERFACE_H
|
||||||
|
|
||||||
|
#include <Wt/WContainerWidget>
|
||||||
|
#include "../WebInterface.h"
|
||||||
|
|
||||||
|
class UploadInterface : public Wt::WContainerWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UploadInterface(WebInterface* app);
|
||||||
|
WebInterface* app;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // UPLOADINTERFACE_H
|
||||||
Reference in New Issue
Block a user