Skip to content

Commit

Permalink
Merge pull request #196 from Noita-Together/next
Browse files Browse the repository at this point in the history
0.11.0
  • Loading branch information
SkyeOfBreeze committed Aug 25, 2024
2 parents 8e08d8b + c6b920f commit 97de441
Show file tree
Hide file tree
Showing 11 changed files with 417 additions and 126 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy-linux-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Linux Dev

on:
push:
tags:
- 'dev-*'

#for uploading release exe
permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
environment: dev

steps:
- uses: actions/checkout@v3
- name: 'Create env file'
working-directory: ${{ github.workspace }}/nt-app/
run: |
touch .env
echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env
echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env
echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env
cat .env
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn workspace nt-app electron:build --publish never
- run: ls ${{ github.workspace }}/nt-app/dist_electron/
- working-directory: "${{ github.workspace }}/nt-app/dist_electron/"
run: |
mkdir ${{ github.workspace }}/build
cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml
cp ./*.AppImage ${{ github.workspace }}/build/
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/build/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
44 changes: 44 additions & 0 deletions .github/workflows/deploy-linux-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Linux Production

on:
push:
tags:
- 'v*'

#for uploading release exe
permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
environment: prod

steps:
- uses: actions/checkout@v3
- name: 'Create env file'
working-directory: ${{ github.workspace }}/nt-app/
run: |
touch .env
echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env
echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env
echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env
cat .env
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn workspace nt-app electron:build --publish never
- run: ls ${{ github.workspace }}/nt-app/dist_electron/
- working-directory: "${{ github.workspace }}/nt-app/dist_electron/"
run: |
mkdir ${{ github.workspace }}/build
cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/build/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
45 changes: 45 additions & 0 deletions .github/workflows/deploy-windows-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Windows Dev

on:
push:
tags:
- 'dev-*'

#for uploading release exe
permissions:
contents: write

jobs:
build:
runs-on: windows-latest
environment: dev

steps:
- uses: actions/checkout@v3
- name: 'Create env file'
working-directory: ${{ github.workspace }}/nt-app/
run: |
touch .env
echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env
echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env
echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env
cat .env
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn workspace nt-app electron:build --publish never
- run: ls ${{ github.workspace }}/nt-app/dist_electron/
- run: |
mkdir ${{ github.workspace }}/build
cp "${{ github.workspace }}/nt-app/dist_electron/latest.yml" ${{ github.workspace }}/build/latest.yml
cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe" ${{ github.workspace }}/build/
cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe.blockmap" ${{ github.workspace }}/build/
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/build/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
45 changes: 45 additions & 0 deletions .github/workflows/deploy-windows-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy Windows Production

on:
push:
tags:
- 'v*'

#for uploading release exe
permissions:
contents: write

jobs:
build:
runs-on: windows-latest
environment: prod

steps:
- uses: actions/checkout@v3
- name: 'Create env file'
working-directory: ${{ github.workspace }}/nt-app/
run: |
touch .env
echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env
echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env
echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env
cat .env
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn workspace nt-app electron:build --publish never
- run: ls ${{ github.workspace }}/nt-app/dist_electron/
- run: |
mkdir ${{ github.workspace }}/build
cp "${{ github.workspace }}/nt-app/dist_electron/latest.yml" ${{ github.workspace }}/build/latest.yml
cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe" ${{ github.workspace }}/build/
cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe.blockmap" ${{ github.workspace }}/build/
- name: Upload files to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/build/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
37 changes: 37 additions & 0 deletions .idea/noita-together.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions nt-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nt-app",
"version": "0.10.10",
"version": "0.11.0",
"author": "Noita-Together",
"description": "Allows you to play noita with friends...",
"repository": "https://github.com/Noita-Together/noita-together",
Expand All @@ -18,29 +18,29 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"@popperjs/core": "^2.6.0",
"electron": "9.4.4",
"electron-updater": "5.0.6",
"fs-extra": "^11.1.1",
"got": "^11.8.1",
"electron": "^11.5.0",
"electron-updater": "6.3.0",
"fs-extra": "^11.2.0",
"got": "^11.8.6",
"jsonwebtoken": "^9.0.2",
"keytar": "^7.2.0",
"uuid": "^9.0.0",
"validator": "^13.5.1",
"vue": "^2.6.11",
"vue-form-json-schema": "^2.9.2",
"keytar": "^7.9.0",
"uuid": "^9.0.1",
"validator": "^13.12.0",
"vue": "^2.7.16",
"vue-form-json-schema": "^2.9.5",
"vue-router": "^3.2.0",
"vuex": "^3.6.0",
"ws": "^7.4.2"
"vuex": "^3.6.2",
"ws": "^7.5.10"
},
"devDependencies": {
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"electron-devtools-installer": "3.1.0",
"eslint": "^6.7.2",
"@vue/cli-service": "~4.5.19",
"electron-devtools-installer": "^3.2.0",
"eslint": "^6.8.0",
"eslint-plugin-vue": "^6.2.2",
"vue-cli-plugin-electron-builder": "~2.0.0-rc.5",
"vue-template-compiler": "^2.6.11"
"vue-cli-plugin-electron-builder": "^2.1.1",
"vue-template-compiler": "^2.7.16"
},
"installConfig": {
"hoistingLimits": "workspaces"
Expand Down
4 changes: 2 additions & 2 deletions nt-app/src/components/vRoomFlags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<div class="orb-input">
<vInput
:disabled="!isHost || !tempFlags.NT_sync_orbs.value"
min="0"
:min=0
type="number"
v-model.number="tempFlags.NT_sync_orb_count.value"
ref="orbInput"
Expand All @@ -69,7 +69,7 @@
<div class="world-seed">
<vInput
:disabled="!isHost"
min="0"
:min=0
type="number"
v-model.number="tempFlags.NT_sync_world_seed.value"
ref="seedInput"
Expand Down
32 changes: 20 additions & 12 deletions nt-app/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,22 +523,31 @@ export default new Vuex.Store({
state.roomChat = []
},
userJoinedRoom: (state, payload) => {
state.room.users.push({
userId: payload.userId,
name: payload.name,
owner: false,
color: randomColor(payload.name),
readyState: {
ready: false,
//assume that connected user is already a user, unless we don't find them
let existingUser = state.room.users.find((user => user.userId === payload.userId))
let user = existingUser
if(!user){
//user does not exist yet. create an object to hold their data
user = {
userId: payload.userId,
name: payload.name,
owner: false,
color: randomColor(payload.name),
}
}
user.readyState = {
ready: false,
seed: "",
mods: []
}
})
}
if(existingUser) return
//user does not exist yet. push the user to the users table
state.room.users.push(user)
},
userLeftRoom: (state, payload) => {
const users = state.room.users
for (const [i, user] of users.entries()) {
if (user.userId == payload.userId) {
if (user.userId === payload.userId) {
users.splice(i, 1)
}
}
Expand All @@ -559,15 +568,14 @@ export default new Vuex.Store({
":" +
("0" + time.getMinutes()).slice(-2)
const found = state.room.users.find(
(user) => user.userId == payload.userId
(user) => user.userId === payload.userId
)
let userColor = randomColor(payload.name)
userColor = (found && found.color) || userColor
let userRegex = new RegExp(`(@${state.user.name})(?= |$)`, "i")
let messageClass = userRegex.test(payload.message)
? "mention"
: "chat-entry"
console.log(payload.name)
let messageSpans = payload.message
.split(userRegex)
.filter(String)
Expand Down
Loading

0 comments on commit 97de441

Please sign in to comment.