Skip to content

feat: add instagram social link #4637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions app/components/forms/admin/content/social-links-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@ export default Component.extend(FormMixin, {
}
]
},
instagram: {
identifier : 'instagram',
optional : true,
rules : [
{
type : 'containsExactly[instagram.com]',
prompt : this.l10n.t('Please enter a valid instagram url')
},
{
type : 'regExp',
value : protocolLessValidUrlPattern,
prompt : this.l10n.t('Please enter a valid url')
}
]
},
googleGroup: {
identifier : 'google_group',
optional : true,
Expand Down
2 changes: 2 additions & 0 deletions app/models/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default ModelBase.extend({
twitterUrl : attr('string'),
supportUrl : attr('string'),
facebookUrl : attr('string'),
instagramUrl : attr('string'),
youtubeUrl : attr('string'),
androidAppUrl : attr('string'),
frontendUrl : attr('string'),
Expand Down Expand Up @@ -102,6 +103,7 @@ export default ModelBase.extend({

segmentedSupportUrl : computedSegmentedLink.bind(this)('supportUrl'),
segmentedFacebookUrl : computedSegmentedLink.bind(this)('facebookUrl'),
segmentedInstagramUrl : computedSegmentedLink.bind(this)('instagramUrl'),
segmentedTwitterUrl : computedSegmentedLink.bind(this)('twitterUrl'),
segmentedGoogleUrl : computedSegmentedLink.bind(this)('googleUrl'),
segmentedYoutubeUrl : computedSegmentedLink.bind(this)('youtubeUrl'),
Expand Down
2 changes: 1 addition & 1 deletion app/routes/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class CreateRoute extends Route.extend(AuthenticatedRouteMixin, E
copyright : this.store.createRecord('event-copyright'),
stripeAuthorization : this.store.createRecord('stripe-authorization')
}),
types : await this.store.query('event-type', {
types: await this.store.query('event-type', {
sort: 'name'
}),
topics: await this.store.query('event-topic', {
Expand Down
7 changes: 6 additions & 1 deletion app/templates/components/footer-main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
<i class="facebook f icon"></i> {{t 'Facebook'}}
</a>
{{/if}}
{{#if this.socialLinks.instagramUrl}}
<a class="item" href="{{this.socialLinks.instagramUrl}}" target="_blank" rel="noopener noreferrer">
<i class="instagram icon"></i> {{t 'Instagram'}}
</a>
{{/if}}
{{#if this.socialLinks.twitterUrl}}
<a class="item" href="{{this.socialLinks.twitterUrl}}" target="_blank" rel="noopener noreferrer">
<i class="twitter icon"></i> {{t 'Twitter'}}
Expand All @@ -63,7 +68,7 @@
{{/if}}
{{#if this.socialLinks.googleUrl}}
<a class="item" href="{{this.socialLinks.googleUrl}}" target="_blank" rel="noopener noreferrer">
<i class="google plus icon"></i> {{t 'Google +'}}
<i class="google groups icon"></i> {{t 'Google Groups'}}
</a>
{{/if}}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
@segmentedLink={{this.socials.segmentedFacebookUrl}}
@inputId="facebook" />
</div>
<div class="field">
<label>{{t 'Instagram'}}</label>
<Widgets::Forms::LinkInput
@segmentedLink={{this.socials.segmentedInstagramUrl}}
@inputId="instagram" />
</div>
<div class="field">
<label>{{t 'Google Group'}}</label>
<Widgets::Forms::LinkInput
Expand Down