Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lets gone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
Proof of Concept
Lets gone
Commits
0df6448b
Commit
0df6448b
authored
9 months ago
by
Bastien DUMONT
Browse files
Options
Downloads
Patches
Plain Diff
fix(app): cozy bar clickable
parent
2336169c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/App.tsx
+11
-0
11 additions, 0 deletions
src/components/App.tsx
src/targets/browser/index.tsx
+28
-26
28 additions, 26 deletions
src/targets/browser/index.tsx
with
39 additions
and
26 deletions
src/components/App.tsx
+
11
−
0
View file @
0df6448b
import
{
useClient
}
from
'
cozy-client
'
import
{
useClient
}
from
'
cozy-client
'
import
{
useWebviewIntent
}
from
'
cozy-intent
'
import
{
useI18n
}
from
'
cozy-ui/transpiled/react/I18n
'
import
{
useI18n
}
from
'
cozy-ui/transpiled/react/I18n
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
React
,
{
useEffect
,
useState
}
from
'
react
'
import
{
useLocation
}
from
'
react-router-dom
'
import
{
useLocation
}
from
'
react-router-dom
'
...
@@ -18,9 +19,19 @@ export const App = ({
...
@@ -18,9 +19,19 @@ export const App = ({
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
client
=
useClient
()
const
client
=
useClient
()
const
location
=
useLocation
()
const
location
=
useLocation
()
const
webviewIntent
=
useWebviewIntent
()
const
[
isLoading
,
setIsLoading
]
=
useState
(
true
)
const
[
isLoading
,
setIsLoading
]
=
useState
(
true
)
useEffect
(()
=>
{
webviewIntent
?.
call
(
'
setFlagshipUI
'
,
{
bottomBackground
:
'
#E8F0FF
'
,
bottomTheme
:
'
light
'
,
topBackground
:
'
#ffffff
'
,
topTheme
:
'
light
'
})
},
[
webviewIntent
])
useEffect
(()
=>
{
useEffect
(()
=>
{
let
subscribed
=
true
let
subscribed
=
true
async
function
getActions
()
{
async
function
getActions
()
{
...
...
This diff is collapsed.
Click to expand it.
src/targets/browser/index.tsx
+
28
−
26
View file @
0df6448b
import
'
cozy-ui/transpiled/react/stylesheet.css
'
import
'
cozy-ui/dist/cozy-ui.utils.min.css
'
import
'
cozy-ui/dist/cozy-ui.utils.min.css
'
import
'
cozy-ui/transpiled/react/stylesheet.css
'
import
'
src/styles/index.styl
'
import
'
src/styles/index.styl
'
import
React
from
'
react
'
import
{
CozyProvider
}
from
'
cozy-client
'
import
{
createRoot
}
from
'
react-dom/client
'
import
{
I18n
}
from
'
cozy-ui/transpiled/react/I18n
'
import
MuiCozyTheme
from
'
cozy-ui/transpiled/react/MuiCozyTheme
'
import
{
BreakpointsProvider
}
from
'
cozy-ui/transpiled/react/hooks/useBreakpoints
'
import
{
import
{
StylesProvider
,
StylesProvider
,
createGenerateClassName
createGenerateClassName
}
from
'
cozy-ui/transpiled/react/styles
'
}
from
'
cozy-ui/transpiled/react/styles
'
import
{
I18n
}
from
'
cozy-ui/transpiled/react/I18n
'
import
React
from
'
react
'
import
MuiCozyTheme
from
'
cozy-ui/transpiled/react/MuiCozyTheme
'
import
{
createRoot
}
from
'
react-dom/client
'
import
{
BreakpointsProvider
}
from
'
cozy-ui/transpiled/react/hooks/useBreakpoints
'
import
{
CozyProvider
}
from
'
cozy-client
'
import
setupApp
from
'
src/targets/browser/setupApp
'
import
{
HashRouter
}
from
'
react-router-dom
'
import
AppLayout
from
'
components/AppLayout
'
import
{
App
}
from
'
components/App
'
import
{
App
}
from
'
components/App
'
import
{
AppRoutes
}
from
'
components/Routes
'
import
{
AppRoutes
}
from
'
components/Routes
'
import
MatomoTracker
from
'
utils/matomoTracker
'
import
{
WebviewIntentProvider
}
from
'
cozy-intent
'
import
{
createHashHistory
}
from
'
history
'
import
{
createHashHistory
}
from
'
history
'
import
{
HashRouter
}
from
'
react-router-dom
'
import
setupApp
from
'
src/targets/browser/setupApp
'
import
MatomoTracker
from
'
utils/matomoTracker
'
declare
let
__PIWIK_TRACKER_URL__
:
string
declare
let
__PIWIK_TRACKER_URL__
:
string
declare
let
__PIWIK_SITEID__
:
number
declare
let
__PIWIK_SITEID__
:
number
...
@@ -59,21 +59,23 @@ const init = () => {
...
@@ -59,21 +59,23 @@ const init = () => {
}
}
root
.
render
(
root
.
render
(
<
StylesProvider
generateClassName
=
{
generateClassName
}
>
<
WebviewIntentProvider
>
<
CozyProvider
client
=
{
client
}
>
<
StylesProvider
generateClassName
=
{
generateClassName
}
>
<
I18n
lang
=
{
lang
}
polyglot
=
{
polyglot
}
>
<
CozyProvider
client
=
{
client
}
>
<
HashRouter
>
<
I18n
lang
=
{
lang
}
polyglot
=
{
polyglot
}
>
<
MuiCozyTheme
>
<
HashRouter
>
<
BreakpointsProvider
>
<
MuiCozyTheme
>
<
App
tracker
=
{
tracker
}
>
<
BreakpointsProvider
>
<
AppRoutes
/>
<
App
tracker
=
{
tracker
}
>
</
App
>
<
AppRoutes
/>
</
BreakpointsProvider
>
</
App
>
</
MuiCozyTheme
>
</
BreakpointsProvider
>
</
HashRouter
>
</
MuiCozyTheme
>
</
I18n
>
</
HashRouter
>
</
CozyProvider
>
</
I18n
>
</
StylesProvider
>
</
CozyProvider
>
</
StylesProvider
>
</
WebviewIntentProvider
>
)
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment