Commit Graph

128 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
82abb33555 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-04 17:32:18 +00:00
Syres916
6f57f36620 [Start] Fix Python 3.11 Unicode Errors
Example Error :
  File "/home/john/freecad-daily-build/Mod/Start/StartPage/StartPage.py", line 422, in handle
    ALTCSS = f.read()
             ^^^^^^^^
  File "/usr/lib/python3.11/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 421: ordinal not in range(128)
2023-09-04 18:15:20 +01:00
qewer33
221e337a04 Apply pre-commit 2023-09-03 23:51:49 +03:00
qewer
2dc6a69d65 Merge branch 'master' into startpage-quickstart-open 2023-09-03 19:47:28 +03:00
qewer33
1ece491dfd StartPage remove hide scrollbars option 2023-09-03 19:30:57 +03:00
qewer33
5be49a56f9 StartPage implement custom CSS preference 2023-09-03 16:21:49 +03:00
wmayer
fae6f8f5bb Start: apply clang format 2023-09-03 14:21:53 +02:00
luzpaz
40d2a90e3a Fix typos 2023-08-31 22:29:17 -05:00
qewer33
a1d20ec97d Turn StartPage "Import" quickstart button into "Open" 2023-08-31 22:04:50 +03:00
qewer33
230501d3d5 Add file thumbnail icons hide and size options to StartPage 2023-08-28 18:07:33 +03:00
qewer33
23ad8ffcd2 Change default StartPage BackgroundTextColor value 2023-08-28 16:50:19 +03:00
qewer
d141e7167f StartPage: Visual overhaul and CSS fixes (#10391)
* StartPage visual overhaul and CSS fixes
* Add qewer33 to CONTRIBUTORS
2023-08-27 13:27:53 -05:00
qewer
dfbedc75b7 StartPage: Fix new file templates issues (#10291)
* Make StartPage new file template buttons use if instead of match

* Make StartPage Part design new file template not create a sketch

* Remove StartPage Part new file template and rename Part Design template based on community feedback

* StartPage LoadNew.py fix indentation
2023-08-21 13:58:29 -05:00
luzpaz
09a965d595 Fix typos 2023-08-21 20:20:47 +02:00
qewer33
0d522e16b9 Add new file section and file templates to StartPage 2023-08-11 19:50:26 +03:00
bdieterm
0fc81ccfc7 fix encoding on StartPage file information 2023-07-22 17:37:46 +02:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
luzpaz
a134129868 Fix various trailing whitespace issues 2023-02-16 09:30:22 -05:00
Yorik van Havre
ac9fde2a3d Fixes startpage css - fixes #8330 2023-02-05 15:09:23 +01:00
Yorik van Havre
2056cd94f9 Start: Added option to hide start page scrollbars 2023-02-04 22:50:23 +01:00
Adrián Insaurralde Avalos
4256a08f70 Adjust Startpage version info to new format
due to the changes from 0a659d9e74
2022-12-25 14:52:45 +01:00
Chris Hennes
dd8b4a68ef Start: Add icon for FCMacro files
Closes #7709
2022-12-21 22:51:02 -06:00
Chris Hennes
ca8609ef3a Start: Remove Py2 code 2022-11-09 14:08:54 +01:00
VM4Dim
b180512664 [StartPage] Fix Wiki Link to Reverse_Engineering WB Page 2022-09-05 15:34:06 +03:00
0penBrain
530333a3c8 [Bugfix] Prevent start page loading to fail if WB doesn't define an icon 2022-05-02 14:30:24 +02:00
wmayer
1a62c2024d lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
Yorik van Havre
82c2868416 Start: Added possibility to provide custom CSS for the start page 2022-03-04 14:06:13 +01:00
wmayer
0b70be452c StartPage: fix regression of #5515 2022-02-14 08:37:53 +01:00
luz paz
da847fab35 StartWB: Remove superfluous paranthesis [skip ci] 2022-02-10 17:17:32 +01:00
luz paz
139387fee4 StartWB: Remove python2 support
* removed six module  
* removed encode() function
2022-02-10 17:17:32 +01:00
luz paz
80250eafb2 Start: header uniformity + whitespace management + misc. pep8 fixes 2022-01-08 18:28:27 +01:00
wmayer
45632cc32e Start: if a corrupted file is part of the Recent File List then ignore it 2021-10-11 10:13:49 +02:00
Yorik van Havre
5177a5f051 Start: Fixed faling test 2021-08-30 15:36:13 +02:00
川島和津実
0f9cb4caab Start: Correct hash for thumbnail filename (py3)
Image file names need to be quoted before hashing to generate thumbnail file names. This is related to pull requests #4931 and #4972, so please refer to discussions therein. Only Python3 is supported, not Python2.
2021-08-18 22:27:39 +08:00
川島和津実
7b32264b63 Start: Correct hash for thumbnail filename
Image file names need to be quoted before hashing to generate thumbnail file names.
This is related to pull requests #4931 and #4972, so please refer to discussions therein.
2021-08-18 22:15:18 +08:00
Chris Hennes
6f185eb14f Revert "Start: Properly hash thumbnail filenames" 2021-08-17 14:28:47 -05:00
GUAN Xin
9d5e707350 Start: Properly hash thumbnail filenames
Image filenames should be encoded as URI before being hashed.

Also assume that filenames are already utf8 because the community
has been advertiseing utf8 usage since the beginning of this centry.

Calling .encode("utf8") on strings that are already in utf8 simply
raises the following exception:

  UnicodeDecodeError: 'ascii' codec can't decode byte ...
for non-ascii (already utf8) strings.

It's in fact impossible to precisely determine pathname encoding
because different components within the path may have different
encodings, e.g., a utf8 directory name followed by an MBCS filename
is valid on Linux native filesystems.
It's the user's responsibility to keep the iocharset consistent.
2021-07-21 16:49:06 +08:00
Heewa Barfchin
0b1daf7fba Start: fix bug when custom dir missing 2021-05-10 13:24:17 -04:00
Chris Hennes
4f3cc41d65 Modify Start HTML to be valid HTML
Using the W3C validator, a number of minor issues were found with the Start page
HTML. Those items were:
* Missing language setting on the body of the document
* Deprecated attributes set for the style and script tags
* Image tags require alt text
* List tags can only contain list items
* All file:/// URLs must not contain backslashes, even on Windows
2021-01-31 22:13:47 -06:00
Chris Hennes
76e25a3a96 Minor tweaks to Start recommended by LGTM
Using the results of the vulnerability scan at lgtm.com, some minor
changes were made. First, all Python exception handling now explicitly
catches Exception, rather than BaseException (which would include SystemExit
and KeyboardInterrupt). Second, unused imports were removed. Third, a
couple of unnecessary or unused assignments were addressed. Finally, the
JavaScript was modified to explicitly declare the local ddiv variable when
needed.
2021-01-26 20:38:51 -06:00
Chris Hennes
c7f1a49ba4 Add SHADOW replacement 2021-01-08 21:48:31 -06:00
Yorik van Havre
6c7366f76e Start: Fixed freedesktop thumbnail retrieval 2021-01-07 15:36:06 +01:00
Łukasz Stelmach
d1aa56e6b1 Start: encode basename to avoid crashes on non-ascii file names 2020-12-01 14:56:38 +01:00
Yorik van Havre
0b89de1911 Start: Allow to display more than one custom folder on the start page 2020-10-20 12:03:27 +02:00
wmayer
b3d292865f Coverity: [skip ci] Bad use of null-like value 2020-07-21 12:23:10 +02:00
triplus
873769d021 Use relative path to stylesheet fix #4130 2020-03-19 14:25:03 +01:00
Yorik van Havre
58ab713eb5 Start: Added settings button and allow to turn tips off 2020-01-22 12:46:45 +01:00
Markus Lampert
d5820329c5 Added <last> as an option to the workbench selection. 2019-11-01 17:42:14 -03:00
Yorik van Havre
29334052ba Start: Small cosmetic fixes 2019-09-07 16:45:14 -03:00
Yorik van Havre
0fc0476bd8 StartPage: thumbnails for image formats, + use freedesktop thumbnails if available 2019-07-03 10:52:43 -03:00