Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
80f3ee3
Merge pull request #12 from johnpooch/johnpooch/title-favicon
johnpooch Jan 4, 2025
da8fc0b
Merge pull request #13 from johnpooch/johnpooch/phases
johnpooch Jan 9, 2025
cc88213
Merge pull request #2 from johnpooch/johnpooch/add-readme
johnpooch Jan 9, 2025
e0e0857
Merge pull request #14 from johnpooch/johnpooch/phases
johnpooch Jan 9, 2025
3870680
Add order outcomes
Jan 10, 2025
b2d061c
case
Jan 10, 2025
0c11b3a
Fix casing
Jan 10, 2025
c1d91a8
Merge pull request #16 from johnpooch/johnpooch/order-resolutions
johnpooch Jan 10, 2025
274de07
Move contexts to context sub-folder
Jan 10, 2025
36b6b78
Refactor IconButton usage in PhaseSelect component to use StyledIconB…
Jan 10, 2025
400fa47
Add "Invalid" outcome to orders utility and update label and icon map…
Jan 10, 2025
2045051
wip
Jan 10, 2025
066b362
Add utility functions for order formatting and resolution transformat…
Jan 10, 2025
edc6502
wip
Jan 27, 2025
6770970
Refactor game-related hooks and components; remove unused files and c…
Jan 27, 2025
43f9e36
wip
Jan 27, 2025
fc3b451
Add styles for tabs in My Games screen to ensure full-width display
Jan 27, 2025
15a3178
Refactor Login screen layout; replace Card with Stack for improved st…
Jan 27, 2025
f2aa506
Implement player info and game info
Jan 28, 2025
86d4285
Add Google Fonts and update theme typography to use 'Cabin' font
Jan 29, 2025
0488692
wip
Jan 29, 2025
11330ba
wip
Jan 29, 2025
8e09609
Refactor game detail screen: separate Map and Orders components, remo…
Jan 29, 2025
25eae91
Enhance orders display: add AppBar with navigation and group orders b…
Jan 29, 2025
c5fc93a
Add GameDetailAppBar component and integrate it into Map and Orders s…
Jan 29, 2025
70f2dfa
Update navigation items to use dynamic gameId for routing in GameDeta…
Jan 30, 2025
e20d77e
Add game-info and player-info routes; enhance GameDetailAppBar with n…
Jan 30, 2025
740611d
Enhance PhaseSelect component for mobile responsiveness; update GameD…
Jan 30, 2025
73f0809
Add Chat screen and integrate it into routing; create MapOrders compo…
Jan 30, 2025
2682230
Add OrderList component and use it in Orders screen; refactor useOrde…
Jan 30, 2025
ba66c5a
update favicon
Jan 30, 2025
3920d79
Update favicon
Jan 30, 2025
644dc57
Refactor game-related schemas and enhance GameCard component with joi…
Jan 31, 2025
3597735
Refactor CreateOrder hook and enhance Orders screen with a bottom she…
Jan 31, 2025
2b46dbb
Add message and channel schemas; update service to handle messages an…
Feb 2, 2025
871bf56
Refactor CreateOrder component; add ChannelList component and update …
Feb 2, 2025
6541eaf
Add chat
Feb 3, 2025
c50d1d8
Add desktop chat
Feb 3, 2025
62ac28e
Add styled desktop chat
Feb 4, 2025
54f4874
Refactor GameCard component to streamline navigation logic and update…
Feb 4, 2025
0af8f86
Add telemetry service and update variant handling in order utilities
Feb 4, 2025
634510e
Add telemetry service for error logging and update middleware to trac…
Feb 4, 2025
546ae24
Refactor login screen structure and add CreateOrder component for ord…
Feb 4, 2025
acc4c3f
Remove chat components and add GameDetailMenu for improved game detai…
Feb 4, 2025
0c5d68b
Add useGetUserPhaseStateQuery hook and integrate it into order manage…
Feb 5, 2025
7b77a98
Refactor game schema to update ActiveBans structure for improved user…
Feb 5, 2025
e4e876e
Add IMapEditor interface for map editing functionality
Feb 5, 2025
ba0eff2
restructure layout
Feb 7, 2025
80e0df4
s
Feb 7, 2025
9abe0ff
f
Feb 7, 2025
bef91f3
s
Feb 7, 2025
f7cd50a
t
Feb 7, 2025
c19ada0
t
Feb 7, 2025
d4e4447
Add web.config for URL rewriting to support React routes
Feb 7, 2025
affce4f
Replace web.config with staticwebapp.config.json for React route hand…
Feb 7, 2025
33831f8
Add spacing component to HomeLayout for mobile view
Feb 9, 2025
593c02b
Refactor GameCard component layout for improved readability and struc…
Feb 9, 2025
58a508c
Increase token duration in login URL to 100 years for extended sessio…
Feb 9, 2025
4caa514
Add CreateChannelAction component and update channel-related exports
Feb 9, 2025
78f380d
Add interactive map
Feb 12, 2025
66e8715
Wip
Feb 12, 2025
991673a
Merge pull request #28 from johnpooch/johnpooch/interactive-map
johnpooch Feb 12, 2025
5a998bd
Improved Cross
JorenC Feb 12, 2025
4e22083
Adding units
JorenC Feb 12, 2025
3ea2fd5
Arrows now work
JorenC Feb 12, 2025
1ae9db6
Added support order
JorenC Feb 12, 2025
e998d9e
Update SC rendering
JorenC Feb 12, 2025
f39ad4d
Better Octagon colour
JorenC Feb 12, 2025
c9ac42c
Added Convoy Arrow
JorenC Feb 12, 2025
fb1dc58
Tokenize values
JorenC Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions .github/workflows/azure-static-web-apps-blue-cliff-00777a403.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_CLIFF_00777A403 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "/dist" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_CLIFF_00777A403 }}
action: "close"
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_CLIFF_00777A403 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "/dist" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BLUE_CLIFF_00777A403 }}
action: "close"
94 changes: 47 additions & 47 deletions .github/workflows/azure-static-web-apps-nice-sand-001bca703.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_SAND_001BCA703 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
app_build_command: "npm run build-storybook"
api_location: "api" # Api source code path - optional
output_location: "/storybook-static" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_SAND_001BCA703 }}
action: "close"
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_SAND_001BCA703 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
app_build_command: "npm run build-storybook"
api_location: "api" # Api source code path - optional
output_location: "/storybook-static" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_SAND_001BCA703 }}
action: "close"
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
Expand Down
65 changes: 65 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "dev",
"type": "shell",
"command": "npm run dev",
"presentation": {
"echo": false,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": false
},
"options": {
"cwd": "${workspaceFolder}"
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "storybook",
"type": "shell",
"command": "npm run storybook",
"presentation": {
"echo": false,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": false
},
"options": {
"cwd": "${workspaceFolder}"
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "build:watch",
"type": "shell",
"command": "npm run build-watch",
"presentation": {
"echo": false,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": false
},
"options": {
"cwd": "${workspaceFolder}"
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
113 changes: 63 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,63 @@
# React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

## Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```

- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:

```js
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```
# Diplicity React

Welcome to the Diplicity React project! This project is a web client for [Diplicity](https://github.com/zond/diplicity). This project is maintained voluntarily by members of the online Diplomacy board game community.

## Get involved

We are looking for developers to get involved with the project. If you want to contribute, come say hi on the [Diplomacy Discord](chttps://discord.gg/QETtwGR).

## Project Overview

Diplicity React is a React-based web application that allows users to play the Diplomacy board game online. The application communicates with the diplicity API to manage game state, player actions, and other game-related functionalities.

- **API Link**: [diplicity API](https://github.com/zond/diplicity)
- **Application Deployment**: [Diplicity React App](https://blue-cliff-00777a403.4.azurestaticapps.net/)
- **Storybook Deployment**: [Diplicity React Storybook](https://nice-sand-001bca703.4.azurestaticapps.net/)

## Technologies Used

- **React**: A JavaScript library for building user interfaces.
- **TypeScript**: A typed superset of JavaScript that compiles to plain JavaScript.
- **Vite**: A fast build tool and development server for modern web projects.
- **Material UI**: A popular React UI framework for building responsive and accessible user interfaces.
- **Storybook**: A tool for developing UI components in isolation.

## Getting Started

### Prerequisites

Before you begin, ensure you have the following installed on your machine:

- Node.js (v14 or higher)
- NPM (v6 or higher)

### Getting started

1. Clone the repository:

```sh
git clone https://github.com/johnpooch/diplicity-react.git
cd diplicity-react
```

2. Install the dependencies:

```sh
npm install
```

3. Start the development server:

```sh
npm run dev
```

The application will be available at `http://localhost:5173`.

4. To run Storybook, use the following command:

```sh
npm run storybook
```

Storybook will be available at `http://localhost:6006`.
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" href="/favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&display=swap"
rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Diplicity</title>
<style>
html,
body,
Expand Down
Loading
Loading