Compare commits

...

18 Commits
main ... main

Author SHA1 Message Date
Brain d46aaa0f31 Merge pull request 'Fix Dockerfile' (!89) from fix-dockerfile into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#89
2024-04-23 23:07:43 +02:00
Brain 81dcf5ebe7
Try to build Docker image for Pull Requests
continuous-integration/drone/pr Build is passing Details
2024-04-23 22:48:01 +02:00
Brain 7433d25716
Add missing trailing slash 2024-04-23 22:47:54 +02:00
Brain 7feee07d35 Merge pull request '♻️ Optimize Dockerfile' (!85) from optimize-dockerfile into main
continuous-integration/drone/push Build is failing Details
Reviewed-on: kompetenzinventar/ki-frontend#85
Reviewed-by: srsh <srsh@noreply.git.wtf-eg.de>
2024-04-23 22:26:14 +02:00
Nikolai c79ada2123 ISSUE-58| Move profile visiblity (!87)
continuous-integration/drone/push Build is passing Details
Move switch profile visibility button to save bar
Rename Save button to save as draft and offer save and publish

Fixes kompetenzinventar/ki-doku#58

Reviewed-on: kompetenzinventar/ki-frontend#87
Reviewed-by: srsh <srsh@noreply.git.wtf-eg.de>
Co-authored-by: Nikolai Gotzmann <self@ngotzmann.net>
Co-committed-by: Nikolai Gotzmann <self@ngotzmann.net>
2024-02-20 20:26:54 +01:00
nomaster f8e78d1cc8 ♻️ Optimize Dockerfile
continuous-integration/drone/pr Build is passing Details
- add all non-essential files to .dockerignore
- improve cachability by layers
- re-order lines to reduce layer generation
2024-01-12 18:42:27 +01:00
jaschop c2552f3c3a Merge pull request 'Push image to Gitea registry' (!84) from gitea-registry into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#84
2023-12-10 18:47:54 +01:00
Brain 687454afdb
Push image to Gitea registry
continuous-integration/drone/pr Build is passing Details
2023-12-04 20:09:52 +01:00
jaschop a7c8774cc4 Merge pull request 'Add labels to Docker images' (!83) from docker-labels into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#83
2023-11-16 11:18:44 +01:00
jaschop b63e5a6c2d Merge pull request 'Rewrite Drone config' (!82) from drone-config into main
continuous-integration/drone/push Build is pending Details
Reviewed-on: kompetenzinventar/ki-frontend#82
2023-11-16 11:18:35 +01:00
jaschop 1b221ab180 Merge pull request 'Improve SPA cacheing' (!81) from nginx-cacheing into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#81
2023-11-13 16:51:10 +01:00
Brain e2b101eb89
Add labels to Docker images
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-11-07 14:54:40 +01:00
Brain 654169c383
Rewrite Drone config
continuous-integration/drone/pr Build is passing Details
- Split PR and "push to main" actions
- Deploy latest main to dev system
- Build image for Git tags
2023-11-06 23:33:33 +01:00
Brain 26edf1d4b2
Improve SPA cacheing
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2023-11-06 18:35:05 +01:00
jaschop e7ff487aeb Merge pull request '"Problem melden"-Link korrigiert' (!78) from brain-patch-1 into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#78
2023-10-27 15:12:55 +02:00
jaschop c5bda80f11 Merge pull request 'Klarnamen in der Suche berücksichtigen' (!80) from zeitschlag/ki-frontend:feature/48-search-address-name into main
continuous-integration/drone/push Build is passing Details
Reviewed-on: kompetenzinventar/ki-frontend#80
2023-10-27 15:12:06 +02:00
zeitschlag 379ddaf5b9 Change placeholder (kompetenzinventar/ki-doku#48)
continuous-integration/drone/pr Build is passing Details
2023-04-20 18:14:07 +02:00
Brain 13fb15e033 Fix link for new issues 2022-07-20 18:26:39 +02:00
8 changed files with 158 additions and 62 deletions

View File

@ -1,2 +1,11 @@
.browserslistrc
.dockerignore
.drone.yml
.editorconfig
.git
.gitignore
.reuse
Dockerfile
LICENSES
README.md
node_modules

View File

@ -4,40 +4,110 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
kind: pipeline
type: docker
name: default
name: qa
trigger:
event:
- push
- pull_request
branch:
- main
steps:
- name: reuse
image: fsfe/reuse:latest
- name: reuse
image: fsfe/reuse
- name: lint
image: node:20
commands:
- npm ci
- npm run lint
- name: docker-build
image: plugins/docker
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend
target: ki-frontend
dry_run: true
- name: docker-publish
image: plugins/docker
settings:
registry: registry.wtf-eg.net
repo: registry.wtf-eg.net/ki-frontend
target: ki-frontend
auto_tag: true
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"
when:
event:
- push
branch:
- main
---
kind: pipeline
type: docker
name: build
- name: docker-publish-tag
image: plugins/docker
settings:
registry: registry.wtf-eg.net
repo: registry.wtf-eg.net/ki-frontend
target: ki-frontend
auto_tag: true
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"
when:
event:
- tag
trigger:
event:
- push
branch:
- main
depends_on:
- qa
steps:
- name: docker-publish
image: plugins/docker
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend
target: ki-frontend
auto_tag: true
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"
---
kind: pipeline
type: docker
name: deploy
trigger:
event:
- push
branch:
- main
depends_on:
- build
steps:
- name: deploy-dev
image: appleboy/drone-ssh
settings:
host:
- dev01.wtf-eg.net
username: drone_deployment
key:
from_secret: "dev01_deployment_key"
command_timeout: 2m
script:
- echo "Executing forced command..."
---
kind: pipeline
type: docker
name: tag-release
trigger:
event:
- tag
steps:
- name: reuse
image: fsfe/reuse
- name: lint
image: node:20
commands:
- npm ci
- npm run lint
- name: docker-publish
image: plugins/docker
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend
target: ki-frontend
auto_tag: true
username:
from_secret: "docker_username"
password:
from_secret: "docker_password"

View File

@ -4,12 +4,25 @@
FROM node:14-alpine as builder
COPY . ./
COPY package.json package-lock.json ./
RUN npm install
COPY .eslintrc.js .
COPY babel.config.js .
COPY public public
COPY src src
RUN npm ci && npm run build
FROM nginx as ki-frontend
COPY --from=builder /dist/ /usr/share/nginx/html/
LABEL org.opencontainers.image.source=https://git.wtf-eg.de/kompetenzinventar/ki-frontend.git
LABEL org.opencontainers.image.url=https://git.wtf-eg.de/kompetenzinventar/ki-frontend
LABEL org.opencontainers.image.documentation=https://git.wtf-eg.de/kompetenzinventar/ki-frontend#docker
LABEL org.opencontainers.image.vendor="WTF Kooperative eG"
WORKDIR /usr/share/nginx/html
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /dist .

View File

@ -9,10 +9,24 @@ server {
#access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html;
# routes without dots serve the index.html without caching
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
try_files $uri $uri/index.html /index.html;
}
# static js and css files that get replaced instead of updated
location ~ \.(js|css) {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
# cache other static files for 30 days
location ~ \.(?!html) {
add_header Cache-Control "public, max-age=2592000";
try_files $uri =404;
}
#error_page 404 /404.html;

View File

@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<div class="fw-bold text-white mb-2">Kompetenzinventar</div>
<ul class="list-unstyled">
<li><a href="https://git.wtf-eg.de/kompetenzinventar">Quellcode</a></li>
<li><a href="https://git.wtf-eg.de/kompetenzinventar/ki-frontend/issues/new">Problem melden</a></li>
<li><a href="https://git.wtf-eg.de/kompetenzinventar/ki-doku/issues/new/choose">Problem melden</a></li>
</ul>
</div>
</div>

View File

@ -95,10 +95,11 @@ export default {
console.error(error);
}
},
async submitFormEdit() {
async submitFormEdit(isProfileVisible) {
this.showErrorMessage = false
this.showSuccessMessage = false
const userId = store.state.currentUserId
this.profile.visible = isProfileVisible;
try {
const body = JSON.stringify(this.profile)

View File

@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
class="form-control"
id="searchText"
v-model="searchText"
placeholder="Nick, Fähigkeit, Sprache"
placeholder="Nick, Name, Fähigkeit, Sprache"
ref="searchTextInput"
/>
</div>

View File

@ -12,25 +12,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later
</div>
</div>
<div class="container">
<form @submit.prevent="submitFormEdit()">
<form @submit.prevent="submitFormEdit(false)">
<Section title="Grunddaten">
<div class="mb-4">
<div class="form-check form-switch">
<input
class="form-check-input"
type="checkbox"
role="switch"
v-model="profile.visible"
id="visibility"
>
<label
class="form-check-label"
for="visibility">
Profil für angemeldete Benutzer sichtbar
</label>
</div>
</div>
<div class="row mb-4">
<div class="col-12 col-md-4 mb-3 mb-md-0">
<label class="form-label">Nickname</label>
@ -223,10 +206,16 @@ SPDX-License-Identifier: AGPL-3.0-or-later
Gespeichert
</div>
<button
class="btn btn-primary ms-3"
@click="submitFormEdit()"
class="btn btn-secondary ms-3"
@click="submitFormEdit(false)"
>
Speichern
Entwurf Speichern
</button>
<button
class="btn btn-primary ms-3"
@click="submitFormEdit(true)"
>
Speichern und Veröffentlichen
</button>
</div>
</div>