Show More
@@ -1,25 +1,24 b'' | |||||
1 | <link rel="import" href="../../../../../../bower_components/paper-button/paper-button.html"> |
|
1 | <link rel="import" href="../../../../../../bower_components/paper-button/paper-button.html"> | |
2 | <link rel="import" href="../../../../../../bower_components/paper-toast/paper-toast.html"> |
|
2 | <link rel="import" href="../../../../../../bower_components/paper-toast/paper-toast.html"> | |
3 | <link rel="import" href="../rhodecode-unsafe-html/rhodecode-unsafe-html.html"> |
|
3 | <link rel="import" href="../rhodecode-unsafe-html/rhodecode-unsafe-html.html"> | |
4 | <dom-module id="rhodecode-toast"> |
|
4 | <dom-module id="rhodecode-toast"> | |
5 | <template> |
|
5 | <template> | |
6 | <style include="shared-styles"></style> |
|
6 | <style include="shared-styles"></style> | |
7 | <link rel="stylesheet" href="rhodecode-toast.css"> |
|
7 | <link rel="stylesheet" href="rhodecode-toast.css"> | |
8 |
|
8 | |||
9 | <paper-toast id="p-toast" duration="0" horizontal-offset="100" horizontal-align="auto" vertical-align="top" always-on-top> |
|
9 | <paper-toast id="p-toast" duration="0" horizontal-offset="100" horizontal-align="auto" vertical-align="top" always-on-top> | |
10 | <div class="toast-message-holder"> |
|
10 | <div class="toast-message-holder"> | |
11 | <template is="dom-repeat" items="{{toasts}}"> |
|
11 | <template is="dom-repeat" items="{{toasts}}"> | |
12 |
<div class=" |
|
12 | <div class$="alert alert-{{item.level}}"> | |
13 | <span class$="toast-level {{item.level}}">{{item.level}}</span> |
|
|||
14 | <rhodecode-unsafe-html text="{{item.message}}"></rhodecode-unsafe-html> |
|
13 | <rhodecode-unsafe-html text="{{item.message}}"></rhodecode-unsafe-html> | |
15 | </div> |
|
14 | </div> | |
16 | </template> |
|
15 | </template> | |
17 | </div> |
|
16 | </div> | |
18 | <div class="toast-close"> |
|
17 | <div class="toast-close"> | |
19 |
<paper-button on-tap="dismissNotifications" class="btn btn- |
|
18 | <paper-button on-tap="dismissNotifications" class="btn btn-default">{{_gettext('Close now')}}</paper-button> | |
20 | </div> |
|
19 | </div> | |
21 | </paper-toast> |
|
20 | </paper-toast> | |
22 | </template> |
|
21 | </template> | |
23 |
|
22 | |||
24 | <script src="rhodecode-toast.js"></script> |
|
23 | <script src="rhodecode-toast.js"></script> | |
25 | </dom-module> |
|
24 | </dom-module> |
@@ -1,44 +1,28 b'' | |||||
1 | @import '../../../../css/variables'; |
|
1 | @import '../../../../css/variables'; | |
2 |
|
2 | |||
3 | paper-toast{ |
|
3 | paper-toast{ | |
4 | width: 100%; |
|
4 | width: 100%; | |
5 | min-width: 400px; |
|
5 | min-width: 400px; | |
6 |
--paper-toast-background-color: |
|
6 | --paper-toast-background-color: transparent; | |
7 | --paper-toast-color: #000000; |
|
7 | --paper-toast-color: #000000; | |
|
8 | -webkit-box-shadow: none; | |||
|
9 | -moz-box-shadow: none; | |||
|
10 | box-shadow: none; | |||
8 | } |
|
11 | } | |
9 | paper-toast a{ |
|
12 | paper-toast a{ | |
10 | font-weight: bold |
|
13 | font-weight: bold | |
11 | } |
|
14 | } | |
12 |
|
15 | |||
13 | .toast-message-holder { |
|
16 | .toast-message-holder { | |
14 | width: ~'calc(100% - 150px)'; |
|
|||
15 | display: inline-block; |
|
|||
16 | } |
|
17 | } | |
17 | .toast-close { |
|
18 | .toast-close { | |
18 | display: inline-block; |
|
|||
19 | width: 145px; |
|
|||
20 | text-align: right; |
|
19 | text-align: right; | |
21 | float: right; |
|
|||
22 | } |
|
|||
23 | .toast-notification { |
|
|||
24 | padding: 10px 0 10px 0; |
|
|||
25 | } |
|
|||
26 |
|
20 | |||
27 | .toast-level { |
|
21 | paper-button{ | |
28 | display: inline-block; |
|
22 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.15); | |
29 | min-width: 100px; |
|
|||
30 | font-weight: bold; |
|
|||
31 | text-transform: uppercase; |
|
|||
32 | &.info{ |
|
|||
33 | color: @alert4; |
|
|||
34 | } |
|
|||
35 | &.success { |
|
|||
36 | color: @alert1; |
|
|||
37 | } |
|
|||
38 | &.error, &.danger { |
|
|||
39 | color: @alert2; |
|
|||
40 | } |
|
|||
41 | &.warning { |
|
|||
42 | color: @alert3; |
|
|||
43 | } |
|
23 | } | |
44 | } |
|
24 | } | |
|
25 | paper-toast .alert{ | |||
|
26 | margin: 0px 0 15px 0; | |||
|
27 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.15); | |||
|
28 | } |
General Comments 0
You need to be logged in to leave comments.
Login now