How to use the ember-get-config.support function in ember-get-config

To help you get started, we’ve selected a few ember-get-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CenterForOpenScience / ember-osf-web / app / settings / account / -components / request-export / component.ts View on Github external
async confirmRequestExport() {
        this.set('showRequestDialog', false);
        if (this.settings !== undefined) {
            await this.settings.requestExport();
            return this.toast.success(
                this.i18n.t('settings.account.export.confirmationToastMessage'),
                '',
                this.toastOptions,
            );
        }
        const { supportEmail } = config.support;
        return this.toast.error(
            this.i18n.t('settings.account.security.saveError', { supportEmail }),
            '',
            this.toastOptions,
        );
    }
github CenterForOpenScience / ember-osf-web / app / not-found / controller.ts View on Github external
import Controller from '@ember/controller';
import config from 'ember-get-config';

export default class NotFound extends Controller {
    supportEmail: string = config.support.supportEmail;
}

declare module '@ember/controller' {
    interface Registry {
        'not-found': NotFound;
    }
}
github CenterForOpenScience / ember-osf-web / lib / osf-components / addon / components / osf-footer / component.ts View on Github external
import { service } from '@ember-decorators/service';
import Component from '@ember/component';
import config from 'ember-get-config';

import { serviceLinks } from 'ember-osf-web/const/service-links';
import { layout } from 'ember-osf-web/decorators/component';
import Analytics from 'ember-osf-web/services/analytics';
import styles from './styles';
import template from './template';

@layout(template, styles)
export default class OsfFooter extends Component {
    @service analytics!: Analytics;

    serviceLinks = serviceLinks;
    supportEmail: string = config.support.supportEmail;
    currentYear: number = (new Date()).getUTCFullYear();

    constructor(properties: object) {
        super(properties);
        Object.assign(this, config.signUpPolicy, config.footerLinks);
    }
}
github CenterForOpenScience / ember-osf-web / app / support / controller.ts View on Github external
constructor() {
        super();
        Object.assign(this, config.support);
    }
}
github CenterForOpenScience / ember-osf-web / app / settings / account / -components / request-deactivation / component.ts View on Github external
saveSettings: task(function *(this: DeactivationPane, successMessage: string) {
        try {
            if (this.settings !== undefined) {
                yield this.settings.save();
                return this.toast.success(successMessage);
            }
            throw Error('No settings to save.');
        } catch (e) {
            const { supportEmail } = config.support;
            const saveErrorMessage = this.i18n.t('settings.account.security.saveError', { supportEmail });
            return this.toast.error(saveErrorMessage);
        }
    }),
}) {
github CenterForOpenScience / ember-osf-web / app / settings / account / -components / security / component.ts View on Github external
verificationError(error: DS.AdapterError) {
        if (error instanceof DS.ForbiddenError) {
            this.set('showError', true);
        } else {
            const { supportEmail } = config.support;
            const saveErrorMessage: string = this.i18n.t('settings.account.security.saveError', { supportEmail });
            this.toast.error(saveErrorMessage);
        }
    }
github CenterForOpenScience / ember-osf-web / app / settings / account / -components / default-region / component.ts View on Github external
updateError() {
        this.user.rollbackAttributes();
        const { supportEmail } = config.support;
        const saveErrorMessage = this.i18n.t('settings.account.defaultRegion.saveError', { supportEmail });
        return this.toast.error(saveErrorMessage);
    }