From 38142182774ea772aacc88f26586512d6279267f Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 19 Oct 2020 19:38:49 +0300 Subject: [PATCH] Some initial work on replacing icons with FA5 --- package.json | 4 + src/App.scss | 9 +- src/components/emoji_input/emoji_input.js | 9 + src/components/emoji_input/emoji_input.vue | 2 +- src/components/emoji_picker/emoji_picker.js | 16 +- src/components/emoji_picker/emoji_picker.scss | 2 +- src/components/emoji_picker/emoji_picker.vue | 4 +- src/components/extra_buttons/extra_buttons.js | 4 + .../extra_buttons/extra_buttons.vue | 6 +- .../favorite_button/favorite_button.js | 14 +- .../favorite_button/favorite_button.vue | 33 ++-- src/components/media_upload/media_upload.js | 8 + src/components/media_upload/media_upload.vue | 10 +- src/components/nav_panel/nav_panel.js | 23 +++ src/components/nav_panel/nav_panel.vue | 160 +++++++++--------- src/components/poll/poll_form.js | 12 ++ src/components/poll/poll_form.vue | 16 +- .../post_status_form/post_status_form.js | 17 ++ .../post_status_form/post_status_form.vue | 31 ++-- src/components/react_button/react_button.js | 4 + src/components/react_button/react_button.vue | 6 +- src/components/reply_button/reply_button.js | 4 + src/components/reply_button/reply_button.vue | 28 ++- .../retweet_button/retweet_button.js | 8 +- .../retweet_button/retweet_button.vue | 48 ++++-- .../scope_selector/scope_selector.js | 15 ++ .../scope_selector/scope_selector.vue | 50 +++--- src/components/status/status.js | 49 +++++- src/components/status/status.scss | 26 +-- src/components/status/status.vue | 70 ++++---- src/components/timeline_menu/timeline_menu.js | 18 ++ .../timeline_menu/timeline_menu.vue | 32 ++-- src/main.js | 4 + yarn.lock | 31 ++++ 34 files changed, 528 insertions(+), 245 deletions(-) diff --git a/package.json b/package.json index 75d9ee56c8..6bc285c864 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,10 @@ "dependencies": { "@babel/runtime": "^7.7.6", "@chenfengyuan/vue-qrcode": "^1.0.0", + "@fortawesome/fontawesome-svg-core": "^1.2.32", + "@fortawesome/free-regular-svg-icons": "^5.15.1", + "@fortawesome/free-solid-svg-icons": "^5.15.1", + "@fortawesome/vue-fontawesome": "^2.0.0", "body-scroll-lock": "^2.6.4", "chromatism": "^3.0.0", "cropperjs": "^1.4.3", diff --git a/src/App.scss b/src/App.scss index e1e1bdd0d2..d34698e24b 100644 --- a/src/App.scss +++ b/src/App.scss @@ -318,7 +318,7 @@ option { } } -i[class*=icon-] { +i[class*=icon-], .svg-inline--fa { color: $fallback--icon; color: var(--icon, $fallback--icon); } @@ -808,7 +808,12 @@ nav { } .button-icon { - font-size: 1.2em; + &i, + &.svg-inline--fa.fa-lg { + display: inline-block; + padding: 0 0.3em; + font-size: 1.1em; + } } @keyframes shakeError { diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js index f012344750..87303d0874 100644 --- a/src/components/emoji_input/emoji_input.js +++ b/src/components/emoji_input/emoji_input.js @@ -3,6 +3,15 @@ import EmojiPicker from '../emoji_picker/emoji_picker.vue' import { take } from 'lodash' import { findOffset } from '../../services/offset_finder/offset_finder.service.js' +import { library } from '@fortawesome/fontawesome-svg-core' +import { + faSmileBeam +} from '@fortawesome/free-regular-svg-icons' + +library.add( + faSmileBeam +) + /** * EmojiInput - augmented inputs for emoji and autocomplete support in inputs * without having to give up the comfort of and