Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
alxlion committed Dec 9, 2023
2 parents d170cb8 + f575b24 commit 2cdf3f4
Show file tree
Hide file tree
Showing 67 changed files with 4,388 additions and 9,726 deletions.
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
erlang 26.1.2
elixir 1.15.7-otp-26
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## v1.7.0

- Add keyboard shortcuts to control settings (#64) (@Dhanus3133)
- Add embed (Youtube or any web content) as an interraction (#72) (@Dhanus3133)
- Add pinned messages (#62) (@haruncurak)
- Add reset password feature
- Add indication when a form is saved
- Add Postmark adapter
- Add the ability to send mail to facilitators invited to manage an event
- Allow navigation within presenter window (#63) (@railsmechanic)
- Change default avatar style
- Security updates

## v1.6.0
- Improve QR code readability
- Add ARM Docker image
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Don't forget to give the project a star! Thanks again!
2. Create your Feature Branch (`git checkout -b feature/amazing_feature`)
3. Commit your Changes (`git commit -m 'Add some amazing feature'`)
4. Push to the Branch (`git push origin feature/amazing_feature`)
5. Open a Pull Request
5. Open a Pull Request on `dev` branch

## Translations

You can contribute to the translations of this project by joining the POEditor project [here](https://poeditor.com/join/project/HbRyvyt3TT).
You can contribute to the translations by editing or addind PO files in `/priv/gettext/`
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ RUN mkdir /home/nobody && chown nobody /home/nobody

WORKDIR "/app"
RUN mkdir /app/uploads
RUN chown nobody /app
RUN chown -R nobody /app

# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/prod/rel/claper ./
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-arm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ RUN mkdir /home/nobody && chown nobody /home/nobody

WORKDIR "/app"
RUN mkdir /app/uploads
RUN chown nobody /app -R
RUN chown -R nobody /app -R

# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/prod/rel/claper ./
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,21 @@ A Docker Compose [reference file](https://github.com/ClaperCo/Claper/blob/main/d
```sh
git clone https://github.com/ClaperCo/Claper.git
cd Claper
docker-compose up
docker compose up
```


### Using Docker Compose for Dev

To easy check new features, it is possible to directly build the Docker image from the source code and run the container with the [docker-compose-dev.yml](https://github.com/ClaperCo/Claper/blob/main/docker-compose-dev.yml) file.

```sh
git clone https://github.com/ClaperCo/Claper.git
cd Claper
docker compose -f docker-compose-dev.yml up
```


<!-- CONTRIBUTING -->
## Contributing

Expand All @@ -139,7 +151,7 @@ Distributed under the GPLv3 License. See `LICENSE.txt` for more information.
<!-- CONTACT -->
## Contact

[![](https://img.shields.io/badge/@alxlion__-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white)](https://twitter.com/alxlion_)
[![](https://img.shields.io/badge/@alxlion__-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/alxlion_)

Project Link: [https://github.com/ClaperCo/Claper](https://github.com/ClaperCo/Claper)

Expand Down
2 changes: 0 additions & 2 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ Hooks.QRCode = {
width: this.el.dataset.dynamic ? document.documentElement.clientWidth * .25 : 240,
height: this.el.dataset.dynamic ? document.documentElement.clientWidth * .25 : 240,
margin: 0,
image:
"/images/logo.png",
data: url,
cornersSquareOptions: {
type: "square"
Expand Down
30 changes: 15 additions & 15 deletions assets/js/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export class Manager {
document.getElementById("slide-preview-" + data.current_page).scrollIntoView({
block: 'center',
behavior: 'smooth'
});
});
}, data.timeout ? data.timeout : 0)
}
})

window.addEventListener('keydown', (e) => {
if (e.target.tagName.toLowerCase() != "input") {

if ((e.target.tagName || '').toLowerCase() != "input") {
e.preventDefault()

switch (e.key) {
Expand All @@ -41,7 +41,7 @@ export class Manager {
case 'ArrowDown':
this.nextPage()
break
}
}
}
});
}
Expand All @@ -54,25 +54,25 @@ export class Manager {
document.getElementById("slide-preview-" + this.currentPage).scrollIntoView({
block: 'center',
behavior: 'smooth'
});
});
}
}

nextPage() {
if(this.currentPage == this.maxPage - 1)
return;
if (this.currentPage == this.maxPage - 1)
return;

this.currentPage += 1;
this.context.pushEventTo(this.context.el, "current-page", {"page": this.currentPage.toString()});
this.context.pushEventTo(this.context.el, "current-page", { "page": this.currentPage.toString() });
}

prevPage() {
if(this.currentPage == 0)
if (this.currentPage == 0)
return;

this.currentPage -= 1;
this.context.pushEventTo(this.context.el, "current-page", {"page": this.currentPage.toString()});
this.context.pushEventTo(this.context.el, "current-page", { "page": this.currentPage.toString() });

}
}

}
63 changes: 41 additions & 22 deletions assets/js/presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export class Presenter {
slideBy: 'page',
center: true,
autoplay: false,
controls: false,
controls: false,
swipeAngle: false,
startIndex: this.currentPage,
loop: false,
nav: false
nav: false
});

this.context.handleEvent('page', data => {
Expand All @@ -35,12 +35,19 @@ export class Presenter {
if (data.value) {
document.getElementById("post-list").classList.remove("animate__animated", "animate__fadeOutLeft")
document.getElementById("post-list").classList.add("animate__animated", "animate__fadeInLeft")

document.getElementById("pinned-post-list").classList.remove("animate__animated", "animate__fadeOutLeft")
document.getElementById("pinned-post-list").classList.add("animate__animated", "animate__fadeInLeft")
} else {
document.getElementById("post-list").classList.remove("animate__animated", "animate__fadeInLeft")
document.getElementById("post-list").classList.add("animate__animated", "animate__fadeOutLeft")

document.getElementById("pinned-post-list").classList.remove("animate__animated", "animate__fadeInLeft")
document.getElementById("pinned-post-list").classList.add("animate__animated", "animate__fadeOutLeft")
}
})


this.context.handleEvent('poll-visible', data => {
if (data.value) {
document.getElementById("poll").classList.remove("animate__animated", "animate__fadeOut")
Expand Down Expand Up @@ -69,37 +76,49 @@ export class Presenter {
case 'f': // F
this.fullscreen()
break
}
case 'ArrowUp':
window.opener.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'ArrowUp' }));
break
case 'ArrowLeft':
window.opener.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'ArrowLeft' }));
break
case 'ArrowRight':
window.opener.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'ArrowRight' }));
break
case 'ArrowDown':
window.opener.dispatchEvent(new KeyboardEvent('keydown', { 'key': 'ArrowDown' }));
break
}
}
});
}

fullscreen() {

var docEl = document.getElementById("presenter")
var docEl = document.getElementById("presenter")

try {
docEl.webkitRequestFullscreen()
.then(function() {
try {
docEl.webkitRequestFullscreen()
.then(function () {
})
.catch(function(error) {
.catch(function (error) {

});
} catch (e) {
docEl.requestFullscreen()
.then(function() {
} catch (e) {
docEl.requestFullscreen()
.then(function () {
})
.catch(function(error) {
.catch(function (error) {
});
docEl.mozRequestFullScreen()
.then(function() {

docEl.mozRequestFullScreen()
.then(function () {
})
.catch(function(error) {
.catch(function (error) {
});
}
}


}
}

}

0 comments on commit 2cdf3f4

Please sign in to comment.