Buttons for theme import/export on theme designer screen

main
Bob Mottram 2021-12-07 12:39:52 +00:00
parent 1b2e1befc3
commit 590acb6cc5
1 changed files with 19 additions and 1 deletions

View File

@ -301,7 +301,25 @@ def htmlThemeDesigner(cssCache: {}, baseDir: str,
fontStr += ' </table>\n </div>\n' fontStr += ' </table>\n </div>\n'
dimensionStr += ' </table>\n </div>\n' dimensionStr += ' </table>\n </div>\n'
switchStr += ' </table>\n </div>\n' switchStr += ' </table>\n </div>\n'
themeForm += colorStr + fontStr + dimensionStr + switchStr
themeFormats = '.zip, .gz'
exportImportStr = ' <div class="container">\n'
exportImportStr += \
' <label class="labels">' + \
translate['Import Theme'] + '</label>\n'
exportImportStr += ' <input type="file" id="importTheme" '
exportImportStr += 'name="submitImportTheme" '
exportImportStr += 'accept="' + themeFormats + '">\n'
exportImportStr += \
' <label class="labels">' + \
translate['Export Theme'] + '</label><br>\n'
exportImportStr += \
' <button type="submit" class="button" ' + \
'name="submitExportTheme">➤</button><br>\n'
exportImportStr += ' </div>\n'
themeForm += colorStr + fontStr + dimensionStr
themeForm += switchStr + exportImportStr
themeForm += ' </form>\n' themeForm += ' </form>\n'
themeForm += '</div>\n' themeForm += '</div>\n'
themeForm += htmlFooter() themeForm += htmlFooter()