devshort

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/devshort.git
Log | Files | Refs | README | LICENSE

commit 71e1525d70480ac607a08b23dfb02440c71c9fc5
parent 40fd4668588fe8ce3cb889a39c97d13794cf74d0
Author: Florian <flokx@users.noreply.github.com>
Date:   Mon, 10 Feb 2020 10:39:36 +0100

Small fixes

- Fix margin of error message
- Fix detection of the index data card
- Remove unneeded check for favicon.ico in redirect.php

Diffstat:
Madmin.php | 2+-
Massets/main.js | 6+++---
Mredirect.php | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/admin.php b/admin.php @@ -161,7 +161,7 @@ if ($config_content["settings"]["custom_links"]) { <hr> <div class="overflow-auto" :id="chartId"></div> <hr> - <p class="text-center text-muted mb-0" v-if="this.name === 'Index'">Index is an internal entry. It counts the number of front page accesses.</p> + <p class="text-center text-muted mb-0" v-if="this.name === 'index'">Index is an internal entry. It counts the number of front page accesses.</p> <p class="text-center text-muted mb-0" v-else-if="this.name === '404-request'">404-request is an internal entry. It counts the number of accesses to non-existent shortlinks.</p> <div class="row" v-else> <div class="col-lg-9"> diff --git a/assets/main.js b/assets/main.js @@ -131,11 +131,11 @@ document.getElementById('add-form').addEventListener('submit', function (event) vm.loadData(); document.getElementById('status').innerHTML = ''; } else if (data.status === 'unvalid-url') { - document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger" role="alert">Unvalid URL. Please provide a valid URL.</div>'); + document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger mt-2" role="alert">Unvalid URL. Please provide a valid URL.</div>'); } else if (data.status === 'url-already-exists') { - document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger" role="alert">URL already exists. Please delete before readding.</div>'); + document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger mt-2" role="alert">Shortlink already exists. Please delete before readding.</div>'); } else { - document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger" role="alert">Error. Please try again.</div>'); + document.getElementById('status').insertAdjacentHTML('afterbegin', '<div class="alert alert-danger mt-2" role="alert">Error. Please try again.</div>'); } }); }); diff --git a/redirect.php b/redirect.php @@ -4,7 +4,7 @@ $short = strtolower(htmlspecialchars($_GET["short"])); -$return_404 = array("favicon.ico", "assets/vendor/bootstrap/bootstrap.min.css.map", "assets/vendor/frappe-charts/frappe-charts.min.iife.js.map"); +$return_404 = array("assets/vendor/bootstrap/bootstrap.min.css.map", "assets/vendor/frappe-charts/frappe-charts.min.iife.js.map"); if (in_array($short, $return_404)) { header("HTTP/1.1 404 Not Found"); exit;