mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-05 09:53:12 +00:00
Cleaned up code, removed unnessesary notifications
This commit is contained in:
parent
d2858ce907
commit
26ddca3e6c
6 changed files with 216 additions and 163 deletions
45
account.php
45
account.php
|
@ -95,6 +95,7 @@
|
|||
<p>Don't leave! I'm with the science team!</p>
|
||||
<a class='btn btn-bad' href='app/account/logout.php'><img class='svg' src='assets/icons/sign-out.svg'>Forget Me</a>
|
||||
<br>
|
||||
<p>Scawwy</p>
|
||||
<a class='btn btn-bad' href='password-reset.php'><img class='svg' src='assets/icons/password.svg'>Reset Password</a>
|
||||
<button class="btn btn-bad" onclick="deleteAccount()"><img class='svg' src='assets/icons/trash.svg'>Forget me forever</button>
|
||||
</div>
|
||||
|
@ -366,7 +367,8 @@
|
|||
|
||||
tabcontent = document.getElementsByClassName("tabcontent");
|
||||
for (i = 0; i < tabcontent.length; i++) {
|
||||
tabcontent[i].style.display = "none";
|
||||
tabcontent[i].style.height = "0";
|
||||
tabcontent[i].style.overflow = "hidden";
|
||||
}
|
||||
|
||||
tablinks = document.getElementsByClassName("tablinks");
|
||||
|
@ -374,7 +376,8 @@
|
|||
tablinks[i].className = tablinks[i].className.replace(" active-tab", "");
|
||||
}
|
||||
|
||||
document.getElementById(tabName).style.display = "flex";
|
||||
document.getElementById(tabName).style.height = "21rem";
|
||||
document.getElementById(tabName).style.overflow = "scroll";
|
||||
evt.currentTarget.className += " active-tab";
|
||||
}
|
||||
</script>
|
||||
|
@ -395,31 +398,39 @@
|
|||
<?php
|
||||
foreach ($check_sanity as $result) {
|
||||
if ($result['type'] == 'critical') {
|
||||
echo "<p class='alert alert-bad'>
|
||||
<img class='svg' src='assets/icons/warning.svg'>
|
||||
".$result['message'];
|
||||
echo "<p class='alert alert-bad'>";
|
||||
|
||||
if (isset($result['link'])) echo " <a class='link' href='".$result['link']."'>Link</a>";
|
||||
echo "<span class='badge badge-critical'>Critical</span> ";
|
||||
|
||||
if ($result['fix'] == 'auto') {
|
||||
echo "<span class='badge badge-primary'>Auto fix available</span>";
|
||||
echo "<span class='badge badge-primary'>Auto fix available</span> ";
|
||||
} elseif ($result['fix'] == 'manual') {
|
||||
echo "<span class='badge badge-critical'>Manual fix required</span>";
|
||||
echo "<span class='badge badge-critical'>Manual fix required</span> ";
|
||||
}
|
||||
|
||||
if (isset($result['link'])) {
|
||||
echo "<a class='link badge badge-primary' href='".$result['link']."'>Recources</a> ";
|
||||
}
|
||||
|
||||
echo $result['message'];
|
||||
|
||||
echo "</p>";
|
||||
} else {
|
||||
echo "<p class='alert alert-warning'>
|
||||
<img class='svg' src='assets/icons/warning.svg'>
|
||||
".$result['message'];
|
||||
echo "<p class='alert alert-warning'>";
|
||||
|
||||
if (isset($result['link'])) echo " <a class='link' href='".$result['link']."'>Link</a>";
|
||||
echo "<span class='badge badge-warning'>Warning</span> ";
|
||||
|
||||
if ($result['fix'] == 'auto') {
|
||||
echo "<span class='badge badge-primary'>Auto fix available</span>";
|
||||
echo "<span class='badge badge-primary'>Auto fix available</span> ";
|
||||
} elseif ($result['fix'] == 'manual') {
|
||||
echo "<span class='badge badge-critical'>Manual fix required</span>";
|
||||
echo "<span class='badge badge-critical'>Manual fix required</span> ";
|
||||
}
|
||||
|
||||
if (isset($result['link'])) {
|
||||
echo "<a class='link badge badge-primary' href='".$result['link']."'>Recources</a> ";
|
||||
}
|
||||
|
||||
echo $result['message'];
|
||||
|
||||
echo "</p>";
|
||||
}
|
||||
|
@ -440,6 +451,7 @@
|
|||
<div class="login-root defaultDecoration defaultSpacing defaultFonts">
|
||||
<h2>Login</h2>
|
||||
<p>Passwords are important to keep safe. Don't tell anyone your password, not even Fluffy!</p>
|
||||
<div id="alertsLogin" class="alert-box"></div>
|
||||
<br>
|
||||
<form id="loginForm" method="POST" enctype="multipart/form-data">
|
||||
<input id="loginUsername" class="btn btn-neutral" type="text" name="username" placeholder="Username">
|
||||
|
@ -455,7 +467,7 @@
|
|||
var username = $("#loginUsername").val();
|
||||
var password = $("#loginPassword").val();
|
||||
var submit = $("#loginSubmit").val();
|
||||
$("#newSniff").load("app/account/account.php", {
|
||||
$("#alertsLogin").load("app/account/account.php", {
|
||||
username: username,
|
||||
password: password,
|
||||
submit_login: submit
|
||||
|
@ -466,6 +478,7 @@
|
|||
<div class="signup-root defaultDecoration defaultSpacing defaultFonts" style="display: none;">
|
||||
<h2>Make account</h2>
|
||||
<p>And amazing things happened here...</p>
|
||||
<div id="alertsSignup" class="alert-box"></div>
|
||||
<br>
|
||||
<form id="signupForm" method="POST" action="signup.php" enctype="multipart/form-data">
|
||||
<input id="signupUsername" class="btn btn-neutral" type="text" name="username" placeholder="Username">
|
||||
|
@ -487,7 +500,7 @@
|
|||
var confirm_password = $("#signupPasswordConfirm").val();
|
||||
var token = $("#signupToken").val();
|
||||
var submit = $("#signupSubmit").val();
|
||||
$("#newSniff").load("app/account/account.php", {
|
||||
$("#alertsSignup").load("app/account/account.php", {
|
||||
username: username,
|
||||
password: password,
|
||||
confirm_password: confirm_password,
|
||||
|
|
|
@ -71,11 +71,7 @@ if (isset($_POST['submit_login'])) {
|
|||
if ($error <= 0) {
|
||||
// Checking if Username is empty
|
||||
if (empty(trim($_POST["username"]))) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Who dis?', 'You must enter a username to login!', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>You must enter a username to login!</p>";
|
||||
$error += 1;
|
||||
} else {
|
||||
$username = trim($_POST["username"]);
|
||||
|
@ -83,11 +79,7 @@ if (isset($_POST['submit_login'])) {
|
|||
|
||||
// Check if Password is empty
|
||||
if (empty(trim($_POST["password"]))) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Whats the magic word?', 'Pls enter the super duper secrete word(s) to login!', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Pls enter the super duper secrete word(s) to login!</p>";
|
||||
$error += 1;
|
||||
} else {
|
||||
$password = trim($_POST["password"]);
|
||||
|
@ -134,28 +126,16 @@ if (isset($_POST['submit_login'])) {
|
|||
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','New loggin to ".$_SESSION['username']."')");
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Sus', 'Username or Password WRONG, please try again :3', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Sussy wussy, Username or Password WRONG, please try again :3</p>";
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','Failed to enter correct Password')");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Sus', 'Username or Password WRONG, please try again :3', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Sussy wussy, Username or Password WRONG, please try again :3</p>";
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','Failed to enter correct Username')");
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('woops...', 'Sowwy, something went wrong on our end :c', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Sowwy, something went wrong on our end :c</p>";
|
||||
}
|
||||
// Close statement
|
||||
mysqli_stmt_close($stmt);
|
||||
|
@ -220,19 +200,11 @@ if (isset($_POST['submit_signup'])) {
|
|||
if ($error <= 0) {
|
||||
if (empty(trim($_POST["username"]))) {
|
||||
// Username not entered
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Hmmm', 'You must enter a username!', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
$error = $error + 1;
|
||||
echo "<p class='alert alert-warning'>Username is empty!!!!!</p>";
|
||||
$error += 1;
|
||||
} elseif (!preg_match('/^[a-zA-Z0-9_]+$/', trim($_POST["username"]))) {
|
||||
// Username entered contains illegal characters
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Sussy Wussy', 'Very sus. Username can only contain letters, numbers, and underscores', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Very sus. Username can only contain letters, numbers, and underscores</p>";
|
||||
$error = $error + 1;
|
||||
} else {
|
||||
// Prepare sql for sus
|
||||
|
@ -249,21 +221,13 @@ if (isset($_POST['submit_signup'])) {
|
|||
|
||||
if (mysqli_stmt_num_rows($stmt) == 1) {
|
||||
// Username taken
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('A clone?', 'Sorry, but username was already taken by someone else', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Sorry, but username was already taken by someone else</p>";
|
||||
$error = $error + 1;
|
||||
} else {
|
||||
$username = trim($_POST["username"]);
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Reee', 'We had a problem on our end, sowwy', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>We had a problem on our end, sowwy</p>";
|
||||
$error = $error + 1;
|
||||
}
|
||||
// Outa here with this
|
||||
|
@ -274,19 +238,11 @@ if (isset($_POST['submit_signup'])) {
|
|||
// Validate sussness of Password
|
||||
if (empty(trim($_POST["password"]))) {
|
||||
// No password entered
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('What', 'You must enter a password, dont want just anyone seeing your stuff uwu', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>You must enter a password, dont want just anyone seeing your stuff uwu</p>";
|
||||
$error = $error + 1;
|
||||
} elseif(strlen(trim($_POST["password"])) < 6){
|
||||
// Password not long enough 👀
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('👀', 'Nice (Password) but its not long enough 👀', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Not long enough for my taste 👀</p>";
|
||||
$error = $error + 1;
|
||||
} else {
|
||||
$password = trim($_POST["password"]);
|
||||
|
@ -295,21 +251,13 @@ if (isset($_POST['submit_signup'])) {
|
|||
// Validate sussiness of the other Password
|
||||
if (empty(trim($_POST["confirm_password"]))) {
|
||||
// Did not confirm passowrd
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Eh?', 'Confirm the password pls, its very important you remember what it issss', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Confirm the password pls, its very important you remember what it issss</p>";
|
||||
$error = $error + 1;
|
||||
} else {
|
||||
$confirm_password = trim($_POST["confirm_password"]);
|
||||
if (empty($error) && $confirm_password != $password) {
|
||||
// Password and re-entered Password does not match
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Try again', 'Passwords need to be the same, smelly smelly', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Passwords need to be the same, smelly smelly</p>";
|
||||
$error = $error + 1;
|
||||
}
|
||||
}
|
||||
|
@ -318,11 +266,8 @@ if (isset($_POST['submit_signup'])) {
|
|||
if (isset($_POST['token'])) {
|
||||
// Check if invite code is empty
|
||||
if (empty($_POST['token'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('smelly', 'Enter Invite Code ;3', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-warning'>Enter Invite Code ;3</p>";
|
||||
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','Failed to enter correct Invite Code')");
|
||||
$error = $error + 1;
|
||||
} else {
|
||||
|
@ -340,19 +285,11 @@ if (isset($_POST['submit_signup'])) {
|
|||
if (mysqli_stmt_num_rows($stmt) == 1) {
|
||||
$token = trim($_POST["token"]);
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Argh', 'Your invite code did not check out, woopsie!', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Your invite code did not check out, woopsie!</p>";
|
||||
$error = $error + 1;
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Woops', 'The server or website died inside and could not process your request, sowwy!', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>The server or website died inside and could not process your request, sowwy!</p>";
|
||||
$error = $error + 1;
|
||||
}
|
||||
// Outa here with this
|
||||
|
@ -404,11 +341,7 @@ if (isset($_POST['submit_signup'])) {
|
|||
<?php
|
||||
mysqli_query($conn,"INSERT INTO logs (ipaddress, action) VALUES('$user_ip','New account ($username) has been made')");
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Bruh', 'Something went fuckywucky, please try later', 'var(--warning)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
echo "<p class='alert alert-bad'>Something went fuckywucky, please try later</p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
142
app/app.php
142
app/app.php
|
@ -433,24 +433,44 @@ class Sanity {
|
|||
$results = array();
|
||||
|
||||
if (!is_file(__DIR__."/../usr/conf/msg.json")) {
|
||||
$results[] = array('type'=>'warning', 'message'=>'msg.json is missing', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'msg.json is missing',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
|
||||
if (!is_file(__DIR__."/../usr/conf/conf.json")) {
|
||||
if (is_file(__DIR__."/../usr/conf/manifest.json")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'manifest.json is deprecated, please rename it to conf.json', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'manifest.json is deprecated, please rename it to conf.json',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
} else {
|
||||
$results[] = array('type'=>'critical', 'message'=>'conf.json is missing, using conf.default.json instead', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'conf.json is missing, using conf.default.json instead',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$manifest = json_decode(file_get_contents(__DIR__."/../usr/conf/conf.json"), true);
|
||||
|
||||
if (empty($manifest['user_name']) || $manifest['user_name'] == "[your name]") {
|
||||
$results[] = array('type'=>'warning', 'message'=>'conf.json is missing your name', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'conf.json is missing your name',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
if ($manifest['upload']['rename_on_upload']) {
|
||||
if (empty($manifest['upload']['rename_to'])) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'conf.json doesnt know what to rename your files to', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'conf.json doesnt know what to rename your files to',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
} else {
|
||||
$rename_to = $manifest['upload']['rename_to'];
|
||||
$rename_rate = 0;
|
||||
|
@ -464,15 +484,26 @@ class Sanity {
|
|||
if (str_contains($rename_to, '{{username}}') || str_contains($rename_to, '{{userid}}')) $rename_rate += 1;
|
||||
|
||||
if ($rename_rate < 2) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You will encounter errors when uploading images due to filenames, update your conf.json', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You will encounter errors when uploading images due to filenames, update your conf.json',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
} elseif ($rename_rate < 5 && $rename_rate > 2) {
|
||||
$results[] = array('type'=>'warning', 'message'=>'You may encounter errors when uploading images due to filenames, concider modifying your conf.json', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'You may encounter errors when uploading images due to filenames, concider modifying your conf.json',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($manifest['is_testing']) {
|
||||
$results[] = array('type'=>'warning', 'message'=>'You are currently in testing mode, errors will be displayed to the user. This is not recommended for production use.');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'You are currently in testing mode, errors will be displayed to the user. This is not recommended for production use.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -484,16 +515,32 @@ class Sanity {
|
|||
$results = array();
|
||||
|
||||
if (!is_dir("usr/images")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to setup an images folder.', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to setup an images folder.',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
if (!is_dir("usr/images/pfp")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to setup an pfp folder.', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to setup an pfp folder.',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
if (!is_dir("usr/images/previews")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to setup an previews folder.', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to setup an previews folder.',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
if (!is_dir("usr/images/thumbnails")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to setup an thumbnails folder.', 'fix'=>'auto');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to setup an thumbnails folder.',
|
||||
'fix'=>'auto'
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -517,13 +564,28 @@ class Sanity {
|
|||
$app_repo = json_decode($result, true);
|
||||
|
||||
if ($app_local['version'] < $app_repo['version']) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You are not running the latest version of the app v'.$app_repo['version'], 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You are not running the latest version of the app v'.$app_repo['version'],
|
||||
'link'=>'https://github.com/Fluffy-Bean/image-gallery',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
} elseif ($app_local['version'] > $app_repo['version']) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You are running a version of the app that is newer than the latest release v'.$app_repo['version'], 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You are running a version of the app that is newer than the latest release v'.$app_repo['version'],
|
||||
'link'=>'https://github.com/Fluffy-Bean/image-gallery',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
$results[] = array('type'=>'warning', 'message'=>'Your current version of PHP is '.PHP_VERSION.' The reccomended version is 8.0.0 or higher', 'link'=>'https://www.php.net/downloads.php');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'Your current version of PHP is '.PHP_VERSION.' The reccomended version is 8.0.0 or higher',
|
||||
'link'=>'https://www.php.net/downloads.php',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -534,16 +596,32 @@ class Sanity {
|
|||
$results = array();
|
||||
|
||||
if (!is_writable("usr/images")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to make the images folder writable', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to make the images folder writable',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
if (!is_writable("usr/images/pfp")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to make the pfp folder writable', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to make the pfp folder writable',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
if (!is_writable("usr/images/previews")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to make the previews folder writable', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to make the previews folder writable',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
if (!is_writable("usr/images/thumbnails")) {
|
||||
$results[] = array('type'=>'critical', 'message'=>'You need to make the thumbnails folder writable', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'critical',
|
||||
'message'=>'You need to make the thumbnails folder writable',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -554,7 +632,11 @@ class Sanity {
|
|||
$results = array();
|
||||
|
||||
if (!is_dir("usr/conf") && !is_dir("usr/images")) {
|
||||
$results[] = array('type'=>'warning', 'message'=>'You are running a fresh install, please configure your app through the settings. Alternatively you can import usr folder from a previous install', 'fix'=>'manual');
|
||||
$results[] = array(
|
||||
'type'=>'warning',
|
||||
'message'=>'You are running a fresh install, please configure your app through the settings. Alternatively you can import usr folder from a previous install',
|
||||
'fix'=>'manual'
|
||||
);
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
@ -564,21 +646,11 @@ class Sanity {
|
|||
{
|
||||
$results = array();
|
||||
|
||||
foreach ($this->check_json() as $result) {
|
||||
$results[] = $result;
|
||||
}
|
||||
foreach ($this->check_files() as $result) {
|
||||
$results[] = $result;
|
||||
}
|
||||
foreach ($this->check_permissions() as $result) {
|
||||
$results[] = $result;
|
||||
}
|
||||
foreach ($this->check_version() as $result) {
|
||||
$results[] = $result;
|
||||
}
|
||||
foreach ($this->check_freshinstall() as $result) {
|
||||
$results[] = $result;
|
||||
}
|
||||
foreach ($this->check_json() as $result) $results[] = $result;
|
||||
foreach ($this->check_files() as $result) $results[] = $result;
|
||||
foreach ($this->check_permissions() as $result) $results[] = $result;
|
||||
foreach ($this->check_version() as $result) $results[] = $result;
|
||||
foreach ($this->check_freshinstall() as $result) $results[] = $result;
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
|
42
css/main.css
42
css/main.css
|
@ -771,13 +771,14 @@ nav .btn {
|
|||
|
||||
.logs {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
overflow-y: scroll;
|
||||
display: none;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: 3px;
|
||||
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
}
|
||||
|
||||
.log {
|
||||
|
@ -819,13 +820,14 @@ nav .btn {
|
|||
|
||||
.bans {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
overflow-y: scroll;
|
||||
display: none;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: 3px;
|
||||
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
}
|
||||
|
||||
.ban {
|
||||
|
@ -874,13 +876,14 @@ nav .btn {
|
|||
|
||||
.user-settings {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
overflow-y: scroll;
|
||||
display: none;
|
||||
overflow-y: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: 3px;
|
||||
transition: height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
}
|
||||
|
||||
.user {
|
||||
|
@ -1115,17 +1118,17 @@ a.btn {
|
|||
|
||||
.alert-bad {
|
||||
border-color: #B66467;
|
||||
background-image: linear-gradient(to right, rgba(182, 100, 103, 0.3), rgba(21, 21, 21, 0));
|
||||
background-image: linear-gradient(120deg, rgba(182, 100, 103, 0.3), rgba(21, 21, 21, 0));
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
border-color: #D8A657;
|
||||
background-image: linear-gradient(to right, rgba(216, 166, 87, 0.3), rgba(21, 21, 21, 0));
|
||||
background-image: linear-gradient(120deg, rgba(216, 166, 87, 0.3), rgba(21, 21, 21, 0));
|
||||
}
|
||||
|
||||
.alert-good {
|
||||
border-color: #8C977D;
|
||||
background-image: linear-gradient(to right, rgba(140, 151, 125, 0.3), rgba(21, 21, 21, 0));
|
||||
background-image: linear-gradient(120deg, rgba(140, 151, 125, 0.3), rgba(21, 21, 21, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1136,7 +1139,6 @@ a.btn {
|
|||
.badge {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0.25rem;
|
||||
padding: 0.2em 0.4em;
|
||||
border: #121212 0.2rem solid;
|
||||
border-radius: 0.4rem;
|
||||
|
@ -1148,18 +1150,32 @@ a.btn {
|
|||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
.badge.link {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
.badge.badge-primary {
|
||||
background: rgba(140, 151, 125, 0.3);
|
||||
border: #8C977D 0.2rem solid;
|
||||
}
|
||||
.badge.badge-primary.link:hover {
|
||||
color: #8C977D;
|
||||
}
|
||||
.badge.badge-critical {
|
||||
background: rgba(182, 100, 103, 0.3);
|
||||
border: #B66467 0.2rem solid;
|
||||
}
|
||||
.badge.badge-critical.link:hover {
|
||||
color: #B66467;
|
||||
}
|
||||
.badge.badge-warning {
|
||||
background: rgba(216, 166, 87, 0.3);
|
||||
border: #D8A657 0.2rem solid;
|
||||
}
|
||||
.badge.badge-warning.link:hover {
|
||||
color: #D8A657;
|
||||
}
|
||||
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
|
|
|
@ -185,15 +185,15 @@ a.btn {
|
|||
|
||||
.alert-bad {
|
||||
border-color: $warning;
|
||||
background-image: linear-gradient(to right, rgba($warning, 0.3), rgba($bg, 0));
|
||||
background-image: linear-gradient(120deg, rgba($warning, 0.3), rgba($bg, 0));
|
||||
}
|
||||
.alert-warning {
|
||||
border-color: $alert;
|
||||
background-image: linear-gradient(to right, rgba($alert, 0.3), rgba($bg, 0));
|
||||
background-image: linear-gradient(120deg, rgba($alert, 0.3), rgba($bg, 0));
|
||||
}
|
||||
.alert-good {
|
||||
border-color: $page-accent;
|
||||
background-image: linear-gradient(to right, rgba($page-accent, 0.3), rgba($bg, 0));
|
||||
background-image: linear-gradient(120deg, rgba($page-accent, 0.3), rgba($bg, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -204,12 +204,16 @@ a.btn {
|
|||
@mixin badge($color, $fg: $color) {
|
||||
background: rgba($color, 0.3);
|
||||
border: $color $border-thickness solid;
|
||||
|
||||
&.link:hover {
|
||||
color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
margin: 0 0.25rem;
|
||||
//margin: 0 0.25rem;
|
||||
padding: 0.2em 0.4em;
|
||||
border: $black $border-thickness solid;
|
||||
@if $rad <= 0 {
|
||||
|
@ -225,6 +229,12 @@ a.btn {
|
|||
white-space: nowrap;
|
||||
text-align: center;
|
||||
|
||||
&.link {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
&.badge-primary {
|
||||
@include badge($page-accent);
|
||||
}
|
||||
|
|
|
@ -773,13 +773,14 @@
|
|||
|
||||
.logs {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
|
||||
padding: 0;
|
||||
|
||||
overflow-y: scroll;
|
||||
overflow-y: hidden;
|
||||
|
||||
display: none; flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
|
@ -787,6 +788,8 @@
|
|||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
transition: height 0.3s cubic-bezier(.19, 1, .22, 1);
|
||||
}
|
||||
.log {
|
||||
min-width: 850px;
|
||||
|
@ -830,13 +833,14 @@
|
|||
|
||||
.bans {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
|
||||
padding: 0;
|
||||
|
||||
overflow-y: scroll;
|
||||
overflow-y: hidden;
|
||||
|
||||
display: none; flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
|
@ -844,6 +848,8 @@
|
|||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
transition: height 0.3s cubic-bezier(.19, 1, .22, 1);
|
||||
}
|
||||
.ban {
|
||||
min-width: 900px;
|
||||
|
@ -893,13 +899,14 @@
|
|||
|
||||
.user-settings {
|
||||
width: 100%;
|
||||
height: 21rem;
|
||||
height: 0;
|
||||
|
||||
padding: 0;
|
||||
|
||||
overflow-y: scroll;
|
||||
overflow-y: hidden;
|
||||
|
||||
display: none; flex-direction: column;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
@if calc($rad - 0.5rem) > 0 {
|
||||
|
@ -907,6 +914,8 @@
|
|||
} @else {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
transition: height 0.3s cubic-bezier(.19, 1, .22, 1);
|
||||
}
|
||||
.user {
|
||||
min-width: 950px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue