# HG changeset patch # User salimr # Date 1538962254 -7200 # Node ID 183b128a41896e59dbf329966594112e0652c6e6 # Parent a4705c2b4544d21f8443ec4827adb41f2f3b9af3 Change sessions list disposition and add sessions number diff -r a4705c2b4544 -r 183b128a4189 client/src/components/SessionList.js --- a/client/src/components/SessionList.js Mon Oct 08 03:24:47 2018 +0200 +++ b/client/src/components/SessionList.js Mon Oct 08 03:30:54 2018 +0200 @@ -52,6 +52,17 @@ }) } + showSessionsNumber = () => { + if (this.props.sessions.size === 1) + return ( + {this.props.sessions.size} session + ); + return ( + {this.props.sessions.size} sessions + ) + + } + deleteSession = () => { const { sessionToDelete } = this.state; @@ -66,16 +77,19 @@ render() { return (
- +
-
+
+ {this.showSessionsNumber()} +
+
{this.props.sessions.map((session) => -
-
+
- close + close
- Êtes-vous sûr(e) de vouloir supprimer cette session ? - + Supprimer cette session ? +
diff -r a4705c2b4544 -r 183b128a4189 client/src/components/SessionList.scss --- a/client/src/components/SessionList.scss Mon Oct 08 03:24:47 2018 +0200 +++ b/client/src/components/SessionList.scss Mon Oct 08 03:30:54 2018 +0200 @@ -1,3 +1,9 @@ + +.session-count { + font-size: 2rem; + z-index: -1; +} + a.sessions{ cursor: pointer; } @@ -15,16 +21,16 @@ -o-transition-delay: 5s; transition: .5s all; transition-delay: 5s; -} -#delete:hover { - // opacity: 1; - display: inline-block; - -webkit-transition-delay: 0s; - -moz-transition-delay: 0s; - -ms-transition-delay: 0s; - -o-transition-delay: 0s; - transition-delay: 0s; + &:hover { + // opacity: 1; + display: inline-block; + -webkit-transition-delay: 0s; + -moz-transition-delay: 0s; + -ms-transition-delay: 0s; + -o-transition-delay: 0s; + transition-delay: 0s; + } } .sessions:hover ~ #delete { @@ -42,23 +48,27 @@ } -span.session-title { - font-size: 20px; -} +span.session { + + &-title { + font-size: 1.3rem; + white-space: pre-wrap; + overflow-wrap: break-word; + } -span.session-description { - font-size: 12px; -} -span.session-date { - font-size: 13px; -} + &-date { + font-size: .9rem; + } -.edit{ - font-size: 17px; + &-description { + font-size: .9rem; + white-space: pre-wrap; + overflow-wrap: break-word; + } } .delete{ - font-size: 16px; + font-size: 1rem; } #delete-session-modal{ @@ -98,23 +108,27 @@ to { opacity: 1; } } -#delete-session-close-modal-button{ - background-color: transparent; - border: transparent; - color: rgba(#769FED, .4); - cursor: pointer; +#delete-session { + + &-modal-button { + font-size: .9rem; + } + + &-close-modal-button { + background-color: transparent; + border: transparent; + color: rgba(#769FED, .4); + cursor: pointer; + } + + &-close-modal-button:hover { + background-color: transparent; + border: transparent; + color:black; + } } -#delete-session-close-modal-button:hover{ - background-color: transparent; - border: transparent; - color:black; +.modal-text { + font-size: 1rem; } -.modal-text{ - font-size: 16px; -} - -#delete-session-modal-button { - font-size: 14px; -}