Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.

26.1.0 (2026-01-01)
===================

* Angular FE support for Notification Refactor Project

# vi: ft=markdown

1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"styles": [
"src/styles/styles.scss",
"node_modules/primeflex/primeflex.css",
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css"
],
"stylePreprocessorOptions": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "osf",
"version": "25.4.0",
"version": "26.1.0",
"scripts": {
"ng": "ng",
"analyze-bundle": "ng build --configuration=analyze-bundle && source-map-explorer dist/**/*.js --no-border-checks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ <h1>{{ currentUser()?.fullName }}</h1>

<div class="flex flex-column gap-4 min-w-0 xl:align-items-end xl:flex-1">
<div class="flex flex-column gap-3 w-full md:flex-row xl:gap-4 xl:justify-content-end">
@if (currentUser()?.social?.orcid) {
@if (orcidId()) {
<div class="flex flex-row align-items-center gap-2">
<img ngSrc="assets/icons/colored/orcid.svg" width="16" height="16" alt="orcid" />
<a class="dark-blue-two-link font-bold" [href]="'https://orcid.org/' + currentUser()?.social?.orcid">
https://orcid.org/{{ currentUser()?.social?.orcid }}
<a class="dark-blue-two-link font-bold" [href]="'https://orcid.org/' + orcidId()">
https://orcid.org/{{ orcidId() }}
</a>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ export class ProfileInformationComponent {

userSocials = computed(() => mapUserSocials(this.currentUser()?.social, SOCIAL_LINKS));

orcidId = computed(() => {
const orcid = this.currentUser()?.external_identity?.ORCID;
return orcid?.status?.toUpperCase() === 'VERIFIED' ? orcid.id : undefined;
});

toProfileSettings() {
this.editProfile.emit();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export enum SubscriptionFrequency {
Never = 'none',
Daily = 'daily',
Instant = 'instant',
Instant = 'instantly',
}
1 change: 1 addition & 0 deletions src/app/shared/mappers/user/user.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class UserMapper {
employment: user.attributes.employment,
iri: user.links.iri,
social: user.attributes.social,
external_identity: user.attributes.external_identity,
defaultRegionId: user.relationships?.default_region?.data?.id,
canViewReviews: user.attributes.can_view_reviews === true, // [NS] Do not simplify it
timezone: user.attributes.timezone,
Expand Down
8 changes: 8 additions & 0 deletions src/app/shared/models/user/external-identity.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface OrcidInfo {
id: string;
status: string;
}

export interface ExternalIdentityModel {
ORCID?: OrcidInfo | null;
}
2 changes: 2 additions & 0 deletions src/app/shared/models/user/user-json-api.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ResponseDataJsonApi } from '../common/json-api.model';

import { Education } from './education.model';
import { Employment } from './employment.model';
import { ExternalIdentityModel } from './external-identity.model';
import { SocialModel } from './social.model';

export type UserResponseJsonApi = ResponseDataJsonApi<UserDataJsonApi>;
Expand Down Expand Up @@ -47,6 +48,7 @@ export interface UserAttributesJsonApi {
suffix: string;
locale: string;
social: SocialModel;
external_identity: ExternalIdentityModel;
timezone: string;
}

Expand Down
2 changes: 2 additions & 0 deletions src/app/shared/models/user/user.models.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Education } from './education.model';
import { Employment } from './employment.model';
import { ExternalIdentityModel } from './external-identity.model';
import { SocialModel } from './social.model';

export interface UserData {
Expand All @@ -24,6 +25,7 @@ export interface UserModel {
timezone: string;
locale: string;
social: SocialModel;
external_identity: ExternalIdentityModel;
defaultRegionId: string;
link?: string;
iri?: string;
Expand Down
5 changes: 0 additions & 5 deletions src/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
@use "base";
@use "icons";

@use "@fortawesome/fontawesome-free/scss/fontawesome.scss";
@use "@fortawesome/fontawesome-free/scss/solid.scss";
@use "@fortawesome/fontawesome-free/scss/brands.scss";
@use "@fortawesome/fontawesome-free/scss/regular.scss";

@use "./components/md-editor";
@use "./components/preprints";
@use "./components/collections";
Expand Down