blob: 25da9976fadd14122bc5deef79e623e9be60033e [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="shared_style.html">
<link rel="import" href="store_client.html">
<link rel="import" href="util.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-button/paper-button.html">
<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html">
<dom-module id="app-management-chrome-app-permission-view">
<template>
<style include="app-management-shared-css paper-button-style">
ul {
list-style: none;
margin: 0;
padding-inline-start: 24px;
}
li::before {
content: '- ';
}
#app-info {
padding: 24px;
}
#app-description {
padding-bottom: 12px;
}
#no-permissions {
padding-inline-start: 24px;
}
</style>
<app-management-permission-view-header>
<div slot="extra-right-buttons" class="extra-permission-header-button">
<!-- TODO(crbug.com/906508): For apps which are hosted apps but not
bookmark apps, this button will actually open the site settings page
corresponding to the app, since hosted apps are not listed in
chrome://extensions.
This is not a long-term problem since hosted apps are being replaced,
but in the mean time it might be necessary to change the text of the
button depending on whether or not it is a hosted app. -->
<paper-button class="native-settings-button secondary-text"
on-click="onClickExtensionsSettingsButton_">
$i18n{openExtensionsSettings}
<paper-icon-button-light class="native-settings-icon icon-external">
<button></button>
</paper-icon-button-light>
</paper-button>
</div>
</app-management-permission-view-header>
<div class="card-container">
<div id="app-info">
<div id="app-description" class="secondary-text">
[[app_.description]]
</div>
<div>$i18n{permissions}</div>
<template is="dom-if" if="[[!hasPermissions_(messages_)]]">
<div id="no-permissions">$i18n{appNoPermission}</div>
</template>
<ul>
<template is="dom-repeat"
items="[[getPermissionMessages_(messages_)]]"
as="message">
<li>[[message]]</li>
<ul>
<template is="dom-repeat"
items="[[getPermissionSubmessagesByMessage_(index, messages_)]]"
as="submessage">
<li>[[submessage]]</li>
</template>
</ul>
</template>
</ul>
</div>
</div>
<app-management-metadata-view></app-management-metadata-view>
</template>
<script src="chrome_app_permission_view.js"></script>
</dom-module>