Skip to content
Merged
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
1 change: 0 additions & 1 deletion src/app/core/constants/nav-items.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const AUTHENTICATED_MENU_ITEMS: string[] = [
'my-registrations',
'my-projects',
'my-preprints',
'registries-overview',
'settings',
];

Expand Down
4 changes: 3 additions & 1 deletion src/app/core/guards/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { map, switchMap, take } from 'rxjs';
import { inject } from '@angular/core';
import { CanActivateFn, Router } from '@angular/router';

import { AuthService } from '@core/services';
import { GetCurrentUser, UserSelectors } from '@osf/core/store/user';
import { hasViewOnlyParam } from '@osf/shared/helpers';

export const authGuard: CanActivateFn = () => {
const store = inject(Store);
const router = inject(Router);
const authService = inject(AuthService);

const isAuthenticated = store.selectSnapshot(UserSelectors.isAuthenticated);

Expand All @@ -28,7 +30,7 @@ export const authGuard: CanActivateFn = () => {
take(1),
map((isAuthenticated) => {
if (!isAuthenticated) {
router.navigate(['/']);
authService.navigateToSignIn();
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/features/analytics/analytics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
[isLoading]="isRelatedCountsLoading()"
[title]="'project.analytics.kpi.linksToThisProject'"
[value]="relatedCounts()?.linksToCount"
[showButton]="true"
[showButton]="false"
[buttonLabel]="'project.analytics.kpi.viewLinks'"
></osf-analytics-kpi>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ <h2>{{ 'settings.accountSettings.connectedEmails.title' | translate }}</h2>
<p-button
(onClick)="addEmail()"
[label]="'settings.accountSettings.connectedEmails.buttons.addEmail' | translate"
[disabled]="isEmailsLoading() || isEmailsSubmitting()"
/>
</div>
</p-card>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { filter, finalize, throttleTime } from 'rxjs';
import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject } from '@angular/core';
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';

import { DeleteEmail, MakePrimary, ResendConfirmation, UserEmailsSelectors } from '@core/store/user-emails';
import { DeleteEmail, GetEmails, MakePrimary, ResendConfirmation, UserEmailsSelectors } from '@core/store/user-emails';
import { UserSelectors } from '@osf/core/store/user';
import { ReadonlyInputComponent } from '@osf/shared/components';
import { IS_SMALL } from '@osf/shared/helpers';
Expand Down Expand Up @@ -45,6 +45,7 @@ export class ConnectedEmailsComponent {
readonly isEmailsSubmitting = select(UserEmailsSelectors.isEmailsSubmitting);

private readonly actions = createDispatchMap({
getEmails: GetEmails,
resendConfirmation: ResendConfirmation,
deleteEmail: DeleteEmail,
makePrimary: MakePrimary,
Expand Down Expand Up @@ -103,7 +104,10 @@ export class ConnectedEmailsComponent {
finalize(() => this.loaderService.hide()),
takeUntilDestroyed(this.destroyRef)
)
.subscribe(() => this.toastService.showSuccess('settings.accountSettings.connectedEmails.successResend'));
.subscribe(() => {
this.toastService.showSuccess('settings.accountSettings.connectedEmails.successResend');
this.actions.getEmails();
});
}
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import {
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { FormsModule } from '@angular/forms';

import { LoadingSpinnerComponent } from '@shared/components';
import { SelectOption } from '@shared/models';

import { LoadingSpinnerComponent } from '../loading-spinner/loading-spinner.component';

@Component({
selector: 'osf-generic-filter',
imports: [Select, FormsModule, LoadingSpinnerComponent],
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export { FilterChipsComponent } from './filter-chips/filter-chips.component';
export { FormSelectComponent } from './form-select/form-select.component';
export { FullScreenLoaderComponent } from './full-screen-loader/full-screen-loader.component';
export { GenericFilterComponent } from './generic-filter/generic-filter.component';
export { GlobalSearchComponent } from './global-search/global-search.component';
export { IconComponent } from './icon/icon.component';
export { InfoIconComponent } from './info-icon/info-icon.component';
export { LicenseComponent } from './license/license.component';
Expand Down Expand Up @@ -51,4 +52,3 @@ export { ToastComponent } from './toast/toast.component';
export { TruncatedTextComponent } from './truncated-text/truncated-text.component';
export { ViewOnlyLinkMessageComponent } from './view-only-link-message/view-only-link-message.component';
export { ViewOnlyTableComponent } from './view-only-table/view-only-table.component';
export { GlobalSearchComponent } from '@shared/components/global-search/global-search.component';
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { NgClass } from '@angular/common';
import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';

import { LoadingSpinnerComponent } from '@shared/components';
import { FILTER_PLACEHOLDERS } from '@shared/constants/filter-placeholders';
import { StringOrNull } from '@shared/helpers';
import { DiscoverableFilter, SelectOption } from '@shared/models';
import { FILTER_PLACEHOLDERS } from '@osf/shared/constants';
import { StringOrNull } from '@osf/shared/helpers';
import { DiscoverableFilter, SelectOption } from '@osf/shared/models';

import { GenericFilterComponent } from '../generic-filter/generic-filter.component';
import { LoadingSpinnerComponent } from '../loading-spinner/loading-spinner.component';

@Component({
selector: 'osf-reusable-filters',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InputText } from 'primeng/inputtext';
import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';
import { FormControl, ReactiveFormsModule } from '@angular/forms';

import { IconComponent } from '@shared/components';
import { IconComponent } from '../icon/icon.component';

@Component({
selector: 'osf-search-input',
Expand Down
Loading