From c6083878a2ca151ea8055ae40ec74554720d48f0 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Sun, 12 Jan 2025 15:17:25 +0200 Subject: [PATCH] Commit --- .gitea/workflows/build-docker-image.yaml | 36 ++++++++++++++++++++++++ .gitignore | 18 ++---------- go.mod | 11 ++++++++ go.sum | 8 ++++++ templates/index.html | 15 ---------- 5 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 .gitea/workflows/build-docker-image.yaml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitea/workflows/build-docker-image.yaml b/.gitea/workflows/build-docker-image.yaml new file mode 100644 index 0000000..0869af8 --- /dev/null +++ b/.gitea/workflows/build-docker-image.yaml @@ -0,0 +1,36 @@ +name: build docker image + +on: + - push + +jobs: + docker-build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: gitea.stuzer.link + username: ${{ gitea.repository_owner }} + password: ${{ secrets.DOCKER_REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64 + push: true + build-args: | + APP_URL="${{ vars.APP_URL }}" + tags: gitea.stuzer.link/stuzer05/docker-ldap-change-password-web-ui:latest + cache-from: type=registry,ref=gitea.stuzer.link/stuzer05/docker-ldap-change-password-web-ui:latest + cache-to: type=inline \ No newline at end of file diff --git a/.gitignore b/.gitignore index 92027e5..4dc451f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,2 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ -vendor/ -*.lock +.idea +docker-ldap-change-password-web-ui \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..01421dd --- /dev/null +++ b/go.mod @@ -0,0 +1,11 @@ +module gitea.stuzer.link/stuzer05/docker-ldap-change-password-web-ui + +go 1.23.4 + +require ( + github.com/dchest/captcha v1.1.0 + github.com/npenkov/ldap-passwd-webui v0.0.0-20200503090523-c11e4f5d081d + gopkg.in/ldap.v2 v2.5.1 +) + +require gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..57b2adf --- /dev/null +++ b/go.sum @@ -0,0 +1,8 @@ +github.com/dchest/captcha v1.1.0 h1:2kt47EoYUUkaISobUdTbqwx55xvKOJxyScVfw25xzhQ= +github.com/dchest/captcha v1.1.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo= +github.com/npenkov/ldap-passwd-webui v0.0.0-20200503090523-c11e4f5d081d h1:LglLbl2j5+1NlfannoAB4zvvq8yxn/Y0btpChkUGm/4= +github.com/npenkov/ldap-passwd-webui v0.0.0-20200503090523-c11e4f5d081d/go.mod h1:yXYw3lzzjOzoDQlTgKx8Je1H0EeLcd6WGJxiV5ZzrZY= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/ldap.v2 v2.5.1 h1:wiu0okdNfjlBzg6UWvd1Hn8Y+Ux17/u/4nlk4CQr6tU= +gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= diff --git a/templates/index.html b/templates/index.html index f7708c4..dc8f73f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -21,21 +21,6 @@ } e.src = src + "?" + q } - function playAudio() { - var le = document.getElementById("lang"); - var lang = le.options[le.selectedIndex].value; - var e = document.getElementById('audio') - setSrcQuery(e, "lang=" + lang) - e.style.display = 'block'; - e.autoplay = 'true'; - return false; - } - function changeLang() { - var e = document.getElementById('audio') - if (e.style.display == 'block') { - playAudio(); - } - } function reload() { setSrcQuery(document.getElementById('image'), "reload=" + (new Date()).getTime()); setSrcQuery(document.getElementById('audio'), (new Date()).getTime());