@things-factory/notification 7.0.1-alpha.64 → 7.0.1-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/viewparts/notification-badge.ts +4 -2
- package/client/viewparts/notification-item.ts +8 -5
- package/client/viewparts/notification-list.ts +5 -5
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/notification-badge.d.ts +1 -0
- package/dist-client/viewparts/notification-badge.js +3 -2
- package/dist-client/viewparts/notification-badge.js.map +1 -1
- package/dist-client/viewparts/notification-item.d.ts +1 -1
- package/dist-client/viewparts/notification-item.js +7 -5
- package/dist-client/viewparts/notification-item.js.map +1 -1
- package/dist-client/viewparts/notification-list.d.ts +2 -2
- package/dist-client/viewparts/notification-list.js +4 -4
- package/dist-client/viewparts/notification-list.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { LitElement, html, css } from 'lit'
|
|
2
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
3
5
|
|
|
@@ -14,7 +16,7 @@ export class NotificationBadge extends connect(store)(LitElement) {
|
|
|
14
16
|
--badge-size: 14px;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
md-icon {
|
|
18
20
|
display: block;
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -49,7 +51,7 @@ export class NotificationBadge extends connect(store)(LitElement) {
|
|
|
49
51
|
|
|
50
52
|
render() {
|
|
51
53
|
var badge = this.badge || 0
|
|
52
|
-
return html` <
|
|
54
|
+
return html` <md-icon data-badge=${badge} class="badge">notifications_none</md-icon> `
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
stateChanged(state) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import gql from 'graphql-tag'
|
|
2
4
|
import { LitElement, html, css } from 'lit'
|
|
3
5
|
import { customElement, property } from 'lit/decorators.js'
|
|
4
|
-
import '@material/mwc-icon'
|
|
5
6
|
import { client } from '@operato/graphql'
|
|
6
7
|
|
|
7
8
|
function isOriginSameAsLocation(url) {
|
|
@@ -40,7 +41,9 @@ export class NotificationItem extends LitElement {
|
|
|
40
41
|
padding: var(--padding-default);
|
|
41
42
|
border-left: 0 solid transparent;
|
|
42
43
|
border-bottom: var(--border-dark-color) !important;
|
|
43
|
-
transition:
|
|
44
|
+
transition:
|
|
45
|
+
border-left 300ms ease-in-out,
|
|
46
|
+
padding-left 300ms ease-in-out;
|
|
44
47
|
color: var(--scondary-color);
|
|
45
48
|
|
|
46
49
|
--type-dot-size: 9px;
|
|
@@ -98,7 +101,7 @@ export class NotificationItem extends LitElement {
|
|
|
98
101
|
border-radius: var(--border-radius);
|
|
99
102
|
font-size: 0.8em;
|
|
100
103
|
color: var(--theme-white-color);
|
|
101
|
-
--
|
|
104
|
+
--md-icon-size: 14px;
|
|
102
105
|
}
|
|
103
106
|
span.more * {
|
|
104
107
|
vertical-align: middle;
|
|
@@ -174,7 +177,7 @@ export class NotificationItem extends LitElement {
|
|
|
174
177
|
: html`<a href=${url}>${title}</a>`
|
|
175
178
|
: title}
|
|
176
179
|
</div>
|
|
177
|
-
<
|
|
180
|
+
<md-icon close @click=${e => this.dispatchEvent(new CustomEvent('close'))}>close</md-icon>
|
|
178
181
|
|
|
179
182
|
${image
|
|
180
183
|
? url
|
|
@@ -190,7 +193,7 @@ export class NotificationItem extends LitElement {
|
|
|
190
193
|
this.decipherErrorCode()
|
|
191
194
|
}}
|
|
192
195
|
>
|
|
193
|
-
<span class="more"><
|
|
196
|
+
<span class="more"><md-icon>expand_circle_down</md-icon> more</span>
|
|
194
197
|
</div>`
|
|
195
198
|
: html``}
|
|
196
199
|
${detail ? html`<div detail>${detail.message}</div>` : html``}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import './notification-item'
|
|
3
|
+
|
|
1
4
|
import { LitElement, html, css } from 'lit'
|
|
2
5
|
import { customElement, property } from 'lit/decorators.js'
|
|
3
6
|
import { connect } from 'pwa-helpers'
|
|
@@ -5,9 +8,6 @@ import { store, notificationStore } from '@operato/shell'
|
|
|
5
8
|
import { i18next, localize } from '@operato/i18n'
|
|
6
9
|
import { UPDATE_NOTIFICATION } from '../actions/notification-fcm'
|
|
7
10
|
|
|
8
|
-
import '@material/mwc-icon'
|
|
9
|
-
import './notification-item'
|
|
10
|
-
|
|
11
11
|
@customElement('notification-list')
|
|
12
12
|
export class NotificationList extends connect(store)(localize(i18next)(LitElement)) {
|
|
13
13
|
static styles = [
|
|
@@ -61,7 +61,7 @@ export class NotificationList extends connect(store)(localize(i18next)(LitElemen
|
|
|
61
61
|
font-weight: bold;
|
|
62
62
|
color: var(--secondary-color);
|
|
63
63
|
}
|
|
64
|
-
div
|
|
64
|
+
div md-icon {
|
|
65
65
|
display: block;
|
|
66
66
|
opacity: 0.3;
|
|
67
67
|
}
|
|
@@ -107,7 +107,7 @@ export class NotificationList extends connect(store)(localize(i18next)(LitElemen
|
|
|
107
107
|
`
|
|
108
108
|
: html`
|
|
109
109
|
<div no-notifications @click=${e => window.history.back()}>
|
|
110
|
-
<
|
|
110
|
+
<md-icon>notifications_off</md-icon>${i18next.t('text.no notification available')}
|
|
111
111
|
</div>
|
|
112
112
|
`
|
|
113
113
|
}
|