diff --git a/README.md b/README.md index 8e409bea5f..b81c593b7f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +# with harper's tweaks + +- added bite notification support + # Chuckya (standalone frontend) This is a somewhat hacky fork of Chuckya that adds standalone support (based on https://iceshrimp.dev/iceshrimp/masto-fe-standalone) (meaning your browser can OAuth against an arbitrary instance). It's currently tested to work (for the most part) with Iceshrimp and Iceshrimp.NET. diff --git a/app/javascript/flavours/glitch/components/status_prepend.jsx b/app/javascript/flavours/glitch/components/status_prepend.jsx index 096bb5a5ac..b270119e08 100644 --- a/app/javascript/flavours/glitch/components/status_prepend.jsx +++ b/app/javascript/flavours/glitch/components/status_prepend.jsx @@ -13,6 +13,7 @@ import MoodIcon from '@/material-icons/400-24px/mood.svg?react'; import PushPinIcon from '@/material-icons/400-24px/push_pin.svg?react'; import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react'; import StarIcon from '@/material-icons/400-24px/star-fill.svg?react'; +import DentistryIcon from '@/material-icons/400-24px/dentistry.svg?react'; import { Icon } from 'flavours/glitch/components/icon'; import { me } from 'flavours/glitch/initial_state'; @@ -51,6 +52,14 @@ export default class StatusPrepend extends PureComponent { ); switch (type) { + case 'bite': + return ( + + ); case 'featured': return ( @@ -130,6 +139,10 @@ export default class StatusPrepend extends PureComponent { let iconId, iconComponent; switch(type) { + case 'bite': + iconId = 'dentistry'; + iconComponent = DentistryIcon; + break; case 'favourite': iconId = 'star'; iconComponent = StarIcon; diff --git a/app/javascript/flavours/glitch/features/notifications/components/notification.jsx b/app/javascript/flavours/glitch/features/notifications/components/notification.jsx index ac280282b6..c709bbc1d1 100644 --- a/app/javascript/flavours/glitch/features/notifications/components/notification.jsx +++ b/app/javascript/flavours/glitch/features/notifications/components/notification.jsx @@ -13,6 +13,7 @@ import { HotKeys } from 'react-hotkeys'; import FlagIcon from '@/material-icons/400-24px/flag-fill.svg?react'; import PersonIcon from '@/material-icons/400-24px/person-fill.svg?react'; import PersonAddIcon from '@/material-icons/400-24px/person_add-fill.svg?react'; +import Dentistry from '@/material-icons/400-24px/dentistry.svg?react'; import { Icon } from 'flavours/glitch/components/icon'; import { Permalink } from 'flavours/glitch/components/permalink'; import AccountContainer from 'flavours/glitch/containers/account_container'; @@ -27,6 +28,7 @@ import { RelationshipsSeveranceEvent } from './relationships_severance_event'; import Report from './report'; const messages = defineMessages({ + bite: { id: 'notification.bite', defaultMessage: '{name} bit you' }, follow: { id: 'notification.follow', defaultMessage: '{name} followed you' }, adminSignUp: { id: 'notification.admin.sign_up', defaultMessage: '{name} signed up' }, adminReport: { id: 'notification.admin.report', defaultMessage: '{name} reported {target}' }, @@ -118,6 +120,52 @@ class Notification extends ImmutablePureComponent { }; } + renderBiteUser (notification, account, link) { + const { intl, unread } = this.props; + + return ( + +
+
+ + + + + +
+ +
+
+ ); + } + + renderBiteNote (notification) { + return ( +