Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek committed Oct 4, 2022
2 parents 4138cde + e686598 commit d4ade93
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 27 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ Mindmapping made simple: Host and create your own mindmaps. Share your mindmap s

TeamMapper is based on mindmapp (https://github.com/cedoor/mindmapp , discontinued). In contrast to mindmapp, TeamMapper features shared mindmapping sessions for your team based on websockets.

![TeamMapper Screenshot](docs/teammapper-screenshot.png?raw=true "TeamMapper Screenshot with two users")

## Features:

- Host and create your own mindmaps
- Set node images, colors and font properties.
- Shortcuts
- Import and export functionality (JSON, PDF, PNG...)
- Import and export functionality (JSON, SVG, PDF, PNG...)
- Mutli user support: Share your mindmap with friends and collegues. Work at the same time on the same mindmap!
- Use a QR Code or URL to share your maps
- By default, mindmaps are deleted after 30 days to ensure GDPR compliancy.

## Getting started
Expand All @@ -26,15 +29,13 @@ TeamMapper is based on mindmapp (https://github.com/cedoor/mindmapp , discontinu
- Start frontend and backend at once

```bash
docker-compose exec app sh
# Inside docker container, you execute the following
npm --prefix teammapper-backend run dev
docker-compose exec app npm --prefix teammapper-backend run dev
```

or start frontend and backend separately

```bash
# Open to terminal session on your host machine
# Open two terminal sessions on your host machine
# In first terminal session
docker-compose exec app npm --prefix teammapper-backend start
Expand Down Expand Up @@ -125,7 +126,7 @@ docker-compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod
Example of running sql via typeorm:

```
npx typeorm query "select * from mmp_node" --config dist/ormconfig.js
docker-compose --file docker-compose-prod.yml --env-file .env.prod exec app_prod npx --prefix teammapper-backend typeorm query "select * from mmp_node" --config dist/ormconfig.js
```

### Further details
Expand Down
1 change: 1 addition & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
image: postgres:12-alpine
# Pass config parameters to the postgres server.
# Find more information below when you need to generate the ssl-relevant file your self
# In case you dont plan to use a certificate, uncomment this line
command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
environment:
PGDATA: /var/lib/postgresql/data/pgdata
Expand Down
Binary file added docs/teammapper-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 0 additions & 16 deletions teammapper-backend/src/map/services/maps.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,4 @@ export class MapsService {
deleteMap(uuid: string) {
this.mapsRepository.delete({ id: uuid });
}

// In case cascade is too slow, this is a WIP
// async recursiveFindAllNodeChildren(node: MmpNode): Promise<MmpNode[]> {
// const children = await this.nodesRepository.find({
// where: {
// nodeParentId: node.id,
// nodeMapId: node.nodeMapId,
// }
// });

// if (children === undefined || children.length === 0) return [];

// return (await Promise.all(children.map(async (node: MmpNode): Promise<MmpNode[]> => {
// return [node, ...await this.recursiveFindAllNodeChildren(node)];
// }, []))).flat()
// }
}
2 changes: 1 addition & 1 deletion teammapper-frontend/mmp/src/map/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Options implements OptionParameters {

// Default node properties
this.defaultNode = Utils.mergeObjects({
name: 'Node',
name: '',
image: {
src: '',
size: 60
Expand Down
4 changes: 2 additions & 2 deletions teammapper-frontend/mmp/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ export default class Utils {
sel = window.getSelection()

element.focus()
range.setStart(element.firstChild, 0)
range.setEnd(element.firstChild, element.firstChild.textContent.length)
range.selectNodeContents(element)
range.collapse(false)
sel.removeAllRanges()
sel.addRange(range)
}
Expand Down
3 changes: 2 additions & 1 deletion teammapper-frontend/src/app/core/services/mmp/mmp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class MmpService {
* Add a node in the mind mmp.
*/
public addNode (properties?: ExportNodeProperties, notifyWithEvent = true) {
const newProps: UserNodeProperties = properties || {}
const newProps: UserNodeProperties = properties || { name: '' }
// when the method is called with no params (from shortcut service), use the current selected node as parent
const parent = properties?.parent ? this.getNode(properties.parent) : this.selectNode()
const settings = this.settingsService.getCachedSettings()
Expand All @@ -142,6 +142,7 @@ export class MmpService {
}

this.currentMap.instance.addNode(newProps, notifyWithEvent, properties?.parent, properties?.id)
this.editNode()
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class ShortcutsService {
this.mmpService.addNode()
}
}, {
keys: '-',
keys: ['-', 'backspace'],
description: 'TOOLTIPS.REMOVE_NODE',
callback: () => {
this.mmpService.removeNode()
Expand Down

0 comments on commit d4ade93

Please sign in to comment.