-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix aws us-east-1 subdomain and fix slow projects list
- Loading branch information
Showing
9 changed files
with
27 additions
and
101 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 |
---|---|---|
@@ -1,50 +1,11 @@ | ||
import Component from '@glimmer/component'; | ||
import {lt, gte} from '@ember/object/computed'; | ||
import percentage from 'accent-webapp/component-helpers/percentage'; | ||
|
||
const LOW_PERCENTAGE = 50; | ||
const HIGH_PERCENTAGE = 90; | ||
|
||
interface Args { | ||
project: any; | ||
} | ||
|
||
export default class ProjectsListItem extends Component<Args> { | ||
@lt('correctedKeysPercentage', LOW_PERCENTAGE) | ||
lowPercentage: boolean; // Lower than low percentage | ||
|
||
@gte('correctedKeysPercentage', LOW_PERCENTAGE) | ||
mediumPercentage: boolean; // higher or equal than low percentage | ||
|
||
@gte('correctedKeysPercentage', HIGH_PERCENTAGE) | ||
highPercentage: boolean; // higher or equal than high percentage | ||
|
||
get colors() { | ||
return ` | ||
.projectId-${this.args.project.id} { | ||
--color-primary: ${this.args.project.mainColor}; | ||
} | ||
`; | ||
} | ||
|
||
get totalStrings() { | ||
return this.args.project.translationsCount; | ||
} | ||
|
||
get totalConflicts() { | ||
return this.args.project.conflictsCount; | ||
} | ||
|
||
get totalReviewed() { | ||
return ( | ||
this.args.project.translationsCount - this.args.project.conflictsCount | ||
); | ||
} | ||
|
||
get correctedKeysPercentage() { | ||
return percentage( | ||
this.totalStrings - this.totalConflicts, | ||
this.totalStrings | ||
); | ||
get colorPrimary() { | ||
return `--color-primary: ${this.args.project.mainColor}`; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -35,8 +35,6 @@ export default gql` | |
lastSyncedAt | ||
mainColor | ||
logo | ||
translationsCount | ||
conflictsCount | ||
} | ||
} | ||
} | ||
|
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