diff --git a/daemon.py b/daemon.py index 588da28f0..e5085ae3b 100644 --- a/daemon.py +++ b/daemon.py @@ -5424,6 +5424,20 @@ class PubServer(BaseHTTPRequestHandler): else: disableGrayscale(baseDir) + # low bandwidth images checkbox + if path.startswith('/users/' + adminNickname + '/') or \ + isArtist(baseDir, nickname): + currLowBandwidth = \ + getConfigParam(baseDir, 'lowBandwidth') + lowBandwidth = False + if fields.get('lowBandwidth'): + if fields['lowBandwidth'] == 'on': + lowBandwidth = True + if currLowBandwidth != lowBandwidth: + setConfigParam(baseDir, 'lowBandwidth', + lowBandwidth) + self.server.lowBandwidth = lowBandwidth + # save filtered words list filterFilename = \ acctDir(baseDir, nickname, domain) + \ diff --git a/epicyon.py b/epicyon.py index d87c0187c..c6cfed377 100644 --- a/epicyon.py +++ b/epicyon.py @@ -2773,6 +2773,11 @@ showNodeInfoVersion = \ if showNodeInfoVersion is not None: args.showNodeInfoVersion = bool(showNodeInfoVersion) +lowBandwidth = \ + getConfigParam(baseDir, 'lowBandwidth') +if lowBandwidth is not None: + args.lowBandwidth = bool(lowBandwidth) + userAgentsBlocked = [] if args.userAgentBlocks: userAgentsBlockedStr = args.userAgentBlocks diff --git a/translations/ar.json b/translations/ar.json index f5c21b153..9523f6978 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -473,5 +473,6 @@ "Maximum Price": "السعر الأقصى", "Create a new wanted item": "قم بإنشاء عنصر مطلوب جديد", "Wanted Items Search": "البحث عن العناصر المطلوبة", - "Website": "موقع إلكتروني" + "Website": "موقع إلكتروني", + "Low Bandwidth": "انخفاض النطاق الترددي" } diff --git a/translations/ca.json b/translations/ca.json index 3e149f82f..f44884e41 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -473,5 +473,6 @@ "Maximum Price": "Preu màxim", "Create a new wanted item": "Creeu un element desitjat", "Wanted Items Search": "Cerca d'articles desitjats", - "Website": "Lloc web" + "Website": "Lloc web", + "Low Bandwidth": "Ample de banda baixa" } diff --git a/translations/cy.json b/translations/cy.json index 6ce8726f7..6f761d3e9 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -473,5 +473,6 @@ "Maximum Price": "Uchafswm Pris", "Create a new wanted item": "Creu eitem newydd ei heisiau", "Wanted Items Search": "Chwilio Eitemau Eisiau", - "Website": "Gwefan" + "Website": "Gwefan", + "Low Bandwidth": "Lled band isel" } diff --git a/translations/de.json b/translations/de.json index 99f18cae3..d7d3dd56b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -473,5 +473,6 @@ "Maximum Price": "Höchstpreis", "Create a new wanted item": "Erstelle einen neuen gesuchten Artikel", "Wanted Items Search": "Gesuchte Artikel suchen", - "Website": "Webseite" + "Website": "Webseite", + "Low Bandwidth": "Niedrige Bandbreite" } diff --git a/translations/en.json b/translations/en.json index bec304dae..d65ce0eed 100644 --- a/translations/en.json +++ b/translations/en.json @@ -473,5 +473,6 @@ "Maximum Price": "Maximum Price", "Create a new wanted item": "Create a new wanted item", "Wanted Items Search": "Wanted Items Search", - "Website": "Website" + "Website": "Website", + "Low Bandwidth": "Low Bandwidth" } diff --git a/translations/es.json b/translations/es.json index cbe428a40..53c6fab3d 100644 --- a/translations/es.json +++ b/translations/es.json @@ -473,5 +473,6 @@ "Maximum Price": "Precio Máximo", "Create a new wanted item": "Crea un nuevo artículo buscado", "Wanted Items Search": "Búsqueda de artículos deseados", - "Website": "Sitio web" + "Website": "Sitio web", + "Low Bandwidth": "Ancho de banda bajo" } diff --git a/translations/fr.json b/translations/fr.json index 6484fdec8..70788283f 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -473,5 +473,6 @@ "Maximum Price": "Prix maximum", "Create a new wanted item": "Créer un nouvel article recherché", "Wanted Items Search": "Recherche d'objets recherchés", - "Website": "Site Internet" + "Website": "Site Internet", + "Low Bandwidth": "Bas débit" } diff --git a/translations/ga.json b/translations/ga.json index e264cbbfd..97441e317 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -473,5 +473,6 @@ "Maximum Price": "Uasphraghas", "Create a new wanted item": "Cruthaigh mír nua a theastaigh", "Wanted Items Search": "Cuardaigh Míreanna Teastaíonn", - "Website": "Suíomh gréasáin" + "Website": "Suíomh gréasáin", + "Low Bandwidth": "Bandaleithead íseal" } diff --git a/translations/hi.json b/translations/hi.json index 04928a602..00e79e04b 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -473,5 +473,6 @@ "Maximum Price": "अधिकतम मूल्य", "Create a new wanted item": "एक नई वांछित वस्तु बनाएँ", "Wanted Items Search": "वांटेड आइटम सर्च", - "Website": "वेबसाइट" + "Website": "वेबसाइट", + "Low Bandwidth": "कम बैंडविड्थ" } diff --git a/translations/it.json b/translations/it.json index 023a231ca..64aa96724 100644 --- a/translations/it.json +++ b/translations/it.json @@ -473,5 +473,6 @@ "Maximum Price": "Prezzo massimo", "Create a new wanted item": "Crea un nuovo oggetto ricercato", "Wanted Items Search": "Ricerca articoli ricercati", - "Website": "Sito web" + "Website": "Sito web", + "Low Bandwidth": "Bassa larghezza di banda" } diff --git a/translations/ja.json b/translations/ja.json index f478adecb..2aef39f71 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -473,5 +473,6 @@ "Maximum Price": "最高価格", "Create a new wanted item": "新しい欲しいアイテムを作成する", "Wanted Items Search": "欲しいアイテム検索", - "Website": "Webサイト" + "Website": "Webサイト", + "Low Bandwidth": "低帯域幅" } diff --git a/translations/ku.json b/translations/ku.json index 9e6bff56d..2d52651c1 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -473,5 +473,6 @@ "Maximum Price": "Maximum Price", "Create a new wanted item": "Tiştek xwestî ya nû biafirînin", "Wanted Items Search": "Wanted Items Search", - "Website": "Malper" + "Website": "Malper", + "Low Bandwidth": "Bandwidth kêm" } diff --git a/translations/oc.json b/translations/oc.json index 334d61406..191b28fb7 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -469,5 +469,6 @@ "Maximum Price": "Maximum Price", "Create a new wanted item": "Create a new wanted item", "Wanted Items Search": "Wanted Items Search", - "Website": "Website" + "Website": "Website", + "Low Bandwidth": "Low Bandwidth" } diff --git a/translations/pt.json b/translations/pt.json index af9c7b686..4565aa6d0 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -473,5 +473,6 @@ "Maximum Price": "Preço Máximo", "Create a new wanted item": "Crie um novo item desejado", "Wanted Items Search": "Pesquisa de Itens Desejados", - "Website": "Local na rede Internet" + "Website": "Local na rede Internet", + "Low Bandwidth": "Baixa largura de banda" } diff --git a/translations/ru.json b/translations/ru.json index eeb3a6517..7731076b2 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -473,5 +473,6 @@ "Maximum Price": "Максимальная цена", "Create a new wanted item": "Создать новый требуемый предмет", "Wanted Items Search": "Поиск требуемых предметов", - "Website": "Интернет сайт" + "Website": "Интернет сайт", + "Low Bandwidth": "Низкая пропускная способность" } diff --git a/translations/sw.json b/translations/sw.json index c526a8d11..f12cc4e80 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -473,5 +473,6 @@ "Maximum Price": "Bei ya juu", "Create a new wanted item": "Unda kipengee kipya kinachotafutwa", "Wanted Items Search": "Utafutaji wa Vitu vinavyotafutwa", - "Website": "Tovuti" + "Website": "Tovuti", + "Low Bandwidth": "Bandwidth ya chini" } diff --git a/translations/zh.json b/translations/zh.json index 0be996667..8d176593c 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -473,5 +473,6 @@ "Maximum Price": "最高价格", "Create a new wanted item": "创建一个新的通缉物品", "Wanted Items Search": "通缉物品搜索", - "Website": "网站" + "Website": "网站", + "Low Bandwidth": "低带宽" } diff --git a/webapp_profile.py b/webapp_profile.py index 777a52e3d..d1f4ce450 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -1111,6 +1111,12 @@ def _htmlEditProfileGraphicDesign(baseDir: str, translate: {}) -> str: graphicsStr = beginEditSection(translate['Graphic Design']) + lowBandwidth = getConfigParam(baseDir, 'lowBandwidth') + if not lowBandwidth: + lowBandwidth = False + graphicsStr += \ + editCheckBox(translate['Low Bandwidth'], 'lowBandwidth', + bool(lowBandwidth)) graphicsStr += _htmlThemesDropdown(baseDir, translate) graphicsStr += \ '