-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish: Merge pull request #281 from cozy/feat/add-translate-apps
generated from commit 7e07ec9
- Loading branch information
Travis CI User
committed
Oct 8, 2024
1 parent
004add2
commit 19a6643
Showing
14 changed files
with
565 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import flag from 'cozy-flags' | ||
|
||
import { useBreakpoints } from 'cozy-ui/transpiled/react/providers/Breakpoints' | ||
|
||
import AssistantBar from 'assistant/AssistantBar' | ||
|
||
const AssistantWrapperDesktop = () => { | ||
const { isMobile } = useBreakpoints() | ||
|
||
if (!flag('cozy.assistant.enabled') || isMobile) return null | ||
|
||
return ( | ||
<div className="app-list-wrapper u-mb-3 u-mh-auto u-w-100"> | ||
<AssistantBar /> | ||
</div> | ||
) | ||
} | ||
|
||
export default AssistantWrapperDesktop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
import flag from 'cozy-flags' | ||
import cx from 'classnames' | ||
|
||
import { getFlagshipMetadata } from 'cozy-device-helper' | ||
import { useBreakpoints } from 'cozy-ui/transpiled/react/providers/Breakpoints' | ||
import { useCozyTheme } from 'cozy-ui/transpiled/react/providers/CozyTheme' | ||
|
||
import AssistantBar from 'assistant/AssistantBar' | ||
|
||
import styles from './styles.styl' | ||
|
||
export const AssistantWrapperMobile = () => { | ||
const { isMobile } = useBreakpoints() | ||
const { type } = useCozyTheme() | ||
|
||
if (!flag('cozy.assistant.enabled') || !isMobile) return null | ||
|
||
return ( | ||
<div | ||
className={cx( | ||
styles['assistantWrapper-mobile'], | ||
styles[`assistantWrapper-mobile--${type}`], | ||
{ | ||
[styles['assistantWrapper-mobile--offset']]: flag( | ||
'home.fab.button.enabled' | ||
), | ||
[styles['assistantWrapper-mobile--immersive']]: | ||
getFlagshipMetadata().immersive | ||
} | ||
)} | ||
> | ||
<AssistantBar /> | ||
</div> | ||
) | ||
} | ||
|
||
export default AssistantWrapperMobile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.assistantWrapper-mobile | ||
position fixed | ||
bottom 0 | ||
right 0 | ||
left 0 | ||
padding 1rem | ||
|
||
&--light | ||
background-color #E9F4FF | ||
|
||
&--dark | ||
background-color #142536 | ||
|
||
&--offset | ||
padding-right 4.5rem | ||
|
||
&--immersive | ||
padding-bottom calc(1rem + var(--flagship-bottom-height)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.homeMainContent | ||
&--withAssistant | ||
padding-bottom 2rem | ||
|
||
&--immersive | ||
padding-bottom calc(2rem + var(--flagship-bottom-height)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.