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'),
|
2022-05-12 16:53:18 +03:00
|
|
|
locale: 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'),
|
2022-05-16 13:38:32 +03:00
|
|
|
slackUrl: attr('string'),
|
|
|
|
slackUsername: attr('string'),
|
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'),
|
2022-05-12 11:30:22 +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'),
|
2022-02-04 18:30:59 +03:00
|
|
|
defaultContentVisibilityTiers: attr('json-string'),
|
2020-08-25 15:05:45 +03:00
|
|
|
membersSupportAddress: attr('string'),
|
2021-05-18 11:11:22 +03:00
|
|
|
membersMonthlyPriceId: attr('string'),
|
|
|
|
membersYearlyPriceId: attr('string'),
|
2020-06-29 20:37:11 +03:00
|
|
|
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'),
|
2022-05-16 19:37:00 +03:00
|
|
|
|
2022-05-24 17:53:03 +03:00
|
|
|
membersEnabled: attr('boolean'),
|
|
|
|
paidMembersEnabled: attr('boolean'),
|
|
|
|
|
2022-07-06 10:53:21 +03:00
|
|
|
commentsEnabled: attr(), // "off", "free", "paid"
|
|
|
|
|
2021-05-07 12:02:19 +03:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
});
|