Use FontAwesome as web font instead of vue component (#7469)
* wip * wip * wip * wip * wip * wip * wip * wip * wip * Update yarn.lock * wip * wip
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { faAt, faListUl, faEye, faEyeSlash, faBan, faPencilAlt, faComments, faUsers, faMicrophoneSlash, faPlug, faExclamationCircle, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faSnowflake, faEnvelope } from '@fortawesome/free-regular-svg-icons';
|
||||
import { i18n } from '@client/i18n';
|
||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||
import { host } from '@client/config';
|
||||
@@ -121,62 +119,62 @@ export function getUserMenu(user) {
|
||||
}
|
||||
|
||||
let menu = [{
|
||||
icon: faAt,
|
||||
icon: 'fas fa-at',
|
||||
text: i18n.locale.copyUsername,
|
||||
action: () => {
|
||||
copyToClipboard(`@${user.username}@${user.host || host}`);
|
||||
}
|
||||
}, {
|
||||
icon: faInfoCircle,
|
||||
icon: 'fas fa-info-circle',
|
||||
text: i18n.locale.info,
|
||||
action: () => {
|
||||
os.pageWindow(`/user-info/${user.id}`);
|
||||
}
|
||||
}, {
|
||||
icon: faEnvelope,
|
||||
icon: 'fas fa-envelope',
|
||||
text: i18n.locale.sendMessage,
|
||||
action: () => {
|
||||
os.post({ specified: user });
|
||||
}
|
||||
}, meId != user.id ? {
|
||||
type: 'link',
|
||||
icon: faComments,
|
||||
icon: 'fas fa-comments',
|
||||
text: i18n.locale.startMessaging,
|
||||
to: '/my/messaging/' + getAcct(user),
|
||||
} : undefined, null, {
|
||||
icon: faListUl,
|
||||
icon: 'fas fa-list-ul',
|
||||
text: i18n.locale.addToList,
|
||||
action: pushList
|
||||
}, meId != user.id ? {
|
||||
icon: faUsers,
|
||||
icon: 'fas fa-users',
|
||||
text: i18n.locale.inviteToGroup,
|
||||
action: inviteGroup
|
||||
} : undefined] as any;
|
||||
|
||||
if ($i && meId != user.id) {
|
||||
menu = menu.concat([null, {
|
||||
icon: user.isMuted ? faEye : faEyeSlash,
|
||||
icon: user.isMuted ? 'fas fa-eye' : 'fas fa-eye-slash',
|
||||
text: user.isMuted ? i18n.locale.unmute : i18n.locale.mute,
|
||||
action: toggleMute
|
||||
}, {
|
||||
icon: faBan,
|
||||
icon: 'fas fa-ban',
|
||||
text: user.isBlocking ? i18n.locale.unblock : i18n.locale.block,
|
||||
action: toggleBlock
|
||||
}]);
|
||||
|
||||
menu = menu.concat([null, {
|
||||
icon: faExclamationCircle,
|
||||
icon: 'fas fa-exclamation-circle',
|
||||
text: i18n.locale.reportAbuse,
|
||||
action: reportAbuse
|
||||
}]);
|
||||
|
||||
if ($i && ($i.isAdmin || $i.isModerator)) {
|
||||
menu = menu.concat([null, {
|
||||
icon: faMicrophoneSlash,
|
||||
icon: 'fas fa-microphone-slash',
|
||||
text: user.isSilenced ? i18n.locale.unsilence : i18n.locale.silence,
|
||||
action: toggleSilence
|
||||
}, {
|
||||
icon: faSnowflake,
|
||||
icon: 'fas fa-snowflake',
|
||||
text: user.isSuspended ? i18n.locale.unsuspend : i18n.locale.suspend,
|
||||
action: toggleSuspend
|
||||
}]);
|
||||
@@ -185,7 +183,7 @@ export function getUserMenu(user) {
|
||||
|
||||
if ($i && meId === user.id) {
|
||||
menu = menu.concat([null, {
|
||||
icon: faPencilAlt,
|
||||
icon: 'fas fa-pencil-alt',
|
||||
text: i18n.locale.editProfile,
|
||||
action: () => {
|
||||
router.push('/settings/profile');
|
||||
@@ -195,7 +193,7 @@ export function getUserMenu(user) {
|
||||
|
||||
if (userActions.length > 0) {
|
||||
menu = menu.concat([null, ...userActions.map(action => ({
|
||||
icon: faPlug,
|
||||
icon: 'fas fa-plug',
|
||||
text: action.title,
|
||||
action: () => {
|
||||
action.handler(user);
|
||||
|
Reference in New Issue
Block a user