blob: d0e245851108479a696cd3f3524095dcceae3ea8 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="pack_dialog_alert.html">
<dom-module id="extensions-pack-dialog">
<template>
<style include="cr-shared-style paper-button-style">
cr-input {
margin-top: var(--cr-form-field-bottom-spacing);
--cr-input-error-display: none;
}
paper-button[slot='suffix'] {
margin-inline-start: 10px;
}
/* Prevent focus-outline from being chopped by the bottom of dialog body.
TODO(scottchen): find a more general way to solve this. */
cr-input {
margin-bottom: 2px;
}
</style>
<cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">$i18n{packDialogTitle}</div>
<div slot="body">
<div>$i18n{packDialogContent}</div>
<cr-input id="root-dir" label="$i18n{packDialogExtensionRoot}"
value="{{packDirectory_}}">
<paper-button id="root-dir-browse" on-click="onRootBrowse_"
slot="suffix">
$i18n{packDialogBrowse}
</paper-button>
</cr-input>
<cr-input id="key-file" label="$i18n{packDialogKeyFile}"
value="{{keyFile_}}">
<paper-button id="key-file-browse" on-click="onKeyBrowse_"
slot="suffix">
$i18n{packDialogBrowse}
</paper-button>
</cr-input>
</div>
<div slot="button-container">
<paper-button class="cancel-button" on-click="onCancelTap_">
$i18n{cancel}
</paper-button>
<paper-button class="action-button" on-click="onConfirmTap_"
disabled="[[!packDirectory_]]">
$i18n{packDialogConfirm}
</paper-button>
</div>
</cr-dialog>
<template is="dom-if" if="[[lastResponse_]]" restamp>
<extensions-pack-dialog-alert model="[[lastResponse_]]"
on-close="onAlertClose_">
</extensions-pack-dialog-alert>
</template>
</template>
<script src="pack_dialog.js"></script>
</dom-module>