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
14 changes: 11 additions & 3 deletions app/guid-node/addons/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,18 @@
{{manager.selectedConfiguration.displayName}}
</div>
<div>
{{#if manager.selectedConfiguration.rootFolder}}
{{manager.selectedConfiguration.rootFolderName}}
{{#if (instance-of manager.selectedConfiguration 'ConfiguredLinkAddon')}}
{{#if manager.selectedConfiguration.targetUrl}}
{{manager.selectedConfiguration.targetItemName}}
{{else}}
{{t 'addons.list.target-not-set'}}
{{/if}}
{{else}}
{{t 'addons.list.root-folder-not-set'}}
{{#if manager.selectedConfiguration.rootFolder}}
{{manager.selectedConfiguration.rootFolderName}}
{{else}}
{{t 'addons.list.root-folder-not-set'}}
{{/if}}
{{/if}}
</div>
<div>
Expand Down
4 changes: 4 additions & 0 deletions app/guid-node/links/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
padding-top: 10px;
}

.edit-header {
min-width: 30px;
}

.table-row {
border-bottom: 1px solid $color-border-gray;
}
Expand Down
2 changes: 1 addition & 1 deletion app/guid-node/links/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<th local-class='table-header'>{{t 'links.linked-service'}}</th>
<th local-class='table-header'>{{t 'links.display-name'}}</th>
<th local-class='table-header'>{{t 'links.resource-type'}}</th>
<th local-class='table-header'>
<th local-class='table-header edit-header'>
{{#if this.currentUserCanEdit}}
<OsfLink
@route='guid-node.addons'
Expand Down
20 changes: 20 additions & 0 deletions app/helpers/instance-of.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { getOwner } from '@ember/application';
import { assert } from '@ember/debug';

import Helper from '@ember/component/helper';

export default class InstanceOf extends Helper {
compute([object, className]: [any, string]) {
if (!object || typeof className !== 'string') {
return false;
}
// Look up the class from the container
const owner = getOwner(this);
const klass = owner.factoryFor(`model:${className}`)?.class;
if (!klass) {
assert(`Class "${className}" not found`);
return false;
}
return object instanceof klass;
}
}
1 change: 1 addition & 0 deletions translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ addons:
confirm-remove-connected-location: 'You are about to disconnect the addon below from the project.'
connected-to-account: 'Connected to account'
root-folder-not-set: 'Root folder not set'
target-not-set: 'Target not set'
sync-details-1: 'Sync your projects with external services to help stay connected and organized. Select a category and browse the options.'
sync-details-2: 'To manage all add-ons connected to your account, visit your profile settings.'
sync-details-3: 'Manage your connected Add-ons, re-authorize, disconnect account, or disconnect project'
Expand Down