Skip to content

Commit

Permalink
Release Hyperactive sloth (#212)
Browse files Browse the repository at this point in the history
* [ADD] Open original profile button
* [FIX] editing post with the original content_type (#205)
* [ADD] add dashboard entry (#208)
* [ADD] Update Readme to add info about csp (#209)
* [CH] Remove mention to soapbox in some doc files (#210)
* [FIX] Fix follow imports (#211)
  • Loading branch information
Cl0v1s authored May 7, 2023
1 parent aef03fa commit 3031302
Show file tree
Hide file tree
Showing 73 changed files with 601 additions and 3,999 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Mangane is now installed.
The change will take effect immediately, just refresh your browser tab, and Mangane will replace the default Pleroma FE or Akkoma FE interface.
You may need to restart Pleroma/Akkoma for the change to take effect.

If you notice some issue with UI colors, please take a look at the Troubleshooting section.

## Install in other environments

#### Yunohost server
Expand Down Expand Up @@ -255,6 +257,18 @@ Customization details can be found in the [Customization documentation](docs/cus
It's a [known issue](https://git.pleroma.social/pleroma/pleroma/-/issues/2768#note_97928) with the `exiftool` filter.
To solve these upload problems, go to your admin-fe, search the upload section and remove `exiftool` from the enabled filters.

## Messy colors / style configuration

Akkoma recently changed their Content Security Policy (Content-Secutiry-Policy HTTP response header) to make it more strict.
If you notice any issue with your UI style configuration, please update your HTTP server configuration to override Akkoma's CSP header so the `style-src` section is set to `'self' 'unsafe-inline';`

Here is a example configuration for nginx:
```
# add style-src for mangane
proxy_set_header Content-Security-Policy "upgrade-insecure-requests;script-src 'self';connect-src 'self' blob: https://example.com wss://example.com;media-src 'self' https:;img-src 'self' data: blob: https:;default-src 'none';base-uri 'self';frame-ancestors 'none';style-src 'self' 'unsafe-inline';font-src 'self';manifest-src 'self';";
```
*Please replace https://example.com with your own domain*

# License & Credits

Mangane is free software: you can redistribute it and/or modify
Expand Down
6 changes: 3 additions & 3 deletions app/soapbox/actions/import_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const importFollows = (params: FormData) =>
(dispatch: React.Dispatch<ImportDataActions>, getState: () => RootState) => {
dispatch({ type: IMPORT_FOLLOWS_REQUEST });
return api(getState)
.post('/api/v1/pleroma/follow_import', params)
.post('/api/pleroma/follow_import', params)
.then(response => {
dispatch(snackbar.success(messages.followersSuccess));
dispatch({ type: IMPORT_FOLLOWS_SUCCESS, config: response.data });
Expand All @@ -56,7 +56,7 @@ export const importBlocks = (params: FormData) =>
(dispatch: React.Dispatch<ImportDataActions>, getState: () => RootState) => {
dispatch({ type: IMPORT_BLOCKS_REQUEST });
return api(getState)
.post('/api/v1/pleroma/blocks_import', params)
.post('/api/pleroma/blocks_import', params)
.then(response => {
dispatch(snackbar.success(messages.blocksSuccess));
dispatch({ type: IMPORT_BLOCKS_SUCCESS, config: response.data });
Expand All @@ -69,7 +69,7 @@ export const importMutes = (params: FormData) =>
(dispatch: React.Dispatch<ImportDataActions>, getState: () => RootState) => {
dispatch({ type: IMPORT_MUTES_REQUEST });
return api(getState)
.post('/api/v1/pleroma/mutes_import', params)
.post('/api/pleroma/mutes_import', params)
.then(response => {
dispatch(snackbar.success(messages.mutesSuccess));
dispatch({ type: IMPORT_MUTES_SUCCESS, config: response.data });
Expand Down
2 changes: 1 addition & 1 deletion app/soapbox/actions/statuses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const editStatus = (id: string) => (dispatch: AppDispatch, getState: () => RootS

api(getState).get(`/api/v1/statuses/${id}/source`).then(response => {
dispatch({ type: STATUS_FETCH_SOURCE_SUCCESS });
dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text, false));
dispatch(setComposeToStatus(status, response.data.text, response.data.spoiler_text, response.data.content_type));
dispatch(openModal('COMPOSE'));
}).catch(error => {
dispatch({ type: STATUS_FETCH_SOURCE_FAIL, error });
Expand Down
12 changes: 11 additions & 1 deletion app/soapbox/components/sidebar_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
const sidebarOpen = useAppSelector((state) => state.sidebar.sidebarOpen);
const settings = useAppSelector((state) => getSettings(state));
const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count());
const dashboardCount = useAppSelector((state) => state.admin.openReports.count() + state.admin.awaitingApproval.count());

const bubbleTimeline = features.bubbleTimeline && settings.getIn(['public', 'bubble']);

Expand Down Expand Up @@ -308,6 +309,15 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
/>
)}

{account.staff && (
<SidebarLink
to='/soapbox/admin'
icon={require('@tabler/icons/dashboard.svg')}
text={intl.formatMessage(messages.dashboard)}
onClick={onClose}
/>
)}

{features.import && (
<SidebarLink
to='/settings/import'
Expand All @@ -334,4 +344,4 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
);
};

export default SidebarMenu;
export default SidebarMenu;
20 changes: 18 additions & 2 deletions app/soapbox/features/account/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
import type { Menu as MenuType } from 'soapbox/components/dropdown_menu';

const messages = defineMessages({
open_profile: { id: 'account.open_profile', defaultMessage: 'Open Original Profile' },
edit_profile: { id: 'account.edit_profile', defaultMessage: 'Edit profile' },
linkVerifiedOn: { id: 'account.link_verified_on', defaultMessage: 'Ownership of this link was checked on {date}' },
account_locked: { id: 'account.locked_info', defaultMessage: 'This account privacy status is set to locked. The owner manually reviews who can follow them.' },
Expand Down Expand Up @@ -368,6 +369,16 @@ const Header: React.FC<IHeader> = ({ account }) => {
menu.push(null);
}

if (isRemote(account)) {
const originalUrl = account.url;

menu.push({
text: intl.formatMessage(messages.open_profile),
icon: require('@tabler/icons/external-link.svg'),
href: originalUrl,
newTab: true,
});
}
if (account.id === ownAccount?.id) {
menu.push({
text: intl.formatMessage(messages.edit_profile),
Expand Down Expand Up @@ -792,8 +803,13 @@ const Header: React.FC<IHeader> = ({ account }) => {
{menuItem.icon && (
<SvgIcon src={menuItem.icon} className='mr-3 h-5 w-5 text-gray-400 flex-none group-hover:text-gray-500' />
)}

<div className='truncate'>{menuItem.text}</div>
{menuItem.href ?
<a
href={menuItem.href}
className='truncate'
target={menuItem.newTab ? '_blank' : '_self'}
>{menuItem.text}</a>
: <div className='truncate'>{menuItem.text}</div>}
</div>
</Comp>
);
Expand Down
60 changes: 7 additions & 53 deletions app/soapbox/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"account.muted": "Muted",
"account.never_active": "Never",
"account.no_fields": "This section is empty for now.",
"account.open_profile": "Open Original Profile",
"account.posts": "تبويقات",
"account.posts_with_replies": "التبويقات و الردود",
"account.profile": "Profile",
Expand Down Expand Up @@ -216,7 +217,6 @@
"column.birthdays": "Birthdays",
"column.blocks": "الحسابات المحجوبة",
"column.bookmarks": "Bookmarks",
"column.bubble": "Bubble timeline",
"column.chats": "Chats",
"column.community": "الخيط العام المحلي",
"column.crypto_donate": "Donate Cryptocurrency",
Expand Down Expand Up @@ -270,7 +270,6 @@
"column.public": "الخيط العام الموحد",
"column.reactions": "Reactions",
"column.reblogs": "Reposts",
"column.remote": "Federated timeline",
"column.scheduled_statuses": "Scheduled Posts",
"column.search": "Search",
"column.settings_store": "Settings store",
Expand Down Expand Up @@ -471,6 +470,7 @@
"emoji_button.recent": "الشائعة الاستخدام",
"emoji_button.search": "ابحث...",
"emoji_button.search_results": "نتائج البحث",
"emoji_button.skins": "Skins",
"emoji_button.symbols": "رموز",
"emoji_button.travel": "الأماكن والسفر",
"empty_column.account_blocked": "You are blocked by @{accountUsername}.",
Expand Down Expand Up @@ -507,47 +507,6 @@
"empty_column.search.hashtags": "There are no hashtags results for \"{term}\"",
"empty_column.search.statuses": "There are no posts results for \"{term}\"",
"empty_column.test": "The test timeline is empty.",
"enlistment.next": "Next",
"enlistment.pass": "Ignore",
"enlistment.step0.body": "This website is your gateway to a network of independent servers that communicate together to form a larger social network: the fediverse. Each server is called an “instance”. Your instance is simply this site: ",
"enlistment.step0.body1": "This website is your gateway to a network of independent servers that communicate together to form a larger social network: the fediverse.",
"enlistment.step0.body2": "Each server is called an “instance”. Your instance is simply this site: ",
"enlistment.step0.explanation": "It is this identifier that you can share on the fediverse",
"enlistment.step0.title": "Welcome on the Fediverse",
"enlistment.step0.username": "You full username",
"enlistment.step1.explanation": "Don't worry though, when writing a post, autosuggestion will help you find the right mention! Moreover, if you reply to a post, the mention will automatically be written in the right way.",
"enlistment.step1.left": "Here you are on {title}. If you exchange with people from the same instance as you, you can simply mention them with {username}{br}{br}ex: {contact}, if you want to talk to the admin of {title}",
"enlistment.step1.right": "If you exchange with a person from another instance, you must mention them with their <span class='font-bold'>@pseudo@instance</span><br/><br/> ex: <a href=' https://oslo.town/@matt'>@matt@oslo.town</a>, if you want to talk to the Oslo.town admin",
"enlistment.step1.title": "How it works ?",
"enlistment.step1.username": "@username",
"enlistment.step2.col1": "Here you are on familiar ground: only your publications and those of the people you follow will be displayed on this thread.",
"enlistment.step2.col2": "Here is a bit like your neighborhood: you will only find publications from members of this server, whether you follow them or not.",
"enlistment.step2.col3": "Think outside the box and go explore the rest of the world: this thread displays posts from all known instances.",
"enlistment.step2.explanation1": "At first it will be a little empty but don't worry we can help you fill it!",
"enlistment.step2.explanation2": "We usually call it \"local\" thread",
"enlistment.step2.explanation3": "We usually call it \"global\" or \"federated\" thread",
"enlistment.step2.title1": "Home",
"enlistment.step2.title3": "Discover",
"enlistment.step3.description": "This site offers precise control over who can see your posts and therefore interact with you.",
"enlistment.step3.direct-description": "The post is only visible to people mentioned via @username@instance",
"enlistment.step3.direct-title": "Direct",
"enlistment.step3.followers-description": "The post is not displayed on any public feeds and is only visible to people who follow you",
"enlistment.step3.followers-title": "Followers only",
"enlistment.step3.public-description": "The post is displayed on all feeds, including other instances.",
"enlistment.step3.public-title": "Public",
"enlistment.step3.title": "Privacy",
"enlistment.step3.unlisted-description": "The post is public but only appears in your subscribers' feeds and on your profile",
"enlistment.step3.unlisted-title": "Unlisted",
"enlistment.step4.complete": "complete your profile",
"enlistment.step4.conduct": "code of conduct",
"enlistment.step4.disclaimer": "You're almost ready to dive into the deep end.",
"enlistment.step4.informations": "If you have any questions about this new playground, do not hesitate to ask questions to the people you meet online, the community is quite caring and welcoming. You will also find more comprehensive online resources {wiki}.",
"enlistment.step4.point-1": "Think of {complete} (profile photo, banner and bio). You can even add hashtags to let people know your interests.",
"enlistment.step4.point-2": "It is customary to {publish} to make you discover. Do not forget the hashtags #introduction or #presentation.",
"enlistment.step4.point-3": "Let's go, it's up to you to discover and tame the places, find people to follow, share your ideas while respecting the {conduct} and the values of {title}.",
"enlistment.step4.publish": "publish a presentation",
"enlistment.step4.title": "What's next ?",
"enlistment.step4.wiki": "on the official wiki",
"export_data.actions.export": "Export",
"export_data.actions.export_blocks": "Export blocks",
"export_data.actions.export_follows": "Export follows",
Expand Down Expand Up @@ -625,9 +584,6 @@
"header.register.label": "Register",
"home.column_settings.show_reblogs": "عرض الترقيات",
"home.column_settings.show_replies": "اعرض الردود",
"icon_button.icons": "Icons",
"icon_button.label": "Select icon",
"icon_button.not_found": "No icons!! (╯°□°)╯︵ ┻━┻",
"import_data.actions.import": "Import",
"import_data.actions.import_blocks": "Import blocks",
"import_data.actions.import_follows": "Import follows",
Expand Down Expand Up @@ -806,7 +762,6 @@
"onboarding.avatar.title": "Choose a profile picture",
"onboarding.display_name.subtitle": "You can always edit this later.",
"onboarding.display_name.title": "Choose a display name",
"onboarding.done": "Done",
"onboarding.feeds.col1": "Here you are on familiar ground: only your publications and those of the people you follow will be displayed on this thread.",
"onboarding.feeds.col2": "Here is a bit like your neighborhood: you will only find publications from members of this server, whether you follow them or not.",
"onboarding.feeds.col3": "Think outside the box and go explore the rest of the world: this thread displays posts from all known instances.",
Expand Down Expand Up @@ -839,8 +794,6 @@
"onboarding.privacy.unlisted-title": "Unlisted",
"onboarding.saving": "Saving…",
"onboarding.skip": "Skip for now",
"onboarding.suggestions.subtitle": "Here are a few of the most popular accounts you might like.",
"onboarding.suggestions.title": "Suggested accounts",
"onboarding.view_feed": "View Feed",
"onboarding.welcome.body1": "This website is your gateway to a network of independent servers that communicate together to form a larger social network: the fediverse.",
"onboarding.welcome.body2": "Each server is called an “instance”. Your instance is simply this site: ",
Expand All @@ -860,7 +813,6 @@
"poll.non_anonymous": "Public poll",
"poll.non_anonymous.label": "Other instances may display the options you voted for",
"poll.refresh": "تحديث",
"poll.total_people": "{count, plural, one {# person} other {# people}}",
"poll.total_votes": "{count, plural, one {# صوت} other {# أصوات}}",
"poll.vote": "صَوّت",
"poll.voted": "You voted for this answer",
Expand Down Expand Up @@ -896,11 +848,14 @@
"preferences.options.content_type_markdown": "Markdown",
"preferences.options.content_type_plaintext": "Plain text",
"preferences.options.privacy_followers_only": "Followers-only",
"preferences.options.privacy_local": "Local-only",
"preferences.options.privacy_public": "Public",
"preferences.options.privacy_unlisted": "Unlisted",
"privacy.change": "اضبط خصوصية المنشور",
"privacy.direct.long": "أنشر إلى المستخدمين المشار إليهم فقط",
"privacy.direct.short": "مباشر",
"privacy.local.long": "Status is only visible to people on this instance",
"privacy.local.short": "Local-only",
"privacy.private.long": "أنشر لمتابعيك فقط",
"privacy.private.short": "لمتابعيك فقط",
"privacy.public.long": "أنشر على الخيوط العامة",
Expand All @@ -924,6 +879,7 @@
"registration.closed_message": "{instance} is not accepting new members",
"registration.closed_title": "Registrations Closed",
"registration.confirmation_modal.close": "Close",
"registration.custom_provider_tooltip": "Sign up with {provider}",
"registration.fields.confirm_placeholder": "Password (again)",
"registration.fields.email_placeholder": "E-Mail address",
"registration.fields.password_placeholder": "Password",
Expand All @@ -944,6 +900,7 @@
"registrations.create_account": "Create an account",
"registrations.error": "Failed to register your account.",
"registrations.get_started": "Let's get started!",
"registrations.redirect": "No account yet?",
"registrations.success": "Welcome to {siteTitle}!",
"registrations.tagline": "Social Media Without Discrimination",
"registrations.unprocessable_entity": "This username has already been taken.",
Expand Down Expand Up @@ -1054,9 +1011,6 @@
"soapbox_config.authenticated_profile_hint": "Users must be logged-in to view replies and media on user profiles.",
"soapbox_config.authenticated_profile_label": "Profiles require authentication",
"soapbox_config.copyright_footer.meta_fields.label_placeholder": "Copyright footer",
"soapbox_config.crypto_address.meta_fields.address_placeholder": "Address",
"soapbox_config.crypto_address.meta_fields.note_placeholder": "Note (optional)",
"soapbox_config.crypto_address.meta_fields.ticker_placeholder": "Ticker",
"soapbox_config.crypto_donate_panel_limit.meta_fields.limit_placeholder": "Number of items to display in the crypto homepage widget",
"soapbox_config.custom_css.meta_fields.url_placeholder": "URL",
"soapbox_config.display_fqn_label": "Display domain (eg @user@domain) for local accounts.",
Expand Down
Loading

0 comments on commit 3031302

Please sign in to comment.