From 9f5dc2c0df0cdba1113697bdd71637a404444065 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 6 Nov 2018 01:40:11 +0900 Subject: [PATCH] [WIP] Use FontAwesome Component for Vue (#3127) * wip * Rename * Clean up * Clean up * wip * wip * Enable tree shaking * :v: * :v: * wip * wip * Clean up --- gulpfile.ts | 4 +- package.json | 10 +- src/client/app/admin/views/announcements.vue | 4 +- src/client/app/admin/views/ap-log.vue | 8 +- src/client/app/admin/views/charts.vue | 2 +- src/client/app/admin/views/cpu-memory.vue | 4 +- src/client/app/admin/views/dashboard.vue | 24 ++--- src/client/app/admin/views/emoji.vue | 8 +- src/client/app/admin/views/index.vue | 24 ++--- src/client/app/app.styl | 2 +- .../common/views/components/api-settings.vue | 8 +- .../connect-failed.troubleshooter.vue | 28 +++--- .../views/components/connect-failed.vue | 2 +- .../views/components/drive-settings.vue | 2 +- .../app/common/views/components/error.vue | 2 +- .../views/components/file-type-icon.vue | 2 +- .../components/games/reversi/reversi.game.vue | 10 +- .../components/games/reversi/reversi.room.vue | 6 +- .../app/common/views/components/google.vue | 2 +- .../common/views/components/media-banner.vue | 4 +- .../app/common/views/components/menu.vue | 7 +- .../views/components/messaging-room.form.vue | 6 +- .../components/messaging-room.message.vue | 4 +- .../views/components/messaging-room.vue | 18 ++-- .../app/common/views/components/messaging.vue | 8 +- .../views/components/mute-and-block.vue | 2 +- .../app/common/views/components/nav.vue | 2 +- .../common/views/components/note-header.vue | 12 +-- .../app/common/views/components/note-menu.vue | 16 +-- .../common/views/components/poll-editor.vue | 8 +- .../app/common/views/components/poll.vue | 4 +- .../views/components/profile-editor.vue | 10 +- .../app/common/views/components/signin.vue | 2 +- .../app/common/views/components/signup.vue | 30 +++--- .../views/components/stream-indicator.vue | 8 +- .../app/common/views/components/tag-cloud.vue | 6 +- .../app/common/views/components/theme.vue | 18 ++-- .../app/common/views/components/trends.vue | 6 +- .../app/common/views/components/ui/info.vue | 4 +- .../app/common/views/components/uploader.vue | 4 +- .../app/common/views/components/url.vue | 4 +- .../views/components/visibility-chooser.vue | 10 +- src/client/app/common/views/pages/follow.vue | 12 +-- .../app/common/views/widgets/donation.vue | 4 +- .../app/common/views/widgets/hashtags.vue | 2 +- src/client/app/common/views/widgets/memo.vue | 2 +- .../app/common/views/widgets/photo-stream.vue | 6 +- .../common/views/widgets/posts-monitor.vue | 4 +- src/client/app/common/views/widgets/rss.vue | 8 +- .../app/common/views/widgets/server.cpu.vue | 4 +- .../app/common/views/widgets/server.disk.vue | 4 +- .../common/views/widgets/server.memory.vue | 4 +- .../app/common/views/widgets/server.vue | 8 +- src/client/app/common/views/widgets/tips.vue | 4 +- .../app/desktop/views/components/activity.vue | 8 +- .../app/desktop/views/components/calendar.vue | 6 +- .../choose-file-from-drive-window.vue | 6 +- .../choose-folder-from-drive-window.vue | 4 +- .../views/components/context-menu.menu.vue | 14 +-- .../desktop/views/components/crop-window.vue | 4 +- .../app/desktop/views/components/dialog.vue | 2 - .../desktop/views/components/drive-window.vue | 4 +- .../desktop/views/components/drive.file.vue | 12 +-- .../desktop/views/components/drive.folder.vue | 16 +-- .../views/components/drive.nav-folder.vue | 4 +- .../app/desktop/views/components/drive.vue | 19 ++-- .../views/components/follow-button.vue | 12 +-- .../views/components/friends-maker.vue | 8 +- .../desktop/views/components/game-window.vue | 4 +- .../app/desktop/views/components/home.vue | 6 +- .../desktop/views/components/input-dialog.vue | 6 +- .../desktop/views/components/media-image.vue | 2 +- .../desktop/views/components/media-video.vue | 4 +- .../components/messaging-room-window.vue | 4 +- .../views/components/messaging-window.vue | 4 +- .../desktop/views/components/note-detail.vue | 20 ++-- .../app/desktop/views/components/note.vue | 18 ++-- .../app/desktop/views/components/notes.vue | 8 +- .../views/components/notifications.vue | 32 +++--- .../views/components/post-form-window.vue | 2 +- .../desktop/views/components/post-form.vue | 22 ++--- .../received-follow-requests-window.vue | 2 +- .../views/components/renote-form-window.vue | 4 +- .../views/components/settings-window.vue | 4 +- .../desktop/views/components/settings.2fa.vue | 2 +- .../views/components/settings.signins.vue | 8 +- .../app/desktop/views/components/settings.vue | 64 ++++++------ .../views/components/sub-note-content.vue | 2 +- .../views/components/timeline.core.vue | 4 +- .../app/desktop/views/components/timeline.vue | 28 +++--- .../views/components/ui.header.account.vue | 67 ++++++++++--- .../views/components/ui.header.nav.vue | 20 ++-- .../components/ui.header.notifications.vue | 7 +- .../views/components/ui.header.post.vue | 2 +- .../views/components/ui.header.search.vue | 4 +- .../desktop/views/components/ui.sidebar.vue | 28 +++--- .../views/components/user-lists-window.vue | 2 +- .../desktop/views/components/users-list.vue | 4 +- .../views/components/widget-container.vue | 2 +- .../app/desktop/views/components/window.vue | 11 ++- .../desktop/views/pages/deck/deck.column.vue | 26 ++--- .../views/pages/deck/deck.direct-column.vue | 2 +- .../views/pages/deck/deck.hashtag-column.vue | 2 +- .../views/pages/deck/deck.mentions-column.vue | 2 +- .../views/pages/deck/deck.note-column.vue | 4 +- .../desktop/views/pages/deck/deck.notes.vue | 8 +- .../views/pages/deck/deck.notification.vue | 18 ++-- .../pages/deck/deck.notifications-column.vue | 2 +- .../views/pages/deck/deck.notifications.vue | 10 +- .../views/pages/deck/deck.tl-column.vue | 14 +-- .../views/pages/deck/deck.user-column.vue | 28 +++--- .../app/desktop/views/pages/deck/deck.vue | 22 ++--- .../views/pages/deck/deck.widgets-column.vue | 6 +- src/client/app/desktop/views/pages/note.vue | 4 +- src/client/app/desktop/views/pages/search.vue | 7 +- .../app/desktop/views/pages/selectdrive.vue | 2 +- src/client/app/desktop/views/pages/share.vue | 2 +- src/client/app/desktop/views/pages/tag.vue | 4 +- .../pages/user/user.followers-you-know.vue | 4 +- .../desktop/views/pages/user/user.friends.vue | 4 +- .../desktop/views/pages/user/user.github.vue | 2 +- .../desktop/views/pages/user/user.header.vue | 6 +- .../desktop/views/pages/user/user.photos.vue | 4 +- .../desktop/views/pages/user/user.profile.vue | 14 +-- .../views/pages/user/user.timeline.vue | 10 +- .../desktop/views/pages/user/user.twitter.vue | 2 +- .../app/desktop/views/pages/user/user.vue | 4 +- .../app/desktop/views/pages/welcome.vue | 16 +-- .../app/desktop/views/widgets/messaging.vue | 4 +- .../desktop/views/widgets/notifications.vue | 4 +- .../app/desktop/views/widgets/polls.vue | 10 +- .../app/desktop/views/widgets/post-form.vue | 4 +- .../app/desktop/views/widgets/trends.vue | 8 +- .../app/desktop/views/widgets/users.vue | 8 +- src/client/app/dev/views/new-app.vue | 2 +- src/client/app/init.ts | 99 ++++++++++++++++++- .../app/mobile/views/components/dialog.vue | 2 - .../views/components/drive-file-chooser.vue | 4 +- .../views/components/drive-folder-chooser.vue | 4 +- .../views/components/drive.file-detail.vue | 24 ++--- .../mobile/views/components/drive.file.vue | 6 +- .../mobile/views/components/drive.folder.vue | 6 +- .../app/mobile/views/components/drive.vue | 10 +- .../mobile/views/components/follow-button.vue | 12 +-- .../mobile/views/components/friends-maker.vue | 8 +- .../mobile/views/components/media-image.vue | 2 +- .../mobile/views/components/media-video.vue | 4 +- .../mobile/views/components/note-detail.vue | 20 ++-- .../app/mobile/views/components/note.vue | 18 ++-- .../app/mobile/views/components/notes.vue | 10 +- .../views/components/notification-preview.vue | 22 ++--- .../mobile/views/components/notification.vue | 18 ++-- .../mobile/views/components/notifications.vue | 10 +- .../app/mobile/views/components/post-form.vue | 26 ++--- .../views/components/sub-note-content.vue | 2 +- .../app/mobile/views/components/ui.header.vue | 8 +- .../app/mobile/views/components/ui.nav.vue | 34 +++---- .../mobile/views/components/user-timeline.vue | 2 +- .../mobile/views/components/users-list.vue | 4 +- .../views/components/widget-container.vue | 2 +- src/client/app/mobile/views/pages/drive.vue | 6 +- .../app/mobile/views/pages/favorites.vue | 2 +- .../app/mobile/views/pages/games/reversi.vue | 2 +- .../app/mobile/views/pages/home.timeline.vue | 2 +- src/client/app/mobile/views/pages/home.vue | 42 ++++---- .../app/mobile/views/pages/messaging-room.vue | 2 +- .../app/mobile/views/pages/messaging.vue | 2 +- src/client/app/mobile/views/pages/note.vue | 6 +- .../app/mobile/views/pages/notifications.vue | 4 +- .../views/pages/received-follow-requests.vue | 2 +- src/client/app/mobile/views/pages/search.vue | 4 +- .../app/mobile/views/pages/selectdrive.vue | 4 +- .../app/mobile/views/pages/settings.vue | 22 ++--- src/client/app/mobile/views/pages/share.vue | 2 +- src/client/app/mobile/views/pages/tag.vue | 4 +- .../app/mobile/views/pages/user-list.vue | 2 +- .../app/mobile/views/pages/user-lists.vue | 4 +- src/client/app/mobile/views/pages/user.vue | 20 ++-- .../pages/user/home.followers-you-know.vue | 2 +- .../mobile/views/pages/user/home.friends.vue | 2 +- .../mobile/views/pages/user/home.notes.vue | 2 +- .../mobile/views/pages/user/home.photos.vue | 2 +- .../app/mobile/views/pages/user/home.vue | 10 +- src/client/app/mobile/views/pages/welcome.vue | 4 +- src/client/app/mobile/views/pages/widgets.vue | 6 +- .../app/mobile/views/widgets/activity.vue | 2 +- src/docs/ui.styl | 2 +- src/misc/fa.ts | 54 ---------- src/server/web/index.ts | 4 +- webpack.config.ts | 18 ---- 190 files changed, 924 insertions(+), 865 deletions(-) delete mode 100644 src/misc/fa.ts diff --git a/gulpfile.ts b/gulpfile.ts index c47d90a1c..029979c35 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -21,7 +21,6 @@ import * as htmlmin from 'gulp-htmlmin'; const uglifyes = require('uglify-es'); const locales = require('./locales'); -import { fa } from './src/misc/fa'; const uglify = uglifyComposer(uglifyes, console); @@ -164,8 +163,7 @@ gulp.task('build:client:pug', [ gulp.src('./src/client/app/base.pug') .pipe(pug({ locals: { - themeColor: constants.themeColor, - facss: fa.dom.css() + themeColor: constants.themeColor } })) .pipe(htmlmin({ diff --git a/package.json b/package.json index d1c846b86..bfa7ca193 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,11 @@ "format": "gulp format" }, "dependencies": { - "@fortawesome/fontawesome-svg-core": "1.2.6", - "@fortawesome/free-brands-svg-icons": "5.4.1", - "@fortawesome/free-regular-svg-icons": "5.4.1", - "@fortawesome/free-solid-svg-icons": "5.4.1", + "@fortawesome/fontawesome-svg-core": "1.2.8", + "@fortawesome/free-brands-svg-icons": "5.5.0", + "@fortawesome/free-regular-svg-icons": "5.5.0", + "@fortawesome/free-solid-svg-icons": "5.5.0", + "@fortawesome/vue-fontawesome": "0.1.2", "@koa/cors": "2.2.2", "@prezzemolo/rap": "0.1.2", "@prezzemolo/zip": "0.0.3", @@ -215,7 +216,6 @@ "vue-content-loading": "1.5.3", "vue-cropperjs": "2.2.2", "vue-js-modal": "1.3.26", - "vue-json-tree-view": "2.1.4", "vue-loader": "15.4.2", "vue-router": "3.0.1", "vue-style-loader": "4.1.2", diff --git a/src/client/app/admin/views/announcements.vue b/src/client/app/admin/views/announcements.vue index bd99e1bc0..cc765230a 100644 --- a/src/client/app/admin/views/announcements.vue +++ b/src/client/app/admin/views/announcements.vue @@ -1,7 +1,7 @@