[WIP] Use FontAwesome Component for Vue (#3127)

* wip

* Rename

* Clean up

* Clean up

* wip

* wip

* Enable tree shaking

* ✌️

* ✌️

* wip

* wip

* Clean up
This commit is contained in:
syuilo
2018-11-06 01:40:11 +09:00
committed by GitHub
parent e640dbc501
commit 9f5dc2c0df
190 changed files with 924 additions and 865 deletions

View File

@ -15,18 +15,18 @@ export default Vue.extend({
computed: {
items() {
const items = [{
icon: '%fa:info-circle%',
icon: 'info-circle',
text: '%i18n:@detail%',
action: this.detail
}, {
icon: '%fa:link%',
icon: 'link',
text: '%i18n:@copy-link%',
action: this.copyLink
}];
if (this.note.uri) {
items.push({
icon: '%fa:external-link-square-alt%',
icon: 'external-link-square-alt',
text: '%i18n:@remote%',
action: () => {
window.open(this.note.uri, '_blank');
@ -38,13 +38,13 @@ export default Vue.extend({
if (this.note.isFavorited) {
items.push({
icon: '%fa:star%',
icon: 'star',
text: '%i18n:@unfavorite%',
action: this.unfavorite
});
} else {
items.push({
icon: '%fa:star%',
icon: 'star',
text: '%i18n:@favorite%',
action: this.favorite
});
@ -53,13 +53,13 @@ export default Vue.extend({
if (this.note.userId == this.$store.state.i.id) {
if ((this.$store.state.i.pinnedNoteIds || []).includes(this.note.id)) {
items.push({
icon: '%fa:thumbtack%',
icon: 'thumbtack',
text: '%i18n:@unpin%',
action: this.unpin
});
} else {
items.push({
icon: '%fa:thumbtack%',
icon: 'thumbtack',
text: '%i18n:@pin%',
action: this.pin
});
@ -69,7 +69,7 @@ export default Vue.extend({
if (this.note.userId == this.$store.state.i.id || this.$store.state.i.isAdmin) {
items.push(null);
items.push({
icon: '%fa:trash-alt R%',
icon: ['far', 'trash-alt'],
text: '%i18n:@delete%',
action: this.del
});