diff --git a/app/guid-node/links/styles.scss b/app/guid-node/links/styles.scss index 3c10baeda7..c904e51f0f 100644 --- a/app/guid-node/links/styles.scss +++ b/app/guid-node/links/styles.scss @@ -22,3 +22,8 @@ max-width: 50px; max-height: 50px; } + +.links-page-wrapper { + margin: 20px; +} + diff --git a/app/guid-node/links/template.hbs b/app/guid-node/links/template.hbs index 530347c928..51fd1f3bac 100644 --- a/app/guid-node/links/template.hbs +++ b/app/guid-node/links/template.hbs @@ -1,38 +1,47 @@ -

{{t 'links.linked-services'}}

- - - - - - - - - - - - {{#each this.model.configuredLinkAddons as |configuredLinkAddon|}} - - - - - - - {{/each}} - -
{{t 'links.linked-service'}}{{t 'links.display-name'}}{{t 'links.resource-type'}} - {{#if this.currentUserCanEdit}} - - {{t 'links.edit'}} - - {{/if}} -
- {{t - {{configuredLinkAddon.externalLinkService.displayName}} - {{configuredLinkAddon.displayName}}{{configuredLinkAddon.resourceType}}{{t 'links.link'}}
\ No newline at end of file +
+

{{t 'links.linked-services'}}

+ {{#if this.model.configuredLinkAddons}} + + + + + + + + + + + {{#each this.model.configuredLinkAddons as |configuredLinkAddon|}} + + + + + + + {{/each}} + +
{{t 'links.linked-service'}}{{t 'links.display-name'}}{{t 'links.resource-type'}} + {{#if this.currentUserCanEdit}} + + {{t 'links.edit'}} + + {{/if}} +
+ {{t + {{configuredLinkAddon.externalLinkService.displayName}} + {{configuredLinkAddon.displayName}}{{configuredLinkAddon.resourceType}}{{t 'links.link'}}
+ {{else}} +

{{t 'links.empty-screen-message'}}

+ {{#if this.currentUserCanEdit}} +

{{t 'links.point-to-addons-message'}} {{t 'addons.heading'}}

+ {{/if}} + {{/if}} +
diff --git a/lib/osf-components/addon/components/addons-service/file-manager/component.ts b/lib/osf-components/addon/components/addons-service/file-manager/component.ts index b7d6fd0013..bf8d45ded1 100644 --- a/lib/osf-components/addon/components/addons-service/file-manager/component.ts +++ b/lib/osf-components/addon/components/addons-service/file-manager/component.ts @@ -14,6 +14,7 @@ import AuthorizedAccountModel from 'ember-osf-web/models/authorized-account'; import ConfiguredAddonModel from 'ember-osf-web/models/configured-addon'; import captureException, { getApiErrorMessage } from 'ember-osf-web/utils/capture-exception'; import ConfiguredLinkAddonModel from 'ember-osf-web/models/configured-link-addon'; +import AuthorizedLinkAccountModel from 'ember-osf-web/models/authorized-link-account'; interface Args { configuredAddon?: ConfiguredAddonModel; @@ -48,7 +49,8 @@ export default class FileManager extends Component { } get isLinkAddon() { - return this.operationInvocableModel instanceof ConfiguredLinkAddonModel; + return this.operationInvocableModel instanceof ConfiguredLinkAddonModel || + this.operationInvocableModel instanceof AuthorizedLinkAccountModel ; } constructor(owner: unknown, args: Args) { diff --git a/translations/en-us.yml b/translations/en-us.yml index a468f91cb4..e62ad177ba 100644 --- a/translations/en-us.yml +++ b/translations/en-us.yml @@ -381,6 +381,8 @@ links: linked-service: 'Linked Service' display-name: 'Display Name' resource-type: 'Resource Type' + empty-screen-message: 'This project has no configured linked services at a moment ' + point-to-addons-message: 'In order to add linked service visit' link: 'Link' edit: 'Edit' icon: '{addonName} icon'