OLD | NEW |
1 <link rel="import" href="chrome://resources/html/cr.html"> | 1 <link rel="import" href="chrome://resources/html/cr.html"> |
2 <link rel="import" href="chrome://resources/html/cr/ui.html"> | 2 <link rel="import" href="chrome://resources/html/cr/ui.html"> |
3 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> | 3 <link rel="import" href="chrome://resources/html/cr/ui/command.html"> |
4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
5 <link rel="import" href="chrome://resources/html/util.html"> | 5 <link rel="import" href="chrome://resources/html/util.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm
l"> |
7 <link rel="import" href="chrome://downloads/action_service.html"> | 7 <link rel="import" href="chrome://downloads/action_service.html"> |
8 <link rel="import" href="chrome://downloads/constants.html"> | 8 <link rel="import" href="chrome://downloads/constants.html"> |
9 <link rel="import" href="chrome://downloads/i18n_setup.html"> | 9 <link rel="import" href="chrome://downloads/i18n_setup.html"> |
10 <link rel="import" href="chrome://downloads/item.html"> | 10 <link rel="import" href="chrome://downloads/item.html"> |
11 <link rel="import" href="chrome://downloads/toolbar.html"> | 11 <link rel="import" href="chrome://downloads/toolbar.html"> |
12 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> | 12 <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> |
13 | 13 |
14 <dom-module id="downloads-manager"> | 14 <dom-module id="downloads-manager"> |
15 <template> | 15 <template> |
| 16 <style> |
| 17 :host { |
| 18 display: flex; |
| 19 flex: 1 0; |
| 20 flex-direction: column; |
| 21 height: 100%; |
| 22 z-index: 0; |
| 23 } |
| 24 |
| 25 [hidden] { |
| 26 display: none !important; |
| 27 } |
| 28 |
| 29 @media screen and (max-width: 1024px) { |
| 30 :host { |
| 31 flex-basis: calc( |
| 32 var(--downloads-card-width) + 2 * var(--downloads-card-margin)); |
| 33 } |
| 34 } |
| 35 |
| 36 #toolbar { |
| 37 position: relative; |
| 38 z-index: 1; |
| 39 } |
| 40 |
| 41 #toolbar::after { |
| 42 box-shadow: inset 0 5px 6px -3px rgba(0, 0, 0, 0.4); |
| 43 content: ''; |
| 44 display: block; |
| 45 height: 6px; |
| 46 opacity: 0; |
| 47 position: absolute; |
| 48 top: 100%; |
| 49 transition: opacity 500ms; |
| 50 width: 100%; |
| 51 } |
| 52 |
| 53 :host([has-shadow_]) #toolbar::after { |
| 54 opacity: 1; |
| 55 } |
| 56 |
| 57 #downloads-list { |
| 58 /* TODO(dbeam): we're not setting scrollTarget explicitly, yet |
| 59 * style="overflow: auto" is still being set by <iron-list>'s JS. Weird. |
| 60 */ |
| 61 overflow-y: overlay !important; |
| 62 } |
| 63 |
| 64 #no-downloads, |
| 65 #downloads-list { |
| 66 flex: 1; |
| 67 } |
| 68 |
| 69 :host([loading]) #no-downloads, |
| 70 :host([loading]) #downloads-list { |
| 71 display: none; |
| 72 } |
| 73 |
| 74 #no-downloads { |
| 75 align-items: center; |
| 76 color: #b4b4b4; |
| 77 display: flex; |
| 78 font-size: 123.1%; |
| 79 font-weight: 500; |
| 80 justify-content: center; |
| 81 /* To avoid overlapping with the header, we need this min-height |
| 82 * until bug 596743 is fixed. */ |
| 83 min-height: min-content; |
| 84 } |
| 85 |
| 86 #no-downloads .illustration { |
| 87 background: -webkit-image-set( |
| 88 url(chrome://downloads/1x/no_downloads.png) 1x, |
| 89 url(chrome://downloads/2x/no_downloads.png) 2x) |
| 90 no-repeat center center; |
| 91 height: 144px; /* Matches natural image height. */ |
| 92 margin-bottom: 32px; |
| 93 } |
| 94 </style> |
| 95 |
16 <downloads-toolbar id="toolbar" spinner-active="{{spinnerActive_}}"> | 96 <downloads-toolbar id="toolbar" spinner-active="{{spinnerActive_}}"> |
17 </downloads-toolbar> | 97 </downloads-toolbar> |
18 <iron-list id="downloads-list" items="{{items_}}" | 98 <iron-list id="downloads-list" items="{{items_}}" |
19 hidden="[[!hasDownloads_]]"> | 99 hidden="[[!hasDownloads_]]"> |
20 <template> | 100 <template> |
21 <downloads-item data="[[item]]" hide-date="[[item.hideDate]]"> | 101 <downloads-item data="[[item]]" hide-date="[[item.hideDate]]"> |
22 </downloads-item> | 102 </downloads-item> |
23 </template> | 103 </template> |
24 </iron-list> | 104 </iron-list> |
25 <div id="no-downloads" hidden="[[hasDownloads_]]"> | 105 <div id="no-downloads" hidden="[[hasDownloads_]]"> |
26 <div> | 106 <div> |
27 <div class="illustration"></div> | 107 <div class="illustration"></div> |
28 <span><!-- Text populated dynamically. --></span> | 108 <span><!-- Text populated dynamically. --></span> |
29 </div> | 109 </div> |
30 </div> | 110 </div> |
31 </template> | 111 </template> |
32 <link rel="import" type="css" href="chrome://downloads/shared_style.css"> | |
33 <link rel="import" type="css" href="chrome://downloads/manager.css"> | |
34 <script src="chrome://downloads/manager.js"></script> | 112 <script src="chrome://downloads/manager.js"></script> |
35 </dom-module> | 113 </dom-module> |
OLD | NEW |