Compare commits

..

6 Commits

Author SHA1 Message Date
dgtlmoon
4bf41a29f8 Fixing text and "no web page changes" message on mobile 2026-01-16 17:50:25 +01:00
dgtlmoon
2abc8aa9b4 UI - CSS - Give dark-mode switching a soft transition 2026-01-16 17:45:33 +01:00
dgtlmoon
69b70a2a07 Edit - More reliable fetch of watch on test (usually affects tests) 2026-01-16 16:52:35 +01:00
吾爱分享
0c42bcb8d6 Manual polish for several translations in the zh locale. (#3757)
Some checks failed
ChangeDetection.io Container Build Test / Build linux/amd64 (alpine) (push) Waiting to run
ChangeDetection.io Container Build Test / Build linux/arm64 (alpine) (push) Waiting to run
ChangeDetection.io Container Build Test / Build linux/amd64 (main) (push) Waiting to run
ChangeDetection.io Container Build Test / Build linux/arm/v7 (main) (push) Waiting to run
ChangeDetection.io Container Build Test / Build linux/arm/v8 (main) (push) Waiting to run
ChangeDetection.io Container Build Test / Build linux/arm64 (main) (push) Waiting to run
Build and push containers / metadata (push) Has been cancelled
Build and push containers / build-push-containers (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Has been cancelled
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Has been cancelled
ChangeDetection.io App Test / lint-code (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-10 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-11 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-12 (push) Has been cancelled
ChangeDetection.io App Test / test-application-3-13 (push) Has been cancelled
2026-01-16 10:50:31 +01:00
dgtlmoon
091c708a28 Fix for old selenium 3 (#3748 #3756), however be sure to use selenium 4. 2026-01-16 10:30:26 +01:00
dgtlmoon
084be9c990 Languages - Recompile languages, small fix for 'de'. 2026-01-16 09:50:15 +01:00
26 changed files with 68 additions and 60 deletions

View File

@@ -52,13 +52,4 @@ jobs:
uses: ./.github/workflows/test-stack-reusable-workflow.yml
with:
python-version: '3.13'
skip-pypuppeteer: true
test-application-3-14:
#if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: lint-code
uses: ./.github/workflows/test-stack-reusable-workflow.yml
with:
python-version: '3.14'
skip-pypuppeteer: false
skip-pypuppeteer: true

View File

@@ -52,7 +52,13 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
redirect(url_for('ui_edit.edit_page', uuid=uuid))
# be sure we update with a copy instead of accidently editing the live object by reference
default = deepcopy(datastore.data['watching'][uuid])
default = None
while not default:
try:
default = deepcopy(datastore.data['watching'][uuid])
except RuntimeError as e:
# Dictionary changed
continue
# Defaults for proxy choice
if datastore.proxy_list is not None: # When enabled

View File

@@ -159,7 +159,7 @@ html[data-darkmode="true"] .watch-tag-list.tag-{{ class_name }} {
<tbody>
{%- if not watches|length -%}
<tr>
<td colspan="{{ cols_required }}" style="text-wrap: wrap;">{{ _('No website watches configured, please add a URL in the box above, or') }} <a href="{{ url_for('imports.import_page')}}" >{{ _('import a list') }}</a>.</td>
<td colspan="{{ cols_required }}" style="text-wrap: wrap;">{{ _('No web page change detection watches configured, please add a URL in the box above, or') }} <a href="{{ url_for('imports.import_page')}}" >{{ _('import a list') }}</a>.</td>
</tr>
{%- endif -%}

View File

@@ -157,7 +157,17 @@ class fetcher(Fetcher):
import io
img = Image.open(io.BytesIO(screenshot_png))
# Convert to RGB if needed (JPEG doesn't support transparency)
if img.mode != 'RGB':
# Always convert non-RGB modes to RGB to ensure JPEG compatibility
if img.mode in ('RGBA', 'LA', 'P', 'PA'):
# Handle transparency by compositing onto white background
if img.mode == 'P':
img = img.convert('RGBA')
background = Image.new('RGB', img.size, (255, 255, 255))
if img.mode in ('RGBA', 'LA', 'PA'):
background.paste(img, mask=img.split()[-1]) # Use alpha channel as mask
img = background
elif img.mode != 'RGB':
# For other modes, direct conversion
img = img.convert('RGB')
jpeg_buffer = io.BytesIO()
img.save(jpeg_buffer, format='JPEG', quality=int(os.getenv("SCREENSHOT_QUALITY", 72)))

View File

@@ -125,6 +125,11 @@ $grid-gap: 0.5rem;
border-bottom: none;
}
// Empty state message - span full width on mobile
> td[colspan] {
grid-column: 1 / -1;
}
> td.title-col {
grid-column: 1 / -1;
grid-row: 1;

View File

@@ -33,6 +33,31 @@
@use "parts/login_form";
@use "parts/tabs";
// Smooth transitions for theme switching
body,
.pure-table,
.pure-table thead,
.pure-table td,
.pure-table th,
.pure-form input,
.pure-form textarea,
.pure-form select,
.edit-form .inner,
.pure-menu-horizontal,
footer,
.sticky-tab,
#diff-jump,
.button-tag,
#new-watch-form,
#new-watch-form input:not(.pure-button),
code,
.messages li,
#checkbox-operations,
.inline-warning,
a,
.watch-controls img {
transition: color 0.4s ease, background-color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
body {
color: var(--color-text);

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,6 @@
import psutil
import time
from threading import Thread
import multiprocessing
import pytest
import arrow
@@ -98,34 +97,6 @@ def cleanup(datastore_path):
if os.path.isfile(f):
os.unlink(f)
def pytest_configure(config):
"""Configure pytest environment before tests run.
CRITICAL: Set multiprocessing start method to 'fork' for Python 3.14+ compatibility.
Python 3.14 changed the default start method from 'fork' to 'forkserver' on Linux.
The forkserver method requires all objects to be picklable, but pytest-flask's
LiveServer uses nested functions that can't be pickled.
Setting 'fork' explicitly:
- Maintains compatibility with Python 3.10-3.13 (where 'fork' was already default)
- Fixes Python 3.14 pickling errors
- Only affects Unix-like systems (Windows uses 'spawn' regardless)
See: https://github.com/python/cpython/issues/126831
See: https://docs.python.org/3/whatsnew/3.14.html
"""
# Only set if not already set (respects existing configuration)
if multiprocessing.get_start_method(allow_none=True) is None:
try:
# 'fork' is available on Unix-like systems (Linux, macOS)
# On Windows, this will have no effect as 'spawn' is the only option
multiprocessing.set_start_method('fork', force=False)
logger.debug("Set multiprocessing start method to 'fork' for Python 3.14+ compatibility")
except (ValueError, RuntimeError):
# Already set, not available on this platform, or context already created
pass
def pytest_addoption(parser):
"""Add custom command-line options for pytest.

View File

@@ -45,7 +45,7 @@ def run_filter_test(client, live_server, content_filter, app_notification_format
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url)
res = client.get(url_for("watchlist.index"))
assert b'No website watches configured' not in res.data
assert b'No web page change detection watches configured' not in res.data
client.get(url_for("ui.form_watch_checknow"), follow_redirects=True)

View File

@@ -2008,7 +2008,7 @@ msgid "Changed"
msgstr "Změněno"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
"Nejsou nakonfigurována žádná sledování webových stránek, do výše "
"uvedeného pole přidejte adresu URL nebo"

View File

@@ -2044,7 +2044,7 @@ msgid "Changed"
msgstr "Geändert"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
"Es sind keine Website-Überwachungen konfiguriert. Bitte fügen Sie im Feld"
" oben eine URL hinzu, oder"
@@ -2229,7 +2229,7 @@ msgstr "Über dem Preis, um eine Benachrichtigung auszulösen"
#: changedetectionio/processors/restock_diff/forms.py:25
#, python-format
msgid "Threshold in %% for price changes since the original price"
msgstr "Schwellenwert in % für Preisänderungen seit dem ursprünglichen Preis"
msgstr "Schwellenwert in %% für Preisänderungen seit dem ursprünglichen Preis"
#: changedetectionio/processors/restock_diff/forms.py:28
msgid "Should be between 0 and 100"

View File

@@ -1989,7 +1989,7 @@ msgid "Changed"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -1989,7 +1989,7 @@ msgid "Changed"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -2051,7 +2051,7 @@ msgid "Changed"
msgstr "Modifié"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
"Aucune surveillance de site Web configurée, veuillez ajouter une URL dans"
" la case ci-dessus, ou"

View File

@@ -2020,7 +2020,7 @@ msgid "Changed"
msgstr "Modifica"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr "Nessun monitoraggio configurato, aggiungi un URL nella casella sopra, oppure"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -2036,7 +2036,7 @@ msgid "Changed"
msgstr "변경됨"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr "구성된 웹사이트 시계가 없습니다. 위 상자에 URL을 추가하세요. 또는"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -1988,7 +1988,7 @@ msgid "Changed"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr ""
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-01-03 14:31+0100\n"
"PO-Revision-Date: 2026-01-16 06:40+0800\n"
"PO-Revision-Date: 2026-01-16 17:40+0800\n"
"Last-Translator: 吾爱分享 <admin@wuaishare.cn>\n"
"Language-Team: zh <LL@li.org>\n"
"Language: zh\n"
@@ -218,7 +218,7 @@ msgstr "应为 1 秒或以上"
#: changedetectionio/forms.py:767
msgid "URLs"
msgstr "URL"
msgstr "URL 列表"
#: changedetectionio/forms.py:768
msgid "Upload .xlsx file"
@@ -521,7 +521,7 @@ msgstr "移除密码"
#: changedetectionio/forms.py:1021
msgid "Render anchor tag content"
msgstr "渲染 a 标签内容"
msgstr "渲染 <a> 标签内容"
#: changedetectionio/forms.py:1022
msgid "Allow anonymous access to watch history page when password is enabled"
@@ -1243,7 +1243,7 @@ msgstr "确认文本"
#: changedetectionio/blueprint/ui/templates/clear_all_history.html:27
msgid "Type in the word"
msgstr "请输入"
msgstr "请输入单词"
#: changedetectionio/blueprint/ui/templates/clear_all_history.html:27
msgid "clear"
@@ -1745,7 +1745,7 @@ msgstr ""
#: changedetectionio/blueprint/ui/templates/edit.html:386
msgid "tab. Use"
msgstr "使用"
msgstr "选项卡中。使用"
#: changedetectionio/blueprint/ui/templates/edit.html:386
msgid "Shift+Click"
@@ -1987,7 +1987,7 @@ msgid "Changed"
msgstr "变更"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr "尚未配置网站监控项,请在上方输入 URL 或"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130

View File

@@ -1992,7 +1992,7 @@ msgid "Changed"
msgstr "變更"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
msgid "No website watches configured, please add a URL in the box above, or"
msgid "No web page change detection watches configured, please add a URL in the box above, or"
msgstr "未設定網站監測任務,請在上方欄位新增 URL或"
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130