Skip to content

Commit d7abf97

Browse files
authored
feat: introduce overlay and notifications (DAP-4762) (#25)
1 parent 4255994 commit d7abf97

39 files changed

+1560
-355
lines changed

apps/extension/src/contentscript/multitable-panel/assets/stylesDropdown.tsx renamed to apps/extension/src/contentscript/multitable-panel/assets/styles-dropdown.tsx

File renamed without changes.

apps/extension/src/contentscript/multitable-panel/components/dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
SelectedMutationInfo,
2626
StarSelectedMutationWrapper,
2727
WrapperDropdown,
28-
} from '../assets/stylesDropdown'
28+
} from '../assets/styles-dropdown'
2929
import {
3030
AvailableIcon,
3131
Back,

apps/gateway/src/components/navigation/MutableOverlayContainer.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import React from 'react'
22
import { useMutableWeb, useMutationApp } from '@mweb/engine'
33
import { MiniOverlay, AppSwitcher } from '@mweb/shared-components'
4+
import styled from 'styled-components'
5+
6+
const MiniOverlayContainer = styled(MiniOverlay)`
7+
div[data-mweb-context-type="mweb-overlay"] {
8+
top: 80px;
9+
}
10+
`
411

512
function AppSwitcherContainer({ app }) {
613
// ToDo: move to @mweb/engine
@@ -14,11 +21,11 @@ function MutableOverlayContainer() {
1421
// ToDo: move to @mweb/engine
1522
const { selectedMutation, mutationApps } = useMutableWeb()
1623
return (
17-
<MiniOverlay baseMutation={selectedMutation} mutationApps={mutationApps}>
24+
<MiniOverlayContainer baseMutation={selectedMutation} mutationApps={mutationApps}>
1825
{mutationApps.map((app) => (
1926
<AppSwitcherContainer key={app.id} app={app} />
2027
))}
21-
</MiniOverlay>
28+
</MiniOverlayContainer>
2229
)
2330
}
2431

libs/engine/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ export {
3535
} from './app/contexts/notification-context'
3636
export { NotificationType } from './app/services/notification/notification.entity'
3737
export { NotificationDto } from './app/services/notification/dtos/notification.dto'
38+
export { PullRequestPayload, PullRequestResult, PullRequestStatus } from './app/services/notification/types/pull-request'
39+
export { RegularPayload } from './app/services/notification/types/regular'

libs/shared-components/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
},
2929
"dependencies": {
3030
"@mweb/engine": "workspace:*",
31-
"ethereum-blockies-base64": "^1.0.2"
31+
"ethereum-blockies-base64": "^1.0.2",
32+
"antd": "^5.18.3"
3233
}
3334
}
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react'
2+
3+
const Arrow = () => (
4+
<svg
5+
xmlns="http://www.w3.org/2000/svg"
6+
width="14"
7+
height="8"
8+
viewBox="0 0 14 8"
9+
fill="none"
10+
stroke="currentColor"
11+
>
12+
<path
13+
d="M1.5 1.25L7 6.75L12.5 1.25"
14+
strokeWidth="1.5"
15+
strokeLinecap="round"
16+
strokeLinejoin="round"
17+
/>
18+
</svg>
19+
)
20+
21+
export default Arrow
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react'
2+
3+
const BellWithCircle = () => (
4+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
5+
<path
6+
d="M9.4375 7.81817C9.4375 6.95019 9.08982 6.11776 8.47095 5.504C7.85208 4.89024 7.01271 4.54544 6.1375 4.54544C5.26229 4.54544 4.42292 4.89024 3.80405 5.504C3.18518 6.11776 2.8375 6.95019 2.8375 7.81817C2.8375 11.6364 1.1875 12.7273 1.1875 12.7273H11.0875C11.0875 12.7273 9.4375 11.6364 9.4375 7.81817Z"
7+
fill="currentColor"
8+
stroke="currentColor"
9+
strokeLinecap="round"
10+
strokeLinejoin="round"
11+
/>
12+
<path
13+
d="M7.08855 14.9091C6.99185 15.0744 6.85306 15.2116 6.68607 15.307C6.51908 15.4024 6.32976 15.4526 6.13705 15.4526C5.94434 15.4526 5.75501 15.4024 5.58802 15.307C5.42103 15.2116 5.28224 15.0744 5.18555 14.9091"
14+
stroke="currentColor"
15+
strokeLinecap="round"
16+
strokeLinejoin="round"
17+
/>
18+
<circle cx="11.375" cy="3.5" r="3" fill="#D9304F" stroke="white" />
19+
</svg>
20+
)
21+
22+
export default BellWithCircle
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import React from 'react'
2+
3+
const Bell = () => {
4+
return (
5+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
6+
<path
7+
d="M9.4375 3.81817C9.4375 2.95019 9.08982 2.11776 8.47095 1.504C7.85208 0.890245 7.01271 0.545441 6.1375 0.545441C5.26229 0.545441 4.42292 0.890245 3.80405 1.504C3.18518 2.11776 2.8375 2.95019 2.8375 3.81817C2.8375 7.63635 1.1875 8.72726 1.1875 8.72726H11.0875C11.0875 8.72726 9.4375 7.63635 9.4375 3.81817Z"
8+
fill="currentColor"
9+
stroke="currentColor"
10+
strokeLinecap="round"
11+
strokeLinejoin="round"
12+
/>
13+
<path
14+
d="M7.08855 10.9091C6.99185 11.0744 6.85306 11.2116 6.68607 11.307C6.51908 11.4024 6.32976 11.4526 6.13705 11.4526C5.94434 11.4526 5.75501 11.4024 5.58802 11.307C5.42103 11.2116 5.28224 11.0744 5.18555 10.9091"
15+
stroke="currentColor"
16+
strokeLinecap="round"
17+
strokeLinejoin="round"
18+
/>
19+
</svg>
20+
)
21+
}
22+
23+
export default Bell
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
const Close = () => (
4+
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="10" viewBox="0 0 9 10" fill="none">
5+
<path
6+
d="M8 1.5L1 8.5M1 1.5L8 8.5"
7+
stroke="#7A818B"
8+
strokeWidth="1.16667"
9+
strokeLinecap="round"
10+
strokeLinejoin="round"
11+
/>
12+
</svg>
13+
)
14+
15+
export default Close

0 commit comments

Comments
 (0)