- Sujets:
+ Sujets
-
- {{ i + 1 }}) {{ s.title }}
+ [ngClass]="{ active: (currentSubjectId === i) }">
+ {{s.id}}) {{ s.title }}
{{ s.duration }} min, par {{ s.author }}. Reste: {{ resteTopicMinutes(s) }}.
Passé: {{ round(s.spentSeconds) }}.
đ
+
+ sujet actuel dans les temps impartis
+
+
+ temps écoulé, sujet suivant.
+
@@ -88,6 +94,34 @@
{{ (hints) }}
+
+
+
+
+
diff --git a/ordre-du-jour/odj/src/app/app.component.scss b/ordre-du-jour/odj/src/app/app.component.scss
index c10b832c..6a7b1d59 100644
--- a/ordre-du-jour/odj/src/app/app.component.scss
+++ b/ordre-du-jour/odj/src/app/app.component.scss
@@ -155,10 +155,10 @@ main {
fill: var(--gray-900);
}
-//
-//.left-side{
-// width: 50%;
-//}
+
+.left-side{
+ width: 50%;
+}
.subject {
display: block;
padding: 1rem;
@@ -169,6 +169,7 @@ main {
width: 20em;
word-break: break-all;
word-wrap: break-word;
+ padding-left: 2rem;
}
}
@@ -210,6 +211,10 @@ pre {
}
}
+.content-current-subject{
+ padding-left: 10rem;
+ box-sizing:border-box;
+}
@media screen and (max-width: 650px) {
.content {
flex-direction: column;
diff --git a/ordre-du-jour/odj/src/app/app.component.ts b/ordre-du-jour/odj/src/app/app.component.ts
index 9248c696..fb7bc302 100644
--- a/ordre-du-jour/odj/src/app/app.component.ts
+++ b/ordre-du-jour/odj/src/app/app.component.ts
@@ -38,8 +38,8 @@ export class AppComponent implements OnInit, OnDestroy {
presents: string = '- tykayn';
pasteLand: string = "* Présentation du suivi sur Nextcloud - 5min (tykayn)\n" +
- "* RĂ©duction de bus factor - 5min (tykayn)\n" +
- "* RĂ©union avec Wikimedia France - 5min (tykayn)\n" +
+ "* RĂ©duction de bus factor - 10min (tykayn)\n" +
+ "* RĂ©union avec Wikimedia France - 25min (tykayn)\n" +
"";
statsExplication: string = ''
@@ -145,6 +145,10 @@ export class AppComponent implements OnInit, OnDestroy {
this.startDate = this.makeDateFromHourToday(this.startTime);
this.endDate = this.makeDateFromHourToday(this.endTime);
+ // let self = this;
+ // this.interval = setInterval(() => {
+ // self.updateTopicChangeDate()
+ // }, 5000)
}
@@ -160,7 +164,7 @@ export class AppComponent implements OnInit, OnDestroy {
}
findMinutesDurationInDescription(topic: string): number {
- let durationRegex = /-\s(\d+)min/g;
+ let durationRegex = /-\s(\d+)\s?min/g;
let matches = durationRegex.exec(topic);
if (matches) {
return parseInt(matches[1]);
@@ -207,7 +211,7 @@ export class AppComponent implements OnInit, OnDestroy {
}
resteTopicMinutes(topic: Topic) {
- return this.round(topic.spentSeconds / topic.duration * 60) + ' min'
+ return this.round(topic.spentSeconds / topic.duration * 60)
}
@@ -271,6 +275,7 @@ export class AppComponent implements OnInit, OnDestroy {
}
compteRendu: string = ''
+ now:Date = new Date();
formatDateYMD(date: Date) {
const year = date.getFullYear();
@@ -365,4 +370,13 @@ export class AppComponent implements OnInit, OnDestroy {
}
return Math.floor((date2.getTime() - date1.getTime()) / 1000);
}
+
+ isNowTimeBetweenTwoDates(date1: Date, date2: Date) {
+
+ let min = Math.min(date1.getTime(),date2.getTime());
+ let max = Math.max(date1.getTime(),date2.getTime());
+ let now = new Date().getTime();
+ console.log('min', min, now , max)
+ return min < now && max > now;
+ }
}