* chore: upgrade dependencies
* feat/mac: draft pipeline
* feat/mac: use public folder for transient files
* feat/mac: set app fullscreen
* feat/mac: cmd + , toggles menu
* feat/mac: update readme
* refact: easier login process
* refact prevent style issues with safari
* refact reduce css download
* style: cleanup paginator design
* style: studio clock is responsive
* style: fix spacing style issues with safari
This commit is contained in:
Carlos Valente
2022-04-17 20:30:39 +02:00
committed by GitHub
parent 20d3ddbc18
commit db0eee3b9c
140 changed files with 10160 additions and 2139 deletions
+1 -4
View File
@@ -6,7 +6,4 @@ export const fetchEvent = async () => {
return res.data;
};
export const postEvent = async (data) => {
const res = await axios.post(eventURL, data);
return res;
};
export const postEvent = async (data) => axios.post(eventURL, data);
+7 -22
View File
@@ -6,31 +6,16 @@ export const fetchAllEvents = async () => {
return res.data;
};
export const requestPost = async (data) => {
await axios.post(eventsURL, data);
};
export const requestPost = async (data) => axios.post(eventsURL, data);
export const requestPut = async (data) => {
await axios.put(eventsURL, data);
};
export const requestPut = async (data) => axios.put(eventsURL, data);
export const requestPatch = async (data) => {
await axios.patch(eventsURL, data);
};
export const requestPatch = async (data) => axios.patch(eventsURL, data);
export const requestReorder = async (data) => {
await axios.patch(`${eventsURL}/reorder`, data);
};
export const requestReorder = async (data) => axios.patch(`${eventsURL}/reorder`, data);
export const requestApplyDelay = async (eventId) => {
const action = 'applydelay';
return await axios.patch(`${eventsURL}/${action}/${eventId}`);
};
export const requestApplyDelay = async (eventId) => axios.patch(`${eventsURL}/applydelay/${eventId}`);
export const requestDelete = async (eventId) => {
await axios.delete(`${eventsURL}/${eventId}`);
};
export const requestDelete = async (eventId) => axios.delete(`${eventsURL}/${eventId}`);
export const requestDeleteAll = async () => {
await axios.delete(`${eventsURL}/all`);
};
export const requestDeleteAll = async () => axios.delete(`${eventsURL}/all`);
+14 -28
View File
@@ -104,46 +104,35 @@ export const getSettings = async () => {
return res.data;
};
export const postSettings = async (data) => {
await axios.post(`${ontimeURL}/settings`, data);
};
export const postSettings = async (data) => axios.post(`${ontimeURL}/settings`, data);
export const getInfo = async () => {
const res = await axios.get(`${ontimeURL}/info`);
return res.data;
};
export const postInfo = async (data) => {
await axios.post(`${ontimeURL}/info`, data);
};
export const postInfo = async (data) => axios.post(`${ontimeURL}/info`, data);
export const getAliases = async () => {
const res = await axios.get(`${ontimeURL}/aliases`);
return res.data;
};
export const postAliases = async (data) => {
await axios.post(`${ontimeURL}/aliases`, data);
};
export const postAliases = async (data) => axios.post(`${ontimeURL}/aliases`, data);
export const getUserFields = async () => {
const res = await axios.get(`${ontimeURL}/userfields`);
return res.data;
};
export const postUserFields = async (data) => {
await axios.post(`${ontimeURL}/userfields`, data);
};
export const postUserFields = async (data) => axios.post(`${ontimeURL}/userfields`, data);
export const getOSC = async () => {
const res = await axios.get(`${ontimeURL}/osc`);
return res.data;
};
export const postOSC = async (data) => {
await axios.post(`${ontimeURL}/osc`, data);
};
export const postOSC = async (data) => axios.post(`${ontimeURL}/osc`, data);
export const downloadEvents = async () => {
await axios({
@@ -151,13 +140,13 @@ export const downloadEvents = async () => {
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
let headerLine = response.headers['Content-Disposition'];
const headerLine = response.headers['Content-Disposition'];
let filename = 'events.json';
// try and get the filename from the response
if (headerLine != null) {
let startFileNameIndex = headerLine.indexOf('"') + 1;
let endFileNameIndex = headerLine.lastIndexOf('"');
const startFileNameIndex = headerLine.indexOf('"') + 1;
const endFileNameIndex = headerLine.lastIndexOf('"');
filename = headerLine.substring(startFileNameIndex, endFileNameIndex);
}
@@ -173,14 +162,11 @@ export const downloadEvents = async () => {
export const uploadEvents = async (file) => {
const formData = new FormData();
formData.append('userFile', file); // appending file
await axios
.post(`${ontimeURL}/db`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
await axios.post(`${ontimeURL}/db`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
};
export const uploadEventsWithPath = async (filepath) => {
await axios.post(`${ontimeURL}/dbpath`, { path: filepath });
};
export const uploadEventsWithPath = async (filepath) => axios.post(`${ontimeURL}/dbpath`, { path: filepath });
+8 -29
View File
@@ -1,37 +1,16 @@
import axios from 'axios';
import { playbackURL } from '../api/apiConstants';
import { playbackURL } from './apiConstants';
export const getStart = async () => {
const res = await axios.get(playbackURL + '/start');
return res;
};
export const getStart = async () => axios.get(`${playbackURL}/start`);
export const getPause = async () => {
const res = axios.get(playbackURL + '/pause');
return res;
};
export const getPause = async () => axios.get(`${playbackURL}/pause`);
export const getRoll = async () => {
const res = axios.get(playbackURL + '/roll');
return res;
};
export const getRoll = async () => axios.get(`${playbackURL}/roll`);
export const getPrevious = async () => {
const res = axios.get(playbackURL + '/previous');
return res;
};
export const getPrevious = async () => axios.get(`${playbackURL}/previous`);
export const getNext = async () => {
const res = axios.get(playbackURL + '/next');
return res;
};
export const getNext = async () => axios.get(`${playbackURL}/next`);
export const getUnload = async () => {
const res = axios.get(playbackURL + '/unload');
return res;
};
export const getUnload = async () => axios.get(`${playbackURL}/unload`);
export const getReload = async () => {
const res = axios.get(playbackURL + '/reload');
return res;
};
export const getReload = async () => axios.get(`${playbackURL}/reload`);