[Glitch] Profile editing: Use server flag

Port 00bcb014dfc9f6e23b7ad2d070f628ea64727c8a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo 2026-03-20 14:32:48 +01:00 committed by Claire
parent 469076c357
commit 00a423ed2b
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ import classNames from 'classnames';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { useIdentity } from '@/flavours/glitch/identity_context'; import { useIdentity } from '@/flavours/glitch/identity_context';
import { isClientFeatureEnabled } from '@/flavours/glitch/utils/environment'; import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment';
import { import {
fetchRelationships, fetchRelationships,
followAccount, followAccount,
@ -171,7 +171,7 @@ export const FollowButton: React.FC<{
'button--compact': compact, 'button--compact': compact,
}); });
if (isClientFeatureEnabled('profile_editing')) { if (isServerFeatureEnabled('profile_redesign')) {
return ( return (
<Link to='/profile/edit' className={buttonClasses}> <Link to='/profile/edit' className={buttonClasses}>
{label} {label}

View File

@ -26,7 +26,7 @@ import { layoutFromWindow } from 'flavours/glitch/is_mobile';
import { selectUnreadNotificationGroupsCount } from 'flavours/glitch/selectors/notifications'; import { selectUnreadNotificationGroupsCount } from 'flavours/glitch/selectors/notifications';
import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router'; import { WithRouterPropTypes } from 'flavours/glitch/utils/react_router';
import { checkAnnualReport } from '@/flavours/glitch/reducers/slices/annual_report'; import { checkAnnualReport } from '@/flavours/glitch/reducers/slices/annual_report';
import { isClientFeatureEnabled } from '@/flavours/glitch/utils/environment'; import { isServerFeatureEnabled } from '@/flavours/glitch/utils/environment';
import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose'; import { uploadCompose, resetCompose, changeComposeSpoilerness } from '../../actions/compose';
import { clearHeight } from '../../actions/height_cache'; import { clearHeight } from '../../actions/height_cache';
@ -190,7 +190,7 @@ class SwitchingColumnsArea extends PureComponent {
} }
const profileRedesignRoutes = []; const profileRedesignRoutes = [];
if (isClientFeatureEnabled('profile_editing')) { if (isServerFeatureEnabled('profile_redesign')) {
profileRedesignRoutes.push( profileRedesignRoutes.push(
<WrappedRoute key="edit" path='/profile/edit' component={AccountEdit} content={children} />, <WrappedRoute key="edit" path='/profile/edit' component={AccountEdit} content={children} />,
<WrappedRoute key="featured_tags" path='/profile/featured_tags' component={AccountEditFeaturedTags} content={children} /> <WrappedRoute key="featured_tags" path='/profile/featured_tags' component={AccountEditFeaturedTags} content={children} />

View File

@ -18,7 +18,7 @@ export function isServerFeatureEnabled(feature: ServerFeatures) {
return initialState?.features.includes(feature) ?? false; return initialState?.features.includes(feature) ?? false;
} }
type ClientFeatures = 'collections' | 'profile_editing'; type ClientFeatures = 'collections';
export function isClientFeatureEnabled(feature: ClientFeatures) { export function isClientFeatureEnabled(feature: ClientFeatures) {
try { try {