2016-11-14 16:16:51 +03:00
|
|
|
/* eslint-disable camelcase */
|
2020-01-16 20:01:12 +03:00
|
|
|
import Model, {attr} from '@ember-data/model';
|
2016-05-24 15:06:59 +03:00
|
|
|
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
|
2021-05-07 12:02:19 +03:00
|
|
|
import {and} from '@ember/object/computed';
|
2014-06-24 10:33:24 +04:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Model.extend(ValidationEngine, {
|
2014-06-24 10:33:24 +04:00
|
|
|
validationType: 'setting',
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
title: attr('string'),
|
|
|
|
description: attr('string'),
|
|
|
|
logo: attr('string'),
|
2017-04-24 20:42:43 +03:00
|
|
|
coverImage: attr('string'),
|
2017-01-26 14:17:34 +03:00
|
|
|
icon: attr('string'),
|
2020-06-23 22:48:53 +03:00
|
|
|
accentColor: attr('string'),
|
2020-06-24 17:27:17 +03:00
|
|
|
lang: attr('string'),
|
2020-06-24 17:34:59 +03:00
|
|
|
timezone: attr('string', {defaultValue: 'Etc/UTC'}),
|
2019-03-05 13:40:19 +03:00
|
|
|
codeinjectionHead: attr('string'),
|
|
|
|
codeinjectionFoot: attr('string'),
|
2016-05-16 21:16:40 +03:00
|
|
|
facebook: attr('facebook-url-user'),
|
2016-03-03 11:52:27 +03:00
|
|
|
twitter: attr('twitter-url-user'),
|
2015-10-28 14:36:45 +03:00
|
|
|
labs: attr('string'),
|
2016-04-26 12:45:59 +03:00
|
|
|
navigation: attr('navigation-settings'),
|
2019-12-04 07:14:45 +03:00
|
|
|
secondaryNavigation: attr('navigation-settings', {isSecondary: true}),
|
2015-10-28 14:36:45 +03:00
|
|
|
isPrivate: attr('boolean'),
|
2017-10-05 12:59:14 +03:00
|
|
|
publicHash: attr('string'),
|
2016-03-29 11:40:44 +03:00
|
|
|
password: attr('string'),
|
2017-01-20 12:33:54 +03:00
|
|
|
slack: attr('slack-settings'),
|
2017-08-02 10:05:59 +03:00
|
|
|
amp: attr('boolean'),
|
2020-07-15 14:45:31 +03:00
|
|
|
ampGtagId: attr('string'),
|
2021-01-15 17:31:40 +03:00
|
|
|
firstpromoter: attr('boolean'),
|
|
|
|
firstpromoterId: attr('string'),
|
2021-02-18 03:25:21 +03:00
|
|
|
unsplash: attr('boolean'),
|
2019-08-21 18:16:59 +03:00
|
|
|
metaTitle: attr('string'),
|
|
|
|
metaDescription: attr('string'),
|
|
|
|
twitterTitle: attr('string'),
|
|
|
|
twitterDescription: attr('string'),
|
|
|
|
twitterImage: attr('string'),
|
|
|
|
ogTitle: attr('string'),
|
|
|
|
ogDescription: attr('string'),
|
2019-11-13 06:58:27 +03:00
|
|
|
ogImage: attr('string'),
|
2020-07-03 12:48:54 +03:00
|
|
|
mailgunApiKey: attr('string'),
|
|
|
|
mailgunDomain: attr('string'),
|
|
|
|
mailgunBaseUrl: attr('string'),
|
2020-11-23 21:36:57 +03:00
|
|
|
emailTrackOpens: attr('boolean'),
|
2020-06-19 19:06:49 +03:00
|
|
|
portalButton: attr('boolean'),
|
|
|
|
portalName: attr('boolean'),
|
|
|
|
portalPlans: attr('json-string'),
|
2021-06-21 11:51:48 +03:00
|
|
|
portalProducts: attr('json-string'),
|
2020-07-07 07:22:42 +03:00
|
|
|
portalButtonStyle: attr('string'),
|
|
|
|
portalButtonIcon: attr('string'),
|
|
|
|
portalButtonSignupText: attr('string'),
|
2020-06-29 20:37:11 +03:00
|
|
|
sharedViews: attr('string'),
|
|
|
|
/**
|
|
|
|
* Members settings
|
|
|
|
*/
|
2021-04-16 17:33:02 +03:00
|
|
|
membersSignupAccess: attr('string'),
|
2021-05-07 12:02:19 +03:00
|
|
|
defaultContentVisibility: attr('string'),
|
2020-06-29 20:37:11 +03:00
|
|
|
membersFromAddress: attr('string'),
|
2020-08-25 15:05:45 +03:00
|
|
|
membersSupportAddress: attr('string'),
|
|
|
|
membersReplyAddress: attr('string'),
|
2020-11-19 12:59:51 +03:00
|
|
|
membersPaidSignupRedirect: attr('string'),
|
|
|
|
membersFreeSignupRedirect: attr('string'),
|
2021-05-07 20:16:35 +03:00
|
|
|
membersFreePriceName: attr('string'),
|
|
|
|
membersFreePriceDescription: attr('string'),
|
2021-05-18 11:11:22 +03:00
|
|
|
membersMonthlyPriceId: attr('string'),
|
|
|
|
membersYearlyPriceId: attr('string'),
|
2020-06-29 20:37:11 +03:00
|
|
|
stripeProductName: attr('string'),
|
|
|
|
stripeSecretKey: attr('string'),
|
|
|
|
stripePublishableKey: attr('string'),
|
|
|
|
stripePlans: attr('json-string'),
|
|
|
|
stripeConnectIntegrationToken: attr('string'),
|
|
|
|
stripeConnectPublishableKey: attr('string'),
|
|
|
|
stripeConnectSecretKey: attr('string'),
|
|
|
|
stripeConnectLivemode: attr('boolean'),
|
|
|
|
stripeConnectDisplayName: attr('string'),
|
2020-11-12 17:45:22 +03:00
|
|
|
stripeConnectAccountId: attr('string'),
|
|
|
|
/**
|
|
|
|
* Newsletter settings
|
|
|
|
*/
|
2021-06-07 18:36:21 +03:00
|
|
|
newsletterHeaderImage: attr('string'),
|
|
|
|
newsletterShowHeaderIcon: attr('boolean'),
|
|
|
|
newsletterShowHeaderTitle: attr('boolean'),
|
|
|
|
newsletterTitleFontCategory: attr('string'),
|
|
|
|
newsletterTitleAlignment: attr('string'),
|
|
|
|
newsletterShowFeatureImage: attr('boolean'),
|
2020-11-12 17:45:22 +03:00
|
|
|
newsletterBodyFontCategory: attr('string'),
|
2021-04-22 20:41:41 +03:00
|
|
|
newsletterFooterContent: attr('string'),
|
2021-06-07 18:36:21 +03:00
|
|
|
newsletterShowBadge: attr('boolean'),
|
2021-04-22 20:41:41 +03:00
|
|
|
/**
|
|
|
|
* OAuth settings
|
|
|
|
*/
|
|
|
|
oauthClientId: attr('string'),
|
2021-05-07 12:02:19 +03:00
|
|
|
oauthClientSecret: attr('string'),
|
|
|
|
/**
|
|
|
|
* Editor settings
|
|
|
|
*/
|
|
|
|
editorDefaultEmailRecipients: attr('string'),
|
|
|
|
editorDefaultEmailRecipientsFilter: attr('members-segment-string'),
|
2021-08-19 16:50:21 +03:00
|
|
|
emailVerificationRequired: attr('boolean'),
|
2021-05-07 12:02:19 +03:00
|
|
|
|
|
|
|
mailgunIsConfigured: and('mailgunApiKey', 'mailgunDomain', 'mailgunBaseUrl')
|
2014-06-20 06:29:49 +04:00
|
|
|
});
|