Skip to content

Commit

Permalink
Merge branch 'release/2022.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruptein committed Apr 25, 2022
2 parents dacb56a + 666556c commit 9129e59
Show file tree
Hide file tree
Showing 232 changed files with 17,483 additions and 6,353 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,42 @@ on:
- "dev"
tags:
- "v*"
pull_request:
branches:
- "master"
- "dev"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: kruptein/planarally

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 4 additions & 4 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
working-directory: client
run: |
npm run lint:ci
# - name: test
# working-directory: client
# run: |
# npm run test
- name: test
working-directory: client
run: |
npm run test
- name: build
working-directory: client
run: |
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.zip
# editors
.idea/**
.vscode/**
Expand All @@ -20,11 +21,12 @@ server/build/**
# JS
client/coverage/**
client/node_modules/**
admin-client/node_modules/**

# PlanarAlly
server/planarallyserver.log
server/planar.save*
server/planar.sqlite*
server/*.sqlite*
server/save_backups
server/server_config.cfg

Expand All @@ -34,6 +36,7 @@ server/static/css/**
server/static/js/**
server/static/img/assets/**
server/static/vite/**
server/static/vite-admin/**
server/templates/**

# docs
Expand Down
63 changes: 62 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,72 @@
All notable changes to this project will be documented in this file.

[DM] denotes changes only useful for the dungeon master
[tech] denotes technical changes or changes specifically for the server owner.
[tech]/[server] denotes technical changes or changes specifically for the server owner.
These usually have no immediately visible impact on regular users

## Unreleased

## [2022.1] - 2022-04-25

For server owners using a subpath, some important changes are made, so make sure to check the changed section before upgrading

### Added

- simple logic systems to attach to shapes
- these logic systems can be configured with permissions
- current set of logic systems:
- door
- Automatically toggle blocking settings for a shape with a single click
- teleport zones
- Automatically move shapes to spawn points
- Dropping an asset with dimension info in its name (e.g. 50x30) will automatically size the asset
- [asset-manager] drop support for folders
- [server] Added `allow_signups` option in the `General` config section that can be disabled to prevent users from signing up themselves
- [server] Added barebones admin dashboard
- this uses the API endpoint and requires a token
- lists users + reset password + delete
- lists campaigns
- container (Docker) build instructions for arm64

### Changed

- Draw tool UI now has a tabbed interface
- a shape tab to configure shape and colours
- a visibility tab to configure advanced vision modes as well as blocksVision and blocksMovement changes
- Polygon edit tool will hide UI while dragging a point/shape
- [server] Change subpath handling
- the client now MUST also set the PA_BASEPATH env variable in production mode
- this means the env variable needs to be set at build time
- the basepath now HAS TO END with a slash
- for docker this means you need to manually build the image
- use `--build-arg PA_BASEPATH='/subpath/'
- you no longer need the `--env PA_BASEPATH` flag

### Fixed

- Floor not being remembered on reload after "Bring Players" action
- Shape pasting not properly increasing badge counters
- Default vision shapes always acting as tokens (regardless of isToken)
- Map tool aspect ratio lock no longer working
- Modals will now change location when resizing the window would put them out of the visible screen area
- Fix scroll bars being visible due to dice canvas not being sized strictly
- Fix movement blockers intersecting with themselves when moving on the token layer
- Fix assets becoming invisible when using a subpath setup (only applies to new assets)
- Fix colour picker not allowing to change the rgba/hsla/hex values manually
- Account removal not properly redirecting to login
- Selecting a shape that was drawn in reveal mode no longer removes shadow during selection
- Removing an asset would remove any campaign using it as their logo
- Aura direction number input not synching change to server
- Some memory leaks when changing locations
- Floor lighting behaviour for late loading images
- DDraft uploads not progressing in the asset manager
- DDraft lights not properly being configured
- [asset-manager] Asset manager would not check for stale files when removing a folder

### Performance

- Cache Shape.points to prevent frequent recalculations

## [0.29.0] - 2021-10-28

### Added
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
################################
# Build stage for the frontend #
################################
FROM node:12-alpine as BUILDER
FROM node:16-alpine as BUILDER

WORKDIR /usr/src/client

Expand All @@ -12,6 +12,8 @@ RUN apk add --no-cache python3 make g++
COPY client/package.json client/package-lock.json ./
RUN npm i

ARG PA_BASEPATH="/"

COPY . /usr/src
RUN npm run build

Expand All @@ -21,7 +23,7 @@ COPY Dockerfiles/server_config_docker.cfg /usr/src/server/server_config.cfg
###############
# Final stage #
###############
FROM python:3.6-slim
FROM python:3.9-slim

ARG DOCKER_TAG
ARG SOURCE_COMMIT
Expand Down Expand Up @@ -50,5 +52,8 @@ COPY --from=BUILDER --chown=9000:9000 /usr/src/server/ .

USER 9000

ARG PA_BASEPATH="/"
ENV PA_BASEPATH=$PA_BASEPATH

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD [ "python", "-u", "planarserver.py"]
2 changes: 2 additions & 0 deletions Dockerfiles/server_config_docker.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ssl_privkey = cert/privkey.pem
save_file = data/planar.sqlite
#public_name =

allow_signups = true

[APIserver]
# The API server is an administration server on which some API calls can be made.
# It should use a different port or socket than the main webserver.
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center"><a href="https://planarally.io" target="_blank" rel="noopener noreferrer"><img width="200" src="https://planarally.io/assets/general/Logo_PlanarAlly_V1.png" alt="PlanarAlly logo"></a></p>
<p align="center"><a href="https://planarally.io" target="_blank" rel="noopener noreferrer"><img width="200" src="https://planarally.io/assets/general/Logo_with_background.png" alt="PlanarAlly logo"></a></p>

<p align="center">
<a href="https://github.com/Kruptein/PlanarAlly/releases"><img src="https://img.shields.io/github/downloads/kruptein/planarally/total.svg" alt="Downloads"></a>
Expand All @@ -10,11 +10,9 @@

# PlanarAlly

_This project is still in active development; multiple bugs or structure changes can and will happen_

A companion tool for when you travel into the planes.

PlanarAlly is a web tool that adds virtual battlemaps with various extras to your D&D toolbox.
PlanarAlly is a web tool that adds virtual battlemaps with various extras to your TTRPG/D&D toolbox.

Some key features are:

Expand All @@ -25,7 +23,8 @@ Some key features are:
**Infinite canvas**: When a limited workspace is still not enough!\
**Dynamic lighting**: Increase your immersion by working with light and shadows.\
**Player vision**: Limit vision to what your token(s) can see. Is your companion in a different room, no light for you!\
**Initiative tracker**: Simple initiative tracker
**Initiative tracker**: Simple initiative tracker\
**Floors!**: Look down upon lower floors when standing on a balcony!

This tool is provided free to use and is open source.

Expand All @@ -41,7 +40,7 @@ For more information on how to use/install PA, see the documentation.

User documentation can be found [here](https://planarally.io/docs/).

This is still a work in progress, so some elements may still be undocumented or outdated. If you wish to contribute to the docs, they are hosted in a different [repository](https://github.com/Kruptein/planarally-docs).
If you wish to contribute to the docs, they are hosted in a different [repository](https://github.com/Kruptein/planarally-docs).

# Contributing

Expand Down
13 changes: 13 additions & 0 deletions admin-client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: ["plugin:vue/vue3-recommended", "prettier"],
rules: {
"vue/html-indent": off,
"vue/html-self-closing": 0,
"vue/max-attributes-per-line": 0,
},
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: "module",
},
};
5 changes: 5 additions & 0 deletions admin-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
11 changes: 11 additions & 0 deletions admin-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Vue 3 + Typescript + Vite

This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

## Recommended IDE Setup

- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)

## Type Support For `.vue` Imports in TS

Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.
13 changes: 13 additions & 0 deletions admin-client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PlanarAlly Admin Dashboard</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 9129e59

Please sign in to comment.