-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
1,027 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class CollectionSubscriptionAdapter extends OsfAdapter { | ||
parentRelationship = 'collection-provider'; | ||
} | ||
|
||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'collection-subscription': CollectionSubscriptionAdapter; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import OsfAdapter from './osf-adapter'; | ||
|
||
export default class RegistrationSubscriptionAdapter extends OsfAdapter { | ||
parentRelationship = 'registration-provider'; | ||
} | ||
|
||
declare module 'ember-data/types/registries/adapter' { | ||
export default interface AdapterRegistry { | ||
'registration-subscription': RegistrationSubscriptionAdapter; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { AsyncBelongsTo, belongsTo } from '@ember-data/model'; | ||
import CollectionProviderModel from 'ember-osf-web/models/collection-provider'; | ||
import SubscriptionModel from './subscription'; | ||
|
||
// subscription model for collection-provider specific notifications to avoid ID conflicts with other provider types | ||
// e.g. preprint_providers, registration_providers with the same ID | ||
export default class CollectionSubscriptionModel extends SubscriptionModel { | ||
@belongsTo('collection-provider', { inverse: 'subscriptions' }) | ||
provider!: AsyncBelongsTo<CollectionProviderModel> & CollectionProviderModel; | ||
} | ||
|
||
declare module 'ember-data/types/registries/model' { | ||
export default interface ModelRegistry { | ||
'collection-subscription': SubscriptionModel; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { AsyncBelongsTo, belongsTo } from '@ember-data/model'; | ||
import RegistrationProviderModel from 'ember-osf-web/models/registration-provider'; | ||
import SubscriptionModel from './subscription'; | ||
|
||
// subscription model for registration-provider specific notifications to avoid ID conflicts with other provider types | ||
// e.g. preprint_providers, collection_providers with the same ID | ||
export default class RegistrationSubscriptionModel extends SubscriptionModel { | ||
@belongsTo('registration-provider', { inverse: 'subscriptions' }) | ||
provider!: AsyncBelongsTo<RegistrationProviderModel> & RegistrationProviderModel; | ||
} | ||
|
||
declare module 'ember-data/types/registries/model' { | ||
export default interface ModelRegistry { | ||
'registration-subscription': SubscriptionModel; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import OsfSerializer from './osf-serializer'; | ||
|
||
export default class CollectionSubscriptionSerializer extends OsfSerializer { | ||
} | ||
|
||
declare module 'ember-data/types/registries/serializer' { | ||
export default interface SerializerRegistry { | ||
'collection-subscription': CollectionSubscriptionSerializer; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import OsfSerializer from './osf-serializer'; | ||
|
||
export default class RegistrationSubscriptionSerializer extends OsfSerializer { | ||
} | ||
|
||
declare module 'ember-data/types/registries/serializer' { | ||
export default interface SerializerRegistry { | ||
'registration-subscription': RegistrationSubscriptionSerializer; | ||
} // eslint-disable-line semi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
lib/collections/addon/provider/moderation/settings/controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import Controller from '@ember/controller'; | ||
import { computed } from '@ember/object'; | ||
import { alias } from '@ember/object/computed'; | ||
import config from 'ember-get-config'; | ||
import pathJoin from 'ember-osf-web/utils/path-join'; | ||
|
||
export default class ModerationSettingsController extends Controller { | ||
userSettingsLink = pathJoin(config.OSF.url, 'settings', 'notifications'); | ||
@alias('model.id') providerId?: string; | ||
|
||
@computed('providerId') | ||
get subscriptionIds() { | ||
return [`${this.providerId}_new_pending_submissions`]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import Route from '@ember/routing/route'; | ||
// import { inject as service } from '@ember/service'; | ||
|
||
export default class ModerationSettings extends Route { | ||
} |
Oops, something went wrong.