mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-07 02:43:12 +00:00
Cleaned up some stuffs in profile and upload
This commit is contained in:
parent
956758fa25
commit
7f2e01a7f1
3 changed files with 55 additions and 55 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,3 +3,5 @@ images/
|
||||||
|
|
||||||
# CSS map, I don't think its needed for upload... I think?
|
# CSS map, I don't think its needed for upload... I think?
|
||||||
*.map
|
*.map
|
||||||
|
|
||||||
|
.idea/
|
10
profile.php
10
profile.php
|
@ -34,11 +34,7 @@
|
||||||
echo "<img src='images/pfp/".$user['pfp_path']."'>";
|
echo "<img src='images/pfp/".$user['pfp_path']."'>";
|
||||||
|
|
||||||
$pfp_colour = $make_stuff->get_image_colour("images/pfp/".$user['pfp_path']);
|
$pfp_colour = $make_stuff->get_image_colour("images/pfp/".$user['pfp_path']);
|
||||||
if (!empty($pfp_colour)) {
|
if (empty($pfp_colour)) $pfp_colour = "var(--bg-3)";
|
||||||
$pfp_colour = $pfp_colour;
|
|
||||||
} else {
|
|
||||||
$pfp_colour = "var(--bg-3)";
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
.profile-root {
|
.profile-root {
|
||||||
|
@ -58,7 +54,9 @@
|
||||||
<h2>
|
<h2>
|
||||||
<?php
|
<?php
|
||||||
echo $user['username'];
|
echo $user['username'];
|
||||||
if ($user_info->is_admin($conn, $user['id'])) echo "<span style='color: var(--accent); font-size: 16px; margin-left: 0.5rem;'>Admin</span>";
|
if ($user_info->is_admin($conn, $user['id'])) {
|
||||||
|
echo "<span style='color: var(--accent); font-size: 16px; margin-left: 0.5rem;'>Admin</span>";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
|
|
10
upload.php
10
upload.php
|
@ -50,11 +50,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$("#uploadSubmit").submit(function(event) {
|
$('#uploadSubmit').submit(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// Check if image avalible
|
// Check if image available
|
||||||
var file = $("#image").val();
|
var file = $("#image").val();
|
||||||
if (file != "") {
|
if (file == "") {
|
||||||
|
sniffleAdd('Gwha!', 'Pls provide image', 'var(--warning)', 'assets/icons/file-search.svg');
|
||||||
|
} else {
|
||||||
// Make form
|
// Make form
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
|
|
||||||
|
@ -89,8 +91,6 @@
|
||||||
$("#alt").val("");
|
$("#alt").val("");
|
||||||
$("#tags").val("");
|
$("#tags").val("");
|
||||||
$("#submit").val("");
|
$("#submit").val("");
|
||||||
} else {
|
|
||||||
sniffleAdd('Gwha!', 'Pls provide image', 'var(--warning)', 'assets/icons/file-search.svg');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue