diff --git a/KTUSAPS.Data/Model/IssueType.cs b/KTUSAPS.Data/Model/IssueType.cs index b745503..3d25130 100644 --- a/KTUSAPS.Data/Model/IssueType.cs +++ b/KTUSAPS.Data/Model/IssueType.cs @@ -12,7 +12,7 @@ namespace KTUSAPS.Data.Model public string Name { get; set; } public string NameEn { get; set; } - public virtual ICollection Issues { get; set; } + public virtual HashSet Issues { get; set; } } } diff --git a/KTUSAPS.Data/Model/PublishedProblem.cs b/KTUSAPS.Data/Model/PublishedProblem.cs index b841209..d088ee8 100644 --- a/KTUSAPS.Data/Model/PublishedProblem.cs +++ b/KTUSAPS.Data/Model/PublishedProblem.cs @@ -26,7 +26,7 @@ namespace KTUSAPS.Data.Model public int? SolutionId { get; set; } public virtual Solution Solution { get; set; } - public ICollection Votes { get; set; } + public virtual HashSet Votes { get; set; } public PublishedProblem() { diff --git a/KTUSAPS/ClientApp/package-lock.json b/KTUSAPS/ClientApp/package-lock.json index db7f3de..438ea4d 100644 --- a/KTUSAPS/ClientApp/package-lock.json +++ b/KTUSAPS/ClientApp/package-lock.json @@ -4,6 +4,22 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@azure/msal-browser": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.18.0.tgz", + "integrity": "sha512-YiWsimjsjjVu56+zOUDB1U3BCD9YNPIEZmw5iHzMk14aanqxWIvJlo+Ewo5/3FqxILgBOFWliH2hZCQPRIqKSg==", + "requires": { + "@azure/msal-common": "^5.0.1" + } + }, + "@azure/msal-common": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-5.0.1.tgz", + "integrity": "sha512-CmPR3XM9+CGUu7V/+bAwDxyN6XqWJJhVLmv7utT3sbgay4l5roVXsD1t4wURTs8PwzxmmnJOrhvvGhoDxUW69g==", + "requires": { + "debug": "^4.1.1" + } + }, "@babel/code-frame": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", @@ -4289,7 +4305,6 @@ "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, "requires": { "ms": "2.1.2" } @@ -7626,8 +7641,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "multicast-dns": { "version": "6.2.3", diff --git a/KTUSAPS/ClientApp/package.json b/KTUSAPS/ClientApp/package.json index 644267b..c5513b7 100644 --- a/KTUSAPS/ClientApp/package.json +++ b/KTUSAPS/ClientApp/package.json @@ -8,6 +8,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "@azure/msal-browser": "^2.18.0", "@popperjs/core": "^2.10.1", "axios": "^0.20.0-0", "bootstrap": "^5.1.1", diff --git a/KTUSAPS/ClientApp/src/App.vue b/KTUSAPS/ClientApp/src/App.vue index a9ed8f9..5dfba76 100644 --- a/KTUSAPS/ClientApp/src/App.vue +++ b/KTUSAPS/ClientApp/src/App.vue @@ -19,15 +19,6 @@ -
-
-

Greitai baisis jūsų sesija

- - Po {{ expiresIn }} baigsis jūsų sesija. - Pratęsti sesija. - -
-
@@ -46,7 +37,7 @@ export default { } }, created() { - this.$store.dispatch('auth/initialize') + this.$store.dispatch('msalAuth/initialize') }, computed: { isLocal() { @@ -58,26 +49,6 @@ export default { return location.protocol !== 'https:' }, }, - methods: { - updateExpiry() { - const totalSeconds = Math.floor( - (this.$store.getters['auth/expires'] - new Date()) / 1000 - ) - const seconds = totalSeconds % 60 - const minutes = Math.floor(totalSeconds / 60) - if (minutes) { - this.expiresIn = `${minutes} min. ir ${seconds} sek.` - } else { - this.expiresIn = `${seconds} sek.` - } - }, - }, - mounted() { - this.interval = setInterval(this.updateExpiry, 1000) - }, - beforeUnmount() { - clearInterval(this.interval) - }, } diff --git a/KTUSAPS/ClientApp/src/components/NavMenu.vue b/KTUSAPS/ClientApp/src/components/NavMenu.vue index 740ce71..a757b13 100644 --- a/KTUSAPS/ClientApp/src/components/NavMenu.vue +++ b/KTUSAPS/ClientApp/src/components/NavMenu.vue @@ -27,18 +27,19 @@ >Pagrindinis -