Merge branch 'demo' into 'develop'
Fix demo mode See merge request soapbox-pub/soapbox!2017
This commit is contained in:
commit
34ae2e36d6
3 changed files with 13 additions and 1 deletions
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Posts: hover the "replying to" line to see a preview card of the parent post.
|
- Posts: hover the "replying to" line to see a preview card of the parent post.
|
||||||
- Chats: ability to leave a chat (on Rebased, Truth Social).
|
- Chats: ability to leave a chat (on Rebased, Truth Social).
|
||||||
- Chats: ability to disable chats for yourself.
|
- Chats: ability to disable chats for yourself.
|
||||||
|
- Layout: added right-to-left support for Arabic, Hebrew, Persian, and Central Kurdish languages.
|
||||||
- Composer: support custom emoji categories.
|
- Composer: support custom emoji categories.
|
||||||
- Search: ability to search posts from a specific account (on Pleroma, Rebased).
|
- Search: ability to search posts from a specific account (on Pleroma, Rebased).
|
||||||
- Theme: auto-detect system theme by default.
|
- Theme: auto-detect system theme by default.
|
||||||
|
@ -25,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Admin: added Theme Editor, a GUI for customizing the color scheme.
|
- Admin: added Theme Editor, a GUI for customizing the color scheme.
|
||||||
- Admin: custom badges. Admins can add non-federating badges to any user's profile (on Rebased, Pleroma).
|
- Admin: custom badges. Admins can add non-federating badges to any user's profile (on Rebased, Pleroma).
|
||||||
- Admin: consolidated user dropdown actions (verify/suggest/etc) into a unified "Moderate User" modal.
|
- Admin: consolidated user dropdown actions (verify/suggest/etc) into a unified "Moderate User" modal.
|
||||||
|
- i18n: updated translations for Italian, Polish, Arabic, Hebrew, and German.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- UI: the whole UI has been overhauled both inside and out. 97% of the codebase has been rewritten to TypeScript, and a new component library has been introduced with Tailwind CSS.
|
- UI: the whole UI has been overhauled both inside and out. 97% of the codebase has been rewritten to TypeScript, and a new component library has been introduced with Tailwind CSS.
|
||||||
|
@ -69,6 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Compatibility: improved support for Mastodon, added support for Mitra.
|
- Compatibility: improved support for Mastodon, added support for Mitra.
|
||||||
- Ethereum: Metamask sign-in with Mitra.
|
- Ethereum: Metamask sign-in with Mitra.
|
||||||
- i18n: added Shavian alphabet (`en-Shaw`) transliteration.
|
- i18n: added Shavian alphabet (`en-Shaw`) transliteration.
|
||||||
|
- i18n: added Icelandic translation.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Feeds: added gaps between posts in feeds.
|
- Feeds: added gaps between posts in feeds.
|
||||||
|
|
|
@ -41,6 +41,7 @@ import {
|
||||||
useInstance,
|
useInstance,
|
||||||
} from 'soapbox/hooks';
|
} from 'soapbox/hooks';
|
||||||
import MESSAGES from 'soapbox/locales/messages';
|
import MESSAGES from 'soapbox/locales/messages';
|
||||||
|
import { normalizeSoapboxConfig } from 'soapbox/normalizers';
|
||||||
import { queryClient } from 'soapbox/queries/client';
|
import { queryClient } from 'soapbox/queries/client';
|
||||||
import { useCachedLocationHandler } from 'soapbox/utils/redirect';
|
import { useCachedLocationHandler } from 'soapbox/utils/redirect';
|
||||||
import { generateThemeCss } from 'soapbox/utils/theme';
|
import { generateThemeCss } from 'soapbox/utils/theme';
|
||||||
|
@ -267,8 +268,9 @@ const SoapboxHead: React.FC<ISoapboxHead> = ({ children }) => {
|
||||||
const settings = useSettings();
|
const settings = useSettings();
|
||||||
const soapboxConfig = useSoapboxConfig();
|
const soapboxConfig = useSoapboxConfig();
|
||||||
|
|
||||||
|
const demo = !!settings.get('demo');
|
||||||
const darkMode = useTheme() === 'dark';
|
const darkMode = useTheme() === 'dark';
|
||||||
const themeCss = generateThemeCss(soapboxConfig);
|
const themeCss = generateThemeCss(demo ? normalizeSoapboxConfig({ brandColor: '#0482d8' }) : soapboxConfig);
|
||||||
|
|
||||||
const bodyClass = classNames('bg-white dark:bg-gray-800 text-base h-full', {
|
const bodyClass = classNames('bg-white dark:bg-gray-800 text-base h-full', {
|
||||||
'no-reduce-motion': !settings.get('reduceMotion'),
|
'no-reduce-motion': !settings.get('reduceMotion'),
|
||||||
|
|
|
@ -103,6 +103,13 @@ const SettingsStore: React.FC = () => {
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
|
||||||
<List>
|
<List>
|
||||||
|
<ListItem
|
||||||
|
label={<FormattedMessage id='preferences.fields.demo_label' defaultMessage='Demo mode' />}
|
||||||
|
hint={<FormattedMessage id='preferences.fields.demo_hint' defaultMessage='Use the default Soapbox logo and color scheme. Useful for taking screenshots.' />}
|
||||||
|
>
|
||||||
|
<SettingToggle settings={settings} settingPath={['demo']} onChange={onToggleChange} />
|
||||||
|
</ListItem>
|
||||||
|
|
||||||
<ListItem label={<FormattedMessage id='preferences.notifications.advanced' defaultMessage='Show all notification categories' />}>
|
<ListItem label={<FormattedMessage id='preferences.notifications.advanced' defaultMessage='Show all notification categories' />}>
|
||||||
<SettingToggle settings={settings} settingPath={['notifications', 'quickFilter', 'advanced']} onChange={onToggleChange} />
|
<SettingToggle settings={settings} settingPath={['notifications', 'quickFilter', 'advanced']} onChange={onToggleChange} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|
Loading…
Reference in a new issue