Skip to content

Commit 45082dd

Browse files
committed
4.3 Release
1 parent ed64fac commit 45082dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2610
-624
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module.exports = {
2222
"allowDestructuring": true, // Allow `const { props, state } = this`; false by default
2323
"allowedNames": ["vm"] // Allow `const vm= this`; `[]` by default
2424
}
25-
]
25+
],
26+
"vue/valid-v-slot": ["error", {"allowModifiers": true}]
2627
},
2728
overrides: [
2829
{
@@ -34,5 +35,5 @@ module.exports = {
3435
jest: true
3536
}
3637
}
37-
]
38+
],
3839
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@ckeditor/ckeditor5-theme-lark": "^35.0.0",
4242
"@ckeditor/ckeditor5-upload": "^35.0.0",
4343
"@ckeditor/ckeditor5-vue2": "^3.0.0",
44+
"@types/leaflet": "^1.9.14",
4445
"@types/marked": "^4.0.7",
4546
"@types/qs": "^6.9.7",
4647
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
@@ -50,7 +51,9 @@
5051
"colors": "1.4.0",
5152
"core-js": "^3.21.1",
5253
"dompurify": "^2.4.1",
54+
"html-to-image": "^1.11.11",
5355
"idb": "^7.0.1",
56+
"leaflet": "^1.9.4",
5457
"localforage": "^1.10.0",
5558
"marked": "^4.2.5",
5659
"postcss": "^8.4.31",
@@ -66,7 +69,6 @@
6669
"vue-cookies": "^1.7.4",
6770
"vue-final-modal": "^2.4.3",
6871
"vue-js-modal": "^2.0.1",
69-
"vue-matomo": "^4.1.0",
7072
"vue-meta": "^2.4.0",
7173
"vue-observe-visibility": "^1.0.0",
7274
"vue-pdf-embed": "^1.1.4",

public/layers-2x.png

1.23 KB
Loading

public/layers.png

696 Bytes
Loading

public/marker-icon-2x.png

2.41 KB
Loading

public/marker-icon.png

1.43 KB
Loading

public/marker-shadow.png

618 Bytes
Loading

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- App.vue -->
22
<template>
33
<v-app>
4-
<ScotNavBar />
4+
<ScotNavBar style="z-index: 99;"/>
55
<v-main style="max-height: 100vh">
66
<QuickSettingsDrawer />
77
<v-dialog v-if="searchResults != undefined" :value="showSearchOverlay">

src/api/auth.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ export default (axios: AxiosStatic) => ({
9090
method: 'GET',
9191
withCredentials: true
9292
})
93+
},
94+
async resetPasswordAttempts(username: number): Promise<any> {
95+
return axios({
96+
url: '/users/' + username + '/reset-failed-attempts',
97+
method: 'POST',
98+
withCredentials: true
99+
})
93100
}
94101
}
95102
);

src/api/elements.ts

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {AxiosStatic} from "axios"
22
import { IRElementType, IRElementStatus, PermissionEnum } from "@/store/modules/IRElements/types"
33
import { convertToSnakeCase } from '@/utils/elementUtils'
44

5-
const IRElementAPIPaths: {[key in IRElementType]?: string}= {
5+
const IRElementAPIPaths: {[key in IRElementType]?: string} = {
66
[IRElementType.Alertgroup]: "/alertgroup",
77
[IRElementType.Event]: "/event",
88
[IRElementType.Alert]: "/alert",
@@ -142,14 +142,15 @@ export default (axios: AxiosStatic) => ({
142142
})
143143
},
144144

145-
async submitFile(formData:FormData, targetType:string, targetId:string): Promise<any> {
145+
async submitFile(formData: FormData, targetType: string, targetId: string, description: string | null = null): Promise<any> {
146146
return axios({
147147
url: '/file/',
148148
method: 'POST',
149149
headers: {
150150
'Content-Type': 'multipart/form-data',
151151
'target_type': targetType,
152152
'target_id': targetId,
153+
'description': description
153154
},
154155
withCredentials: true,
155156
data: formData
@@ -195,6 +196,26 @@ export default (axios: AxiosStatic) => ({
195196
})
196197
},
197198

199+
async updateFileById(fileId: number, filename: string | null, description: string | null) {
200+
const path = 'file' + '/' + fileId
201+
const data: any = {}
202+
if (filename) {
203+
data["filename"] = filename
204+
}
205+
if (description) {
206+
data["description"] = description
207+
}
208+
return axios({
209+
url: path,
210+
method: 'PUT',
211+
headers: {
212+
'Content-Type': 'application/json'
213+
},
214+
withCredentials: true,
215+
data: data
216+
})
217+
},
218+
198219
async undeleteElementById(elementId: number, elementType: IRElementType, keep_id: boolean = true) {
199220
const path = IRElementAPIPaths[elementType] + '/undelete'
200221
return axios({
@@ -615,6 +636,18 @@ export default (axios: AxiosStatic) => ({
615636
})
616637
},
617638

639+
async addEntityTag(entityId:number, tagToAdd:any): Promise<any> {
640+
return axios({
641+
url: `/entity/${entityId}/tag`,
642+
method: 'POST',
643+
headers: {
644+
'Content-Type': 'application/json'
645+
},
646+
withCredentials:true,
647+
data: {'id': tagToAdd}
648+
})
649+
},
650+
618651
async removeEntityClass(entityId:number, entityClassesToRemove:any): Promise<any> {
619652
return axios({
620653
url: `/entity/${entityId}/entity_class/remove`,
@@ -742,4 +775,57 @@ export default (axios: AxiosStatic) => ({
742775
withCredentials: true
743776
})
744777
},
745-
});
778+
779+
async upvoteElement(elementID: number, elementType: IRElementType, abortController: AbortController): Promise<any> {
780+
return axios({
781+
url: `${IRElementAPIPaths[elementType]}/${elementID}/upvote`,
782+
method: 'POST',
783+
withCredentials: true,
784+
signal: abortController?.signal
785+
})
786+
},
787+
788+
async downvoteElement(elementID: number, elementType: IRElementType, abortController: AbortController): Promise<any> {
789+
return axios({
790+
url: `${IRElementAPIPaths[elementType]}/${elementID}/downvote`,
791+
method: 'POST',
792+
withCredentials: true,
793+
signal: abortController?.signal
794+
})
795+
},
796+
797+
async favoriteElement(elementID: number, elementType: IRElementType, abortController: AbortController): Promise<any> {
798+
return axios({
799+
url: `${IRElementAPIPaths[elementType]}/${elementID}/favorite`,
800+
method: 'POST',
801+
withCredentials: true,
802+
signal: abortController?.signal
803+
})
804+
},
805+
806+
async subscribeElement(elementID: number, elementType: IRElementType, abortController: AbortController): Promise<any> {
807+
return axios({
808+
url: `notification/subscribe`,
809+
method: 'POST',
810+
withCredentials: true,
811+
data: {
812+
target_type: convertToSnakeCase(elementType),
813+
target_id: elementID
814+
},
815+
signal: abortController?.signal
816+
})
817+
},
818+
819+
async unsubscribeElement(elementID: number, elementType: IRElementType, abortController: AbortController): Promise<any> {
820+
return axios({
821+
url: `notification/unsubscribe`,
822+
method: 'POST',
823+
withCredentials: true,
824+
data: {
825+
target_type: convertToSnakeCase(elementType),
826+
target_id: elementID
827+
},
828+
signal: abortController?.signal
829+
})
830+
},
831+
});

0 commit comments

Comments
 (0)