Revert to default Flask structure
1
.gitignore
vendored
@@ -11,7 +11,6 @@ __pycache__/
|
|||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
.Python
|
.Python
|
||||||
build/
|
build/
|
||||||
!web/build/
|
|
||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
dist/
|
||||||
downloads/
|
downloads/
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ class ReverseProxied(object):
|
|||||||
return self.app(environ, start_response)
|
return self.app(environ, start_response)
|
||||||
|
|
||||||
|
|
||||||
web = Flask(__name__, static_folder="web/build/assets", template_folder="web/build/templates")
|
web = Flask(__name__)
|
||||||
web.config['TEMPLATES_AUTO_RELOAD'] = True
|
web.config['TEMPLATES_AUTO_RELOAD'] = True
|
||||||
log = logging.getLogger("bot")
|
log = logging.getLogger("bot")
|
||||||
user = 'webuser'
|
user = 'webuser'
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 597 B After Width: | Height: | Size: 597 B |
|
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
7
web/src/js/bootstrap.min.js
vendored
5
web/src/js/fontawesome.all.min.js
vendored
@@ -344,9 +344,9 @@ function switchTheme() {
|
|||||||
function setPageTheme(theme) {
|
function setPageTheme(theme) {
|
||||||
return;
|
return;
|
||||||
if (theme === "light")
|
if (theme === "light")
|
||||||
document.getElementById("pagestyle").setAttribute("href", "web/build/assets/css/bootstrap.min.css");
|
document.getElementById("pagestyle").setAttribute("href", "assets/css/bootstrap.min.css");
|
||||||
else if (theme === "dark")
|
else if (theme === "dark")
|
||||||
document.getElementById("pagestyle").setAttribute("href", "web/build/assets/css/bootstrap.darkly.min.css");
|
document.getElementById("pagestyle").setAttribute("href", "assets/css/bootstrap.darkly.min.css");
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------
|
// ---------------------
|
||||||
|
|||||||
5
web/src/js/popper.min.js
vendored
@@ -6,16 +6,16 @@
|
|||||||
|
|
||||||
<title>botamusique web interface</title>
|
<title>botamusique web interface</title>
|
||||||
|
|
||||||
<link rel="icon" href="web/build/assets/image/favicon.ico" />
|
<link rel="icon" href="assets/img/favicon.ico" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="web/build/assets/css/main.css">
|
<link rel="stylesheet" href="assets/css/main.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container page-header mb-5" id="banner">
|
<div class="container page-header mb-5" id="banner">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<img src="web/build/assets/image/logo.png" height="200px">
|
<img src="assets/img/logo.png" height="200px">
|
||||||
</div>
|
</div>
|
||||||
<div class="col my-auto">
|
<div class="col my-auto">
|
||||||
<h1>botamusique Web Interface</h1>
|
<h1>botamusique Web Interface</h1>
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="playlist" class="container mb-5">
|
<div id="playlist" class="container mb-5">
|
||||||
<div class="btn-toolbar mb-2" role="toolbar" aria-label="Playlist controls">
|
<div class="btn-toolbar mb-2" role="toolbar" aria-label="Playlist controls">
|
||||||
<button type="button" id="play-pause-btn" class="btn btn-info mb-2 btn-space" onclick="togglePlayPause()">
|
<button type="button" id="play-pause-btn" class="btn btn-info mb-2 btn-space" onclick="togglePlayPause()">
|
||||||
@@ -89,12 +88,12 @@
|
|||||||
<tbody id="playlist-table" class="playlist-table">
|
<tbody id="playlist-table" class="playlist-table">
|
||||||
<tr id="playlist-loading">
|
<tr id="playlist-loading">
|
||||||
<td colspan="4" class="text-center">
|
<td colspan="4" class="text-center">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/loading.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/loading.svg" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="playlist-empty" class="d-none">
|
<tr id="playlist-empty" class="d-none">
|
||||||
<td colspan="4" class="text-center">
|
<td colspan="4" class="text-center">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/empty_box.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/empty_box.svg" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="playlist-expand table-dark d-none">
|
<tr class="playlist-expand table-dark d-none">
|
||||||
@@ -109,7 +108,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<input hidden type="text" class="playlist-item-id" value="" />
|
<input hidden type="text" class="playlist-item-id" value="" />
|
||||||
<div class="float-left">
|
<div class="float-left">
|
||||||
<img width="80" class="playlist-item-thumbnail" src="web/build/assets/image/unknown-album.png" />
|
<img width="80" class="playlist-item-thumbnail" src="assets/img/unknown-album.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="playlist-artwork">
|
<div class="playlist-artwork">
|
||||||
<b class="playlist-item-title"></b>
|
<b class="playlist-item-title"></b>
|
||||||
@@ -208,10 +207,10 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div id="library-group" class="list-group library-group" style="overflow: auto;">
|
<div id="library-group" class="list-group library-group" style="overflow: auto;">
|
||||||
<div id="library-item-loading" class="list-group-item library-item">
|
<div id="library-item-loading" class="list-group-item library-item">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/loading.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/loading.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div id="library-item-empty" style="display: none" class="list-group-item library-item">
|
<div id="library-item-empty" style="display: none" class="list-group-item library-item">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/empty_box.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/empty_box.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div id="library-item" style="display: none;" class="list-group-item library-item">
|
<div id="library-item" style="display: none;" class="list-group-item library-item">
|
||||||
<input hidden type="text" class="library-item-id" value="" />
|
<input hidden type="text" class="library-item-id" value="" />
|
||||||
@@ -219,7 +218,7 @@
|
|||||||
<div class="library-thumb-col">
|
<div class="library-thumb-col">
|
||||||
<div class="library-thumb-img">
|
<div class="library-thumb-img">
|
||||||
<img class="library-item-thumb library-thumb-img"
|
<img class="library-item-thumb library-thumb-img"
|
||||||
src="web/build/assets/image/unknown-album.png" />
|
src="assets/img/unknown-album.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group-vertical library-thumb-grp">
|
<div class="btn-group-vertical library-thumb-grp">
|
||||||
<div class="library-item-play btn btn-secondary library-thumb-btn-up" title="Play">
|
<div class="library-item-play btn btn-secondary library-thumb-btn-up" title="Play">
|
||||||
@@ -252,10 +251,10 @@
|
|||||||
|
|
||||||
<div id="library-group" class="list-group library-group" style="overflow: auto;">
|
<div id="library-group" class="list-group library-group" style="overflow: auto;">
|
||||||
<div id="library-item-loading" class="list-group-item library-item">
|
<div id="library-item-loading" class="list-group-item library-item">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/loading.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/loading.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div id="library-item-empty" style="display: none" class="list-group-item library-item">
|
<div id="library-item-empty" style="display: none" class="list-group-item library-item">
|
||||||
<img style="margin: auto; width: 35px;" src="web/build/assets/image/empty_box.svg" />
|
<img style="margin: auto; width: 35px;" src="assets/img/empty_box.svg" />
|
||||||
</div>
|
</div>
|
||||||
<div id="library-item" style="display: none;" class="list-group-item library-item">
|
<div id="library-item" style="display: none;" class="list-group-item library-item">
|
||||||
<input hidden type="text" class="library-item-id" value="" />
|
<input hidden type="text" class="library-item-id" value="" />
|
||||||
@@ -457,8 +456,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast-body" id="playerContainer">
|
<div class="toast-body" id="playerContainer">
|
||||||
<img id="playerArtworkIdle" src="web/build/assets/image/empty_box.svg" />
|
<img id="playerArtworkIdle" src="assets/img/empty_box.svg" />
|
||||||
<img id="playerArtwork" src="web/build/assets/image/unknown-album.png" style="display: none;" />
|
<img id="playerArtwork" src="assets/img/unknown-album.png" style="display: none;" />
|
||||||
<div id="playerInfo">
|
<div id="playerInfo">
|
||||||
<div id="playerActionBox">
|
<div id="playerActionBox">
|
||||||
<button id="playerPlayBtn" class="btn btn-primary btn-sm btn-space" style="display: none"
|
<button id="playerPlayBtn" class="btn btn-primary btn-sm btn-space" style="display: none"
|
||||||
@@ -575,7 +574,7 @@
|
|||||||
|
|
||||||
<input type="hidden" id="maxUploadFileSize" value="{{ max_upload_file_size }}" />
|
<input type="hidden" id="maxUploadFileSize" value="{{ max_upload_file_size }}" />
|
||||||
|
|
||||||
<script src="web/build/assets/js/main.js"></script>
|
<script src="assets/js/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
<title>botamusique web interface</title>
|
<title>botamusique web interface</title>
|
||||||
|
|
||||||
<link rel="icon" href="web/build/assets/image/favicon.ico" />
|
<link rel="icon" href="assets/img/favicon.ico" />
|
||||||
|
|
||||||
<link id="pagestyle" rel="stylesheet" href="web/build/assets/css/bootstrap.min.css">
|
<link id="pagestyle" rel="stylesheet" href="assets/css/bootstrap.min.css">
|
||||||
<link rel="stylesheet" href="web/build/assets/css/main.css">
|
<link rel="stylesheet" href="assets/css/main.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -40,10 +40,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="web/build/assets/js/jquery-3.5.1.min.js"></script>
|
<script src="assets/js/jquery-3.5.1.min.js"></script>
|
||||||
<script src="web/build/assets/js/popper.min.js"></script>
|
<script src="assets/js/popper.min.js"></script>
|
||||||
<script src="web/build/assets/js/bootstrap.min.js"></script>
|
<script src="assets/js/bootstrap.min.js"></script>
|
||||||
<script src="web/build/assets/js/fontawesome.all.min.js"></script>
|
<script src="assets/js/fontawesome.all.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -11,12 +11,12 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: 'assets/js/[name].js',
|
filename: 'assets/js/[name].js',
|
||||||
path: path.resolve(__dirname, 'build/'),
|
path: path.resolve(__dirname, '../'),
|
||||||
//ecmaVersion: 5,
|
//ecmaVersion: 5,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'assets/css/[name].css',
|
filename: 'static/css/[name].css',
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
filename: 'templates/index.html',
|
filename: 'templates/index.html',
|
||||||
|
|||||||