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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h3>{{ 'project.contributors.addContributor' | translate }}</h3>
</div>

<div class="filters-container flex flex-column gap-3">
<osf-search-input [control]="searchControl" [placeholder]="'project.contributors.searchPlaceholder' | translate" />
<osf-search-input [control]="searchControl" [placeholder]="searchPlaceholder | translate" />
</div>

<osf-contributors-list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ export class ContributorsDialogComponent implements OnInit {

currentUser = select(UserSelectors.getCurrentUser);

actions = createDispatchMap({
updateSearchValue: UpdateContributorsSearchValue,
updatePermissionFilter: UpdatePermissionFilter,
updateBibliographyFilter: UpdateBibliographyFilter,
deleteContributor: DeleteContributor,
addContributor: AddContributor,
updateContributor: UpdateContributor,
});

private readonly resourceType: ResourceType;
private readonly resourceId: string;

isCurrentUserAdminContributor = computed(() => {
const currentUserId = this.currentUser()?.id;
const initialContributors = this.initialContributors();
Expand All @@ -76,17 +88,15 @@ export class ContributorsDialogComponent implements OnInit {
);
});

actions = createDispatchMap({
updateSearchValue: UpdateContributorsSearchValue,
updatePermissionFilter: UpdatePermissionFilter,
updateBibliographyFilter: UpdateBibliographyFilter,
deleteContributor: DeleteContributor,
addContributor: AddContributor,
updateContributor: UpdateContributor,
});
get searchPlaceholder() {
return this.resourceType === ResourceType.Project
? 'project.contributors.searchProjectPlaceholder'
: 'project.contributors.searchRegistrationPlaceholder';
}

private readonly resourceType: ResourceType;
private readonly resourceId: string;
get hasChanges(): boolean {
return JSON.stringify(this.initialContributors()) !== JSON.stringify(this.contributors());
}

constructor() {
this.resourceId = this.config.data?.resourceId;
Expand All @@ -97,10 +107,6 @@ export class ContributorsDialogComponent implements OnInit {
});
}

get hasChanges(): boolean {
return JSON.stringify(this.initialContributors()) !== JSON.stringify(this.contributors());
}

ngOnInit(): void {
this.setSearchSubscription();
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/project/wiki/wiki.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<osf-sub-header [title]="'navigation.wiki' | translate" [tooltip]="'project.wiki.tooltip' | translate">
<osf-sub-header [title]="'navigation.wiki' | translate">
<p-buttongroup class="ml-auto">
<p-button
[label]="'project.wiki.view' | translate"
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,6 @@
"deleteWikiMessage": "Are you sure you want to delete this wiki page?",
"addNewWikiPlaceholder": "New wiki name",
"addWikiSuccess": "Wiki page has been added successfully",
"tooltip": "This page is currently connected to the collaborative wiki. All edits made will be visible to contributors with write permission in real time. Changes will be stored but not published until you click the \"Save\" button.",
"view": "View",
"edit": "Edit",
"compare": "Compare",
Expand Down
Loading