Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • coscine/frontend/apps/ui
1 result
Select Git revision
Loading items
Show changes
Commits on Source (4)
...@@ -24,8 +24,6 @@ module.exports = { ...@@ -24,8 +24,6 @@ module.exports = {
"error", "error",
{ "allowWholeFile": true } { "allowWholeFile": true }
], ],
// ToDo: REMOVE ONCE error AND pid MODULE'S STORE STATES ARE IMPLEMENTED
"@typescript-eslint/no-empty-interface": 0, // Empty Interfaces error/warning will be ignored for now.
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], // will only ignore variables that start with an underscore _ "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], // will only ignore variables that start with an underscore _
"vue/multi-word-component-names": "off" "vue/multi-word-component-names": "off"
}, },
......
{ {
"name": "ui", "name": "ui",
"version": "1.17.0", "version": "1.17.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
......
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ErrorState { export interface ErrorState {
/* /*
-------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------
......
...@@ -91,7 +91,28 @@ export default defineComponent({ ...@@ -91,7 +91,28 @@ export default defineComponent({
}, },
}, },
created() {
this.fixMalformedLoginStoredData(); // TODO: Remove this from March 2023
},
methods: { methods: {
//-----------------------------------------------------------------
// Method necessary only temporarily. Needed due to the fixed JSON
// format before the UI migration of login. Leave it in for the
// time being, to ensure backwards compatibility with an already
// chosen institution inside the local storage's storedData. This
// is a one time fix for data conforming to the old schema. Can be
// removed from March 2023. Also edit the store type to use object.
fixMalformedLoginStoredData() {
const loginStoredData = this.loginStore.loginStoredData;
if (loginStoredData && loginStoredData.trim() !== "") {
this.loginStore.loginStoredData = loginStoredData
.replace("entityID", "entityId")
.replace("DisplayName", "displayName")
.replace("Logo", "logo");
}
},
//-----------------------------------------------------------------
toOrcidLoginPage() { toOrcidLoginPage() {
if (this.loginUrls && this.loginUrls.orcidUrl) { if (this.loginUrls && this.loginUrls.orcidUrl) {
let url = `${this.loginUrls.orcidUrl}`; let url = `${this.loginUrls.orcidUrl}`;
......
...@@ -30,7 +30,7 @@ export const useLoginStore = defineStore({ ...@@ -30,7 +30,7 @@ export const useLoginStore = defineStore({
expiredSession: null, expiredSession: null,
tosAccepted: null, tosAccepted: null,
currentTosVersion: null, currentTosVersion: null,
loginStoredData: useLocalStorage("coscine.login.storedData", ""), loginStoredData: useLocalStorage("coscine.login.storedData", ""), // TODO: Use Type DFNAAIInstitution from March 2023
loginUrls: null, loginUrls: null,
}), }),
......
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface PidState { export interface PidState {
/* /*
-------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------
......
...@@ -83,13 +83,11 @@ export const useNotificationStore = defineStore({ ...@@ -83,13 +83,11 @@ export const useNotificationStore = defineStore({
}, },
postNotification(toast: NotificationToast) { postNotification(toast: NotificationToast) {
// TODO: Fix typing this.notificationQueue.push(toast);
this.notificationQueue.push(toast); // Weird typescript error because of dissolved object
}, },
deleteNotification(toast: NotificationToast) { deleteNotification(toast: NotificationToast) {
// TODO: Fix typing const index = this.notificationQueue.indexOf(toast);
const index = this.notificationQueue.indexOf(toast); // Weird typescript error because of dissolved object
this.notificationQueue.splice(index); this.notificationQueue.splice(index);
}, },
}, },
......