Skip to content

Commit

Permalink
Merge branch 'uat'
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Feb 26, 2024
2 parents 5b0cebe + 8b933fb commit e1a64f3
Show file tree
Hide file tree
Showing 22 changed files with 214 additions and 34 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/dependabot.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/deploy2prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '19.8.1'
node-version: '20.3.0'

- name: Cache node_modules
id: cache-npm
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy2uat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '19.8.1'
node-version: '20.3.0'

- name: Cache node_modules
id: cache-npm
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"scripts": {
"generate-meta-tag": "node ./node_modules/react-cache-buster/dist/generate-meta-tag.js",
"start": "webpack serve --mode development --port 3000 --open --hot --progress --host localhost --static .",
"start-remote-api": "webpack serve --config webpack.config_uat.js --mode development --port 3000 --open --hot --progress --host localhost --static .",
"build": "npm run generate-meta-tag && npm run build-app",
"build-app": "webpack --config webpack.config_prod.js",
"test": "react-scripts test",
Expand Down
Binary file modified public/img/background_start_mobil_at.webp
Binary file not shown.
Binary file added public/img/background_start_mobil_it.webp
Binary file not shown.
Binary file modified public/img/background_start_mobil_si.webp
Binary file not shown.
Binary file modified public/img/background_start_small_at.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/background_start_small_at.webp
Binary file not shown.
Binary file added public/img/background_start_small_it.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/background_start_small_it.webp
Binary file not shown.
Binary file modified public/img/background_start_small_si.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/background_start_small_si.webp
Binary file not shown.
Binary file modified public/img/background_start_tiny_at.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/background_start_tiny_it.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/background_start_tiny_si.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var axios = require("axios");
export const baseURL =
// "https://www2.zuugle.at/api";
window.location.host.indexOf("localhost") >= 0
? "http://localhost:8080/api"
? process.env.REACT_APP_API_URL
: `${window.location.protocol}//${window.location.host}/api`;

let axiosInstance = axios.create({
Expand Down
87 changes: 84 additions & 3 deletions src/components/DomainMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ if(process.env.NODE_ENV === "development") {
},
{
id: 3,
name: "Zuugle.it",
url: "https://www.zuugle.it",
},
{
id: 4,
name: "Zuugle.si",
url: "https://www.zuugle.si",
},
Expand All @@ -55,6 +60,11 @@ if (host.indexOf("www.zuugle.at") >= 0) {
},
{
id: 2,
name: "Zuugle.it",
url: "https://www.zuugle.it",
},
{
id: 3,
name: "Zuugle.si",
url: "https://www.zuugle.si",
},
Expand All @@ -75,6 +85,11 @@ else if (host.indexOf("www.zuugle.de") >= 0) {
},
{
id: 2,
name: "Zuugle.it",
url: "https://www.zuugle.it",
},
{
id: 3,
name: "Zuugle.si",
url: "https://www.zuugle.si",
},
Expand All @@ -94,14 +109,41 @@ else if (host.indexOf("www.zuugle.si") >= 0) {
url: "https://www.zuugle.at",
},
{
id: 2,
name: "Zuugle.de",
url: "https://www.zuugle.de",
},
{
id: 3,
name: "Zuugle.it",
url: "https://www.zuugle.it",
},
];
}
else if (host.indexOf("www.zuugle.it") >= 0) {
domain = 'www.zuugle.it';

listOfDomains = [
{
id: 0,
name: "Zuugle.it",
url: "https://www.zuugle.it",
},
{
id: 1,
name: "Zuugle.at",
url: "https://www.zuugle.at",
},
{
id: 2,
name: "Zuugle.de",
url: "https://www.zuugle.de",
},
{
id: 3,
name: "Zuugle.si",
url: "https://www.zuugle.si",
},
];
}
else if (host.indexOf("www.zuugle.ch") >= 0) {
domain = 'www.zuugle.ch';
Expand All @@ -125,6 +167,12 @@ if (host.indexOf("www2.zuugle.at") >= 0) {
url: "https://www2.zuugle.de",
},
{
id: 2,
name: "UAT Zuugle.it",
url: "https://www2.zuugle.it",
},
{
id: 3,
name: "UAT Zuugle.si",
url: "https://www2.zuugle.si",
},
Expand All @@ -144,6 +192,12 @@ else if (host.indexOf("www2.zuugle.de") >= 0) {
url: "https://www2.zuugle.at",
},
{
id: 2,
name: "UAT Zuugle.it",
url: "https://www2.zuugle.it",
},
{
id: 3,
name: "UAT Zuugle.si",
url: "https://www2.zuugle.si",
},
Expand All @@ -163,14 +217,41 @@ else if (host.indexOf("www2.zuugle.si") >= 0) {
url: "https://www2.zuugle.at",
},
{
id: 2,
name: "UAT Zuugle.de",
url: "https://www2.zuugle.de",
},
{
id: 3,
name: "UAT Zuugle.it",
url: "https://www2.zuugle.it",
},
];
}
else if (host.indexOf("www2.zuugle.it") >= 0) {
domain = 'www2.zuugle.it';

listOfDomains = [
{
id: 0,
name: "UAT Zuugle.it",
url: "https://www2.zuugle.it",
},
{
id: 1,
name: "UAT Zuugle.at",
url: "https://www2.zuugle.at",
},
{
id: 2,
name: "UAT Zuugle.de",
url: "https://www2.zuugle.de",
},
{
id: 3,
name: "UAT Zuugle.si",
url: "https://www2.zuugle.si",
},
];
}
else if (host.indexOf("www2.zuugle.ch") >= 0) {
domain = 'www2.zuugle.ch';
Expand All @@ -183,7 +264,7 @@ else if (host.indexOf("www2.zuugle.fr") >= 0) {


const secondMenu = [
{ id: 0, name: "Über Zuugle", url: "https://www.bahnzumberg.at/" },
{ id: 0, name: "Über Zuugle", url: "https://verein.bahn-zum-berg.at/" },
{ id: 1, name: "Impressum", url: "https://" + domain + "/imprint" },
{ id: 2, name: "Datenschutz", url: "https://" + domain + "/privacy" },
];
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/CityInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function CityInput({
} else if (host.indexOf("zuugle.si") >= 0) {
return "Ljubljana, Maribor,...";
} else if (host.indexOf("zuugle.it") >= 0) {
return "Bozen, ...";
return "Milano, Bozen, ...";
} else {
return "Wien, Graz, ...";
}
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports = {
attributes: {},
}),
new webpack.DefinePlugin({
"process.env.API_URL": JSON.stringify("http://localhost:8080/api"),
"process.env.REACT_APP_API_URL": JSON.stringify("http://localhost:8080/api"),
}),
],
};
102 changes: 102 additions & 0 deletions webpack.config_uat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

const BUILD_DIR = path.resolve(__dirname, "build");

module.exports = {
mode: "development",
output: {
path: BUILD_DIR,
filename: "./app_static/[name].bundle.js",
},

devServer: {
static: BUILD_DIR,
// directory: BUILD_DIR,
// staticOptions: {
// setHeaders: (res, path) => {
// if (path.endsWith('.json')) {
// res.setHeader('Content-Type', 'application/javascript');
// }
// },
// },
// staticOptions: {
// setHeaders: (res, path) => {
// if (path.endsWith('.json')) {
// res.setHeader('Content-Type', 'text/html');
// }
// },
// },

compress: true,
open: true,
historyApiFallback: true,
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: [["@babel/preset-env", { targets: "defaults" }]],
},
},
},
{
test: /\.html$/,
loader: "html-loader",
},
{
test: /\.(scss)$/,
loader: "css-loader",
},
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, "css-loader"],
},
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack", "url-loader"],
},
{
test: /\.(png|jpg|jpeg|gif|ico)$/,
use: [
{
loader: "file-loader",
options: {
name: "./img/[name].[hash].[ext]",
},
},
],
},
{
test: /\.js$/,
enforce: "pre",
use: ["source-map-loader"],
},
],
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
inject: true,
template: "./public/index.html",
}),
new CopyWebpackPlugin({
patterns: [{ from: "./public", to: "app_static" }],
}),
new MiniCssExtractPlugin({
filename: "./app_static/[name].styles.css",
attributes: {},
}),
new webpack.DefinePlugin({
"process.env.REACT_APP_API_URL": JSON.stringify("https://www2.zuugle.at/api"),
}),
],
};
Loading

0 comments on commit e1a64f3

Please sign in to comment.