-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/connectors-available
- Loading branch information
Showing
64 changed files
with
878 additions
and
496 deletions.
There are no files selected for viewing
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,56 @@ | ||
/*! | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
.rounded-icon { | ||
display: flex; | ||
border-radius: 50% !important; | ||
align-items: center !important; | ||
justify-content: center !important; | ||
width: 24px; | ||
height: 24px; | ||
min-width: 24px; | ||
min-height: 24px; | ||
border: 2px solid; | ||
|
||
&.rounded-icon-sm { | ||
width: 16px !important; | ||
height: 16px !important; | ||
min-width: 16px !important; | ||
min-height: 16px !important; | ||
|
||
& > i.fa { | ||
font-size: 0.75em; | ||
line-height: 0.08333em; | ||
} | ||
} | ||
|
||
&.rounded-icon-none { | ||
display: none !important; | ||
} | ||
|
||
@each $name, $color in $theme-colors { | ||
&.rounded-icon-#{$name} { | ||
&.rounded-icon-partial { | ||
background-color: $white !important; | ||
border-color: $color !important; | ||
|
||
& > i { | ||
color: $color !important; | ||
} | ||
} | ||
|
||
&.rounded-icon-full { | ||
background-color: $color !important; | ||
border-color: $color !important; | ||
|
||
& > i { | ||
color: $white !important; | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
12 changes: 12 additions & 0 deletions
12
...min-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/RoundedIconPanel.html
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,12 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2017 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<i wicket:id="icon"></i> | ||
</wicket:panel> | ||
</html> |
64 changes: 64 additions & 0 deletions
64
...min-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/tile/RoundedIconPanel.java
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,64 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.component.tile; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
|
||
import org.apache.wicket.behavior.AttributeAppender; | ||
import org.apache.wicket.markup.html.basic.Label; | ||
import org.apache.wicket.model.IModel; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class RoundedIconPanel extends BasePanel<String> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_ICON = "icon"; | ||
|
||
public enum State { | ||
NONE, PARTIAL, FULL | ||
} | ||
|
||
private IModel<State> state; | ||
|
||
public RoundedIconPanel(String id, IModel<String> icon, IModel<State> state) { | ||
super(id, icon); | ||
|
||
this.state = state; | ||
|
||
initLayout(); | ||
} | ||
|
||
private void initLayout() { | ||
add(AttributeAppender.prepend("class", "rounded-icon")); | ||
add(AttributeAppender.append("class", this::getCssStateClass)); | ||
|
||
Label icon = new Label(ID_ICON); | ||
icon.add(AttributeAppender.append("class", getModel())); | ||
add(icon); | ||
} | ||
|
||
private String getCssStateClass() { | ||
State state = this.state.getObject(); | ||
if (state == null) { | ||
return "rounded-icon-none"; | ||
} | ||
|
||
switch (state) { | ||
case FULL: | ||
return "rounded-icon-full"; | ||
case PARTIAL: | ||
return "rounded-icon-partial"; | ||
case NONE: | ||
default: | ||
return "rounded-icon-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
Oops, something went wrong.