diff --git a/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.png b/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.png index fdd57ff..0b6b4ec 100644 Binary files a/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.png and b/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.png differ diff --git a/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.small.png b/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.small.png index 71aa93d..7880589 100644 Binary files a/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.small.png and b/vasl_templates/webapp/static/help/images/quick-start/updated-scenario.small.png differ diff --git a/vasl_templates/webapp/static/help/index.html b/vasl_templates/webapp/static/help/index.html index 4956a67..d3b91c4 100644 --- a/vasl_templates/webapp/static/help/index.html +++ b/vasl_templates/webapp/static/help/index.html @@ -188,20 +188,6 @@ We now want to create labels in the VASL scenario for all this information. Choo
In particular, note the data tables for the vehicles, which contain useful information that you can refer to during your game. - -

Including pictures in the labels

- -

-We can pretty-up the labels by including pictures in them. Open the User Settings dialog and turn on the Images in scenarios settings. -

Update the VASL scenario again (as above), open it again in VASSAL, and you will see that the labels now include nationality flags, and the vehicle data tables show the counter images:
- -

Because images can't be stored inside a VASL scenario file, if you turn these options on, you must choose where VASSAL will get the images from: - -
- diff --git a/vasl_templates/webapp/static/user_settings.js b/vasl_templates/webapp/static/user_settings.js index 3aefa7c..2881844 100644 --- a/vasl_templates/webapp/static/user_settings.js +++ b/vasl_templates/webapp/static/user_settings.js @@ -1,7 +1,12 @@ SCENARIO_IMAGES_SOURCE_THIS_PROGRAM = 1 ; SCENARIO_IMAGES_SOURCE_INTERNET = 2 ; -DEFAULT_USER_SETTINGS = { "scenario-images-source": SCENARIO_IMAGES_SOURCE_INTERNET } ; +DEFAULT_USER_SETTINGS = { + "scenario-images-source": SCENARIO_IMAGES_SOURCE_INTERNET, + "include-vasl-images-in-snippets": true, + "include-flags-in-snippets": true, + "custom-list-bullets": true, +} ; gUserSettings = Cookies.getJSON( "user-settings" ) || DEFAULT_USER_SETTINGS ; USER_SETTINGS = { diff --git a/vasl_templates/webapp/tests/test_user_settings.py b/vasl_templates/webapp/tests/test_user_settings.py index 42a1bed..60b72fa 100644 --- a/vasl_templates/webapp/tests/test_user_settings.py +++ b/vasl_templates/webapp/tests/test_user_settings.py @@ -32,30 +32,30 @@ def test_include_vasl_images_in_snippets( webapp, webdriver ): set_player( 1, "german" ) add_vo( webdriver, "vehicles", 1, "PzKpfw IB" ) - # enable "show VASL images in snippets" + # disable "show VASL images in snippets" select_menu_option( "user_settings" ) elem = find_child( ".ui-dialog.user-settings input[name='include-vasl-images-in-snippets']" ) - assert not elem.is_selected() + assert elem.is_selected() elem.click() click_dialog_button( "OK" ) - _check_cookies( webdriver, "include-vasl-images-in-snippets", True ) + _check_cookies( webdriver, "include-vasl-images-in-snippets", False ) # make sure that it took effect snippet_btn = find_child( "button[data-id='ob_vehicles_1']" ) snippet_btn.click() - wait_for_clipboard( 2, "/counter/2524/front", contains=True ) + wait_for_clipboard( 2, "/counter/2524/front", contains=False ) - # disable "show VASL images in snippets" + # enable "show VASL images in snippets" select_menu_option( "user_settings" ) elem = find_child( ".ui-dialog.user-settings input[name='include-vasl-images-in-snippets']" ) - assert elem.is_selected() + assert not elem.is_selected() elem.click() click_dialog_button( "OK" ) - _check_cookies( webdriver, "include-vasl-images-in-snippets", False ) + _check_cookies( webdriver, "include-vasl-images-in-snippets", True ) # make sure that it took effect snippet_btn.click() - wait_for_clipboard( 2, "/counter/2524/front", contains=False ) + wait_for_clipboard( 2, "/counter/2524/front", contains=True ) # --------------------------------------------------------------------- @@ -72,44 +72,44 @@ def test_include_flags_in_snippets( webapp, webdriver ): sortable = find_child( "#ob_setups-sortable_1" ) add_simple_note( sortable, "OB setup note", None ) - # enable "show flags in snippets" + # disable "show flags in snippets" select_menu_option( "user_settings" ) elem = find_child( ".ui-dialog.user-settings input[name='include-flags-in-snippets']" ) - assert not elem.is_selected() + assert elem.is_selected() elem.click() click_dialog_button( "OK" ) - _check_cookies( webdriver, "include-flags-in-snippets", True ) + _check_cookies( webdriver, "include-flags-in-snippets", False ) # make sure that it took effect ob_setup_snippet_btn = find_child( "li img.snippet", sortable ) ob_setup_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=True ) + wait_for_clipboard( 2, "/flags/german", contains=False ) # make sure it also affects vehicle/ordnance snippets ob_vehicles_snippet_btn = find_child( "button.generate[data-id='ob_vehicles_1']" ) ob_vehicles_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=True ) + wait_for_clipboard( 2, "/flags/german", contains=False ) ob_ordnance_snippet_btn = find_child( "button.generate[data-id='ob_ordnance_1']" ) ob_ordnance_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=True ) + wait_for_clipboard( 2, "/flags/german", contains=False ) - # disable "show flags in snippets" + # enable "show flags in snippets" select_menu_option( "user_settings" ) elem = find_child( ".ui-dialog.user-settings input[name='include-flags-in-snippets']" ) - assert elem.is_selected() + assert not elem.is_selected() elem.click() click_dialog_button( "OK" ) - _check_cookies( webdriver, "include-flags-in-snippets", False ) + _check_cookies( webdriver, "include-flags-in-snippets", True ) # make sure that it took effect ob_setup_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=False ) + wait_for_clipboard( 2, "/flags/german", contains=True ) # make sure it also affects vehicle/ordnance snippets ob_vehicles_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=False ) + wait_for_clipboard( 2, "/flags/german", contains=True ) ob_ordnance_snippet_btn.click() - wait_for_clipboard( 2, "/flags/german", contains=False ) + wait_for_clipboard( 2, "/flags/german", contains=True ) # --------------------------------------------------------------------- diff --git a/vasl_templates/webapp/tests/test_vasl_extensions.py b/vasl_templates/webapp/tests/test_vasl_extensions.py index 97bbca1..5d95fb4 100644 --- a/vasl_templates/webapp/tests/test_vasl_extensions.py +++ b/vasl_templates/webapp/tests/test_vasl_extensions.py @@ -250,10 +250,10 @@ def test_bfp_extensions( webapp, webdriver ): btn.click() wait_for_clipboard( 2, re.compile( 'Type 97A CHI-HA' - '.+
1, C\u20202' r'.+M3A1 Scout Car\(a\)' - '.+
2, Jp A\u20201, Ch F\u2020', re.DOTALL @@ -312,14 +312,14 @@ def test_bfp_extensions2( webapp, webdriver ): btn.click() wait_for_clipboard( 2, re.compile( r'\bM5A1\b' - '.+
2, F\u20201, G, N, Y' r'.+\bM5A1F\b' - '.+
2, US F\u20201, US G, US N, US Y, C' r'.+\bM5A1C\b' - '.+
2, US F\u20201, US G, US N, US Y, A, B', re.DOTALL @@ -383,7 +383,7 @@ def test_ffs_extensions( webapp, webdriver ): btn.click() wait_for_clipboard( 2, re.compile( 'POA-CWS-H5' - '.+