Skip to content

Commit

Permalink
extensions page fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedor committed Oct 9, 2023
1 parent 0dfc70d commit 88d103b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 42 deletions.
1 change: 0 additions & 1 deletion toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ manage-addon-button = Manage
find-more-addons = Find more add-ons
## Add-on actions
report-addon-button = Report
remove-addon-button = Remove
disable-addon-button = Disable
enable-addon-button = Enable
Expand Down
6 changes: 0 additions & 6 deletions toolkit/mozapps/extensions/content/aboutaddons.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,6 @@ panel-item[action="install-update"] {
--icon: url("chrome://global/skin/icons/update-icon.svg");
}

panel-item[action="report"] {
-moz-context-properties: fill;
fill: currentColor;
--icon: url(chrome://global/skin/icons/warning.svg);
}

panel-item-separator {
display: block;
height: 1px;
Expand Down
6 changes: 2 additions & 4 deletions toolkit/mozapps/extensions/content/aboutaddons.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
<panel-item data-l10n-id="install-update-button" action="install-update" badged></panel-item>
<panel-item data-l10n-id="preferences-addon-button" action="preferences"></panel-item>
<panel-item-separator></panel-item-separator>
<panel-item data-l10n-id="report-addon-button" action="report"></panel-item>
<panel-item-separator></panel-item-separator>
<panel-item data-l10n-id="expand-addon-button" action="expand"></panel-item>
</panel-list>
</template>
Expand Down Expand Up @@ -97,7 +95,7 @@
data-l10n-attrs="accesskey">
</button>
</div>
<!--div class="addon-detail-row addon-detail-row-updates">
<div class="addon-detail-row addon-detail-row-updates">
<label data-l10n-id="addon-detail-updates-label"></label>
<div>
<button class="button-link" data-l10n-id="addon-detail-update-check-label" action="update-check" hidden></button>
Expand All @@ -114,7 +112,7 @@
<span data-l10n-id="addon-detail-updates-radio-off"></span>
</label>
</div>
</div-->
</div>
<div class="addon-detail-row addon-detail-row-has-help addon-detail-row-private-browsing" hidden>
<label data-l10n-id="detail-private-browsing-label"></label>
<div>
Expand Down
5 changes: 2 additions & 3 deletions toolkit/mozapps/extensions/content/aboutaddons.js
Original file line number Diff line number Diff line change
Expand Up @@ -1243,10 +1243,10 @@ class AddonDetails extends HTMLElement {
this.querySelector(
".addon-detail-contribute"
).hidden = !addon.contributionURL;
/*this.querySelector(".addon-detail-row-updates").hidden = !hasPermission(
this.querySelector(".addon-detail-row-updates").hidden = !hasPermission(
addon,
"upgrade"
);*/
) || !AddonManager.updateEnabled;

// By default, all private browsing rows are hidden. Possibly show one.
if (allowPrivateBrowsingByDefault || addon.type != "extension") {
Expand Down Expand Up @@ -1491,7 +1491,6 @@ class AddonCard extends HTMLElement {
this.panel.hide();
let {
remove,
report,
} = windowRoot.ownerGlobal.promptRemoveExtension(addon);
let value = remove ? "accepted" : "cancelled";
if (remove) {
Expand Down
36 changes: 20 additions & 16 deletions toolkit/mozapps/extensions/content/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,16 +650,29 @@ var gEventManager = {

// The checkbox needs to reflect that both prefs need to be true
// for updates to be checked for and applied automatically
/*document
document
.getElementById("utils-autoUpdateDefault")
.setAttribute("checked", updateEnabled && autoUpdateDefault);

document.getElementById(
"utils-resetAddonUpdatesToAutomatic"
).hidden = !autoUpdateDefault;
"utils-updateNow"
).hidden = !updateEnabled;
let e = document.getElementById(
"utils-viewUpdates"
);
e.hidden = !updateEnabled;
e.nextElementSibling.hidden = !updateEnabled;
document.getElementById(
"utils-autoUpdateDefault"
).hidden = !updateEnabled;
document.getElementById(
"utils-resetAddonUpdatesToAutomatic"
).hidden = !autoUpdateDefault || !updateEnabled;
e = document.getElementById(
"utils-resetAddonUpdatesToManual"
).hidden = autoUpdateDefault;*/
);
e.hidden = autoUpdateDefault || !updateEnabled;
e.nextElementSibling.hidden = !updateEnabled;
},

onCompatibilityModeChanged() {
Expand Down Expand Up @@ -2564,27 +2577,18 @@ var gDetailView = {
updateDateRow.value = null;
}

// TODO if the add-on was downloaded from releases.mozilla.org link to the
// AMO profile (bug 590344)
if (false) {
document.getElementById("detail-repository-row").hidden = false;
document.getElementById("detail-homepage-row").hidden = true;
var repository = document.getElementById("detail-repository");
repository.value = aAddon.homepageURL;
repository.href = aAddon.homepageURL;
} else if (aAddon.homepageURL) {
document.getElementById("detail-repository-row").hidden = true;
if (aAddon.homepageURL) {
document.getElementById("detail-homepage-row").hidden = false;
var homepage = document.getElementById("detail-homepage");
homepage.value = aAddon.homepageURL;
homepage.href = aAddon.homepageURL;
} else {
document.getElementById("detail-repository-row").hidden = true;
document.getElementById("detail-homepage-row").hidden = true;
}

var canUpdate = !aIsRemote && hasPermission(aAddon, "upgrade");
document.getElementById("detail-updates-row").hidden = !canUpdate;
document.getElementById("detail-updates-row").hidden = !canUpdate
|| !AddonManager.updateEnabled;

if ("applyBackgroundUpdates" in aAddon) {
this._autoUpdate.hidden = false;
Expand Down
20 changes: 8 additions & 12 deletions toolkit/mozapps/extensions/content/extensions.xul
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@

<button id="header-utils-btn" type="menu" data-l10n-id="tools-menu">
<menupopup id="utils-menu">
<!--menuitem id="utils-updateNow"
<menuitem id="utils-updateNow"
data-l10n-id="extensions-updates-check-for-updates"
command="cmd_findAllUpdates"/-->
command="cmd_findAllUpdates"/>
<menuitem id="utils-viewUpdates"
data-l10n-id="extensions-updates-view-updates"
command="cmd_goToRecentUpdates"/>
Expand All @@ -239,16 +239,16 @@
data-l10n-id="debug-addons"
command="cmd_debugAddons"/>
<menuseparator/>
<!--menuitem id="utils-autoUpdateDefault"
<menuitem id="utils-autoUpdateDefault"
data-l10n-id="extensions-updates-update-addons-automatically"
type="checkbox" autocheck="false"
command="cmd_toggleAutoUpdateDefault"/-->
<!--menuitem id="utils-resetAddonUpdatesToAutomatic"
command="cmd_toggleAutoUpdateDefault"/>
<menuitem id="utils-resetAddonUpdatesToAutomatic"
data-l10n-id="extensions-updates-reset-updates-to-automatic"
command="cmd_resetAddonAutoUpdate"/-->
<!--menuitem id="utils-resetAddonUpdatesToManual"
command="cmd_resetAddonAutoUpdate"/>
<menuitem id="utils-resetAddonUpdatesToManual"
data-l10n-id="extensions-updates-reset-updates-to-manual"
command="cmd_resetAddonAutoUpdate"/-->
command="cmd_resetAddonAutoUpdate"/>
<menuseparator/>
<menuitem id="manage-shortcuts"
data-l10n-id="manage-extensions-shortcuts"
Expand Down Expand Up @@ -548,10 +548,6 @@
<label class="detail-row-label" data-l10n-id="detail-home-value"/>
<label id="detail-homepage" class="detail-row-value" crop="end" is="text-link"/>
</row>
<row class="detail-row-complex" id="detail-repository-row" data-l10n-id="detail-repository">
<label class="detail-row-label" data-l10n-id="detail-repository-value"/>
<label id="detail-repository" class="detail-row-value" is="text-link"/>
</row>
</rows>
</grid>
<hbox id="detail-controls">
Expand Down

0 comments on commit 88d103b

Please sign in to comment.