-
Notifications
You must be signed in to change notification settings - Fork 2
Update dependencies, octanify moar things #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bbb4d0e
Update dependencies
3940268
Octanify apps controller
f708ebc
Octanify topbar component
3f5915f
Octanify app authorization component
f7f3d20
Allow invalid interactive elements
7ed3fd1
Move template lint rule from global to template
8d21c76
Revert "Move template lint rule from global to template"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,28 +1,25 @@ | ||
| import Component from '@ember/component'; | ||
| import Component from '@glimmer/component'; | ||
| import { action } from '@ember/object'; | ||
| import { run } from '@ember/runloop'; | ||
|
|
||
| export default Component.extend({ | ||
| export default class AppAuthorizationComponent extends Component { | ||
|
|
||
| classNames: ['auth'], | ||
|
|
||
| auth: null, | ||
|
|
||
| click () { | ||
| const elMeta = this.element.querySelector('.metadata'); | ||
| @action | ||
| toggleOpenClass (evt) { | ||
| const elMeta = evt.target.closest('div.auth').querySelector('.metadata'); | ||
| const elActions = elMeta.nextElementSibling; | ||
| elMeta.classList.toggle('open'); | ||
| elActions.classList.toggle('open'); | ||
| }, | ||
|
|
||
| actions: { | ||
| } | ||
|
|
||
| revoke (auth) { | ||
| this.element.classList.add('fade-out'); | ||
| run.later(this, function() { | ||
| this.revokeAccess(auth); | ||
| }, 300); | ||
| } | ||
| @action | ||
| revoke (evt) { | ||
| evt.target.closest('div.auth') | ||
raucao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| .classList.add('fade-out'); | ||
|
|
||
| run.later(this, function() { | ||
| this.args.revokeAccess(this.args.auth); | ||
| }, 300); | ||
| } | ||
|
|
||
| }); | ||
| } | ||
This file contains hidden or 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,25 +1,29 @@ | ||
| <div class="icon"> | ||
| <Icons::BrandIconFlat /> | ||
| </div> | ||
| <div class="app-name"> | ||
| <h4> | ||
| {{this.auth.appName}} | ||
| </h4> | ||
| <p> | ||
| <a href={{this.auth.launchUrl}} class="app_url" target="_blank" rel="noopener noreferrer"> | ||
| {{this.auth.clientId}} | ||
| </a> | ||
| </p> | ||
| </div> | ||
| <div class="metadata"> | ||
| <p> | ||
| {{storage-permissions permissions=this.auth.permissions}} | ||
| </p> | ||
| <p class="created-at"> | ||
| Approved | ||
| <time datetime={{this.auth.createdAtDatetime}} title={{this.auth.createdAtDateTitle}}>{{moment-from-now this.auth.createdAt}}</time>{{#if this.auth.expireAt}}, expires <time datetime={{this.auth.expireAtDatetime}} title={{this.auth.expireAtDateTitle}}>{{moment-from-now this.auth.expireAt}}</time>{{/if}} | ||
| </p> | ||
| </div> | ||
| <div class="actions"> | ||
| <a href="" {{action "revoke" this.auth}} class="danger button">Revoke access</a> | ||
| <div class="auth" {{on "click" (fn this.toggleOpenClass)}}> | ||
| <div class="icon"> | ||
| <Icons::BrandIconFlat /> | ||
| </div> | ||
| <div class="app-name"> | ||
| <h4> | ||
| {{@auth.appName}} | ||
| </h4> | ||
| <p> | ||
| <a href={{@auth.launchUrl}} class="app_url" target="_blank" rel="noopener noreferrer"> | ||
| {{@auth.clientId}} | ||
| </a> | ||
| </p> | ||
| </div> | ||
| <div class="metadata"> | ||
| <p> | ||
| <StoragePermissions @permissions={{@auth.permissions}} /> | ||
| </p> | ||
| <p class="created-at"> | ||
| Approved | ||
| <time datetime={{@auth.createdAtDatetime}} title={{@auth.createdAtDateTitle}}>{{moment-from-now @auth.createdAt}}</time>{{#if @auth.expireAt}}, expires <time datetime={{@auth.expireAtDatetime}} title={{@auth.expireAtDateTitle}}>{{moment-from-now @auth.expireAt}}</time>{{/if}} | ||
| </p> | ||
| </div> | ||
| <div class="actions"> | ||
| <button type="button" {{on "click" (fn this.revoke)}} class="danger button"> | ||
| Revoke access | ||
| </button> | ||
| </div> | ||
| </div> |
This file contains hidden or 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,21 +1,20 @@ | ||
| import Component from '@ember/component'; | ||
| import Component from '@glimmer/component'; | ||
| import { inject as service } from '@ember/service'; | ||
| import { action } from '@ember/object' | ||
| import config from 'storage-frontend/config/environment'; | ||
|
|
||
| export default Component.extend({ | ||
| export default class TopbarComponent extends Component { | ||
|
|
||
| tagName: '', | ||
| @service session; | ||
| @service currentUser; | ||
|
|
||
| session: service(), | ||
| currentUser: service(), | ||
| baseDomain = config.baseDomain; | ||
| frontpageUrl = 'https://'+config.baseDomain; | ||
|
|
||
| baseDomain: config.baseDomain, | ||
|
|
||
| actions: { | ||
| logout () { | ||
| this.set('session.userTriggeredSignout', true); | ||
| this.session.invalidate(); | ||
| } | ||
| @action | ||
| logout () { | ||
| this.set('session.userTriggeredSignout', true); | ||
| this.session.invalidate(); | ||
| } | ||
|
|
||
| }); | ||
| } |
This file contains hidden or 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 hidden or 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,36 +1,35 @@ | ||
| import Controller from '@ember/controller'; | ||
| import { inject as service } from '@ember/service'; | ||
| import { computed } from '@ember/object'; | ||
| import { action, computed } from '@ember/object'; | ||
| import { isEmpty } from '@ember/utils'; | ||
|
|
||
| export default Controller.extend({ | ||
| export default class AppsController extends Controller { | ||
|
|
||
| currentUser: service(), | ||
| @service currentUser; | ||
|
|
||
| appsCount: computed('model.[]', function() { | ||
| @computed('model.[]') | ||
| get appsCount () { | ||
| return this.get('model.length'); | ||
| }), | ||
| } | ||
|
|
||
| categoriesCount: computed('model.@each.permissions', function() { | ||
| @computed('model.@each.permissions') | ||
| get categoriesCount () { | ||
| const permissions = this.model.map((auth) => { | ||
| return auth.get('permissions').map((permission) => { | ||
| return permission.split(':')[0]; | ||
| }); | ||
| }); | ||
|
|
||
| return [].concat(...permissions).uniq().length; | ||
| }), | ||
|
|
||
| actions: { | ||
|
|
||
| revokeAccess (auth) { | ||
| auth.destroyRecord().then(() => { | ||
| if (isEmpty(this.model)) { | ||
| this.transitionToRoute('welcome'); | ||
| } | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| @action | ||
| revokeAccess (auth) { | ||
| auth.destroyRecord().then(() => { | ||
| if (isEmpty(this.model)) { | ||
| this.transitionToRoute('welcome'); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| }); | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.