Browse Source

Merge pull request #2682 from AudriusButkevicius/themes

Add theme support
Jakob Borg 10 years ago
parent
commit
01c70caa8f
100 changed files with 555 additions and 14 deletions
  1. 1 0
      AUTHORS
  2. 1 0
      NICKS
  3. 2 2
      build.go
  4. 60 11
      cmd/syncthing/gui.go
  5. 475 0
      gui/dark/assets/css/overrides.css
  6. 0 0
      gui/default/assets/css/overrides.css
  7. 0 0
      gui/default/assets/font/raleway-500.woff
  8. 0 0
      gui/default/assets/font/raleway.css
  9. 0 0
      gui/default/assets/img/favicon.png
  10. 0 0
      gui/default/assets/img/logo-horizontal.svg
  11. 0 0
      gui/default/assets/img/safari-pinned-tab.svg
  12. 0 0
      gui/default/assets/lang/README-FIRST.txt
  13. 0 0
      gui/default/assets/lang/lang-bg.json
  14. 0 0
      gui/default/assets/lang/lang-ca.json
  15. 0 0
      gui/default/assets/lang/[email protected]
  16. 0 0
      gui/default/assets/lang/lang-cs.json
  17. 0 0
      gui/default/assets/lang/lang-da.json
  18. 0 0
      gui/default/assets/lang/lang-de.json
  19. 0 0
      gui/default/assets/lang/lang-el.json
  20. 0 0
      gui/default/assets/lang/lang-en-GB.json
  21. 0 0
      gui/default/assets/lang/lang-en.json
  22. 0 0
      gui/default/assets/lang/lang-es-ES.json
  23. 0 0
      gui/default/assets/lang/lang-es.json
  24. 0 0
      gui/default/assets/lang/lang-fi.json
  25. 0 0
      gui/default/assets/lang/lang-fr-CA.json
  26. 0 0
      gui/default/assets/lang/lang-fr.json
  27. 0 0
      gui/default/assets/lang/lang-fy.json
  28. 0 0
      gui/default/assets/lang/lang-hu.json
  29. 0 0
      gui/default/assets/lang/lang-it.json
  30. 0 0
      gui/default/assets/lang/lang-ja.json
  31. 0 0
      gui/default/assets/lang/lang-ko-KR.json
  32. 0 0
      gui/default/assets/lang/lang-lt.json
  33. 0 0
      gui/default/assets/lang/lang-nb.json
  34. 0 0
      gui/default/assets/lang/lang-nl.json
  35. 0 0
      gui/default/assets/lang/lang-nn.json
  36. 0 0
      gui/default/assets/lang/lang-pl.json
  37. 0 0
      gui/default/assets/lang/lang-pt-BR.json
  38. 0 0
      gui/default/assets/lang/lang-pt-PT.json
  39. 0 0
      gui/default/assets/lang/lang-ro-RO.json
  40. 0 0
      gui/default/assets/lang/lang-ru.json
  41. 0 0
      gui/default/assets/lang/lang-sv.json
  42. 0 0
      gui/default/assets/lang/lang-tr.json
  43. 0 0
      gui/default/assets/lang/lang-uk.json
  44. 0 0
      gui/default/assets/lang/lang-vi.json
  45. 0 0
      gui/default/assets/lang/lang-zh-CN.json
  46. 0 0
      gui/default/assets/lang/lang-zh-TW.json
  47. 0 0
      gui/default/assets/lang/prettyprint.js
  48. 0 0
      gui/default/assets/lang/valid-langs.js
  49. 0 0
      gui/default/index.html
  50. 0 0
      gui/default/modal.html
  51. 0 0
      gui/default/syncthing/app.js
  52. 0 0
      gui/default/syncthing/core/aboutModalDirective.js
  53. 1 0
      gui/default/syncthing/core/aboutModalView.html
  54. 0 0
      gui/default/syncthing/core/alwaysNumberFilter.js
  55. 0 0
      gui/default/syncthing/core/basenameFilter.js
  56. 0 0
      gui/default/syncthing/core/binaryFilter.js
  57. 0 0
      gui/default/syncthing/core/durationFilter.js
  58. 0 0
      gui/default/syncthing/core/eventService.js
  59. 0 0
      gui/default/syncthing/core/httpErrorDialogDirective.js
  60. 0 0
      gui/default/syncthing/core/httpErrorDialogView.html
  61. 0 0
      gui/default/syncthing/core/identiconDirective.js
  62. 0 0
      gui/default/syncthing/core/languageSelectDirective.js
  63. 0 0
      gui/default/syncthing/core/lastErrorComponentFilter.js
  64. 0 0
      gui/default/syncthing/core/localeService.js
  65. 0 0
      gui/default/syncthing/core/majorUpgradeModalDirective.js
  66. 0 0
      gui/default/syncthing/core/majorUpgradeModalView.html
  67. 0 0
      gui/default/syncthing/core/modalDirective.js
  68. 0 0
      gui/default/syncthing/core/module.js
  69. 0 0
      gui/default/syncthing/core/naturalFilter.js
  70. 0 0
      gui/default/syncthing/core/networkErrorDialogDirective.js
  71. 0 0
      gui/default/syncthing/core/networkErrorDialogView.html
  72. 0 0
      gui/default/syncthing/core/popoverDirective.js
  73. 0 0
      gui/default/syncthing/core/restartingDialogDirective.js
  74. 0 0
      gui/default/syncthing/core/restartingDialogView.html
  75. 0 0
      gui/default/syncthing/core/selectOnClickDirective.js
  76. 0 0
      gui/default/syncthing/core/shutdownDialogDirective.js
  77. 0 0
      gui/default/syncthing/core/shutdownDialogView.html
  78. 5 0
      gui/default/syncthing/core/syncthingController.js
  79. 0 0
      gui/default/syncthing/core/uniqueFolderDirective.js
  80. 0 0
      gui/default/syncthing/core/upgradingDialogDirective.js
  81. 0 0
      gui/default/syncthing/core/upgradingDialogView.html
  82. 0 0
      gui/default/syncthing/core/validDeviceidDirective.js
  83. 0 0
      gui/default/syncthing/device/editDeviceModalDirective.js
  84. 0 0
      gui/default/syncthing/device/editDeviceModalView.html
  85. 0 0
      gui/default/syncthing/device/idqrModalDirective.js
  86. 0 0
      gui/default/syncthing/device/idqrModalView.html
  87. 0 0
      gui/default/syncthing/device/module.js
  88. 0 0
      gui/default/syncthing/folder/editFolderModalDirective.js
  89. 0 0
      gui/default/syncthing/folder/editFolderModalView.html
  90. 0 0
      gui/default/syncthing/folder/editIgnoresModalDirective.js
  91. 0 0
      gui/default/syncthing/folder/editIgnoresModalView.html
  92. 0 0
      gui/default/syncthing/folder/module.js
  93. 0 0
      gui/default/syncthing/settings/advancedSettingsModalDirective.js
  94. 0 0
      gui/default/syncthing/settings/advancedSettingsModalView.html
  95. 0 0
      gui/default/syncthing/settings/module.js
  96. 0 0
      gui/default/syncthing/settings/settingsModalDirective.js
  97. 10 1
      gui/default/syncthing/settings/settingsModalView.html
  98. 0 0
      gui/default/syncthing/transfer/failedFilesModalDirective.js
  99. 0 0
      gui/default/syncthing/transfer/failedFilesModalView.html
  100. 0 0
      gui/default/syncthing/transfer/module.js

+ 1 - 0
AUTHORS

@@ -2,6 +2,7 @@
 
 Aaron Bieber <[email protected]>
 Adam Piggott <[email protected]> <[email protected]>
+Alessandro G. <[email protected]>
 Alexander Graf <[email protected]>
 Anderson Mesquita <[email protected]>
 Andrew Dunham <[email protected]>

+ 1 - 0
NICKS

@@ -2,6 +2,7 @@
 
 acogdev		<[email protected]>
 alex2108	<[email protected]>
+alessandro.g89	<[email protected]>
 andersonvom	<[email protected]>
 andrew-d	<[email protected]>
 asdil12		<[email protected]>

+ 2 - 2
build.go

@@ -410,7 +410,7 @@ func xdr() {
 }
 
 func translate() {
-	os.Chdir("gui/assets/lang")
+	os.Chdir("gui/default/assets/lang")
 	runPipe("lang-en-new.json", "go", "run", "../../../script/translate.go", "lang-en.json", "../../")
 	os.Remove("lang-en.json")
 	err := os.Rename("lang-en-new.json", "lang-en.json")
@@ -421,7 +421,7 @@ func translate() {
 }
 
 func transifex() {
-	os.Chdir("gui/assets/lang")
+	os.Chdir("gui/default/assets/lang")
 	runPrint("go", "run", "../../../script/transifexdl.go")
 	os.Chdir("../../..")
 	assets()

+ 60 - 11
cmd/syncthing/gui.go

@@ -52,6 +52,7 @@ type apiService struct {
 	id              protocol.DeviceID
 	cfg             *config.Wrapper
 	assetDir        string
+	themes          []string
 	model           *model.Model
 	eventSub        *events.BufferedSubscription
 	discoverer      *discover.CachingMux
@@ -79,6 +80,15 @@ func newAPIService(id protocol.DeviceID, cfg *config.Wrapper, assetDir string, m
 		systemLog:       systemLog,
 	}
 
+	seen := make(map[string]struct{})
+	for file := range auto.Assets() {
+		theme := strings.Split(file, "/")[0]
+		if _, ok := seen[theme]; !ok {
+			seen[theme] = struct{}{}
+			service.themes = append(service.themes, theme)
+		}
+	}
+
 	var err error
 	service.listener, err = service.getListener(cfg.GUI())
 	return service, err
@@ -198,10 +208,16 @@ func (s *apiService) Serve() {
 	mux.HandleFunc("/qr/", s.getQR)
 
 	// Serve compiled in assets unless an asset directory was set (for development)
-	mux.Handle("/", embeddedStatic{
-		assetDir: s.assetDir,
-		assets:   auto.Assets(),
-	})
+	assets := &embeddedStatic{
+		theme:        s.cfg.GUI().Theme,
+		lastModified: time.Now(),
+		mut:          sync.NewRWMutex(),
+		assetDir:     s.assetDir,
+		assets:       auto.Assets(),
+	}
+	mux.Handle("/", assets)
+
+	s.cfg.Subscribe(assets)
 
 	guiCfg := s.cfg.GUI()
 
@@ -690,6 +706,7 @@ func (s *apiService) getSystemStatus(w http.ResponseWriter, r *http.Request) {
 	res["pathSeparator"] = string(filepath.Separator)
 	res["uptime"] = int(time.Since(startTime).Seconds())
 	res["startTime"] = startTime
+	res["themes"] = s.themes
 
 	sendJSON(w, res)
 }
@@ -1015,8 +1032,11 @@ func (s *apiService) getSystemBrowse(w http.ResponseWriter, r *http.Request) {
 }
 
 type embeddedStatic struct {
-	assetDir string
-	assets   map[string][]byte
+	theme        string
+	lastModified time.Time
+	mut          sync.RWMutex
+	assetDir     string
+	assets       map[string][]byte
 }
 
 func (s embeddedStatic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
@@ -1039,13 +1059,21 @@ func (s embeddedStatic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		}
 	}
 
-	bs, ok := s.assets[file]
+	s.mut.RLock()
+	theme := s.theme
+	modified := s.lastModified
+	s.mut.RUnlock()
+
+	bs, ok := s.assets[theme+"/"+file]
 	if !ok {
-		http.NotFound(w, r)
-		return
+		bs, ok = s.assets[config.DefaultTheme+"/"+file]
+		if !ok {
+			http.NotFound(w, r)
+			return
+		}
 	}
 
-	if r.Header.Get("If-Modified-Since") == auto.AssetsBuildDate {
+	if modifiedSince, err := time.Parse(r.Header.Get("If-Modified-Since"), http.TimeFormat); err == nil && modified.Before(modifiedSince) {
 		w.WriteHeader(http.StatusNotModified)
 		return
 	}
@@ -1064,7 +1092,7 @@ func (s embeddedStatic) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 		gr.Close()
 	}
 	w.Header().Set("Content-Length", fmt.Sprintf("%d", len(bs)))
-	w.Header().Set("Last-Modified", auto.AssetsBuildDate)
+	w.Header().Set("Last-Modified", modified.Format(http.TimeFormat))
 	w.Header().Set("Cache-Control", "public")
 
 	w.Write(bs)
@@ -1097,6 +1125,27 @@ func (s embeddedStatic) mimeTypeForFile(file string) string {
 	}
 }
 
+// VerifyConfiguration implements the config.Committer interface
+func (s *embeddedStatic) VerifyConfiguration(from, to config.Configuration) error {
+	return nil
+}
+
+// CommitConfiguration implements the config.Committer interface
+func (s *embeddedStatic) CommitConfiguration(from, to config.Configuration) bool {
+	s.mut.Lock()
+	if s.theme != to.GUI.Theme {
+		s.theme = to.GUI.Theme
+		s.lastModified = time.Now()
+	}
+	s.mut.Unlock()
+
+	return true
+}
+
+func (s *embeddedStatic) String() string {
+	return fmt.Sprintf("embeddedStatic@%p", s)
+}
+
 func (s *apiService) toNeedSlice(fs []db.FileInfoTruncated) []jsonDBFileInfo {
 	res := make([]jsonDBFileInfo, len(fs))
 	for i, f := range fs {

+ 475 - 0
gui/dark/assets/css/overrides.css

@@ -0,0 +1,475 @@
+/*
+// Copyright (C) 2014 The Syncthing Authors.
+//
+// This Source Code Form is subject to the terms of the Mozilla Public
+// License, v. 2.0. If a copy of the MPL was not distributed with this file,
+// You can obtain one at http://mozilla.org/MPL/2.0/.
+
+*/
+
+body {
+    padding-bottom: 70px;
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+
+h1, h2, h3, h4, h5 {
+    font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
+    line-height: 1.25;
+}
+
+ul+h5 {
+    margin-top: 1.5em;
+}
+
+#content {
+    margin-bottom: 50px;
+}
+
+.panel-progress {
+    background: #3498db;
+    height: 3px;
+    left: 0;
+    position: absolute;
+    top: 0;
+    display: block;
+}
+
+.panel-title {
+    position: relative;
+    text-overflow: ellipsis;
+    overflow: hidden;
+}
+
+identicon {
+    display: inline-block;
+    position: relative;
+    width: 1em;
+    height: 1em;
+    line-height: 1;
+    margin-right: 5px;
+}
+
+.identicon {
+    width: 1em;
+    height: 1em;
+}
+
+.identicon rect {
+    fill: #333;
+}
+
+.checkbox {
+    margin-top: 0px;
+}
+
+.checkbox input[type="checkbox"], .radio input[type="radio"] {
+    float: none; /* issue #1197 */
+}
+
+.popover {
+    max-width: none;
+    min-width: 250px;
+}
+
+.panel-heading .fa, .modal-header .fa {
+    margin-right: 10px;
+}
+
+.panel-heading {
+    position: relative;
+    overflow: hidden;
+}
+
+.text-monospace {
+    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+
+.table-condensed>thead>tr>th, .table-condensed>tbody>tr>th, .table-condensed>tfoot>tr>th, .table-condensed>thead>tr>td, .table-condensed>tbody>tr>td, .table-condensed>tfoot>tr>td {
+    border-top: none;
+}
+
+.logo {
+    margin: 0;
+    padding: 0;
+    top: -5px;
+    position: relative;
+}
+
+.list-no-bullet {
+    list-style-type: none
+}
+
+.li-column {
+    display: inline-block;
+    min-width: 7em;
+    margin-right: 1em;
+    background-color: rgb(236, 240, 241);
+    border-radius: 3px;
+    padding: 1px 4px;
+    margin: 2px 2px;
+}
+.li-column span.data {
+    margin-left: 0.5em;
+    min-width: 10em;
+    text-align: right;
+    display: inline-block;
+}
+
+.ng-cloak {
+    display: none !important;
+}
+
+.table th {
+    white-space: nowrap;
+    font-weight: 400;
+}
+
+.table td {
+    padding-left: 20px !important;
+}
+
+.table td.small-data {
+    white-space: nowrap;
+}
+
+table.table-condensed {
+    table-layout: fixed;
+}
+table.table-condensed td {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+@media (max-width:767px) {
+    table.table-condensed td {
+        /* for mobile phones to allow linebreaks in long repro folder/shared with
+        * columns. */
+        white-space: normal;
+    }
+}
+
+.navbar-right {
+    /* to align with panel */
+    padding-right: 15px;
+}
+
+/**
+ * Menu for select language
+ */
+
+@media (min-width:480px) and (max-width:649px) {
+    *[language-select] > .dropdown-menu {
+        width: 230px;
+    }
+}
+
+@media (min-width:650px) {
+    *[language-select] > .dropdown-menu > li {
+        width: 50%;
+        float: left;
+    }
+    *[language-select] > .dropdown-menu {
+        width: 440px;
+    }
+}
+
+
+@media (max-width:479px) {
+    .dropdown-menu {
+        padding-top: 55px;
+    }
+
+    nav .dropdown-toggle {
+        font-size: 14px;
+    }
+
+    .dropdown-toggle {
+        float: left;
+    }
+
+    .navbar-brand {
+        padding-left: 0;
+        padding-top: 16px;
+    }
+
+    .navbar-nav .open .dropdown-menu > li > a {
+        padding: 12px 15px 12px 25px;
+    }
+}
+
+
+.panel-body .table-condensed {
+    margin-bottom: 0;
+}
+
+.dl-horizontal.dl-narrow dt {
+    width: 40px;
+}
+
+.dl-horizontal.dl-narrow dd {
+    margin-left: 60px;
+}
+
+/**
+ * Progress bars with centered text
+ */
+
+.progress {
+    margin-bottom: 0px;
+    position: relative;
+}
+
+.progress span.frontal {
+    text-align: center;
+    position: absolute;
+    display: block;
+    width: 100%;
+}
+
+.three-columns {
+    -webkit-column-count: 3;
+    -moz-column-count: 3;
+    column-count: 3;
+}
+
+.two-columns {
+    -webkit-column-count: 2;
+    -moz-column-count: 2;
+    column-count: 2;
+}
+
+ul.three-columns li, ul.two-columns li {
+    padding-left: 0.5em;
+    text-indent: -0.5em;
+}
+
+/** Footer nav on small devices **/
+
+@media (max-width: 1199px) {
+    body {
+        padding-bottom: 0;
+    }
+
+    .navbar-fixed-bottom {
+        position: static;
+    }
+}
+
+
+/**
+
+Dark theme customizations start here.
+
+Author: alessandro.g89
+Source: https://userstyles.org/styles/122502/syncthing-dark
+
+**/
+
+body {
+    color: #aaa !important;
+    background-color: black !important;
+}
+
+a:hover,a:focus,a.focus{
+    outline: none !important;
+}
+
+
+/* navbar */
+.navbar {
+    background-color: #333 !important;
+    border-color: #333 !important;
+    border-width: 2px !important;
+}
+
+.navbar-text, .dropdown>a, .dropdown-menu>li>a, .hidden-xs>a, .navbar-link {
+    color: #aaa !important;
+}
+
+.dropdown-menu {
+    border-color: #333 !important;
+    border-width: 2px !important;
+    background-color: #222 !important;
+}
+
+.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus {
+    color: #fff !important;
+    background-color: #333 !important;
+}
+
+.open>.dropdown-toggle, .dropdown-toggle:hover {
+    border-color: #333 !important;
+    background-color: #222 !important;
+}
+
+.divider {
+    background-color: #333 !important;
+    height: 2px !important;
+}
+
+li.hidden-xs:hover, .navbar-link:hover, .navbar-link:focus {
+    outline: none !important;
+    border-color: #333 !important;
+    background-color: #222 !important;
+}
+
+.dropdown-menu>.active>a {
+    color: #fff !important;
+    background-color: #217dbb !important;
+}
+
+
+/* main panel */
+.panel {
+    background-color: #111 !important;
+    border-width: 2px !important;
+}
+
+.panel-default {
+    border-color: #222 !important;
+}
+
+.panel-default>.panel-heading {
+    color: #aaa !important;
+    border-color: #222 !important;
+    background-color: #222 !important;
+}
+
+.panel-footer {
+    background-color: #111 !important;
+    border-width: 0 !important;
+}
+
+.table-striped>tbody>tr:nth-of-type(odd) {
+    background-color: #181818 !important;
+}
+
+.panel-group .panel-heading+.panel-collapse>.panel-body, .panel-group .panel-heading+.panel-collapse>.list-group {
+    border-top: 1px solid #222 !important;
+}
+
+.identicon>rect {
+    fill: #aaa !important;
+}
+
+/* buttons */
+.btn {
+    border-radius: 3px !important;
+    border-width: 0px !important;
+}
+
+.btn:hover, .btn:focus, .btn.focus {
+    outline: none !important;
+}
+.btn-default {
+    color: #aaa !important;
+    background-color: #333 !important;
+}
+
+.btn-default:hover, .btn-default:focus, .btn-default.focus {
+    color: #fff !important;
+    background-color: #484848 !important;
+}
+
+.btn-primary {
+    background-color: #217dbb !important;
+}
+
+.btn-primary:hover, .btn-primary:focus, .btn-primary.focus {
+    background-color: #3498db !important;
+}
+
+.btn-warning {
+    background-color: #c29d0b !important;
+}
+
+.btn-warning:hover, .btn-warning:focus, .btn-warning.focus {
+    background-color: #f1c40f !important;
+}
+
+.btn-danger {
+    background-color: #d62c1a !important;
+}
+
+.btn-danger:hover, .btn-danger:focus, .btn-danger.focus {
+    background-color: #e74c3c !important;
+}
+
+
+/* modal dialogs */
+.modal-header {
+    border-color: #222 !important;
+    background-color: #222;
+}
+
+.modal-content {
+    border-color: #666 !important;
+    border-width: 2px !important;
+    background-color: #111 !important;
+}
+
+.modal-footer {
+    border-color: #111 !important;
+    background-color: #111 !important;
+}
+
+.alert-warning {
+    background-color: #c29d0b !important;
+}
+
+.alert-danger {
+    background-color: #d62c1a !important;
+}
+
+.help-block {
+    color: #aaa !important;
+}
+
+.form-control {
+    color: #aaa !important;
+    border-color: #444 !important;
+    background-color: black !important;
+}
+
+code.ng-binding{
+    color: #f99 !important;
+    background-color: #444 !important;
+}
+
+.well, .form-control[readonly="readonly"] { /* read-only fields*/
+    color: #444 !important;
+    border-color: #444 !important;
+    background-color: #111 !important;
+}
+
+/* buttons for pagination */
+.pagination>li>a, .pagination>li>span {
+    background-color: #333 !important;
+    border-color: #484848 !important;
+}
+
+.pagination>li>a:hover, .pagination>li>a:focus, .pagination>li>a.focus {
+    background-color: #484848 !important;
+}
+
+
+/* progess bars */
+.progress-bar {
+    background-color: #217dbb !important;
+}
+
+.progress-bar-success {
+    background-color: #0A8522 !important;
+}
+
+.progress-bar-info {
+    background-color: #9b59b6 !important;
+}
+
+.progress-bar-warning {
+    background-color: #c29d0b !important;
+}
+
+.progress-bar-danger {
+    background-color: #d62c1a !important;
+}

+ 0 - 0
gui/assets/css/overrides.css → gui/default/assets/css/overrides.css


+ 0 - 0
gui/assets/font/raleway-500.woff → gui/default/assets/font/raleway-500.woff


+ 0 - 0
gui/assets/font/raleway.css → gui/default/assets/font/raleway.css


+ 0 - 0
gui/assets/img/favicon.png → gui/default/assets/img/favicon.png


+ 0 - 0
gui/assets/img/logo-horizontal.svg → gui/default/assets/img/logo-horizontal.svg


+ 0 - 0
gui/assets/img/safari-pinned-tab.svg → gui/default/assets/img/safari-pinned-tab.svg


+ 0 - 0
gui/assets/lang/README-FIRST.txt → gui/default/assets/lang/README-FIRST.txt


+ 0 - 0
gui/assets/lang/lang-bg.json → gui/default/assets/lang/lang-bg.json


+ 0 - 0
gui/assets/lang/lang-ca.json → gui/default/assets/lang/lang-ca.json


+ 0 - 0
gui/assets/lang/[email protected] → gui/default/assets/lang/[email protected]


+ 0 - 0
gui/assets/lang/lang-cs.json → gui/default/assets/lang/lang-cs.json


+ 0 - 0
gui/assets/lang/lang-da.json → gui/default/assets/lang/lang-da.json


+ 0 - 0
gui/assets/lang/lang-de.json → gui/default/assets/lang/lang-de.json


+ 0 - 0
gui/assets/lang/lang-el.json → gui/default/assets/lang/lang-el.json


+ 0 - 0
gui/assets/lang/lang-en-GB.json → gui/default/assets/lang/lang-en-GB.json


+ 0 - 0
gui/assets/lang/lang-en.json → gui/default/assets/lang/lang-en.json


+ 0 - 0
gui/assets/lang/lang-es-ES.json → gui/default/assets/lang/lang-es-ES.json


+ 0 - 0
gui/assets/lang/lang-es.json → gui/default/assets/lang/lang-es.json


+ 0 - 0
gui/assets/lang/lang-fi.json → gui/default/assets/lang/lang-fi.json


+ 0 - 0
gui/assets/lang/lang-fr-CA.json → gui/default/assets/lang/lang-fr-CA.json


+ 0 - 0
gui/assets/lang/lang-fr.json → gui/default/assets/lang/lang-fr.json


+ 0 - 0
gui/assets/lang/lang-fy.json → gui/default/assets/lang/lang-fy.json


+ 0 - 0
gui/assets/lang/lang-hu.json → gui/default/assets/lang/lang-hu.json


+ 0 - 0
gui/assets/lang/lang-it.json → gui/default/assets/lang/lang-it.json


+ 0 - 0
gui/assets/lang/lang-ja.json → gui/default/assets/lang/lang-ja.json


+ 0 - 0
gui/assets/lang/lang-ko-KR.json → gui/default/assets/lang/lang-ko-KR.json


+ 0 - 0
gui/assets/lang/lang-lt.json → gui/default/assets/lang/lang-lt.json


+ 0 - 0
gui/assets/lang/lang-nb.json → gui/default/assets/lang/lang-nb.json


+ 0 - 0
gui/assets/lang/lang-nl.json → gui/default/assets/lang/lang-nl.json


+ 0 - 0
gui/assets/lang/lang-nn.json → gui/default/assets/lang/lang-nn.json


+ 0 - 0
gui/assets/lang/lang-pl.json → gui/default/assets/lang/lang-pl.json


+ 0 - 0
gui/assets/lang/lang-pt-BR.json → gui/default/assets/lang/lang-pt-BR.json


+ 0 - 0
gui/assets/lang/lang-pt-PT.json → gui/default/assets/lang/lang-pt-PT.json


+ 0 - 0
gui/assets/lang/lang-ro-RO.json → gui/default/assets/lang/lang-ro-RO.json


+ 0 - 0
gui/assets/lang/lang-ru.json → gui/default/assets/lang/lang-ru.json


+ 0 - 0
gui/assets/lang/lang-sv.json → gui/default/assets/lang/lang-sv.json


+ 0 - 0
gui/assets/lang/lang-tr.json → gui/default/assets/lang/lang-tr.json


+ 0 - 0
gui/assets/lang/lang-uk.json → gui/default/assets/lang/lang-uk.json


+ 0 - 0
gui/assets/lang/lang-vi.json → gui/default/assets/lang/lang-vi.json


+ 0 - 0
gui/assets/lang/lang-zh-CN.json → gui/default/assets/lang/lang-zh-CN.json


+ 0 - 0
gui/assets/lang/lang-zh-TW.json → gui/default/assets/lang/lang-zh-TW.json


+ 0 - 0
gui/assets/lang/prettyprint.js → gui/default/assets/lang/prettyprint.js


+ 0 - 0
gui/assets/lang/valid-langs.js → gui/default/assets/lang/valid-langs.js


+ 0 - 0
gui/index.html → gui/default/index.html


+ 0 - 0
gui/modal.html → gui/default/modal.html


+ 0 - 0
gui/syncthing/app.js → gui/default/syncthing/app.js


+ 0 - 0
gui/syncthing/core/aboutModalDirective.js → gui/default/syncthing/core/aboutModalDirective.js


+ 1 - 0
gui/syncthing/core/aboutModalView.html → gui/default/syncthing/core/aboutModalView.html

@@ -14,6 +14,7 @@
       <ul class="list-unstyled three-columns" id="contributor-list">
         <li class="auto-generated">Aaron Bieber</li>
         <li class="auto-generated">Adam Piggott</li>
+        <li class="auto-generated">Alessandro G.</li>
         <li class="auto-generated">Alexander Graf</li>
         <li class="auto-generated">Anderson Mesquita</li>
         <li class="auto-generated">Andrew Dunham</li>

+ 0 - 0
gui/syncthing/core/alwaysNumberFilter.js → gui/default/syncthing/core/alwaysNumberFilter.js


+ 0 - 0
gui/syncthing/core/basenameFilter.js → gui/default/syncthing/core/basenameFilter.js


+ 0 - 0
gui/syncthing/core/binaryFilter.js → gui/default/syncthing/core/binaryFilter.js


+ 0 - 0
gui/syncthing/core/durationFilter.js → gui/default/syncthing/core/durationFilter.js


+ 0 - 0
gui/syncthing/core/eventService.js → gui/default/syncthing/core/eventService.js


+ 0 - 0
gui/syncthing/core/httpErrorDialogDirective.js → gui/default/syncthing/core/httpErrorDialogDirective.js


+ 0 - 0
gui/syncthing/core/httpErrorDialogView.html → gui/default/syncthing/core/httpErrorDialogView.html


+ 0 - 0
gui/syncthing/core/identiconDirective.js → gui/default/syncthing/core/identiconDirective.js


+ 0 - 0
gui/syncthing/core/languageSelectDirective.js → gui/default/syncthing/core/languageSelectDirective.js


+ 0 - 0
gui/syncthing/core/lastErrorComponentFilter.js → gui/default/syncthing/core/lastErrorComponentFilter.js


+ 0 - 0
gui/syncthing/core/localeService.js → gui/default/syncthing/core/localeService.js


+ 0 - 0
gui/syncthing/core/majorUpgradeModalDirective.js → gui/default/syncthing/core/majorUpgradeModalDirective.js


+ 0 - 0
gui/syncthing/core/majorUpgradeModalView.html → gui/default/syncthing/core/majorUpgradeModalView.html


+ 0 - 0
gui/syncthing/core/modalDirective.js → gui/default/syncthing/core/modalDirective.js


+ 0 - 0
gui/syncthing/core/module.js → gui/default/syncthing/core/module.js


+ 0 - 0
gui/syncthing/core/naturalFilter.js → gui/default/syncthing/core/naturalFilter.js


+ 0 - 0
gui/syncthing/core/networkErrorDialogDirective.js → gui/default/syncthing/core/networkErrorDialogDirective.js


+ 0 - 0
gui/syncthing/core/networkErrorDialogView.html → gui/default/syncthing/core/networkErrorDialogView.html


+ 0 - 0
gui/syncthing/core/popoverDirective.js → gui/default/syncthing/core/popoverDirective.js


+ 0 - 0
gui/syncthing/core/restartingDialogDirective.js → gui/default/syncthing/core/restartingDialogDirective.js


+ 0 - 0
gui/syncthing/core/restartingDialogView.html → gui/default/syncthing/core/restartingDialogView.html


+ 0 - 0
gui/syncthing/core/selectOnClickDirective.js → gui/default/syncthing/core/selectOnClickDirective.js


+ 0 - 0
gui/syncthing/core/shutdownDialogDirective.js → gui/default/syncthing/core/shutdownDialogDirective.js


+ 0 - 0
gui/syncthing/core/shutdownDialogView.html → gui/default/syncthing/core/shutdownDialogView.html


+ 5 - 0
gui/syncthing/core/syncthingController.js → gui/default/syncthing/core/syncthingController.js

@@ -866,6 +866,7 @@ angular.module('syncthing.core')
         $scope.saveSettings = function () {
             // Make sure something changed
             var changed = !angular.equals($scope.config.options, $scope.tmpOptions) || !angular.equals($scope.config.gui, $scope.tmpGUI);
+            var themeChanged = $scope.config.gui.theme !== $scope.tmpGUI.theme;
             if (changed) {
                 // Check if usage reporting has been enabled or disabled
                 if ($scope.tmpOptions.urEnabled && $scope.tmpOptions.urAccepted <= 0) {
@@ -901,6 +902,10 @@ angular.module('syncthing.core')
             }
 
             $('#settings').modal("hide");
+
+            if (themeChanged) {
+              document.location.reload(true);
+            }
         };
 
         $scope.saveAdvanced = function () {

+ 0 - 0
gui/syncthing/core/uniqueFolderDirective.js → gui/default/syncthing/core/uniqueFolderDirective.js


+ 0 - 0
gui/syncthing/core/upgradingDialogDirective.js → gui/default/syncthing/core/upgradingDialogDirective.js


+ 0 - 0
gui/syncthing/core/upgradingDialogView.html → gui/default/syncthing/core/upgradingDialogView.html


+ 0 - 0
gui/syncthing/core/validDeviceidDirective.js → gui/default/syncthing/core/validDeviceidDirective.js


+ 0 - 0
gui/syncthing/device/editDeviceModalDirective.js → gui/default/syncthing/device/editDeviceModalDirective.js


+ 0 - 0
gui/syncthing/device/editDeviceModalView.html → gui/default/syncthing/device/editDeviceModalView.html


+ 0 - 0
gui/syncthing/device/idqrModalDirective.js → gui/default/syncthing/device/idqrModalDirective.js


+ 0 - 0
gui/syncthing/device/idqrModalView.html → gui/default/syncthing/device/idqrModalView.html


+ 0 - 0
gui/syncthing/device/module.js → gui/default/syncthing/device/module.js


+ 0 - 0
gui/syncthing/folder/editFolderModalDirective.js → gui/default/syncthing/folder/editFolderModalDirective.js


+ 0 - 0
gui/syncthing/folder/editFolderModalView.html → gui/default/syncthing/folder/editFolderModalView.html


+ 0 - 0
gui/syncthing/folder/editIgnoresModalDirective.js → gui/default/syncthing/folder/editIgnoresModalDirective.js


+ 0 - 0
gui/syncthing/folder/editIgnoresModalView.html → gui/default/syncthing/folder/editIgnoresModalView.html


+ 0 - 0
gui/syncthing/folder/module.js → gui/default/syncthing/folder/module.js


+ 0 - 0
gui/syncthing/settings/advancedSettingsModalDirective.js → gui/default/syncthing/settings/advancedSettingsModalDirective.js


+ 0 - 0
gui/syncthing/settings/advancedSettingsModalView.html → gui/default/syncthing/settings/advancedSettingsModalView.html


+ 0 - 0
gui/syncthing/settings/module.js → gui/default/syncthing/settings/module.js


+ 0 - 0
gui/syncthing/settings/settingsModalDirective.js → gui/default/syncthing/settings/settingsModalDirective.js


+ 10 - 1
gui/syncthing/settings/settingsModalView.html → gui/default/syncthing/settings/settingsModalView.html

@@ -136,8 +136,17 @@
                 <span class="fa fa-repeat"></span>&nbsp;<span translate>Generate</span>
               </button>
             </div>
-          </div>
 
+            <div class="form-group" ng-if="system.themes.length > 1">
+              <label>GUI Theme</label>
+              <select class="form-control" ng-model="tmpGUI.theme" ng->
+                <option ng-repeat="theme in system.themes" value="{{ theme }}">
+                  {{ theme.charAt(0).toUpperCase() + theme.slice(1) }}
+                </option>
+              </select>
+            </div>
+
+          </div>
         </div>
       </form>
     </div>

+ 0 - 0
gui/syncthing/transfer/failedFilesModalDirective.js → gui/default/syncthing/transfer/failedFilesModalDirective.js


+ 0 - 0
gui/syncthing/transfer/failedFilesModalView.html → gui/default/syncthing/transfer/failedFilesModalView.html


+ 0 - 0
gui/syncthing/transfer/module.js → gui/default/syncthing/transfer/module.js


Some files were not shown because too many files changed in this diff