Skip to content

Commit

Permalink
Merge pull request #908 from cozy/feat/VER-692
Browse files Browse the repository at this point in the history
Use CozyTheme in intents
  • Loading branch information
JF-Cozy authored Jun 19, 2024
2 parents c61e2dd + 4e33b01 commit 6637f8e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 37 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"@sentry/integrations": "^7.114.0",
"@sentry/react": "^8.5.0",
"cozy-app-publish": "^0.27.2",
"cozy-bar": "^12.2.4",
"cozy-client": "^48.1.0",
"cozy-bar": "^12.3.0",
"cozy-client": "^48.3.0",
"cozy-device-helper": "^2.1.0",
"cozy-doctypes": "1.85.0",
"cozy-flags": "3.2.2",
Expand All @@ -70,8 +70,8 @@
"cozy-logger": "1.9.0",
"cozy-minilog": "^3.3.1",
"cozy-realtime": "3.14.4",
"cozy-stack-client": "^48.0.0",
"cozy-ui": "^109.1.1",
"cozy-stack-client": "^48.2.0",
"cozy-ui": "^110.0.0",
"emoji-js": "3.7.0",
"focus-trap-react": "4.0.1",
"fuse.js": "6.5.3",
Expand Down
16 changes: 8 additions & 8 deletions src/ducks/components/Root.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ const Root = ({ client, lang = 'en', store }) => {
if (!client) return null
return (
<WebviewIntentProvider>
<CozyTheme variant="normal" className="u-flex-grow-1">
<I18n lang={lang} dictRequire={lang => require(`locales/${lang}`)}>
<Provider store={store}>
<CozyProvider client={client}>
<I18n lang={lang} dictRequire={lang => require(`locales/${lang}`)}>
<Provider store={store}>
<CozyProvider client={client}>
<CozyTheme variant="normal" className="u-flex-grow-1">
<BarProvider>
<HashRouter>
<App />
</HashRouter>
</BarProvider>
</CozyProvider>
</Provider>
</I18n>
</CozyTheme>
</CozyTheme>
</CozyProvider>
</Provider>
</I18n>
</WebviewIntentProvider>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/intents.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

.coz-error {
font-size: 1.5em;
color: red;
color: var(--errorColor);
}

.coz-intent-wrapper .coz-error {
Expand Down
13 changes: 8 additions & 5 deletions src/targets/intents/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'cozy-ui/transpiled/react/stylesheet.css'
import 'styles'

import { BreakpointsProvider } from 'cozy-ui/transpiled/react/providers/Breakpoints'
import CozyTheme from 'cozy-ui/transpiled/react/providers/CozyTheme'
import InstallAppIntent from 'ducks/components/intents/InstallAppIntent'
import IntentHandler from 'ducks/components/intents/IntentHandler'
import schema from 'lib/schema'
Expand Down Expand Up @@ -38,11 +39,13 @@ document.addEventListener('DOMContentLoaded', () => {
>
<Provider store={store}>
<CozyProvider client={client}>
<BreakpointsProvider>
<IntentHandler appData={appData}>
<InstallAppIntent action="INSTALL" type="io.cozy.apps" />
</IntentHandler>
</BreakpointsProvider>
<CozyTheme>
<BreakpointsProvider>
<IntentHandler appData={appData}>
<InstallAppIntent action="INSTALL" type="io.cozy.apps" />
</IntentHandler>
</BreakpointsProvider>
</CozyTheme>
</CozyProvider>
</Provider>
</I18n>,
Expand Down
38 changes: 19 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5369,10 +5369,10 @@ cozy-app-publish@^0.27.2:
request "^2.88.0"
tar "^4.4.13"

cozy-bar@^12.2.4:
version "12.2.4"
resolved "https://registry.yarnpkg.com/cozy-bar/-/cozy-bar-12.2.4.tgz#6892a3eb0479f9fed4be68a2a95ccec8edf9438a"
integrity sha512-Et0yz6b4gGjooVKMsIPrK5mkpmB09x/9btYl0hrnaoj6D+fz/R+jlAiUFht0wflgyUYR4dIXfOVlEQwzA3AkPg==
cozy-bar@^12.3.0:
version "12.3.0"
resolved "https://registry.yarnpkg.com/cozy-bar/-/cozy-bar-12.3.0.tgz#697c19df79b1e3c04978334c64adeb9917790f7e"
integrity sha512-whvGkUQ2Ye1WBnUWCCelwjlDlYuYeauFtAoShcJCxJZG/hmHANJkZT2LTbLbRjQCu+x28JKlpLyiW6XwVSTIPA==
dependencies:
hammerjs "2.0.8"
lodash.debounce "4.0.8"
Expand All @@ -5385,16 +5385,16 @@ cozy-bar@^12.2.4:
redux-persist "5.10.0"
redux-thunk "2.3.0"

cozy-client@^48.1.0:
version "48.1.0"
resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-48.1.0.tgz#22c40222c3ee2fdde6bd8ebcd9fefb395eb7eaec"
integrity sha512-49N2YAJb73hhhnoQ/LDsx06PhCywE14pJh2VA903RwpuGjy6e8Eep61ik0ITmcwSPbojbETSp8IqagWEHsuIBA==
cozy-client@^48.3.0:
version "48.3.0"
resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-48.3.0.tgz#e33779a6fefa9efdecce7b8a2062c44f692e60e7"
integrity sha512-8FruXXw9kWnk36SBzejEjVf3ZSrOnBOGYVmVpPj1aB6XFL0TD2OSumvIG6wEH9y3JSf9xM8c9HhUfbP0eb3AmQ==
dependencies:
"@cozy/minilog" "1.0.0"
"@types/jest" "^26.0.20"
"@types/lodash" "^4.14.170"
btoa "^1.2.1"
cozy-stack-client "^48.0.0"
cozy-stack-client "^48.2.0"
date-fns "2.29.3"
json-stable-stringify "^1.0.1"
lodash "^4.17.13"
Expand Down Expand Up @@ -5549,10 +5549,10 @@ cozy-scripts@^8.3.0:
webpack-dev-server "3.10.3"
webpack-merge "4.2.2"

cozy-stack-client@^48.0.0:
version "48.0.0"
resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-48.0.0.tgz#2e19db82b0df3281fb4cdf9c999cc6bca741b299"
integrity sha512-q45CG9EPIqcl38YDGXCpuXiDnk16pEILaM4Vn0bvRW0B8onp5t0BGJYQdlzaM35cIghBxAn7DOpj66GE8JAdtg==
cozy-stack-client@^48.2.0:
version "48.2.0"
resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-48.2.0.tgz#91e02713a88a61a5ca1a3071a9de5ae52b44d542"
integrity sha512-zORfxbMv2s1RpU1ZyDn9vg5tA+EDlWaJWLWF6yWA4fOQh9jR7d5u1ZtyVsaSPD2LoqwghCRHtPVdQr5nYqmWBQ==
dependencies:
detect-node "^2.0.4"
mime "^2.4.0"
Expand All @@ -5563,10 +5563,10 @@ cozy-tsconfig@^1.2.0:
resolved "https://registry.yarnpkg.com/cozy-tsconfig/-/cozy-tsconfig-1.2.0.tgz#17e61f960f139fae4d26cbac2254b9ab632b269e"
integrity sha512-TRHnY9goF3FzVlUbP7BcHxuN2XAA4AmppT4fHHZmTKaSwYTByVR1Al+riFMDbce94kJZ1wzl9WNLWQuqzGZ6Cw==

cozy-ui@^109.1.1:
version "109.1.1"
resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-109.1.1.tgz#c2fd1c95b8f490b1a9dfd93cec7be096d2de7b33"
integrity sha512-hBR3qmtcvEhV4D08SwYz/eZvWFoCJM0Wfw7rPLYifGgawo388VZTpzxZxFHKFBK9Y0AbQAXQxYqd7oq9nUlcQA==
cozy-ui@^110.0.0:
version "110.0.0"
resolved "https://registry.yarnpkg.com/cozy-ui/-/cozy-ui-110.0.0.tgz#5d39046abe6d1ea5ebcc309d389c56c94f975b65"
integrity sha512-DUb1KUpIRHqimkVCxdt9q2kBHsG6GCr1f+IiL87+Z3aokNeVRrG9+7UMC3LcFSPKvCr4Bhr3aFEVm+nCqUbRtA==
dependencies:
"@babel/runtime" "^7.3.4"
"@material-ui/core" "4.12.3"
Expand Down Expand Up @@ -11132,9 +11132,9 @@ ms@2.1.2:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==

"mui-bottom-sheet@https://github.com/cozy/mui-bottom-sheet.git#v1.0.9":
"mui-bottom-sheet@git+https://github.com/cozy/mui-bottom-sheet.git#v1.0.9":
version "1.0.8"
resolved "https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c"
resolved "git+https://github.com/cozy/mui-bottom-sheet.git#3dc4c2a245ab39079bc2f73546bccf80847be14c"
dependencies:
"@juggle/resize-observer" "^3.1.3"
jest-environment-jsdom-sixteen "^1.0.3"
Expand Down

0 comments on commit 6637f8e

Please sign in to comment.