Commit c27e1094 authored by dbeam's avatar dbeam Committed by Commit bot

MD Downloads: improve early loading shim

Copy some colors, actually simulate the toolbar.
Generally make things super fast.

R=esprehn@chromium.org
BUG=none
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2803653003
Cr-Commit-Position: refs/heads/master@{#462710}
parent fdea7754
<!doctype html>
<html dir="$i18n{textdirection}" lang="$i18n{language}">
<html dir="$i18n{textdirection}" lang="$i18n{language}" class="loading">
<head>
<meta charset="utf-8">
<title>$i18n{title}</title>
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<link rel="stylesheet" href="chrome://resources/css/md_colors.css">
<style>
html {
--downloads-card-margin: 24px;
--downloads-card-width: 640px;
background: var(--md-background-color);
background: #f1f1f1;
}
html,
.loading {
/* --google-blue-700 disguised. Replaced when downloads-toolbar loads. */
border-top: 56px solid rgb(51, 103, 214);
}
html:not(.loading),
body {
height: 100%;
}
......
......@@ -7,6 +7,7 @@
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-progress.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.html">
<link rel="import" href="chrome://downloads/action_service.html">
<link rel="import" href="chrome://downloads/constants.html">
......
......@@ -10,7 +10,6 @@
<link rel="import" href="chrome://downloads/i18n_setup.html">
<link rel="import" href="chrome://downloads/item.html">
<link rel="import" href="chrome://downloads/toolbar.html">
<link rel="stylesheet" href="chrome://resources/css/md_colors.css">
<dom-module id="downloads-manager">
<template>
......
......@@ -40,6 +40,7 @@ cr.define('downloads', function() {
},
hostAttributes: {
// TODO(dbeam): this should use a class instead.
loading: true,
},
......@@ -52,6 +53,10 @@ cr.define('downloads', function() {
'itemsChanged_(items_.*)',
],
attached: function() {
document.documentElement.classList.remove('loading');
},
/** @private {!PromiseResolver} */
loaded_: new PromiseResolver,
......
......@@ -5,6 +5,7 @@
<link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toolbar/cr_toolbar.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
......@@ -14,7 +15,7 @@
<style>
:host {
align-items: center;
background: var(--md-toolbar-color);
background: var(--google-blue-700);
color: white;
display: flex;
min-height: 56px;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment