mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-22 12:24:02 +03:00
converted user.hidePrivacyAlert -> user.onboarding.hidePrivacyAlert
This commit is contained in:
parent
05b12828ef
commit
18396439ef
@ -132,11 +132,11 @@ export class Alert extends React.Component {
|
||||
};
|
||||
|
||||
_handleDismissPrivacyAlert = (e) => {
|
||||
Actions.updateViewer({ hidePrivacyAlert: true });
|
||||
Actions.updateStatus({ onboarding: ["hidePrivacyAlert"] });
|
||||
this.props.onAction({
|
||||
type: "UDPATE_VIEWER",
|
||||
viewer: {
|
||||
hidePrivacyAlert: true,
|
||||
onboarding: { ...this.props.viewer.onboarding, hidePrivacyAlert: true },
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -278,7 +278,7 @@ export default class ApplicationLayout extends React.Component {
|
||||
this.props.page?.id === "NAV_SIGN_IN"
|
||||
? true
|
||||
: this.props.viewer
|
||||
? this.props.viewer.hidePrivacyAlert
|
||||
? this.props.viewer.onboarding.hidePrivacyAlert
|
||||
: false
|
||||
}
|
||||
fileLoading={this.props.fileLoading}
|
||||
|
@ -118,7 +118,6 @@ const addUserColumns = async () => {
|
||||
table.string("name").nullable();
|
||||
table.string("twitterUsername").nullable();
|
||||
table.boolean("twitterVerified").notNullable().defaultTo(false);
|
||||
table.boolean("hidePrivacyAlert").notNullable().defaultTo(false);
|
||||
table.string("textileToken").nullable();
|
||||
table.boolean("settingsDealsAutoApprove").notNullable().defaultTo(false);
|
||||
table.boolean("allowAutomaticDataStorage").notNullable().defaultTo(true);
|
||||
@ -172,12 +171,11 @@ const migrateUserTable = async () => {
|
||||
name: data.name,
|
||||
body: data.body,
|
||||
photo: data.photo,
|
||||
hidePrivacyAlert: data.status?.hidePrivacyAlert,
|
||||
textileToken: data.tokens?.api,
|
||||
settingsDealsAutoApprove: data.settings?.settings_deals_auto_approve,
|
||||
allowAutomaticDataStorage: data.settings?.allow_automatic_data_storage,
|
||||
allowEncryptedDataStorage: data.settings?.allow_encrypted_data_storage,
|
||||
onboarding: data.onboarding,
|
||||
onboarding: { ...data.onboarding, hidePrivacyAlert: data.status?.hidePrivacyAlert },
|
||||
twitterUsername: data.twitter?.username,
|
||||
twitterVerified: data.twitter?.verified,
|
||||
};
|
||||
@ -289,7 +287,7 @@ Users
|
||||
'data.name', -> 'name' MIGRATED
|
||||
'data.body', -> 'body' MIGRATED
|
||||
'data.photo', -> 'photo' MIGRATED
|
||||
'data.status', -> 'hidePrivacyAlert' MIGRATED
|
||||
'data.status', -> 'onboarding.hidePrivacyAlert' MIGRATED
|
||||
'data.tokens.api', -> 'textileToken' MIGRATED
|
||||
'data.settings.settings_deals_auto_approve', -> 'settingsDealsAutoApprove' MIGRATED
|
||||
'data.settings.allow_automatic_data_storage', -> 'allowAutomaticDataStorage' MIGRATED
|
||||
|
@ -39,7 +39,6 @@ const createUsersTable = db.schema.createTable("users", function (table) {
|
||||
table.string("twitterId").unique().nullable();
|
||||
table.string("twitterUsername").nullable();
|
||||
table.boolean("twitterVerified").notNullable().defaultTo(false);
|
||||
table.boolean("hidePrivacyAlert").notNullable().defaultTo(false);
|
||||
table.string("textileToken").nullable();
|
||||
table.boolean("settingsDealsAutoApprove").notNullable().defaultTo(false);
|
||||
table.boolean("allowAutomaticDataStorage").notNullable().defaultTo(true);
|
||||
|
Loading…
Reference in New Issue
Block a user