diff --git a/frontend/src/api/about.js b/frontend/src/api/about.js new file mode 100644 index 000000000..f04322939 --- /dev/null +++ b/frontend/src/api/about.js @@ -0,0 +1,59 @@ +import { baseURL } from "./api-utils"; +import { apiReq } from "./api-utils"; + +const prefix = baseURL + "about"; + +const aboutURLs = { + version: `${prefix}/version`, + debug: `${prefix}`, + lastRecipe: `${prefix}/last-recipe-json`, + demo: `${prefix}/is-demo`, + log: num => `${prefix}/log/${num}`, + statistics: `${prefix}/statistics`, + events: `${prefix}/events`, + event: id => `${prefix}/events/${id}`, +}; + +export const aboutAPI = { + async getEvents() { + const resposne = await apiReq.get(aboutURLs.events); + return resposne.data; + }, + async deleteEvent(id) { + const resposne = await apiReq.delete(aboutURLs.event(id)); + return resposne.data; + }, + async deleteAllEvents() { + const resposne = await apiReq.delete(aboutURLs.events); + return resposne.data; + }, + // async getAppInfo() { + // const response = await apiReq.get(aboutURLs.version); + // return response.data; + // }, + + // async getDebugInfo() { + // const response = await apiReq.get(aboutURLs.debug); + // return response.data; + // }, + + // async getLogText(num) { + // const response = await apiReq.get(aboutURLs.log(num)); + // return response.data; + // }, + + // async getLastJson() { + // const response = await apiReq.get(aboutURLs.lastRecipe); + // return response.data; + // }, + + // async getIsDemo() { + // const response = await apiReq.get(aboutURLs.demo); + // return response.data; + // }, + + // async getStatistics() { + // const response = await apiReq.get(aboutURLs.statistics); + // return response.data; + // }, +}; diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js index aa1c612fc..53d22e8ac 100644 --- a/frontend/src/api/index.js +++ b/frontend/src/api/index.js @@ -11,6 +11,7 @@ import { userAPI } from "./users"; import { signupAPI } from "./signUps"; import { groupAPI } from "./groups"; import { siteSettingsAPI } from "./siteSettings"; +import { aboutAPI } from "./about"; /** * The main object namespace for interacting with the backend database @@ -30,4 +31,5 @@ export const api = { users: userAPI, signUps: signupAPI, groups: groupAPI, + about: aboutAPI, }; diff --git a/frontend/src/locales/dateTimeFormats/en-US.json b/frontend/src/locales/dateTimeFormats/en-US.json index 485c132d5..9e0240f38 100644 --- a/frontend/src/locales/dateTimeFormats/en-US.json +++ b/frontend/src/locales/dateTimeFormats/en-US.json @@ -9,5 +9,14 @@ "day": "numeric", "weekday": "long", "year": "numeric" + }, + "long": { + "year": "numeric", + "month": "long", + "day": "numeric", + "weekday": "long", + "hour": "numeric", + "minute": "numeric", + "hour12": true } } \ No newline at end of file diff --git a/frontend/src/locales/dateTimeFormats/es-ES.json b/frontend/src/locales/dateTimeFormats/es-ES.json index 485c132d5..9e0240f38 100644 --- a/frontend/src/locales/dateTimeFormats/es-ES.json +++ b/frontend/src/locales/dateTimeFormats/es-ES.json @@ -9,5 +9,14 @@ "day": "numeric", "weekday": "long", "year": "numeric" + }, + "long": { + "year": "numeric", + "month": "long", + "day": "numeric", + "weekday": "long", + "hour": "numeric", + "minute": "numeric", + "hour12": true } } \ No newline at end of file diff --git a/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue b/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue index 591b31b82..b4e333c9c 100644 --- a/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue +++ b/frontend/src/pages/Admin/Backup/AvailableBackupCard.vue @@ -19,7 +19,7 @@