Checkbox for low bandwidth

main
Bob Mottram 2021-08-13 18:31:07 +01:00
parent e91e4a0727
commit 11c02dcfb9
20 changed files with 59 additions and 17 deletions

View File

@ -5424,6 +5424,20 @@ class PubServer(BaseHTTPRequestHandler):
else: else:
disableGrayscale(baseDir) 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 # save filtered words list
filterFilename = \ filterFilename = \
acctDir(baseDir, nickname, domain) + \ acctDir(baseDir, nickname, domain) + \

View File

@ -2773,6 +2773,11 @@ showNodeInfoVersion = \
if showNodeInfoVersion is not None: if showNodeInfoVersion is not None:
args.showNodeInfoVersion = bool(showNodeInfoVersion) args.showNodeInfoVersion = bool(showNodeInfoVersion)
lowBandwidth = \
getConfigParam(baseDir, 'lowBandwidth')
if lowBandwidth is not None:
args.lowBandwidth = bool(lowBandwidth)
userAgentsBlocked = [] userAgentsBlocked = []
if args.userAgentBlocks: if args.userAgentBlocks:
userAgentsBlockedStr = args.userAgentBlocks userAgentsBlockedStr = args.userAgentBlocks

View File

@ -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": "موقع إلكتروني",
"Low Bandwidth": "انخفاض النطاق الترددي"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Preu màxim", "Maximum Price": "Preu màxim",
"Create a new wanted item": "Creeu un element desitjat", "Create a new wanted item": "Creeu un element desitjat",
"Wanted Items Search": "Cerca d'articles desitjats", "Wanted Items Search": "Cerca d'articles desitjats",
"Website": "Lloc web" "Website": "Lloc web",
"Low Bandwidth": "Ample de banda baixa"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Uchafswm Pris", "Maximum Price": "Uchafswm Pris",
"Create a new wanted item": "Creu eitem newydd ei heisiau", "Create a new wanted item": "Creu eitem newydd ei heisiau",
"Wanted Items Search": "Chwilio Eitemau Eisiau", "Wanted Items Search": "Chwilio Eitemau Eisiau",
"Website": "Gwefan" "Website": "Gwefan",
"Low Bandwidth": "Lled band isel"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Höchstpreis", "Maximum Price": "Höchstpreis",
"Create a new wanted item": "Erstelle einen neuen gesuchten Artikel", "Create a new wanted item": "Erstelle einen neuen gesuchten Artikel",
"Wanted Items Search": "Gesuchte Artikel suchen", "Wanted Items Search": "Gesuchte Artikel suchen",
"Website": "Webseite" "Website": "Webseite",
"Low Bandwidth": "Niedrige Bandbreite"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Maximum Price", "Maximum Price": "Maximum Price",
"Create a new wanted item": "Create a new wanted item", "Create a new wanted item": "Create a new wanted item",
"Wanted Items Search": "Wanted Items Search", "Wanted Items Search": "Wanted Items Search",
"Website": "Website" "Website": "Website",
"Low Bandwidth": "Low Bandwidth"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Precio Máximo", "Maximum Price": "Precio Máximo",
"Create a new wanted item": "Crea un nuevo artículo buscado", "Create a new wanted item": "Crea un nuevo artículo buscado",
"Wanted Items Search": "Búsqueda de artículos deseados", "Wanted Items Search": "Búsqueda de artículos deseados",
"Website": "Sitio web" "Website": "Sitio web",
"Low Bandwidth": "Ancho de banda bajo"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Prix maximum", "Maximum Price": "Prix maximum",
"Create a new wanted item": "Créer un nouvel article recherché", "Create a new wanted item": "Créer un nouvel article recherché",
"Wanted Items Search": "Recherche d'objets recherchés", "Wanted Items Search": "Recherche d'objets recherchés",
"Website": "Site Internet" "Website": "Site Internet",
"Low Bandwidth": "Bas débit"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Uasphraghas", "Maximum Price": "Uasphraghas",
"Create a new wanted item": "Cruthaigh mír nua a theastaigh", "Create a new wanted item": "Cruthaigh mír nua a theastaigh",
"Wanted Items Search": "Cuardaigh Míreanna Teastaíonn", "Wanted Items Search": "Cuardaigh Míreanna Teastaíonn",
"Website": "Suíomh gréasáin" "Website": "Suíomh gréasáin",
"Low Bandwidth": "Bandaleithead íseal"
} }

View File

@ -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": "वेबसाइट",
"Low Bandwidth": "कम बैंडविड्थ"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Prezzo massimo", "Maximum Price": "Prezzo massimo",
"Create a new wanted item": "Crea un nuovo oggetto ricercato", "Create a new wanted item": "Crea un nuovo oggetto ricercato",
"Wanted Items Search": "Ricerca articoli ricercati", "Wanted Items Search": "Ricerca articoli ricercati",
"Website": "Sito web" "Website": "Sito web",
"Low Bandwidth": "Bassa larghezza di banda"
} }

View File

@ -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": "Webサイト" "Website": "Webサイト",
"Low Bandwidth": "低帯域幅"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Maximum Price", "Maximum Price": "Maximum Price",
"Create a new wanted item": "Tiştek xwestî ya nû biafirînin", "Create a new wanted item": "Tiştek xwestî ya nû biafirînin",
"Wanted Items Search": "Wanted Items Search", "Wanted Items Search": "Wanted Items Search",
"Website": "Malper" "Website": "Malper",
"Low Bandwidth": "Bandwidth kêm"
} }

View File

@ -469,5 +469,6 @@
"Maximum Price": "Maximum Price", "Maximum Price": "Maximum Price",
"Create a new wanted item": "Create a new wanted item", "Create a new wanted item": "Create a new wanted item",
"Wanted Items Search": "Wanted Items Search", "Wanted Items Search": "Wanted Items Search",
"Website": "Website" "Website": "Website",
"Low Bandwidth": "Low Bandwidth"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Preço Máximo", "Maximum Price": "Preço Máximo",
"Create a new wanted item": "Crie um novo item desejado", "Create a new wanted item": "Crie um novo item desejado",
"Wanted Items Search": "Pesquisa de Itens Desejados", "Wanted Items Search": "Pesquisa de Itens Desejados",
"Website": "Local na rede Internet" "Website": "Local na rede Internet",
"Low Bandwidth": "Baixa largura de banda"
} }

View File

@ -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": "Интернет сайт",
"Low Bandwidth": "Низкая пропускная способность"
} }

View File

@ -473,5 +473,6 @@
"Maximum Price": "Bei ya juu", "Maximum Price": "Bei ya juu",
"Create a new wanted item": "Unda kipengee kipya kinachotafutwa", "Create a new wanted item": "Unda kipengee kipya kinachotafutwa",
"Wanted Items Search": "Utafutaji wa Vitu vinavyotafutwa", "Wanted Items Search": "Utafutaji wa Vitu vinavyotafutwa",
"Website": "Tovuti" "Website": "Tovuti",
"Low Bandwidth": "Bandwidth ya chini"
} }

View File

@ -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": "网站",
"Low Bandwidth": "低带宽"
} }

View File

@ -1111,6 +1111,12 @@ def _htmlEditProfileGraphicDesign(baseDir: str, translate: {}) -> str:
graphicsStr = beginEditSection(translate['Graphic Design']) 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 += _htmlThemesDropdown(baseDir, translate)
graphicsStr += \ graphicsStr += \
' <label class="labels">' + \ ' <label class="labels">' + \