Compare commits

..

4 Commits

15 changed files with 10712 additions and 1859 deletions

View File

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

View File

@ -15,24 +15,12 @@ trigger:
steps:
- name: reuse
image: fsfe/reuse:3.0.2-debian
image: fsfe/reuse
- name: lint
image: node:20.12.2
image: node:20
commands:
- npm ci
- npm run lint
- name: audit
image: node:20.12.2
commands:
- npm install -g better-npm-audit
- better-npm-audit audit --production --level=moderate
- name: docker-dry-run
image: plugins/docker:20.17.3
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend
target: ki-frontend
dry_run: true
---
kind: pipeline
@ -50,7 +38,7 @@ depends_on:
steps:
- name: docker-publish
image: plugins/docker:20.17.3
image: plugins/docker
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend
@ -77,7 +65,7 @@ depends_on:
steps:
- name: deploy-dev
image: appleboy/drone-ssh:1.7.5
image: appleboy/drone-ssh
settings:
host:
- dev01.wtf-eg.net
@ -99,14 +87,14 @@ trigger:
steps:
- name: reuse
image: fsfe/reuse:3.0.2-debian
image: fsfe/reuse
- name: lint
image: node:20.12.2
image: node:20
commands:
- npm ci
- npm run lint
- name: docker-publish
image: plugins/docker:20.17.3
image: plugins/docker
settings:
registry: git.wtf-eg.de
repo: git.wtf-eg.de/kompetenzinventar/frontend

View File

@ -12,9 +12,6 @@ module.exports = {
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'vue/multi-word-component-names': 'off',
'vue/no-useless-template-attributes': 'off',
'vue/no-reserved-component-names': 'off'
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
}
}

View File

@ -2,27 +2,19 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM node:20.12.2-alpine as builder
FROM node:20-alpine as builder
COPY package.json package-lock.json ./
RUN npm install
COPY .eslintrc.js .
COPY babel.config.js .
COPY public public
COPY src src
COPY . ./
RUN npm ci && npm run build
FROM nginx:1.24-alpine as ki-frontend
FROM nginx as ki-frontend
COPY --from=builder /dist/ /usr/share/nginx/html/
COPY etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
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

@ -41,14 +41,6 @@ Folgende Kanäle gibt es für die Kommunikation über das Kompetenzinventar:
npm ci
```
### Pre requirements
* Node 20
* Wenn du eine andere node version installiert hast, kannst du [nvm](https://github.com/nvm-sh/nvm) benutzen um schnell zwischen node version zu wechseln
* NPM
* (KI-backend)[https://git.wtf-eg.de/kompetenzinventar/ki-backend] muss lokal laufen
### Konfigurationsdatei anpassen
```
@ -56,6 +48,7 @@ cp public/config.js.dev public/config.js
vi public/config.js
```
### Compiles and hot-reloads for development
```
npm run serve

12431
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,28 +1,28 @@
{
"name": "@wtf/ki-frontend",
"version": "1.1.0",
"version": "0.1.0",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"devDependencies": {
"@babel/eslint-parser": "7.23.10",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-router": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"@vue/compiler-sfc": "^3.4.19",
"bootstrap": "^5.3.3",
"@vue/compiler-sfc": "^3.0.0",
"@babel/eslint-parser": "7.23.10",
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.3",
"core-js": "^3.38.1",
"core-js": "^3.6.5",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^9.27.0",
"sass": "^1.77.8",
"sass-loader": "^14.2.1",
"eslint-plugin-vue": "^7.0.0",
"sass": "^1.37.5",
"sass-loader": "^10.2.0",
"v-tooltip": "^4.0.0-beta.17",
"vue": "^3.4.0",
"vue-router": "^4.4.3",
"vue-router": "^4.2.5",
"vuex": "^4.1.0"
}
}

View File

@ -21,3 +21,11 @@
.search-card{
height: 100%;
}
.card-body {
background-color: #fff;
}
.list-group-flush > .list-group-item {
background-color: #fff;
}

View File

@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
@update-values="this.$emit('update-values', this.values)"
>
</profile-list>
<div v-bind="$attrs" class="card-body bg-white">
<div v-bind="$attrs" class="card-body">
<div class="row">
<div class="col-12 col-md-4 col-lg-3 col-xl-2">
<div class="form-control-plaintext form-control-sm">Eintrag hinzufügen:</div>
@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<div v-if="searchResults">
<ul class="list-group">
<li
class="list-group-item bg-white"
class="list-group-item"
v-for="result in searchResults"
:key="result.id"
@click="addResult(result)"

View File

@ -14,7 +14,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
>
<span
class="page-link pointer"
:class="{ 'bg-white': page !== current }"
@click="onPageClicked(page)"
>
{{ page }}

View File

@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<template>
<ul class="list-group list-group-flush">
<li
class="list-group-item bg-white"
class="list-group-item"
v-for="(value, valueKey) in values"
:key="value.id"
>

View File

@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
class="text-decoration-none d-flex"
:to="{ path: `/s/profile/${profile.user_id}` }"
>
<div class="card w-100 bg-white">
<div class="card w-100">
<div class="card-body d-flex">
<div class="d-flex align-items-center justify-content-center me-3">
<Avatar :name="profile.nickname"/>

View File

@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
</h3>
<div class="card w-100">
<slot name="card-body">
<div class="card-body bg-white">
<div class="card-body">
<slot></slot>
</div>
</slot>

View File

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

View File

@ -12,8 +12,25 @@ SPDX-License-Identifier: AGPL-3.0-or-later
</div>
</div>
<div class="container">
<form @submit.prevent="submitFormEdit(false)">
<form @submit.prevent="submitFormEdit()">
<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>
@ -167,7 +184,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
</Section>
<Section title="Sonstiges">
<div class="mb-3 bg-white">
<div class="mb-3">
<label class="form-label">Über mich</label>
<textarea
class="form-control"
@ -205,17 +222,11 @@ SPDX-License-Identifier: AGPL-3.0-or-later
<i class="bi bi-check-lg"></i>
Gespeichert
</div>
<button
class="btn btn-secondary ms-3"
@click="submitFormEdit(false)"
>
Entwurf Speichern
</button>
<button
class="btn btn-primary ms-3"
@click="submitFormEdit(true)"
@click="submitFormEdit()"
>
Speichern und Veröffentlichen
Speichern
</button>
</div>
</div>