mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-30 18:35:44 +00:00
Merge "Rename IconLink to Link"
This commit is contained in:
commit
ebee74c578
|
@ -6,9 +6,9 @@ use Linker;
|
|||
use MessageLocalizer;
|
||||
|
||||
/**
|
||||
* VectorComponentIconLink component
|
||||
* VectorComponentLink component
|
||||
*/
|
||||
class VectorComponentIconLink implements VectorComponent {
|
||||
class VectorComponentLink implements VectorComponent {
|
||||
/** @var MessageLocalizer */
|
||||
private $localizer;
|
||||
/** @var string */
|
|
@ -5,7 +5,7 @@ namespace MediaWiki\Skins\Vector\Components;
|
|||
* VectorComponentMenuListItem component
|
||||
*/
|
||||
class VectorComponentMenuListItem implements VectorComponent {
|
||||
/** @var VectorComponentIconLink */
|
||||
/** @var VectorComponentLink */
|
||||
private $link;
|
||||
/** @var string */
|
||||
private $class;
|
||||
|
@ -13,11 +13,11 @@ class VectorComponentMenuListItem implements VectorComponent {
|
|||
private $id;
|
||||
|
||||
/**
|
||||
* @param VectorComponentIconLink $link
|
||||
* @param VectorComponentLink $link
|
||||
* @param string $class
|
||||
* @param string $id
|
||||
*/
|
||||
public function __construct( VectorComponentIconLink $link, string $class = '', string $id = '' ) {
|
||||
public function __construct( VectorComponentLink $link, string $class = '', string $id = '' ) {
|
||||
$this->link = $link;
|
||||
$this->class = $class;
|
||||
$this->id = $id;
|
||||
|
|
|
@ -1 +1 @@
|
|||
<li class="{{item-class}}" {{#item-id}}id="{{.}}"{{/item-id}}>{{>IconLink}}</li>
|
||||
<li class="{{item-class}}" {{#item-id}}id="{{.}}"{{/item-id}}>{{>Link}}</li>
|
||||
|
|
|
@ -12,8 +12,8 @@ const pinnableElementOpenTemplate = fs.readFileSync( 'includes/templates/Pinnabl
|
|||
const pinnableElementCloseTemplate = fs.readFileSync( 'includes/templates/PinnableElement/Close.mustache', 'utf8' );
|
||||
const pinnableHeaderTemplate = fs.readFileSync( 'includes/templates/PinnableHeader.mustache', 'utf8' );
|
||||
const menuTemplate = fs.readFileSync( 'includes/templates/Menu.mustache', 'utf8' );
|
||||
const IconLink = fs.readFileSync( 'includes/templates/IconLink.mustache', 'utf8' );
|
||||
const MenuListItem = fs.readFileSync( 'includes/templates/MenuListItem.mustache', 'utf8' );
|
||||
const linkTemplate = fs.readFileSync( 'includes/templates/Link.mustache', 'utf8' );
|
||||
const menuListItemTemplate = fs.readFileSync( 'includes/templates/MenuListItem.mustache', 'utf8' );
|
||||
|
||||
const templateData = {
|
||||
'is-wide': false,
|
||||
|
@ -69,8 +69,8 @@ const dropdownPartials = {
|
|||
PinnableHeader: pinnableHeaderTemplate,
|
||||
Menu: menuTemplate,
|
||||
MenuContents: menuContents,
|
||||
IconLink,
|
||||
MenuListItem
|
||||
Link: linkTemplate,
|
||||
MenuListItem: menuListItemTemplate
|
||||
};
|
||||
|
||||
const renderedHTML = mustache.render( userLinksTemplate, templateData, dropdownPartials );
|
||||
|
|
Loading…
Reference in a new issue