Skip to content

Commit

Permalink
FEATURE: Upgrade to Font Awesome 5 (#113)
Browse files Browse the repository at this point in the history
* FEATURE: Upgrade to Font Awesome 5

* Adjust buttons CSS
  • Loading branch information
OsamaSayegh committed Mar 30, 2020
1 parent fcf27cd commit 0d43644
Show file tree
Hide file tree
Showing 25 changed files with 1,639 additions and 2,001 deletions.
Binary file removed assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file removed assets/fonts/fontawesome-webfont.eot
Binary file not shown.
640 changes: 0 additions & 640 deletions assets/fonts/fontawesome-webfont.svg

This file was deleted.

Binary file removed assets/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file removed assets/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file removed assets/fonts/fontawesome-webfont.woff2
Binary file not shown.
221 changes: 117 additions & 104 deletions assets/javascript/client-app.js

Large diffs are not rendered by default.

1,802 changes: 892 additions & 910 deletions assets/javascript/vendor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/stylesheets/client-app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions assets/stylesheets/vendor.css

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions client-app/app/components/message-info.js
Expand Up @@ -9,13 +9,15 @@ export default Component.extend({
buttons: computed("currentMessage.protected", "showSolveButton", function() {
const protect = this.get("currentMessage.protected");
const buttons = [];
const prefix = "fas";

if (!protect && this.showSolveButton) {
buttons.push({
klass: "solve",
action: "solve",
icon: "check-square-o",
icon: "check-square",
label: "Solve",
prefix: "far",
danger: true
});
}
Expand All @@ -24,8 +26,9 @@ export default Component.extend({
buttons.push({
klass: "solve-all",
action: "solveAll",
icon: "check-square-o",
icon: "check-square",
label: "Solve All",
prefix: "far",
danger: true
});
}
Expand All @@ -35,14 +38,16 @@ export default Component.extend({
{
klass: "remove",
action: "remove",
icon: "trash-o",
icon: "trash-alt",
label: "Remove",
prefix: "far",
danger: true
},
{
klass: "protect",
action: "protect",
icon: "lock",
prefix,
label: "Protect"
}
);
Expand All @@ -51,14 +56,16 @@ export default Component.extend({
klass: "unprotect",
action: "unprotect",
icon: "unlock",
prefix,
label: "Unprotect"
});
}

buttons.push({
klass: "copy",
action: "copyAction",
icon: "clipboard",
icon: "copy",
prefix: "far",
label: "Copy"
});
return buttons;
Expand Down
6 changes: 5 additions & 1 deletion client-app/app/models/group.js
Expand Up @@ -16,7 +16,11 @@ export default EmberObject.extend({
},

glyph: computed(function() {
return "<i class='fa fa-clone group'></i>";
return "clone";
}),

prefix: computed(function() {
return "far";
}),

solveAll() {
Expand Down
31 changes: 26 additions & 5 deletions client-app/app/models/message.js
Expand Up @@ -87,19 +87,40 @@ export default Em.Object.extend({
}),

glyph: computed("severity", function() {
switch (this.get("severity")) {
switch (this.severity) {
case 0:
return "";
case 1:
return "";
case 2:
return "<i class='fa fa-exclamation-circle warning'></i>";
return "exclamation-circle";
case 3:
return "<i class='fa fa-times-circle error'></i>";
return "times-circle";
case 4:
return "<i class='fa fa-times-circle fatal'></i>";
return "times-circle";
default:
return "<i class='fa fa-question-circle unknown'></i>";
return "question-circle";
}
}),

prefix: computed(function() {
return "fas";
}),

klass: computed("severity", function() {
switch (this.severity) {
case 0:
return "";
case 1:
return "";
case 2:
return "warning";
case 3:
return "error";
case 4:
return "fatal";
default:
return "unknown";
}
})
});

0 comments on commit 0d43644

Please sign in to comment.