Commit graph

4660 commits

Author SHA1 Message Date
Zach H
b1ef8220ee
Support Registration on Webatrice with a baseline of handling. (#4436)
* Support Registration on Webatrice with a baseline of handling. Still needs to support activation tokens & unit testing.

* Add support for account activation with token

* Activate Account refactor

* Fix typo

* Add Unit Testing for Commands/Events

* Changes based on review feedback
2021-10-20 21:07:35 -05:00
Jeremy Letto
ebebb9c4bb
add Material UI theme support (#4437)
* add Material UI theme support

* add primary color palette

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-20 20:03:05 -04:00
Jeremy Letto
586f23cfa9
Webatrice websocket refactor (#4435)
* add unit tests for websocket events

* add unit tests for KeepAliveService, clean up keepAlive termination flow

* put keepAlive command in protobuf service and expose thru webClient

* secure wss

* rename files tsx to ts

* add localhost support for ws/wss connection

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 20:52:59 -04:00
Jeremy Letto
f75ff2a7c8
cleanup and unit tests (#4434)
* put socket.updateHistory behind SessionCommand

* rename /websocket files from .tsx to .ts

* add unit tests to websocket commands

* complete unit tests for webClient commands

* secure wss

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 16:15:09 -04:00
Jeremy Letto
e9ba195d7d
Refactor websocket into separate services, clean up socket status communication (#4433)
* Refactor websocket into separate services, clean up socket status communication

* cleanup

* add EOF lines

* fix keepalive logged in check

* undo change

* fix keepalive connection check

* cleanup

* add typings

* secure connection

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-17 01:07:30 -04:00
Jeremy Letto
19333c53f6
secure webclient socket (#4432)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-10-14 21:58:34 -04:00
Jeremy Letto
36e5a399d5
Webatrice: card import wizard (#4397) 2021-10-14 21:42:35 -04:00
Bruno Mendes
dde0f568d9
Show country flag in user list of webclient (#4431) 2021-10-14 20:59:06 -04:00
Rafael Ritzel Tischler
3bc90003b3
Fixed layout on Deck Editor not using last layout. It was reseting layout on ctor. (#4420) 2021-09-14 16:41:04 -04:00
Danny Piper
689f65b38a
Fix for poor performance with large decks (#4347)
* Fix for #4284

-> The menus have the update menu thing emitted when they get triggered.
| -> works surprising well https://youtu.be/KOOmhxvHA2c is a demo on a 10000ish card deck

* changed my comment to make sense

* fix to the issues that @ebbit1q found

what caued them idk

* Revert "fix to the issues that @ebbit1q found"

This reverts commit 20b1ad9f7a675fd3b0d1be7452f71160ce06de71.

* actual fix for the issues @ebbit1q found

* its dirty but works

* fix cards in zoneviews not having a menu

* deleted isempty check as it is updated after the check

* key binds should work now

-> menus updated on zone change/attach/retranslate UI if selected

* clangify

* remove updateCardMenu from carditem entirely

updateCardMenu is done by the player and having it in carditem led to it
often being run multiple times, I've opted to instead run it in the
player and remove the signal entirely

the new logic updates the cardMenu every time a card is set as the
activeCard in the game tab

additionally a cardmenu can change while selected if the selected card:
moves zone, is flipped, or is attached (it receives the unattach action)

this is done in the player instead now, checking if the card is the
activeCard

this however exposes a flaw in the selection management where if you
unselect a card the activeCard is set to nullptr, this was an existing
bug and causes the action on selected cards to suddenly disappear, even
if there are other cards selected!

* revert null test of aCardMenu

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-09-14 16:35:47 -04:00
tooomm
154e1084ba
CI: Separate C++ linting (#4400)
* separate cpp lint

* made executable
2021-09-14 16:11:56 -04:00
tooomm
6df5cece04
CI: Update Qt version (Windows) (#4407)
* qt patch update

* qt 5.15

* fix qtdir export

* cleanup
2021-09-14 16:11:29 -04:00
ebbit1q
c8bb8b0aae
add reset paths button to settings (#4384) 2021-09-14 16:10:40 -04:00
ebbit1q
1e995cd97c
add option to delete a user's messages (#4362)
* add option to delete a user's messages

add optional parameter remove_messages to the ban and warn commands
add event for clients to redact messages
implement server side command and message handling
implement server history removal
todo: client side implementation

add option to remove messages to moderator action dialogs

add storage of message beginnings to chatview

add redactMessage command
handle Event_RemoveMessages on rooms

this approach is favored over parsing the chatroom after the fact but
will use additional memory to store the block indexes

this also leaves a problem in that user messages from the chat backlog
are not removed in the same way because they don't have a user
associated with them

add workaround for old qt versions

add action for users to remove messages from users in chats

add chat history to userMessagePositions with regex

proper const usage for userName

allow removing the messages of unregistered users

add menus to usernames in chat history

this allows you to remove user messages on chat history as well
this also allows moderators to take actions on users in chat history

Apply suggestions from code review

* readd missing call to handler
2021-09-14 16:05:20 -04:00
ebbit1q
c25bf491e4
fix card moving on server (#4413)
* wip fix card moving on server

* fix flipped cards being moved as -1
2021-09-14 15:48:46 -04:00
ZeldaZach
affc288144 Use gmail over googlemail in all cases, as they're the same alias 2021-08-27 23:17:26 -04:00
Zach H
051be37419
Server Config Whitelist Email Providers (#4416)
* Support registration domain whitelist (registration/emailproviderwhitelist) that, if set, will require a user to have an email with one of the specified domain providers. Will require client updates to see the Whitelist message, otherwise they'll be greeted with a default alert.

This also works to remove the pain of Google Email addresses and their infinite combination of usernames for the same account (i.e. remove periods and everything after the first plus sign).

* Make blacklist response show custom dialog
2021-08-18 21:18:53 -04:00
Aren Kasner
c0bd49cf13
Fixed VCPKG folder for windows (#4406)
update vcpkg submodule
2021-08-04 03:23:42 +02:00
tooomm
2fe572c398
CI: Update Xcode versions (#4403) 2021-07-27 18:42:54 +02:00
Michael Stanaszak
904e740460
#4316: Wording change: CMC --> MV (#4388)
Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-07-27 17:30:55 +02:00
ebbit1q
00add2a527
add gtest from arch repos so it doesn't have to download it (#4378) 2021-07-27 16:42:28 +02:00
Zach H
bbe43d4246
Prevent users from being able to upload super large files via Sockets, which could inadvertently deny access to the server (#4398) 2021-07-25 20:28:14 -04:00
ebbit1q
0280fea3e6
apply chat flood prevention in games next to rooms (#4387)
* apply chat flood prevention in games next to rooms

* add limit to private messages as well
2021-06-28 01:57:46 -04:00
Joseph Chamish
a65ce8694c
selection of known hosts to form (#4379) 2021-06-15 03:12:17 -04:00
Jeremy Letto
c9ddd042fc
Webatrice: Update nav (#4380)
* wip: subnav debug

* nav redesign

* remove unnecessary code

* remove subnav

* add leaveRoom button

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-06-15 03:12:04 -04:00
ebbit1q
da9222929b
add werror flags when making a debug build using llvm (#4344)
* add werror flags when making a debug build using llvm

this would get bugs like
https://github.com/Cockatrice/Cockatrice/pull/4337
get signalled earlier to us

* fix error: 'Servatrice_DatabaseInterface::registerUser' hides overloaded virtual function

* remove unused field

* mac machines have 3 cores

see
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources

* typo
2021-06-01 21:57:37 -04:00
marsnicholas
b858e36183
Closes all library views when shuffled (#4261) (#4324) 2021-06-01 21:53:43 -04:00
ebbit1q
ebe2c494aa
remove the stop dump zone command from the protocol (#4326)
the stop dump zone command was implemented as a courtesy to other
players in order to take into account when they would stop looking at
unknown information

however, this can be abused, a malicious client can send this command
whenever they would like

cockatrice is not a physical tabletop nor does it aim to be, if you can
take a screenshot of your deck and then close the view, you are not
cheating as you have been given this information

in order to prevent anyone from abusing this we should remove the
command from the protocol, this means servers will ignore this message
and clients will get a little invalid command reply in their debug log

the extension id will remain reserved

shuffling your deck will always invalidate any card view looking at
those cards

if players wish to signal that they stopped looking at their deck for
whatever reason they should just use the chat instead, optionally using
one of the chat macros
2021-06-01 21:52:20 -04:00
Jeremy Letto
fac7bfaa92
Webatrice: Nav Update (#4367) 2021-06-01 20:47:19 -04:00
Jeremy Letto
0d05f9097d
Webatrice updates (#4366) 2021-05-21 21:23:30 -04:00
Jeremy Letto
8db9475804
Cleanup and refactor (#4361)
* fix three panel layout height issue

* rename websocket/services to websocket/persistence, implement LeaveRoom

* cleanup

* add new line eof

* move route components from /components to /containers

* remove duplicate style

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-05-18 23:06:41 -04:00
ebbit1q
294229622d
tell the filter widget that games can have 0 players now (#4359) 2021-05-18 23:03:58 -04:00
Jeremy Letto
5cf9023a21
move and rename src/websocket/instanceServices to src/api (#4360)
Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2021-05-17 21:59:32 -04:00
ebbit1q
66d24f086e
properly enable notification checkboxes (#4356) 2021-05-17 02:37:12 +02:00
tooomm
19a7c4092c
Update ci-builds.yml (#4358) 2021-05-16 23:12:49 +02:00
ebbit1q
b27cb58727
it is not possible to add a link to the wiki to this description (#4354) 2021-05-14 22:44:02 -04:00
tooomm
472f401590
Templates: Add Transifex link (#4351) 2021-05-14 19:29:11 +02:00
tooomm
744099277a
Readme: Improve CI badge (#4352)
* Improve CI badge

* fix toc
2021-05-14 18:00:30 +02:00
ebbit1q
dff25a175b
fix status badge (#4350) 2021-05-13 12:51:50 -04:00
ebbit1q
61f1141fe8
fix #3840 (#4348) 2021-05-13 12:51:34 -04:00
tooomm
0a73162bcf
Beta releases: collapsable list of changes (#4339)
* add collapsable list

* make it show commit count

* why not have it also know the release type and name

* update the template as well

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-05-12 17:27:20 +02:00
ebbit1q
5f32892e75
check if player is null when updating card menu (#4346) 2021-05-12 09:51:56 -04:00
ebbit1q
ae7437750b
do not edit the zone currently iterated on (#4345)
this can cause the iterator to become invalidated which will crash but
because of the data not always being moved it will often still work as
intended, giving the idea that it is random
2021-05-10 13:21:12 -04:00
Zach H
046a3649ed
Revert "add werror flags when making a debug build using llvm (#4338)" (#4343)
This reverts commit 890810f5b9.

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2021-05-10 11:32:23 -04:00
ebbit1q
890810f5b9
add werror flags when making a debug build using llvm (#4338)
this would get bugs like
https://github.com/Cockatrice/Cockatrice/pull/4337
get signalled earlier to us
2021-05-10 02:11:40 -04:00
Zach H
8fb561b4c4
Fix regression from #4281 which caused crash with QList and GCC race time (#4341) 2021-05-09 14:50:48 -04:00
Zach H
b9c4b496e4
Fix regression from #4281 which caused crash if card was null (#4340) 2021-05-09 13:10:13 -04:00
ebbit1q
ff6f28390a
fix macos update logic (#4337) 2021-05-08 23:16:52 -04:00
ebbit1q
e034de9083
don't log in users while giving them an error for missing the clientid (#4335) 2021-05-08 18:12:05 -04:00
ebbit1q
ecf57b4226
add fedora 34 and ubuntu 21.04 (#4331)
* add fedora 34 and ubuntu 21.04

* remove qt5-default from ubuntu 21.04

apparently it's not required?

* disable tests on fedora 34
2021-05-08 00:24:38 -04:00