Skip to content

Commit

Permalink
[UPD] locked
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed May 27, 2024
1 parent fcfb507 commit a10c735
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@ body[data-connected] .disconnected {
margin: auto;
}

[data-role="content"] .teamLocked {
display: none;
background-image: repeating-linear-gradient(45deg, #f4564833, #f4564833 10px, #eee 10px 20px);
border: 2px solid #f45648;
padding: 1em;
margin-bottom: 1em;
}
[data-role="content"] .teamLocked:before {
content: "\f071";
font-family: FontAwesome;
color: #f45648;
font-size: 3em;
float: left;
line-height: 1em;
margin-right: .25em;
position: relative;
top: -.25em
}

[data-role="content"] [data-locked] .teamLocked {
display: block;
}

.connected .loading {
position: relative;
pointer-events: none;
Expand Down
22 changes: 22 additions & 0 deletions src/pages/home/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,28 @@
.mc-list li.selected {
background-color: #e1eefd!important;
}
.mc-list li.locked {
background-image: repeating-linear-gradient(
45deg,rgba(244, 86, 72, .5),rgba(244, 86, 72, .5) 10px, transparent 10px,transparent 20px
);
box-shadow: inset 0 0 0 .25em #f45648 ;
}
.mc-list li.locked:before {
content: "\f023";
font-family: fontawesome;
font-size: 2em;
margin-right: .5em;
}
.mc-list li.locked:after {
content: "bloquée";
background-color: #f45648;
color: #fff;
position: absolute;
top: 0;
right: 0;
font-size: .85em;
padding: 0 .5em;
}

.ol-ext-dialog.create-team form {
width: 30em;
Expand Down
1 change: 1 addition & 0 deletions src/pages/home/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function showList() {
},
parent: (o.active === false) ? joinList : teamList
})
if (o.locked) li.classList.add('locked');
element.create('IMG', {
src: o.profile_picture || '',
parent: li
Expand Down
5 changes: 4 additions & 1 deletion src/pages/profil/profil-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ <h1 class="team"><i>Equipe</i></h1>
<li class="current-team"><a href="#equipe"></a></li>
<li>Profil</li>
</ul>
<div class="teamLocked">
Cette équipe est bloquée par un administrateur.
</div>
<div data-role="teaser-1">
<article>
<h2>Profil de l'équipe</h2>
Expand Down Expand Up @@ -76,7 +79,7 @@ <h2>Membres</h2>
<div class="left-block">
</div><div class="buttons">
<button class="button button-accent delete">
Supprimer
Supprimer l'équipe
</button>
</div>
</article>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/profil/profil.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function showTeam() {
content.querySelectorAll('#equipe span').forEach(sp => {
sp.innerText= '';
})
if (team.isLocked()) content.dataset.locked = '';
else delete content.dataset.locked;
// Get members
list.clear()
list.element.dataset.waiting = '';
Expand Down
3 changes: 3 additions & 0 deletions src/pages/team/teams-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ <h1 class="team"><i>Equipe</i></h1>
<li><a class="link-home" href="#">Mes équipe</a></li>
<li class="current-team"><a></a></li>
</ul>
<div class="teamLocked">
Cette équipe est bloquée par un administrateur.
</div>
<div class="info">
<div>
<article>
Expand Down

0 comments on commit a10c735

Please sign in to comment.