mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Remove donations flags
This commit is contained in:
@@ -25,8 +25,6 @@ const KnownConfigKeys = [
|
||||
'desktop.clientExpiration',
|
||||
'desktop.backups.beta',
|
||||
'desktop.backups.prod',
|
||||
'desktop.donations',
|
||||
'desktop.donations.prod',
|
||||
'desktop.internalUser',
|
||||
'desktop.loggingErrorToasts',
|
||||
'desktop.mediaQuality.levels',
|
||||
|
||||
@@ -409,7 +409,6 @@ export default {
|
||||
customColors: {},
|
||||
defaultConversationColor: DEFAULT_CONVERSATION_COLOR,
|
||||
deviceName: 'Work Windows ME',
|
||||
donationsFeatureEnabled: false,
|
||||
emojiSkinToneDefault: EmojiSkinTone.None,
|
||||
phoneNumber: '+1 555 123-4567',
|
||||
hasAudioNotifications: true,
|
||||
@@ -683,7 +682,6 @@ DataUsage.args = {
|
||||
};
|
||||
export const Donations = Template.bind({});
|
||||
Donations.args = {
|
||||
donationsFeatureEnabled: true,
|
||||
settingsLocation: { page: SettingsPage.Donations },
|
||||
};
|
||||
|
||||
@@ -824,7 +822,6 @@ NotificationsPageWithThreeProfiles.args = {
|
||||
|
||||
export const DonationsDonateFlow = Template.bind({});
|
||||
DonationsDonateFlow.args = {
|
||||
donationsFeatureEnabled: true,
|
||||
settingsLocation: { page: SettingsPage.DonationsDonateFlow },
|
||||
renderDonationsPane: ({
|
||||
contentsRef,
|
||||
@@ -852,7 +849,6 @@ DonationsDonateFlow.args = {
|
||||
};
|
||||
export const DonationReceipts = Template.bind({});
|
||||
DonationReceipts.args = {
|
||||
donationsFeatureEnabled: true,
|
||||
settingsLocation: { page: SettingsPage.DonationsDonateFlow },
|
||||
renderDonationsPane: ({
|
||||
contentsRef,
|
||||
@@ -893,7 +889,6 @@ DonationReceipts.args = {
|
||||
};
|
||||
export const DonationsHomeWithInProgressDonation = Template.bind({});
|
||||
DonationsHomeWithInProgressDonation.args = {
|
||||
donationsFeatureEnabled: true,
|
||||
settingsLocation: { page: SettingsPage.Donations },
|
||||
renderDonationsPane: ({
|
||||
contentsRef,
|
||||
@@ -1174,8 +1169,3 @@ NavTabsCollapsedWithExclamation.args = {
|
||||
readChatsMarkedUnreadCount: 0,
|
||||
},
|
||||
};
|
||||
|
||||
export const WithDonationsEnabled = Template.bind({});
|
||||
WithDonationsEnabled.args = {
|
||||
donationsFeatureEnabled: true,
|
||||
};
|
||||
|
||||
@@ -125,7 +125,6 @@ export type PropsDataType = {
|
||||
customColors: Record<string, CustomColorType>;
|
||||
defaultConversationColor: DefaultConversationColorType;
|
||||
deviceName?: string;
|
||||
donationsFeatureEnabled: boolean;
|
||||
emojiSkinToneDefault: EmojiSkinTone;
|
||||
hasAudioNotifications?: boolean;
|
||||
hasAutoConvertEmoji: boolean;
|
||||
@@ -393,7 +392,6 @@ export function Preferences({
|
||||
defaultConversationColor,
|
||||
deviceName = '',
|
||||
doDeleteAllData,
|
||||
donationsFeatureEnabled,
|
||||
editCustomColor,
|
||||
emojiSkinToneDefault,
|
||||
exportLocalBackup,
|
||||
@@ -578,9 +576,6 @@ export function Preferences({
|
||||
) {
|
||||
setSettingsLocation({ page: SettingsPage.General });
|
||||
}
|
||||
if (isDonationsPage(settingsLocation.page) && !donationsFeatureEnabled) {
|
||||
setSettingsLocation({ page: SettingsPage.General });
|
||||
}
|
||||
if (settingsLocation.page === SettingsPage.Internal && !isInternalUser) {
|
||||
setSettingsLocation({ page: SettingsPage.General });
|
||||
}
|
||||
@@ -2448,23 +2443,21 @@ export function Preferences({
|
||||
{i18n('icu:Preferences__button--backups')}
|
||||
</button>
|
||||
) : null}
|
||||
{donationsFeatureEnabled && (
|
||||
<button
|
||||
type="button"
|
||||
className={classNames({
|
||||
Preferences__button: true,
|
||||
'Preferences__button--donations': true,
|
||||
'Preferences__button--selected': isDonationsPage(
|
||||
settingsLocation.page
|
||||
),
|
||||
})}
|
||||
onClick={() =>
|
||||
setSettingsLocation({ page: SettingsPage.Donations })
|
||||
}
|
||||
>
|
||||
{i18n('icu:Preferences__button--donate')}
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
type="button"
|
||||
className={classNames({
|
||||
Preferences__button: true,
|
||||
'Preferences__button--donations': true,
|
||||
'Preferences__button--selected': isDonationsPage(
|
||||
settingsLocation.page
|
||||
),
|
||||
})}
|
||||
onClick={() =>
|
||||
setSettingsLocation({ page: SettingsPage.Donations })
|
||||
}
|
||||
>
|
||||
{i18n('icu:Preferences__button--donate')}
|
||||
</button>
|
||||
{isInternalUser ? (
|
||||
<button
|
||||
type="button"
|
||||
|
||||
@@ -91,7 +91,6 @@ import type { SmartPreferencesChatFoldersPageProps } from './PreferencesChatFold
|
||||
import { SmartPreferencesChatFoldersPage } from './PreferencesChatFoldersPage.js';
|
||||
import type { SmartPreferencesEditChatFolderPageProps } from './PreferencesEditChatFolderPage.js';
|
||||
import { SmartPreferencesEditChatFolderPage } from './PreferencesEditChatFolderPage.js';
|
||||
import { isProduction } from '../../util/version.js';
|
||||
import { AxoProvider } from '../../axo/AxoProvider.js';
|
||||
import {
|
||||
SmartNotificationProfilesCreateFlow,
|
||||
@@ -562,13 +561,6 @@ export function SmartPreferences(): JSX.Element | null {
|
||||
const backupFeatureEnabled = isBackupFeatureEnabled(items.remoteConfig);
|
||||
const backupLocalBackupsEnabled = isLocalBackupsEnabled(items.remoteConfig);
|
||||
|
||||
const donationsFeatureEnabled =
|
||||
(isInternalUser ||
|
||||
items.remoteConfig?.['desktop.donations']?.enabled ||
|
||||
(isProduction(window.getVersion()) &&
|
||||
items.remoteConfig?.['desktop.donations.prod']?.enabled)) ??
|
||||
false;
|
||||
|
||||
// Two-way items
|
||||
|
||||
function createItemsAccess<K extends keyof StorageAccessType>(
|
||||
@@ -779,7 +771,6 @@ export function SmartPreferences(): JSX.Element | null {
|
||||
customColors={customColors}
|
||||
defaultConversationColor={defaultConversationColor}
|
||||
deviceName={deviceName}
|
||||
donationsFeatureEnabled={donationsFeatureEnabled}
|
||||
emojiSkinToneDefault={emojiSkinToneDefault}
|
||||
exportLocalBackup={exportLocalBackup}
|
||||
phoneNumber={phoneNumber}
|
||||
|
||||
Reference in New Issue
Block a user