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:
committed by
Khaled Garbaya
parent
af9c453c52
commit
b5d69d71e7
@@ -77,7 +77,7 @@ html
|
||||
.header__lower.layout-centered
|
||||
.header__logo
|
||||
a.header__logo-link(href=`/${queryString}`)
|
||||
img(src='/images/logo-node.svg' alt=translate('logoAlt', currentLocale.code))
|
||||
img(src='/images/logo-the-example-app-nodejs.svg' alt=translate('logoAlt', currentLocale.code))
|
||||
nav.header__navigation.main-navigation
|
||||
ul
|
||||
li
|
||||
@@ -126,24 +126,69 @@ html
|
||||
a(href='https://github.com/contentful' target='_blank' rel='noopener')
|
||||
svg
|
||||
use(xlink:href='/icons/icons.svg#github')
|
||||
section.modal#about-this-modal
|
||||
.modal__overlay.close
|
||||
.modal__wrapper
|
||||
h1.modal__title #{translate('modalTitle', currentLocale.code)}
|
||||
.modal__content
|
||||
p #{translate('modalIntro', currentLocale.code)}
|
||||
a(href='https://github.com/contentful/the-example-app.nodejs' target='_blank' rel='noopener') GitHub
|
||||
| .
|
||||
p
|
||||
| #{translate('modalSpaceIntro', currentLocale.code)}
|
||||
a(href='https://github.com/contentful/content-models/blob/master/the-example-app/README.md ' target='_blank' rel='noopener')=translate('modalSpaceLinkLabel', currentLocale.code)
|
||||
| .
|
||||
.modal__cta-wrapper
|
||||
a(href='#').modal__cta.close #{translate('modalCTALabel', currentLocale.code)}
|
||||
.modal__close-wrapper
|
||||
a(href='#').modal__close-button.close
|
||||
svg
|
||||
use(xlink:href='/icons/icons.svg#cross')
|
||||
section.modal#about-this-modal
|
||||
.modal__overlay.close
|
||||
.modal__wrapper
|
||||
h1.modal__title= translate("modalTitleDotnet", currentLocale.code)
|
||||
.modal__content
|
||||
p
|
||||
| #{translate("modalIntro", currentLocale.code)}
|
||||
a(href="https://github.com/contentful/the-example-app.nodejs" target="_blank" rel="noopener") Github
|
||||
| .
|
||||
p
|
||||
| #{translate("modalSpaceIntro", currentLocale.code)}
|
||||
a(href="https://github.com/contentful/content-models/blob/master/the-example-app/README.md " target="_blank" rel="noopener") #{translate("modalSpaceLinkLabel", currentLocale.code)}
|
||||
| .
|
||||
p= translate("modalPlatforms", currentLocale.code)
|
||||
ul
|
||||
li
|
||||
img(src='/images/nodejs-icon.svg')
|
||||
br
|
||||
a(href="https://the-example-app-nodejs.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||
br
|
||||
a(href="https://github.com/contentful/the-example-app.nodejs" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/dotnet.svg')
|
||||
br
|
||||
a(href="https://the-example-app-csharp.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||
br
|
||||
a(href="https://github.com/contentful/the-example-app.csharp" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/ruby.svg')
|
||||
br
|
||||
a(href="https://the-example-app-rb.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||
br
|
||||
a(href="https://github.com/contentful/the-example-app.rb" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/php.svg')
|
||||
br
|
||||
a(href="https://the-example-app-php.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||
br
|
||||
a(href="https://github.com/contentful/the-example-app.php" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/python.svg')
|
||||
br
|
||||
a(href="https://the-example-app-py.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||
br
|
||||
a(href="https://github.com/contentful/the-example-app.py" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img.inactive(src='/images/swift.svg')
|
||||
br
|
||||
= translate("comingSoonLabel", currentLocale.code)
|
||||
li
|
||||
img.inactive(src='/images/java.svg')
|
||||
br
|
||||
= translate("comingSoonLabel", currentLocale.code)
|
||||
li
|
||||
img.inactive(src='/images/android-icon.svg')
|
||||
br
|
||||
= translate("comingSoonLabel", currentLocale.code)
|
||||
.modal__cta-wrapper
|
||||
a.modal__cta.close(href="#")= translate("modalCTALabel", currentLocale.code)
|
||||
.modal__close-wrapper
|
||||
a.modal__close-button.close(href="#")
|
||||
svg
|
||||
use(xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/icons/icons.svg#cross")
|
||||
|
||||
script(src='/scripts/index.js')
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user