completed
This commit is contained in:
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
|
||||
services:
|
||||
web:
|
||||
image: digi_signage:latest
|
||||
image: digi_serverdocker :latest
|
||||
ports:
|
||||
- "7100:5000"
|
||||
environment:
|
||||
|
||||
Binary file not shown.
BIN
static/uploads/cropped-cropped-main-picture-scaled-1.jpeg
Normal file
BIN
static/uploads/cropped-cropped-main-picture-scaled-1.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 410 KiB |
@@ -19,11 +19,33 @@
|
||||
max-width: 100px;
|
||||
max-height: 100px;
|
||||
}
|
||||
.popup-message {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
display: none;
|
||||
z-index: 1000;
|
||||
}
|
||||
.logo {
|
||||
max-height: 100px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Admin Panel</h1>
|
||||
<div class="d-flex justify-content-start align-items-center mb-4">
|
||||
{% if logo_exists %}
|
||||
<img src="{{ url_for('static', filename='uploads/logo.png') }}" alt="Logo" class="logo">
|
||||
{% endif %}
|
||||
<h1 class="mb-0">Admin Panel</h1>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header">
|
||||
<h2>Manage Users</h2>
|
||||
@@ -125,13 +147,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Change Theme Section -->
|
||||
<!-- Change Theme Card -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header">
|
||||
<h2>Change Theme</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('change_theme') }}" method="post">
|
||||
<form action="{{ url_for('change_theme') }}" method="post" onsubmit="showPopupMessage('Theme changed successfully!')">
|
||||
<div class="mb-3">
|
||||
<label for="theme" class="form-label">Select Theme</label>
|
||||
<select class="form-select" id="theme" name="theme" required>
|
||||
@@ -144,11 +166,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Clean Script Card -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header">
|
||||
<h2>Clean Unused Files</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('clean_unused_files') }}" method="post" onsubmit="showPopupMessage('Clean script executed successfully!')">
|
||||
<button type="submit" class="btn btn-danger">Run Clean Script</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="popup-message" class="popup-message"></div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
function showPopupMessage(message) {
|
||||
const popup = document.getElementById('popup-message');
|
||||
popup.textContent = message;
|
||||
popup.style.display = 'block';
|
||||
setTimeout(() => {
|
||||
popup.style.display = 'none';
|
||||
}, 5000); // Increased time to 5 seconds
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -15,35 +15,62 @@
|
||||
.dark-mode label, .dark-mode th, .dark-mode td {
|
||||
color: #ffffff;
|
||||
}
|
||||
.logo {
|
||||
max-height: 100px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Integrate Player</h1>
|
||||
<div class="d-flex justify-content-start align-items-center mb-4">
|
||||
{% if logo_exists %}
|
||||
<img src="{{ url_for('static', filename='uploads/logo.png') }}" alt="Logo" class="logo">
|
||||
{% endif %}
|
||||
<h1 class="mb-0">Integrate Player</h1>
|
||||
</div>
|
||||
|
||||
<!-- Players Section -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="card-header">
|
||||
<h2>Players</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<ul class="list-group">
|
||||
{% for player in players %}
|
||||
<div class="col-md-4 mb-3">
|
||||
<div class="card {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ player.username }}</h5>
|
||||
<p class="card-text">{{ player.ip }}</p>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" value="{{ url_for('player_fullscreen', player_id=player.id, _external=True) }}" readonly>
|
||||
<button class="btn btn-primary" onclick="copyToClipboard(this)">Copy</button>
|
||||
</div>
|
||||
<a href="{{ url_for('player_fullscreen', player_id=player.id) }}" class="btn btn-primary mt-2" target="_blank">Fullscreen Link</a>
|
||||
</div>
|
||||
</div>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>{{ player.username }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ url_for('player_page', player_id=player.id) }}" class="btn btn-sm btn-primary">View</a>
|
||||
<form action="{{ url_for('delete_player', player_id=player.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this player?');">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add Player Section -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header">
|
||||
<h2>Add Player</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('add_player') }}" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control {{ 'dark-mode' if theme == 'dark' else '' }}" id="username" name="username" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control {{ 'dark-mode' if theme == 'dark' else '' }}" id="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Add Player</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -15,24 +15,33 @@
|
||||
.dark-mode label, .dark-mode th, .dark-mode td {
|
||||
color: #ffffff;
|
||||
}
|
||||
.logo {
|
||||
max-height: 100px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Manage Group: {{ group.name }}</h1>
|
||||
<div class="d-flex justify-content-start align-items-center mb-4">
|
||||
{% if logo_exists %}
|
||||
<img src="{{ url_for('static', filename='uploads/logo.png') }}" alt="Logo" class="logo">
|
||||
{% endif %}
|
||||
<h1 class="mb-0">Manage Group: {{ group.name }}</h1>
|
||||
</div>
|
||||
|
||||
<!-- Add Players to Group Section -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<div class="card-header">
|
||||
<h2>Add Players to Group</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('add_player_to_group', group_id=group.id) }}" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="player_id" class="form-label">Select Player</label>
|
||||
<select class="form-select" id="player_id" name="player_id" required>
|
||||
<select class="form-select {{ 'dark-mode' if theme == 'dark' else '' }}" id="player_id" name="player_id" required>
|
||||
{% for player in available_players %}
|
||||
<option value="{{ player.id }}">{{ player.username }} ({{ player.ip }})</option>
|
||||
<option value="{{ player.id }}">{{ player.username }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -41,32 +50,29 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Players in Group Section -->
|
||||
<!-- Group Players Section -->
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header bg-secondary text-white">
|
||||
<h2>Players in Group</h2>
|
||||
<div class="card-header">
|
||||
<h2>Group Players</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for player in group.players %}
|
||||
<li class="list-group-item {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
{{ player.username }} ({{ player.ip }})
|
||||
<form action="{{ url_for('remove_player_from_group', group_id=group.id, player_id=player.id) }}" method="post" class="d-inline">
|
||||
<button type="submit" class="btn btn-danger btn-sm float-end">Remove</button>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>{{ player.username }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<form action="{{ url_for('remove_player_from_group', group_id=group.id, player_id=player.id) }}" method="post" style="display:inline;">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to remove this player from the group?');">Remove</button>
|
||||
</form>
|
||||
</li>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Replace Upload Content Card with Button -->
|
||||
{% if current_user.role == 'admin' %}
|
||||
<div class="text-center mb-4">
|
||||
<a href="{{ url_for('upload_content', target_type='group', target_id=group.id, return_url=request.url) }}" class="btn btn-primary">Upload Content</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
align-items: center;
|
||||
background-color: black;
|
||||
}
|
||||
img, video {
|
||||
img, video, embed, object {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: none;
|
||||
}
|
||||
.active {
|
||||
@@ -29,6 +31,10 @@
|
||||
<source src="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
{% elif item.file_name.endswith('.pdf') %}
|
||||
<object data="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" type="application/pdf" class="content-item" data-duration="{{ item.duration }}">
|
||||
<embed src="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" type="application/pdf" class="content-item" data-duration="{{ item.duration }}">
|
||||
</object>
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='uploads/' ~ item.file_name) }}" alt="Content Image" class="content-item" data-duration="{{ item.duration }}">
|
||||
{% endif %}
|
||||
|
||||
@@ -15,12 +15,33 @@
|
||||
.dark-mode label, .dark-mode th, .dark-mode td {
|
||||
color: #ffffff;
|
||||
}
|
||||
.popup-message {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
display: none;
|
||||
z-index: 1000;
|
||||
}
|
||||
.logo {
|
||||
max-height: 100px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Upload Content</h1>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<div class="d-flex justify-content-start align-items-center mb-4">
|
||||
{% if logo_exists %}
|
||||
<img src="{{ url_for('static', filename='uploads/logo.png') }}" alt="Logo" class="logo">
|
||||
{% endif %}
|
||||
<h1 class="mb-0">Upload Content</h1>
|
||||
</div>
|
||||
<form id="upload-form" action="{{ url_for('upload_content') }}" method="post" enctype="multipart/form-data" onsubmit="showPopupMessage('Content uploaded successfully!')">
|
||||
<input type="hidden" name="return_url" value="{{ return_url }}">
|
||||
<div class="mb-3">
|
||||
<label for="target_type" class="form-label">Target Type:</label>
|
||||
@@ -55,6 +76,8 @@
|
||||
<select name="media_type" id="media_type" class="form-select" required>
|
||||
<option value="image">Image</option>
|
||||
<option value="video">Video</option>
|
||||
<option value="pdf">PDF</option>
|
||||
<option value="ppt">PPT/PPTX</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
@@ -70,6 +93,9 @@
|
||||
<a href="{{ return_url }}" class="btn btn-secondary mt-3">Back</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary mt-3">Back to Dashboard</a>
|
||||
</div>
|
||||
|
||||
<div id="popup-message" class="popup-message"></div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script>
|
||||
document.getElementById('files').addEventListener('change', function(event) {
|
||||
@@ -87,6 +113,16 @@
|
||||
videoElement.src = URL.createObjectURL(videoFile);
|
||||
}
|
||||
});
|
||||
|
||||
function showPopupMessage(message) {
|
||||
const popup = document.getElementById('popup-message');
|
||||
popup.textContent = message;
|
||||
popup.style.display = 'block';
|
||||
setTimeout(() => {
|
||||
popup.style.display = 'none';
|
||||
document.getElementById('upload-form').submit();
|
||||
}, 5000); // Display time set to 5 seconds
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user