Compare commits
No commits in common. "main" and "0.3.1" have entirely different histories.
18 changed files with 70 additions and 99 deletions
52
.forgejo/workflows/build.yaml
Normal file
52
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,52 @@
|
|||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: container
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build package (transpile ts => js)
|
||||
run: ng build
|
||||
|
||||
- name: Build container
|
||||
uses: actions/buildah-build@v1
|
||||
with:
|
||||
image: treetrail-frontend
|
||||
#tags: foo # v1 ${{ github.sha }}
|
||||
containerfiles: |
|
||||
./Containerfile
|
||||
|
||||
- name: Workaround for bug of podman-login
|
||||
run: |
|
||||
mkdir -p $HOME/.docker
|
||||
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
|
||||
|
||||
- name: Log in to container registry (with another workaround)
|
||||
uses: actions/podman-login@v1
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
auth_file_path: /tmp/auth.json
|
||||
|
||||
- uses: actions/push-to-registry@v2
|
||||
with:
|
||||
registry: "docker://${{ vars.REGISTRY }}"
|
||||
image: treetrail-frontend
|
||||
tags: latest
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -44,5 +44,3 @@ testem.log
|
|||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
.npmrc
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
when:
|
||||
- event: manual
|
||||
- event: tag
|
||||
|
||||
#depends_on:
|
||||
#- test
|
||||
|
||||
steps:
|
||||
npm:
|
||||
image: code.philo.ydns.eu/philorg/pnpm-deb
|
||||
environment:
|
||||
ORG: philorg
|
||||
REGISTRY_TOKEN:
|
||||
from_secret: registry_token
|
||||
volumes:
|
||||
- pnpm:/root/.local/share/pnpm
|
||||
commands:
|
||||
- pnpm install --frozen-lockfile
|
||||
- pnpm set "//code.philo.ydns.eu/api/packages/$ORG/npm/:_authToken=$REGISTRY_TOKEN"
|
||||
- pnpm publish --no-git-checks
|
||||
failure: ignore
|
||||
|
||||
build:
|
||||
image: code.philo.ydns.eu/philorg/pnpm-deb
|
||||
commands:
|
||||
- pnpm build
|
||||
|
||||
build_publish:
|
||||
image: quay.io/podman/stable:latest
|
||||
# Caution: This image is built daily. It might fill up your image store quickly.
|
||||
#pull: true
|
||||
volumes:
|
||||
- containers:/var/lib/containers
|
||||
- pnpm:/root/.local/share/pnpm
|
||||
# Fill in the trusted checkbox in Woodpecker's settings as well
|
||||
privileged: true
|
||||
environment:
|
||||
registry: code.philo.ydns.eu
|
||||
org: philorg
|
||||
container_name: treetrail-frontend
|
||||
registry_token:
|
||||
from_secret: registry_token
|
||||
commands:
|
||||
# Login at the registry
|
||||
- podman login -u __token__ --password $registry_token $registry
|
||||
# Build the container image
|
||||
- podman build --volume=/var/lib/containers:/var/lib/containers --tag $registry/$org/$container_name:latest --tag $registry/$org/$container_name:$CI_COMMIT_TAG .
|
||||
# Push the image
|
||||
- podman push $registry/$org/$container_name:latest
|
||||
- podman push $registry/$org/$container_name:$CI_COMMIT_TAG
|
11
README.md
11
README.md
|
@ -1,10 +1 @@
|
|||
# Treetrail web front-end
|
||||
|
||||
Front-end for *Tree Trail*, a fun and pedagogic tool
|
||||
to discover the trails and trees around.
|
||||
|
||||
Home page (source, bugs, etc):
|
||||
<https://code.philo.ydns.eu/philorg/treetrail-frontend> .
|
||||
|
||||
The main documentation for Tree Trail is:
|
||||
<https://code.philo.ydns.eu/philorg/treetrail-backend> .
|
||||
Front-end for *Tree Trail*, a fun and pedagogic tool to discover the trails and trees around.
|
14
build.yaml
14
build.yaml
|
@ -1,11 +1,8 @@
|
|||
- name: Build container image
|
||||
- name: Build container
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
vars:
|
||||
repository: tiptop:5000
|
||||
force_rm: false
|
||||
cache: false
|
||||
|
||||
tasks:
|
||||
- name: Install dependencies
|
||||
command: pnpm install
|
||||
|
@ -23,11 +20,6 @@
|
|||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Update version.json
|
||||
command: pnpm run version
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}"
|
||||
|
||||
- name: Build frontend container
|
||||
containers.podman.podman_image:
|
||||
name: "treetrail-frontend:{{ version.stdout }}"
|
||||
|
@ -36,10 +28,8 @@
|
|||
path: "{{ playbook_dir }}"
|
||||
build:
|
||||
format: oci
|
||||
force_rm: "{{ force_rm }}"
|
||||
cache: "{{ cache }}"
|
||||
cache: no
|
||||
file: Containerfile
|
||||
extra_args: "--build-arg APP_VERSION={{ version.stdout }}"
|
||||
push: true
|
||||
push_args:
|
||||
dest: "{{ repository }}/treetrail-frontend:{{ version.stdout }}"
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "treetrail",
|
||||
"version": "0.4.5",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "treetrail",
|
||||
"version": "0.4.5",
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.2.6",
|
||||
"@angular/cdk": "^18.2.6",
|
||||
|
|
12
package.json
12
package.json
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
"name": "treetrail-frontend",
|
||||
"version": "0.4.5",
|
||||
"name": "treetrail",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --proxy-config proxy.conf.json --port 4201 --serve-path /treetrail --host 0.0.0.0",
|
||||
"start": "ng serve --proxy-config proxy.conf.json --port 4201 --serve-path /treetrail",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test",
|
||||
"openapi-ts": "openapi-ts"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.2.6",
|
||||
"@angular/cdk": "^18.2.6",
|
||||
|
@ -60,8 +61,5 @@
|
|||
"karma-jasmine-html-reporter": "^2.1.0",
|
||||
"typescript": "~5.4.5"
|
||||
},
|
||||
"packageManager": "pnpm@9.12.2",
|
||||
"publishConfig": {
|
||||
"registry": "http://code.philo.ydns.eu/api/packages/philorg/npm/"
|
||||
}
|
||||
"packageManager": "pnpm@9.12.2"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<h2>Version</h2>
|
||||
<p><span class='h'>Client: </span>{{ version }}></p>
|
||||
<p><span class='h'>Client: </span>{{ (configService.conf | async).bootstrap.client.version }}></p>
|
||||
<p><span class='h'>Server: </span>{{ (configService.conf | async).bootstrap.server.version }}</p>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
|
@ -1,7 +1,6 @@
|
|||
import { Component, OnInit } from '@angular/core'
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
import { ConfigService } from '../config.service'
|
||||
import packageJson from '../../../package.json'
|
||||
|
||||
@Component({
|
||||
selector: 'app-about',
|
||||
|
@ -13,8 +12,6 @@ export class AboutComponent implements OnInit {
|
|||
public configService: ConfigService,
|
||||
) { }
|
||||
|
||||
public version: string = packageJson.version
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
}
|
||||
|
|
0
src/app/app.component.scss
Normal file
0
src/app/app.component.scss
Normal file
|
@ -1,7 +1,5 @@
|
|||
import {
|
||||
Component, OnInit,
|
||||
ChangeDetectorRef, ChangeDetectionStrategy
|
||||
} from '@angular/core'
|
||||
import { Component, OnInit,
|
||||
ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'
|
||||
import { DataService } from './data.service'
|
||||
|
||||
import { ActionService } from './action.service'
|
||||
|
@ -12,6 +10,7 @@ import { combineLatest } from 'rxjs'
|
|||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
@ -21,7 +20,7 @@ export class AppComponent implements OnInit {
|
|||
public actionService: ActionService,
|
||||
public appUpdateService: AppUpdateService,
|
||||
public cdr: ChangeDetectorRef,
|
||||
) { }
|
||||
) {}
|
||||
title = 'treetrail'
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
0
src/app/profile/profile.component.scss
Normal file
0
src/app/profile/profile.component.scss
Normal file
|
@ -3,6 +3,7 @@ import { Component } from '@angular/core';
|
|||
@Component({
|
||||
selector: 'app-profile',
|
||||
templateUrl: './profile.component.html',
|
||||
styleUrls: ['./profile.component.scss']
|
||||
})
|
||||
export class ProfileComponent {
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
<li><span class='h'>Dave Storey</span>: communication</li>
|
||||
</ul>
|
||||
<p><span class='h'>Contact</span>: phil.treetrail at philome.mooo.com</p>
|
||||
<p><span class='h'>Version</span>: {{conf.bootstrap?.client.version }}, frontend: {{ version }}</p>
|
||||
<p><span class='h'>Version</span>: {{conf.bootstrap?.client.version }}</p>
|
||||
</mat-expansion-panel>
|
||||
|
||||
<mat-expansion-panel>
|
||||
|
|
|
@ -3,7 +3,6 @@ import { Router } from '@angular/router'
|
|||
|
||||
import { ActionService } from '../action.service'
|
||||
import { ConfigService, Config } from '../config.service'
|
||||
import packageJson from '../../../package.json'
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
|
@ -18,8 +17,6 @@ export class SettingsComponent implements OnInit {
|
|||
public router: Router,
|
||||
) { }
|
||||
|
||||
public version: string = packageJson.version
|
||||
|
||||
ngOnInit(): void {
|
||||
this.configService.conf.subscribe(
|
||||
conf => this.conf = conf
|
||||
|
|
0
src/assets/.gitkeep
Normal file
0
src/assets/.gitkeep
Normal file
0
src/assets/fonts/.gitignore
vendored
Normal file
0
src/assets/fonts/.gitignore
vendored
Normal file
|
@ -15,8 +15,6 @@
|
|||
"importHelpers": true,
|
||||
"target": "ES2022",
|
||||
"module": "es2020",
|
||||
//"allowSyntheticDefaultImports": true,
|
||||
"resolveJsonModule": true,
|
||||
"lib": [
|
||||
"es2019",
|
||||
"dom"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue