diff --git a/browser b/browser new file mode 120000 index 0000000..99a72d8 --- /dev/null +++ b/browser @@ -0,0 +1 @@ +/home/maxime/Projects/WebstormProjects/tactique-basket-app/platforms/browser \ No newline at end of file diff --git a/drone/deliver.sh b/drone/deliver.sh index c6d6791..89e6feb 100755 --- a/drone/deliver.sh +++ b/drone/deliver.sh @@ -33,7 +33,10 @@ case "$TYPE" in ;; "browser") OUT_DIR="platforms/browser/www/" - SERV_DIR="/server/apache/TBasket/" + if [ "$DRONE_BRANCH" = "production" ]; then + SERV_DIR="public_html/basket" + else SERV_DIR="/server/apache/TBasket/" + fi ;; "electron") OUT_DIR="platforms/electron/build" diff --git a/www/js/counter.js b/www/js/counter.js deleted file mode 100644 index abc4a12..0000000 --- a/www/js/counter.js +++ /dev/null @@ -1,27 +0,0 @@ -import {ADDRESS} from "./constants.js"; - -let counter = 0; - -window.onload = () => initCounter(); -window.makeIncrement = () => makeIncrement(); - -function updateText() { - document.getElementById("counter").innerHTML = counter -} - -async function makeIncrement() { - fetch(`http://${ADDRESS}/counter`, {method: 'POST'}) - .then(response => { //TODO verify if it's not an error - counter++ - updateText() - }) -} - -function initCounter() { - fetch(`http://${ADDRESS}/counter`, {method: 'GET'}) - .then(response => response.json()) - .then(json => { - counter = json.value - updateText() - }) -} diff --git a/www/js/utils.js b/www/js/utils.js new file mode 100644 index 0000000..e69de29 diff --git a/www/login/index.html b/www/login/index.html index 75cd2b4..f67b43e 100644 --- a/www/login/index.html +++ b/www/login/index.html @@ -9,7 +9,7 @@