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 @@
{{ backup.name }}
-
{{ $d(new Date(backup.date), "medium") }}
+
{{ $d(Date.parse(backup.date), "medium") }}
diff --git a/frontend/src/pages/Admin/Backup/ImportDialog.vue b/frontend/src/pages/Admin/Backup/ImportDialog.vue index 9d4aceef3..0aed4c0e2 100644 --- a/frontend/src/pages/Admin/Backup/ImportDialog.vue +++ b/frontend/src/pages/Admin/Backup/ImportDialog.vue @@ -15,7 +15,7 @@ {{ name }} - {{ $d(new Date(date), "medium") }} + {{ $d(new Date(date), "medium") }} diff --git a/frontend/src/pages/Admin/Dashboard/EventViewer.vue b/frontend/src/pages/Admin/Dashboard/EventViewer.vue new file mode 100644 index 000000000..7cff4b90b --- /dev/null +++ b/frontend/src/pages/Admin/Dashboard/EventViewer.vue @@ -0,0 +1,107 @@ + + + + + \ No newline at end of file diff --git a/frontend/src/pages/Admin/Dashboard/StatCard.vue b/frontend/src/pages/Admin/Dashboard/StatCard.vue index 706a4fe13..b399cb623 100644 --- a/frontend/src/pages/Admin/Dashboard/StatCard.vue +++ b/frontend/src/pages/Admin/Dashboard/StatCard.vue @@ -2,14 +2,11 @@ w @@ -71,10 +76,10 @@ export default { }; }, hasHeading() { - return Boolean(this.$slots.heading || this.title || this.icon); + return false; }, hasAltHeading() { - return Boolean(this.$slots.heading || (this.title && this.icon)); + return false; }, }, }; @@ -82,14 +87,14 @@ export default { diff --git a/frontend/src/pages/Admin/Dashboard/index.vue b/frontend/src/pages/Admin/Dashboard/index.vue index 9b6e5cb9c..feb95ae18 100644 --- a/frontend/src/pages/Admin/Dashboard/index.vue +++ b/frontend/src/pages/Admin/Dashboard/index.vue @@ -1,7 +1,7 @@