Skip to content
This repository has been archived by the owner on Jul 20, 2021. It is now read-only.

Initial implementation #1

Merged
merged 39 commits into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e3f20a6
feat: Initial commit
drazik Dec 6, 2019
20f6af7
feat(PresentationPage): Add button to go to security step
drazik Dec 6, 2019
c1efcdd
feat(SecurityPage): Add link to settings
drazik Dec 6, 2019
8350bba
feat(SecurityPage): Add link to hint configuration page
drazik Dec 6, 2019
6565119
feat(HintPage): Handle hint update
drazik Dec 6, 2019
daba8aa
feat: First step UI
drazik Dec 16, 2019
c64f6b0
feat: Security page UI
drazik Dec 16, 2019
4265bed
feat: Hint step UI
drazik Dec 16, 2019
5b621c8
feat: InstallationPage UI
drazik Dec 16, 2019
ede3e36
feat(PresentationPage): Add translations
drazik Dec 16, 2019
3b39a8f
feat(SecurityPage): Add translations
drazik Dec 16, 2019
8055c75
feat(HintPage): Add translations
drazik Dec 17, 2019
82093d1
fix(deps): Update cozy-ui to v28.6.0
drazik Dec 17, 2019
1594621
feat: Handle redirection after extension install
drazik Dec 17, 2019
6db943b
feat: Handle translated text with cozy icon inside
drazik Dec 17, 2019
e26b5fa
feat(PresentationPage): Show message for unsupported browsers
drazik Dec 17, 2019
b2a7da3
feat: Prevent click on navigation
drazik Dec 17, 2019
1706459
chore: Add app icon
drazik Dec 17, 2019
faa7068
chore: Don't ignore locales
drazik Dec 17, 2019
3d4556d
chore: Disable travis
drazik Dec 17, 2019
a24db9f
fix: Use transpiled cozy-ui only
drazik Dec 17, 2019
8d4edff
refactor: Remove unused file
drazik Dec 17, 2019
1a27a33
feat: Show unavailability message on mobile
drazik Dec 17, 2019
2455b86
chore: Remove outdated stuff in editorconfig
drazik Dec 17, 2019
835a475
chore: Remove outdated stuff in PULL_REQUEST_TEMPLATE
drazik Dec 17, 2019
710521e
chore: Fix repo url (cozycloud => cozy)
drazik Dec 17, 2019
f2d2498
chore: Add editor to manifest
drazik Dec 17, 2019
4bbe40f
test: Remove tests related to removed files
drazik Dec 17, 2019
448a8df
fix(SecurityPage): Add missing password example
drazik Dec 17, 2019
a5958dc
feat: Update translations
drazik Dec 17, 2019
3d1781a
feat(InstalledPage): List available platforms
drazik Dec 17, 2019
9baa994
fix(InstallationPage): Fix link to extension store
drazik Dec 18, 2019
e46e35d
fix: Harmonize margins
drazik Dec 19, 2019
ecb0bbe
refactor: Extract generateWebAppLink helper
drazik Dec 19, 2019
ec26538
refactor(HintPage): Rename loading state to saving
drazik Dec 19, 2019
71406fc
refactor(SecurityPage): Use URL constructor to build urls
drazik Dec 19, 2019
520165e
refactor(WithCozyIcon): Use Media components from cozy-ui
drazik Dec 19, 2019
eb59c97
style: Use spaces indentation only
drazik Dec 19, 2019
41009ea
fix(locales): Typo in FR
drazik Dec 19, 2019
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"cozy-scripts": "2.0.2",
"cozy-ui": "28.3.0",
"eslint-config-cozy-app": "1.3.3",
"lodash": "^4.17.15",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-router-dom": "5.1.2"
Expand Down
41 changes: 40 additions & 1 deletion src/components/SecurityPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
import React from 'react'
import { ButtonLink } from 'cozy-ui/transpiled/react/Button'
import AppLinker, { generateWebLink } from 'cozy-ui/transpiled/react/AppLinker'
import { translate } from 'cozy-ui/transpiled/react/I18n'
import { withClient } from 'cozy-client'
import flowRight from 'lodash/flowRight'

const SecurityPage = () => <div>Security Page</div>
const DumbLinkToSettings = withClient(props => {
// eslint-disable-next-line no-unused-vars
nono marked this conversation as resolved.
Show resolved Hide resolved
const { client, t, f, ...rest } = props
const cozyURL = new URL(client.getStackClient().uri)
const { cozySubdomainType } = client.getInstanceOptions()
const settingsAppSlug = 'settings'
const settingsAppHref = generateWebLink({
cozyUrl: cozyURL.origin,
slug: settingsAppSlug,
subDomainType: cozySubdomainType
})
drazik marked this conversation as resolved.
Show resolved Hide resolved

return (
<AppLinker slug={settingsAppSlug} href={settingsAppHref}>
{({ onClick, href }) => (
<ButtonLink
href={href}
onClick={onClick}
label={t('SecurityPage.enhance-password')}
{...rest}
/>
)}
</AppLinker>
)
})

const LinkToSettings = flowRight(withClient, translate())(DumbLinkToSettings)
drazik marked this conversation as resolved.
Show resolved Hide resolved

const SecurityPage = () => {
return (
<div>
<LinkToSettings />
</div>
)
}

export default SecurityPage
4 changes: 4 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@

"PresentationPage": {
"lets-go": "Let's go!"
},

"SecurityPage": {
"enhance-password": "Enhance my password"
}
}
1 change: 1 addition & 0 deletions src/targets/browser/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
data-cozy-app-slug="{{.AppSlug}}"
data-cozy-app-name-prefix="{{.AppNamePrefix}}"
data-cozy-app-editor="{{.AppEditor}}"
data-cozy-subdomain-type="{{.SubDomain}}"
data-cozy-icon-path="{{.IconPath}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We have a new template attribute available from the stack, containing all the data, we might as well use it. See cozy/cozy-stack#2270. I hope this is deployed ;)

>
<% _.forEach(htmlWebpackPlugin.files.js, function(file) { %>
Expand Down