Skip to content

Commit

Permalink
Working (albeit very messy) build
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jan 14, 2022
1 parent 2080aab commit 586c22a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
6 changes: 4 additions & 2 deletions core/src/main/java/hudson/AboutJenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import hudson.security.Permission;
import java.net.URL;
import jenkins.model.Jenkins;
import org.jenkins.ui.icon.Icon;
import org.jenkins.ui.icon.IconSet;
import org.jenkinsci.Symbol;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
Expand All @@ -17,8 +19,8 @@
@Extension @Symbol("about")
public class AboutJenkins extends ManagementLink {
@Override
public String getIconFileName() {
return "help.png";
public Icon getIcon() {
return Icon.fromSvg(IconSet.getScalableIcon("help-circle-outline", null));
}

@Override
Expand Down
13 changes: 0 additions & 13 deletions core/src/main/java/org/jenkins/ui/icon/IconSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -517,24 +517,11 @@ private static void initializeSVGs() {
images.add("warning");
images.add("document-properties");

Map<String, String> materialIcons = new HashMap<>();
materialIcons.put("help", "svg-sprite-action-symbol.svg#ic_help_24px");

for (Map.Entry<String, String> size : sizes.entrySet()) {
for (String image : images) {
icons.addIcon(new Icon("icon-" + image + " " + size.getKey(),
"svgs/" + image + ".svg", size.getValue()));
}

for (Map.Entry<String, String> imageEntry : materialIcons.entrySet()) {
icons.addIcon(new Icon(
"icon-" + imageEntry.getKey() + " " + size.getKey(),
"material-icons/" + imageEntry.getValue(),
size.getValue(),
IconFormat.EXTERNAL_SVG_SPRITE
)
);
}
}
}
}
6 changes: 3 additions & 3 deletions core/src/main/resources/jenkins/model/Jenkins/manage.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ THE SOFTWARE.
<j:choose>
<j:when test="${m.requiresConfirmation}">
<l:confirmationLink href="${m.urlName}" post="${m.requiresPOST}" message="${%are.you.sure(m.displayName)}">
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" class="icon" />
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" xml="${icon.xml}" class="icon" />
<dl>
<dt>${m.displayName}</dt>
<dd><j:out value="${m.description}"/></dd>
Expand All @@ -82,7 +82,7 @@ THE SOFTWARE.
</j:when>
<j:when test="${m.requiresPOST}">
<f:link href="${m.urlName}" post="${m.requiresPOST}">
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" class="icon" />
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" xml="${icon.xml}" class="icon" />
<dl>
<dt>${m.displayName}</dt>
<dd><j:out value="${m.description}"/></dd>
Expand All @@ -92,7 +92,7 @@ THE SOFTWARE.
</j:when>
<j:otherwise>
<a href="${m.urlName}">
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" class="icon" />
<l:icon src="${rootURL + '/images/' + icon.url}" svg="${icon.svg}" xml="${icon.xml}" class="icon" />
<dl>
<dt>${m.displayName}</dt>
<dd><j:out value="${m.description}"/></dd>
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/less/modules/section.less
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
min-height: 48px;
}

.icon, .icon-xlg {
.icon, .icon-xlg, svg {
position: relative;
width: 48px;
height: 48px;
Expand Down

0 comments on commit 586c22a

Please sign in to comment.