refactor: Improvements

* refactor: Update modal

* refactor: Update settings page

* feat: Add reset credentials

* feat: Add .nvmrc and lodash

* chore: Remove console.log

* chore: nmvrc -> .nvmrc

* chore: nmvrc -> .nvmrc
This commit is contained in:
Khaled Garbaya
2017-12-13 15:57:01 +01:00
committed by GitHub
parent e9e15b0bc2
commit fec1fa8a41
46 changed files with 725 additions and 65 deletions

View File

@@ -35,11 +35,41 @@ block content
svg.status-block__icon.status-block__icon--info
use(xlink:href='/icons/icons.svg#info')
.status-block__content
.status-block__message #{translate('connectedToSpaceLabel', currentLocale.code)} “#{space.name}”
.status-block__message
if !helpers.isCustomCredentials(settings)
p
em #{translate('usingServerCredentialsLabel', currentLocale.code)}
p
strong #{translate('connectedToSpaceLabel', currentLocale.code)}:
br
span #{space.name} (#{settings.spaceId})
p
strong #{translate('credentialSourceLabel', currentLocale.code)}:
br
span #{translate('loadedFromLocalFileLabel', currentLocale.code)}
a(href="https://github.com/contentful/the-example-app.nodejs/blob/master/variables.env" target="_blank" rel="noopener") variable.env
p
em #{translate('overrideConfigLabel', currentLocale.code)}
else
p
em #{translate('usingSessionCredentialsLabel', currentLocale.code)}
p
strong #{translate('connectedToSpaceLabel', currentLocale.code)}:
br
span #{space.name} (#{settings.spaceId})
form(action=`/settings` method="POST" class="form")
form(action='/settings?reset=true' method='POST')
p
strong #{translate('applicationCredentialsLabel', currentLocale.code)}:
br
button(type="submit") #{translate('resetCredentialsLabel', currentLocale.code)}
br
a(href=`${baseUrl}/?space_id=${settings.spaceId}&preview_token=${settings.previewToken}&delivery_token=${settings.deliveryToken}&api=${currentApi.id}${settings.editorialFeatures ? '&enable_editorial_features' : ''}` class="status-block__sharelink") #{translate('copyLinkLabel', currentLocale.code)}
p
em #{translate('overrideConfigLabel', currentLocale.code)}
form(action=`/settings${queryString}` method="POST" class="form")
.form-item
input(type="hidden" name="qs" value=queryString)
label(for="input-space-id") #{translate('spaceIdLabel', currentLocale.code)}
input(type="text" name="spaceId" id="input-space-id" value=settings.spaceId)
if 'spaceId' in errors