ajout bouton export auto
This commit is contained in:
1 parent
fb7152bf21
commit
1948ddab21
2 files changed
+21
-6
No files matched your search
@@ -7,9 +7,9 @@ import {AuthContext} from "../../../../contexts/auth/AuthContext.ts";
|
|||||||
|
|
||||||
function
|
function
|
||||||
Calendar() {
|
Calendar() {
|
||||||
|
|
||||||
const { user } = useContext(AuthContext);
|
const { user } = useContext(AuthContext);
|
||||||
|
|
||||||
|
const calendarUrl = `http://localhost/api/export/ics/${user.id}`;
|
||||||
|
|
||||||
const monthNames = [
|
const monthNames = [
|
||||||
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
|
"Janvier", "Février", "Mars", "Avril", "Mai", "Juin",
|
||||||
@@ -130,17 +130,20 @@ Calendar() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
<div className={`${styles.exportbox} glassBorder`}>
|
||||||
|
<p><b>votre lien d'agenda:</b> {calendarUrl}</p>
|
||||||
<Button className={styles.exportbtn}
|
<Button className={styles.exportbtn}
|
||||||
variant={"primary"}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
window.location.href =
|
window.open(
|
||||||
`http://localhost/api/export/ics/${user.id}`;
|
"https://calendar.google.com/calendar/u/0/r/settings/addbyurl"
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Exporter mon agenda
|
Exporter
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,10 +150,22 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exportbtn{
|
.exportbox{
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px;
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.exportbtn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
max-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.glassCard {
|
.glassCard {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in new issue
Block a user