mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added ability to preview on proxy
This commit is contained in:
parent
e07bf98e62
commit
36478f26d5
@ -158,8 +158,7 @@ export class OlympusApp {
|
||||
this.#weaponsManager = new WeaponsManager();
|
||||
|
||||
/* Set the address of the server */
|
||||
// Temporary forcing port 3000 for development
|
||||
this.getServerManager().setAddress(window.location.href.split('?')[0].replace('8080', '3000'));
|
||||
this.getServerManager().setAddress(window.location.href.split('?')[0]);
|
||||
|
||||
/* Setup all global events */
|
||||
this.#setupEvents();
|
||||
@ -182,8 +181,7 @@ export class OlympusApp {
|
||||
})
|
||||
|
||||
/* Load the config file from the server */
|
||||
// Temporary forcing port 3000 for development
|
||||
const configRequest = new Request(window.location.href.split('?')[0].replace('8080', '3000') + "resources/config");
|
||||
const configRequest = new Request(window.location.href.split('?')[0] + "resources/config");
|
||||
fetch(configRequest).then((response) => {
|
||||
if (response.status === 200) {
|
||||
return response.json();
|
||||
|
||||
@ -4,8 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class AircraftDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
// Temporary forcing port 3000 for development
|
||||
super(window.location.href.split('?')[0].replace('8080', '3000') + 'api/databases/units/aircraftdatabase');
|
||||
super(window.location.href.split('?')[0] + 'api/databases/units/aircraftdatabase');
|
||||
}
|
||||
|
||||
getCategory() {
|
||||
|
||||
@ -4,8 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class GroundUnitDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
// Temporary forcing port 3000 for development
|
||||
super(window.location.href.split('?')[0].replace('8080', '3000') + 'api/databases/units/groundunitdatabase');
|
||||
super(window.location.href.split('?')[0] + 'api/databases/units/groundunitdatabase');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@ -4,8 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class HelicopterDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
// Temporary forcing port 3000 for development
|
||||
super(window.location.href.split('?')[0].replace('8080', '3000') + 'api/databases/units/helicopterdatabase');
|
||||
super(window.location.href.split('?')[0] + 'api/databases/units/helicopterdatabase');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@ -4,8 +4,7 @@ import { UnitDatabase } from "./unitdatabase"
|
||||
|
||||
export class NavyUnitDatabase extends UnitDatabase {
|
||||
constructor() {
|
||||
// Temporary forcing port 3000 for development
|
||||
super(window.location.href.split('?')[0].replace('8080', '3000') + 'api/databases/units/navyunitdatabase');
|
||||
super(window.location.href.split('?')[0] + 'api/databases/units/navyunitdatabase');
|
||||
}
|
||||
|
||||
getSpawnPointsByName(name: string) {
|
||||
|
||||
@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: "/vite"
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user