mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-06 10:23: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?
|
||||
*.map
|
||||
|
||||
.idea/
|
10
profile.php
10
profile.php
|
@ -34,11 +34,7 @@
|
|||
echo "<img src='images/pfp/".$user['pfp_path']."'>";
|
||||
|
||||
$pfp_colour = $make_stuff->get_image_colour("images/pfp/".$user['pfp_path']);
|
||||
if (!empty($pfp_colour)) {
|
||||
$pfp_colour = $pfp_colour;
|
||||
} else {
|
||||
$pfp_colour = "var(--bg-3)";
|
||||
}
|
||||
if (empty($pfp_colour)) $pfp_colour = "var(--bg-3)";
|
||||
?>
|
||||
<style>
|
||||
.profile-root {
|
||||
|
@ -58,7 +54,9 @@
|
|||
<h2>
|
||||
<?php
|
||||
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>
|
||||
<div class="profile-info">
|
||||
|
|
10
upload.php
10
upload.php
|
@ -50,11 +50,13 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$("#uploadSubmit").submit(function(event) {
|
||||
$('#uploadSubmit').submit(function(event) {
|
||||
event.preventDefault();
|
||||
// Check if image avalible
|
||||
// Check if image available
|
||||
var file = $("#image").val();
|
||||
if (file != "") {
|
||||
if (file == "") {
|
||||
sniffleAdd('Gwha!', 'Pls provide image', 'var(--warning)', 'assets/icons/file-search.svg');
|
||||
} else {
|
||||
// Make form
|
||||
var formData = new FormData();
|
||||
|
||||
|
@ -89,8 +91,6 @@
|
|||
$("#alt").val("");
|
||||
$("#tags").val("");
|
||||
$("#submit").val("");
|
||||
} else {
|
||||
sniffleAdd('Gwha!', 'Pls provide image', 'var(--warning)', 'assets/icons/file-search.svg');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue