forked from PrestaShop/autoupgrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
351 additions
and
35 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,8 +85,8 @@ $e: ".check-requirements"; | |
} | ||
|
||
&--success { | ||
background-color: none; | ||
padding: 0; | ||
background-color: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
@use "badge"; | ||
@use "check-requirements"; | ||
@use "form"; | ||
@use "logs"; | ||
@use "radio-card"; | ||
@use "typography"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@use "../variables" as *; | ||
|
||
$e: ".logs"; | ||
|
||
#{$ua-prefix} { | ||
#{$e} { | ||
--ua-logs-height: 14rem; | ||
--ua-logs-background-color: #f7f7f7; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
padding: 1rem; | ||
min-height: var(--ua-logs-height); | ||
max-height: 100%; | ||
background-color: var(--ua-logs-background-color); | ||
|
||
&__scroll { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
gap: 1rem; | ||
height: 100%; | ||
overflow-y: auto; | ||
} | ||
|
||
&__buttons { | ||
flex-shrink: 0; | ||
} | ||
|
||
&__list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
} | ||
|
||
&__line { | ||
padding-inline-start: 2rem; | ||
background-position: left center; | ||
background-repeat: no-repeat; | ||
background-size: 1.5rem 1.5rem; | ||
font-size: 0.875rem; | ||
line-height: 1.4; | ||
|
||
&--success { | ||
background-image: url("../img/check.svg"); | ||
} | ||
|
||
&--warning { | ||
background-image: url("../img/warning.svg"); | ||
} | ||
|
||
&--error { | ||
background-image: url("../img/close.svg"); | ||
} | ||
} | ||
|
||
&__summary-anchor { | ||
font-weight: 700; | ||
} | ||
|
||
&__summaries { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
/** | ||
* Copyright since 2007 PrestaShop SA and Contributors | ||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Academic Free License 3.0 (AFL-3.0) | ||
* that is bundled with this package in the file LICENSE.md. | ||
* It is also available through the world-wide-web at this URL: | ||
* https://opensource.org/licenses/AFL-3.0 | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer | ||
* versions in the future. If you wish to customize PrestaShop for your | ||
* needs please refer to https://devdocs.prestashop.com/ for more information. | ||
* | ||
* @author PrestaShop SA and Contributors <[email protected]> | ||
* @copyright Since 2007 PrestaShop SA and Contributors | ||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) | ||
*/ | ||
|
||
import Logs from "../../../views/templates/components/logs.html.twig"; | ||
|
||
export default { | ||
component: Logs, | ||
args: { | ||
logs: [ | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'warning', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
id: 'warning_1', | ||
}, | ||
{ | ||
status: 'error', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
id: 'error_1', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
{ | ||
status: 'success', | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
}, | ||
], | ||
logsSummaryWarning: [ | ||
{ | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
anchor: 'warning_1', | ||
}, | ||
], | ||
logsSummaryError: [ | ||
{ | ||
message: 'src/Core/Domain/Product/Pack/Query/GetPackedProducts.php added to archive. 13114 files left.', | ||
anchor: 'error_1', | ||
}, | ||
], | ||
downloadLogsButtonUrl: "#", | ||
downloadLogsButtonLabel: "Download update logs", | ||
}, | ||
}; | ||
|
||
export const Default = {}; | ||
|
||
document.addEventListener('DOMContentLoaded', () => { | ||
document.querySelectorAll('.logs__summary-anchor').forEach(anchor => { | ||
anchor.addEventListener('click', function(e) { | ||
e.preventDefault(); | ||
|
||
const targetId = this.getAttribute('href').substring(1); | ||
const targetElement = document.getElementById(targetId); | ||
const logsScroll = document.querySelector('.logs__scroll'); | ||
|
||
if (logsScroll && targetElement) { | ||
const targetRect = targetElement.getBoundingClientRect(); | ||
const containerRect = logsScroll.getBoundingClientRect(); | ||
const offsetTop = targetRect.top - containerRect.top + logsScroll.scrollTop; | ||
|
||
logsScroll.scrollTo({ | ||
top: offsetTop, | ||
behavior: 'smooth' | ||
}); | ||
} else { | ||
console.error('Element not found:', { | ||
logsScroll: logsScroll, | ||
targetElement: targetElement | ||
}); | ||
} | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.