Commit graph

4580 commits

Author SHA1 Message Date
ebbit1q
90679d5669
fix issues with #4648 (#4864) 2023-08-18 12:34:17 -04:00
transifex-integration[bot]
ac5dc2578a
Translate cockatrice/cockatrice_en@source.ts in de (#4861)
100% translated source file: 'cockatrice/cockatrice_en@source.ts'
on 'de'.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-08-13 20:51:02 +02:00
tooomm
671e6823be
cleanup vcpkg.json (#4859) 2023-08-11 13:35:59 +02:00
github-actions[bot]
0d76662311
Update translation source strings (#4843)
Co-authored-by: github-actions <github-actions@github.com>
2023-08-10 22:37:17 +02:00
tooomm
8dd59cf3cf
CI: Bump GitHub actions + submodule (#4852)
* Bump used actions

* Update vcpkg submodule (#4857)

* Pause npm updates for webclient (#4853)

* Bump peter-evans/create-pull-request from 4 to 5 (#4846)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update vcpkg

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vcpkg action to v11

* Update vcpkg cache setting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-09 12:28:16 +02:00
dependabot[bot]
332d25dc00
Bump peter-evans/create-pull-request from 4 to 5 (#4846)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 23:21:26 +02:00
tooomm
0fa81a77dc
Pause npm updates for webclient (#4853) 2023-08-08 13:17:28 +02:00
tooomm
9a74d8f72d
update link (#4845) 2023-08-06 22:46:02 -04:00
Zach H
8c539351e3
Fix Mac Builds (#4844) 2023-08-06 22:45:45 -04:00
ebbit1q
e3552fc0ae
add more default shortcuts (#4349)
* add more default shortcuts

replace the ctrl a look at top of library shortcut with ctrl shift n
use ctl a for draw arrow
replace ctrl shift b for toggle sideboard lock
use ctrl b for move card to bottom of library
use ctrl shift l for start local game
add keyboard shortcuts for all 3 counter colors using , . / keys
use ctrl [ ] \ for the "other" counter
add ctrl = as an easy alternative to ctrl + for people without keypads
( on linux ctrl alt keypad + is a special key that is reserved in x
  it produces the XF86_Next_VMode keyboard event which isn't bindable )
use alt u for toggling untapping
use alt l for peeking at cards
use ctrl alt u for unattaching cards
use alt n for set annotation
use alt y for milling one card

* use alt f for flipping cards
2023-08-06 17:56:24 -04:00
tooomm
ca308636c3
CI: Add automatic PR creation for source string updates (#4544)
* wording

* add pr creation

* Update translations.yml

* Update translations.yml

* update translation workflow

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* skip ci update

* skip ci update

* update conditions

* remove empty line

* typo

* tee test

* cleanup

* pass data between steps

* opt for step output over env variable

* remove space

* create script

* wording

* fix fork protection, re-add pr run

* updates

* Update translations.yml

* adjust for new source paths

* update comment

* wording

Co-authored-by: ebbit1q <ebbit1q@gmail.com>

* wording

* reorder

* reorder

* fix deprecation of set-output

* fix version

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-08-06 17:55:50 -04:00
ebbit1q
244cb847fb
replace trayicon activation with menu actions (#4632) 2023-08-06 17:55:02 -04:00
tooomm
176c52daf2
Enable Dependabot (#4795)
* add dependabot file

* disable submodules for now
2023-08-06 17:54:17 -04:00
tooomm
ee3525ec64
Webclient: Brazilian translations are doubled (#4809)
* cleanup old brazilian translations

* pt-br --> pt_br

* pt-br --> pt_br

* pt-br --> pt_br
2023-08-06 17:53:55 -04:00
dependabot[bot]
adce921be7
Bump protobufjs from 7.1.2 to 7.2.4 in /webclient (#4827)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.1.2 to 7.2.4.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.1.2...protobufjs-v7.2.4)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:41 -04:00
dependabot[bot]
20ceb1c284
Bump semver from 6.3.0 to 6.3.1 in /webclient (#4829)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:32 -04:00
dependabot[bot]
db4364b8f8
Bump tough-cookie from 4.1.2 to 4.1.3 in /webclient (#4828)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:25 -04:00
dependabot[bot]
48d6435e09
Bump word-wrap from 1.2.3 to 1.2.4 in /webclient (#4831)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-06 17:53:18 -04:00
ebbit1q
7c20e9ab34
add move cards from top of library until dialog (#4648)
a bit of a hack, the client will use the play top card action and then
compare it with the propmpted expression, as if you were cascading
normally but really fast

the new keybind for this is ctrl shift y

I have ratelimited the action to 10 cards a second
2023-08-06 17:53:07 -04:00
ebbit1q
cb52605928
use a regex to remove all reserved characters from file names (#4804) 2023-08-06 17:46:22 -04:00
Guangcong Luo
bd3100dcda
Update macOS Monterey app icon (#4805) 2023-08-06 17:46:03 -04:00
ebbit1q
afb7c35cfd
add a way to replace the user facing list of disallowed words (#4807) 2023-08-06 17:45:37 -04:00
tooomm
5b694a55d2
CI: Remove fedora 36 (#4799)
* remove fedora 36

* remove fedora 36

* remove fedora 36
2023-08-04 02:02:44 +02:00
SlightlyCircuitous
f750a4cd72
Remove Ubuntu 22.10 Kinetic Kudu Build (#4826) 2023-07-25 21:34:18 -04:00
SlightlyCircuitous
eddeaaf52a
Add Debian 12 "Bookworm" Build (#4812) 2023-06-14 20:28:12 -04:00
tooomm
2b42bee424
Webclient: lint (#4810)
* lint

* lint
2023-05-14 00:09:40 +02:00
SlightlyCircuitous
b9706c0cc1
Add indentation (#4806)
Improves readability
2023-05-09 17:08:06 -04:00
transifex-integration[bot]
800b21b000
Apply translations in pt_BR (#4801)
100% translated for the source file 'cockatrice/cockatrice_en@source.ts'
on the 'pt_BR' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-05-09 17:07:23 -04:00
transifex-integration[bot]
d1736a25bb
Translate webclient/src/i18n-default.json in pt_BR (#4800)
100% translated for the source file 'webclient/src/i18n-default.json'
on the 'pt_BR' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-05-09 17:06:40 -04:00
ebbit1q
f269e5fe58
add fedora 38, scheduled to release next week (#4785) 2023-04-30 14:21:13 +02:00
tooomm
45a5296013
CI: Fix versions before deprecation (#4798)
* fix deprecation warning

* fix deprecation warning
2023-04-30 13:51:09 +02:00
SlightlyCircuitous
5f0ab2a177
CPack DMG Installer with Background Image (#4787)
* Set some CPack variables

WIP for DMG background image

* Use a .tif for background

* Add Background image and DS_Store script

Script is from https://www.kitware.com//creating-mac-os-x-packages-with-cmake/ with cmake.app changed to cockatrice.app

* Add position for all icons

* Adjust background size and icon position

This draws dbconverter off the screen as a hack to hide it, so hopefully it doesn't break.

* Add files via upload

* Change Icon Position

Icon position is probably relative to the window edge, not the edge of the screen so the numbers should be lower.

* Adjust Icon Position and Window Boundaries

Applescript seems to use the center of the icon rather than the left corner so the coordinates need to be adjusted by 64 px. 

The finder window counts the 22 px of the title bar in the window size so 22 must be added to the fourth coord of position to fit the entire image.

* Fix spelling of Servatrice

* Satifsfy Code Style

* Use vector format (eps)

* Delete background.tif

* Use vector format (eps)

* Use the right file extention in the script

* Point to svg

* Use svg

* Add svg for background image

* Delete background.eps

* Use plain SVG, adjust text

* Move applescript to /cmake

* Move background to /cmake

* Point CPack to /cmake

background and applescript now reside there

* Revert to .tif

* Use compressed .tif

* Use more specific file name

* Script expects .background:background.tif
2023-04-29 23:13:01 -04:00
ebbit1q
70ab02987a
save sets dialog size (#4791)
* save sets dialog size

* reset sorting when restoring

* add to gitignore
2023-04-29 23:10:59 -04:00
ebbit1q
421da882d8
qt 6.5 compatibility (#4796)
* remove metatypes definitions

* deprecation of QApplication::setActiveWindow
2023-04-29 23:09:26 -04:00
SlightlyCircuitous
1a40102f71
Remove Debian 10 "Buster" Build (#4789)
* Drop Debian 10 Support

EOL September 10 2022

* Drop Debian 10 Support

EOL September 10, 2022

* Drop Debian 10 Support

EOL September 10, 2022
2023-04-19 23:04:35 +02:00
SlightlyCircuitous
1fbc10cd77
Add Ubuntu 23.04 Lunar Lobster Build (#4784)
* Create Lunar Dockerfile

Note that qt6-svg-dev and qt6-websockets-dev are renamed replacements for libqt6svg6-dev and libqt6websockets6-dev, respectively.

* Add Ubuntu Lunar

* Add Ubuntu Lunar to Template
2023-04-12 22:31:39 +02:00
skwerlman
87462398d8
show deck hash even when its invalid (#4595)
* show deck hash even when its invalid

* remove invalid deck hashes entirely

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-04-10 22:29:29 +02:00
dependabot[bot]
b33246b29f
Bump loader-utils from 2.0.3 to 2.0.4 in /webclient (#4707)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-01 22:31:44 -04:00
transifex-integration[bot]
dbffe30f63
Translate /webclient/src/i18n-default.json in es (#4657)
translation completed for the source file '/webclient/src/i18n-default.json'
on the 'es' language.

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
2023-04-01 22:30:59 -04:00
ebbit1q
9ce450d0b0
add _substr_[pos]_[len] to picture download templates (#4762) 2023-04-01 22:29:57 -04:00
ebbit1q
f5f8acf1fd
save downloaded xmls (#4736) 2023-04-01 22:19:57 -04:00
tooomm
304ed3cd60
UI: User info dialog updates (#4533) 2023-04-01 21:50:49 -04:00
dependabot[bot]
07248692ce
Bump webpack from 5.74.0 to 5.76.1 in /webclient (#4774)
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.74.0...v5.76.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-15 23:46:50 -04:00
Brent Clark
cef99cba71
Add left nav (#4705)
* Automated translation update ( bf08a04cda )

* Add Layout component wip

* finish layout implementation

* convert header to left nav

* better nav item spacing

* return source files to original glory

* lint fix

* Remove height limit on login screen

* fix top spacing on 3-panel layout

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Brent Clark <brent@backboneiq.com>
2023-03-15 23:45:55 -04:00
SlightlyCircuitous
cab5f29b57
Add 'persistent' as valid attribute of related (#4771) 2023-03-10 02:36:17 +01:00
Basile Clement
55a2f75d16
Make cards rounded (#4765)
* Make cards rounded

Magic cards have rounded corners, and playing cards tend to have rounded
corners as well, but Cockatrice currently displays rectangular cards.

This can cause visual glitches when using image scans where the border
does not extend in the corner, and for this reason Cockatrice always
draws a (rectangular) border around the card to try and make it look a
bit better.

In this patch I take a different approach: rather than try to make
rounded pegs, er, cards, go into a square hole, the hole is now rounded.
More precisely, the AbstractCardItem now has a rounded rectangular shape
(with a corner of 5% of the width of the card, identical to that of
modern M:TG physical cards).

As a side effect, the card drawing gets a bit simplified by getting rid
of transformPainter() when drawing the card outline and using the
QPainter::drawPixmap overloads that takes a target QRectF instead.  This
means we no longer have to bother about card rotation when painting
since that's taken care of by the Graphics View framework (which
transformPainter() undoes).

* format

* Also give PileZone rounded corners

* Forgot untap status + bits of CardDragItem

* fix deckviewcard calculations

* Rounded CardInfoPicture
2023-03-07 01:41:08 +01:00
ebbit1q
a416ee8f2b
set target to sha in release creation (#4763) 2023-03-03 11:40:16 -05:00
Basile Clement
c14936c63c
PictureLoader: Replace downloadedPics cache with QNetworkCache (#4756)
* PictureLoader: Replace downloadedPics cache with QNetworkCache

Currently when the "Download card pictures on the fly" option is
enabled, Cockatrice stores downloaded pictures into a downloadedPics
sub-folder, keyed on set and card name. If a picture is found in that
folder, we never try to download a picture for that card ever again
(until it is reprinted in a more recent set, I guess).

This has the unfortunate consequence that if you change the URLs for
downloading card images, the changes are not applied to cards that
already have their picture downloaded. In particular, if you use
localized card pictures (through !sflang!), you get a mix of cards in
different languages depending on the currently configured language at
the time each card was downloaded.

This patch removes that mechanism in favor of setting a
QNetworkDiskCache on the QNetworkAccessManager used by the PictureLoader
to download pictures. The QNetworkDiskCache caches the picture keyed on
their URL: if the URL changes, a new request will be made. In
particular, if you use picture URLs with !sflang! and change the
language, pictures for the current language will be downloaded even for
cards that already have a picture. The QNetworkDiskCache is configured
with a maximum size of 4GB, which should be enough to hold one
high-quality JPEG for each M:TG card in existence.

Note that this does not affect the existing mechanism for defining
custom card art, either through the CUSTOM directory or the set-based
one.  Cockatrice will still read existing cards in the downloadedPics
directory as before, it will just no longer write into that directory
(since pictures are cached by the QNetworkDiskCache instead). To fully
switch to the new cache, users should use the "Delete Downloaded Images"
button in the settings: it will clear the QNetworkDiskCache but also
remove the downloadedPics directory.

* Do not use system cache dir for portable installs

* Add settings for network cache size

* Delete corrupted cache entries

* Use old-style connect() syntax (Qt5 build failure)

* Add setNetworkCacheSizeInMB to test mocks

* setTransferTimeout was added in Qt 5.15

* Improve logging messages

We now have the following messages

 - "Trying to download picture from url: URL" before loading a picture
   when picture download is enabled
 - "Trying to load picture from cache: URL" before loading a picture
   when picture download is disabled (i.e. cache-only offline mode)
 - "Removing corrupted cache file for url URL and retrying (ERR)" when
   when we fail to load a picture from the cache. Usually, this should
   be due to the timeout, in which case ERR will be "Operation
   Canceled".
 - "Download failed for url URL (ERR)" when there was an error
   downloading a picture from the network (ERR is the error message)
 - "Following redirect to URL" and "Following cached redirect to URL"
   when following a redirect (from network/from cache)
 - "Image successfully downloaded from URL" and "Image successfully
   loaded from cached url at URL" on success
 - "Possible cached/downloaded picture at URL could not be loaded" on
   ImageReader error

* Clarify that network cache is on disk

Also migrate "Delete Downloaded Image" to a "Clear" button right next to
the network cache size.

* Remove qPrintable

* Move pixmap cache settings to card sources

* qDebug().nospace()

* some formatting on debug messages

* format

* inverted condition

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
2023-03-03 16:55:17 +01:00
Basile Clement
42e7a8b423
Better support Double-Faced Cards (#4753)
* Better support Double-Faced Cards

This patch allows cards to be (virtually) transformed into other cards
while preserving their state, essentially implemeting the MTG mechanic
of the same name.

On the server side, this is implemented by allowing cards to be "stashed
away". A card that is stashed away is not in any zone, but is instead
owned by another card. When a token is destroyed due to a zone change,
if it had a card stashed away, that card is placed in the target zone
instead of the token.

On the database side, `attach="transform"` is used on `<reverse>` and
`<reverse-related>` to indicate that the created token should be
transformed this way.

Old servers ignore the new field in `Command_CreateToken` and will
perform a regular attachment, as currently.

* Address review comments

* Prevent tokens from being stashed

* format.sh
2023-03-03 16:54:51 +01:00
ebbit1q
4558b1c7ef
set the target in the created release (#4758)
the target needs to be the current short commit hash because it is being
compared to by the updater, the default is "master" which breaks the
updater.
2023-02-23 01:11:41 +01:00