-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redesigned and improved the Notifications page #1548
Open
MMDJafari
wants to merge
23
commits into
FreeFeed:stable
Choose a base branch
from
MMDJafari:stable
base: stable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c344dfb
Redesigned and improved Notification page
MMDJafari 17f4624
Update notification-body.jsx
MMDJafari 08b25e0
Redesigned and improved Notification page
MMDJafari 5614b8c
fix mouse hover
MMDJafari 4888fa0
fix mouse hover
MMDJafari b5bca32
Update notification-body.jsx
MMDJafari 5b03bdf
fix user tag remover
MMDJafari 8d28281
revert back to shows mentioned users in text and parse it with peaceo…
MMDJafari 068b90e
yarn lint
MMDJafari 66f14c5
remove clock icon
MMDJafari 64241c5
improve spacing between lines
MMDJafari 2c2a89c
fix showing text & profile picture for mobile devices
MMDJafari f3fe2de
improve spacing between lines
MMDJafari b5bf47e
fix url for vercel
MMDJafari c42ad5f
add IG reel preview
MMDJafari 1a4e706
revert to default config
MMDJafari c846deb
Play video attachments using inline video tag - using @n1313 fork
MMDJafari 3f136f5
Revert "Play video attachments using inline video tag - using @n1313 …
MMDJafari b7345fb
Play video attachments using inline video tag - using @n1313 fork
MMDJafari ab2fe3f
add .webm & .ogg to inline video player
MMDJafari 9934fb5
stick navigation bar to the bottom of screen
MMDJafari 162ceda
add dark subscription request alert style
MMDJafari f7ef932
rebase everything
MMDJafari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { useEffect } from 'react'; | ||
import { useDispatch, useSelector} from 'react-redux'; | ||
|
||
import { getSinglePostBody, getSingleComment} from '../redux/action-creators'; | ||
|
||
/** | ||
* @param {string} id | ||
*/ | ||
|
||
export function getCommentBody(id) { | ||
const dispatch = useDispatch(); | ||
useEffect(() => void dispatch(getSingleComment(id)), [dispatch, id]); | ||
return useSelector((state) => { | ||
return { | ||
cmBody: state.comments[id], | ||
ownUsername: state.user.username, | ||
}; | ||
}); | ||
} | ||
|
||
export function getPostBody(id) { | ||
const dispatch = useDispatch(); | ||
useEffect(() => void dispatch(getSinglePostBody(id)), [dispatch, id]); | ||
return useSelector((state) => { | ||
return { | ||
psBody: state.posts[id], | ||
ownUsername: state.user.username, | ||
}; | ||
}); | ||
} | ||
|
||
export function SingleComment({id = null}) { | ||
if (id) { | ||
const { cmBody, ownUsername } = getCommentBody(id); | ||
var commentBody = {}; | ||
Object.assign(commentBody, cmBody); | ||
return <div class="post-notif"><span dir="auto" class="Linkify" role="region">{commentBody.body?.replace('@' + ownUsername, '')}</span></div> | ||
} else { | ||
return null | ||
} | ||
} | ||
|
||
export function SinglePost({id = null}) { | ||
if (id) { | ||
const { psBody, ownUsername } = getPostBody(id); | ||
var postBody = {}; | ||
Object.assign(postBody, psBody); | ||
return <div class="post-notif"><span dir="auto" class="Linkify" role="region">{postBody.body?.replace('@' + ownUsername, '')}</span></div> | ||
} else { | ||
return null | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not change the default settings, they purposely specify a stage instance (candy).
For testing purposes, you can override them in the config.json file at the root of the repository. It will not be included in the commit by .gitignore.