Skip to content

Commit

Permalink
Merge branch 'develop' into 2769_eliminate_ts_ignore_in_AdminGameSetu…
Browse files Browse the repository at this point in the history
…p_Component
  • Loading branch information
IanMayo authored Jul 9, 2024
2 parents 8ac35f9 + 1551dbe commit 5d2128c
Show file tree
Hide file tree
Showing 11 changed files with 1,113 additions and 24 deletions.
6 changes: 5 additions & 1 deletion client/src/Components/Link.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component } from 'react'
import { connect } from 'react-redux'
import { REST_API_ROUTE, serverPath } from 'src/config'
import { setCurrentViewFromURI } from '../ActionsAndReducers/setCurrentViewFromURI/setCurrentViewURI_ActionCreators'

import 'src/themes/App.scss'
Expand All @@ -11,8 +12,11 @@ class Link extends Component {

const aNewTab = e.metaKey || e.ctrlKey
const anExternalLink = this.props.href.startsWith('http')

if (!aNewTab && !anExternalLink) {
if (this.props.href === REST_API_ROUTE) {
window.open(serverPath + REST_API_ROUTE)
}
e.preventDefault()
this.props.dispatch(setCurrentViewFromURI(this.props.href))
}
Expand Down
7 changes: 5 additions & 2 deletions client/src/Components/SidebarAdmin.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import {
ADMIN_ROUTE,
MESSAGE_TEMPLATE_ROUTE,
WELCOME_SCREEN_EDIT_ROUTE
WELCOME_SCREEN_EDIT_ROUTE,
REST_API_ROUTE
} from 'src/config'
import Link from './Link'

export default (props) => {
const menus = {
[ADMIN_ROUTE]: 'Games',
[MESSAGE_TEMPLATE_ROUTE]: 'Message Templates',
[WELCOME_SCREEN_EDIT_ROUTE]: 'Welcome Screen'
[WELCOME_SCREEN_EDIT_ROUTE]: 'Welcome Screen',
[REST_API_ROUTE]: 'REST API'
}

return (
<div id='sidebar_admin'>
{
Expand Down
2 changes: 1 addition & 1 deletion client/src/api/wargames_api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const downloadAllWargames = (): void => {
window.open(serverPath + 'downloadAll')
}

export const openFauxtonUI = ():void => {
export const openFauxtonUI = (): void => {
window.open(serverPath + 'db/_utils/')
}

Expand Down
1 change: 1 addition & 0 deletions client/src/config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const CREATE_MESSAGE_ROUTE = '/create/message'
export const EDIT_MESSAGE_ROUTE = '/edit/message'
export const GAME_SETUP_ROUTE = '/serge/gameSetup'
export const WELCOME_SCREEN_EDIT_ROUTE = '/serge/editWelcomeScreen'
export const REST_API_ROUTE = 'api-docs/'
export const EXPORT_ROUTE = '/serge/export'
export const EXPORT_MESSAGES_SUBROUTE = '/messages'
export const EXPORT_FORCES_SUBROUTE = '/foeces'
Expand Down
Binary file added server/db/storybook
Binary file not shown.
Binary file modified server/db/wargame-lw7k3gk3.sqlite
Binary file not shown.
3 changes: 3 additions & 0 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"pouchdb-replication": "^7.0.0",
"socket.io": "^4.3.1",
"sqlite3": "^5.1.6",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"uniqid": "^5.0.3"
},
"devDependencies": {
Expand All @@ -40,6 +42,7 @@
"scripts": {
"dev": "nodemon main.js",
"start": "node main.js",
"serve-openapi": "node main.js --openapi",
"lint": "eslint --fix **/*.js"
}
}
Loading

0 comments on commit 5d2128c

Please sign in to comment.