diff --git a/authors.go b/authors.go
index 34c5ceed..4c8170ea 100644
--- a/authors.go
+++ b/authors.go
@@ -20,6 +20,8 @@ import (
"strings"
)
+const htmlFile = "gui/scripts/syncthing/core/views/directives/aboutModalView.html"
+
func main() {
bs := readAll("AUTHORS")
lines := strings.Split(string(bs), "\n")
@@ -27,17 +29,17 @@ func main() {
authors := make([]string, 0, len(lines))
for _, line := range lines {
if m := nameRe.FindStringSubmatch(line); len(m) == 2 {
- authors = append(authors, "
"+m[1]+" ")
+ authors = append(authors, " "+m[1]+" ")
}
}
sort.Strings(authors)
replacement := strings.Join(authors, "\n")
authorsRe := regexp.MustCompile(`(?s)id="contributor-list">.*?`)
- bs = readAll("gui/index.html")
- bs = authorsRe.ReplaceAll(bs, []byte("id=\"contributor-list\">\n"+replacement+"\n "))
+ bs = readAll(htmlFile)
+ bs = authorsRe.ReplaceAll(bs, []byte("id=\"contributor-list\">\n"+replacement+"\n "))
- if err := ioutil.WriteFile("gui/index.html", bs, 0644); err != nil {
+ if err := ioutil.WriteFile(htmlFile, bs, 0644); err != nil {
log.Fatal(err)
}
}
diff --git a/build.go b/build.go
index 8d8319c4..d5ece8bd 100644
--- a/build.go
+++ b/build.go
@@ -411,7 +411,7 @@ func xdr() {
func translate() {
os.Chdir("gui/assets/lang")
- runPipe("lang-en-new.json", "go", "run", "../../../cmd/translate/main.go", "lang-en.json", "../../index.html")
+ runPipe("lang-en-new.json", "go", "run", "../../../cmd/translate/main.go", "lang-en.json", "../../")
os.Remove("lang-en.json")
err := os.Rename("lang-en-new.json", "lang-en.json")
if err != nil {
diff --git a/cmd/translate/main.go b/cmd/translate/main.go
index d9ab8483..2cc6ac7d 100644
--- a/cmd/translate/main.go
+++ b/cmd/translate/main.go
@@ -12,6 +12,7 @@ import (
"encoding/json"
"log"
"os"
+ "path/filepath"
"regexp"
"strings"
@@ -21,44 +22,48 @@ import (
var trans = make(map[string]string)
var attrRe = regexp.MustCompile(`\{\{'([^']+)'\s+\|\s+translate\}\}`)
-func generalNode(n *html.Node) {
+func generalNode(n *html.Node, filename string) {
translate := false
if n.Type == html.ElementNode {
- for _, a := range n.Attr {
- if a.Key == "translate" {
- translate = true
- break
- } else {
- if matches := attrRe.FindStringSubmatch(a.Val); len(matches) == 2 {
- translation(matches[1])
+ if n.Data == "translate" { // for Text
+ translate = true
+ } else {
+ for _, a := range n.Attr {
+ if a.Key == "translate" {
+ translate = true
+ break
+ } else {
+ if matches := attrRe.FindStringSubmatch(a.Val); len(matches) == 2 {
+ translation(matches[1])
+ }
}
}
}
} else if n.Type == html.TextNode {
v := strings.TrimSpace(n.Data)
if len(v) > 1 && !(strings.HasPrefix(v, "{{") && strings.HasSuffix(v, "}}")) {
- log.Println("Untranslated text node:")
+ log.Println("Untranslated text node (" + filename + "):")
log.Print("\t" + v)
}
}
for c := n.FirstChild; c != nil; c = c.NextSibling {
if translate {
- inTranslate(c)
+ inTranslate(c, filename)
} else {
- generalNode(c)
+ generalNode(c, filename)
}
}
}
-func inTranslate(n *html.Node) {
+func inTranslate(n *html.Node, filename string) {
if n.Type == html.TextNode {
translation(n.Data)
} else {
- log.Println("translate node with non-text child <")
+ log.Println("translate node with non-text child < (" + filename + ")")
log.Println(n)
}
if n.FirstChild != nil {
- log.Println("translate node has children:")
+ log.Println("translate node has children (" + filename + "):")
log.Println(n.Data)
}
}
@@ -72,6 +77,29 @@ func translation(v string) {
}
}
+func walkerFor(basePath string) filepath.WalkFunc {
+ return func(name string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+
+ if filepath.Ext(name) == ".html" && info.Mode().IsRegular() {
+ fd, err := os.Open(name)
+ if err != nil {
+ log.Fatal(err)
+ }
+ doc, err := html.Parse(fd)
+ if err != nil {
+ log.Fatal(err)
+ }
+ fd.Close()
+ generalNode(doc, filepath.Base(name))
+ }
+
+ return nil
+ }
+}
+
func main() {
fd, err := os.Open(os.Args[1])
if err != nil {
@@ -83,17 +111,10 @@ func main() {
}
fd.Close()
- fd, err = os.Open(os.Args[2])
- if err != nil {
- log.Fatal(err)
- }
- doc, err := html.Parse(fd)
- if err != nil {
- log.Fatal(err)
- }
- fd.Close()
+ var guiDir = os.Args[2]
+
+ filepath.Walk(guiDir, walkerFor(guiDir))
- generalNode(doc)
bs, err := json.MarshalIndent(trans, "", " ")
if err != nil {
log.Fatal(err)
diff --git a/gui/index.html b/gui/index.html
index bfaf8581..0d67980d 100755
--- a/gui/index.html
+++ b/gui/index.html
@@ -476,776 +476,22 @@
-
-
-
-
- Syncthing seems to be down, or there is a problem with your Internet connection. Retrying…
-
-
-
-
-
-
-
- Syncthing seems to be experiencing a problem processing your request. Please refresh the page or restart Syncthing if the problem persists.
-
-
-
-
-
-
- Syncthing is restarting. Please wait ...
-
-
-
-
-
- Syncthing is upgrading. Please wait ...
-
-
-
-
-
- Syncthing has been shut down.
-
-
-
-
-
- {{myID}}
-
-
-
-
-
-
-
-
-
-
-
- This is a major version upgrade.
- A new major version may not be compatible with previous versions.
- Please consult the release notes before performing a major upgrade.
-
-
- Release Notes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
When adding a new folder, keep in mind that the Folder ID is used to tie folders together between devices. They are case sensitive and must match exactly between all devices.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Enter ignore patterns, one per line.
-
-
-
-
-
Quick guide to supported patterns (full documentation ):
-
- ! Inversion of the given condition (i.e. do not exclude)
- * Single level wildcard (matches within a directory only)
- ** Multi level wildcard (matches multiple directory levels)
- // Comment, when used at the start of a line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.
-
The aggregated statistics are publicly available at {%url%}.
-
Preview Usage Report
-
{{reportData | json}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.
-
The aggregated statistics are publicly available at {%url%}.
-
{{reportData | json}}
-
-
-
-
-
-
-
-
-
-
-
Reused
-
Copied from original
-
Copied from elsewhere
-
Downloaded
-
Downloading
-
-
-
-
-
-
-
-
- {{needActions[f.action]}}
-
-
- {{f.name | basename}}
-
-
-
-
- {{f.name | basename}}
-
-
-
-
-
-
-
-
-
-
-
- {{progress[neededFolder][f.name].bytesDone | binary}}B / {{progress[neededFolder][f.name].bytesTotal | binary}}B
-
-
-
-
- {{f.size | binary}}B
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The following items could not be synchronized.
- They are retried automatically and will be synced when the error is resolved.
-
-
-
- {{e.path | basename}}
- {{e.error | lastErrorComponent}}
-
-
-
-
-
-
-
-
-
-
- {{versionString()}}
-
-
- Copyright © 2015 the following Contributors:
-
-
-
- Aaron Bieber
- Alexander Graf
- Andrew Dunham
- Antony Male
- Arthur Axel fREW Schmidt
- Audrius Butkevicius
- Bart De Vries
- Ben Curthoys
- Ben Schulz
- Ben Sidhom
- Brandon Philips
- Brendan Long
- Brian R. Becker
- Caleb Callaway
- Carsten Hagemann
- Cathryne Linenweaver
- Chris Howie
- Chris Joel
- Colin Kennedy
- Daniel Bergmann
- Daniel Martí
- Denis A.
- Dennis Wilson
- Dominik Heidler
- Elias Jarlebring
- Emil Hessman
- Erik Meitner
- Federico Castagnini
- Felix Ableitner
- Felix Unterpaintner
- Francois-Xavier Gsell
- Frank Isemann
- Gilli Sigurdsson
- Jacek Szafarkiewicz
- Jakob Borg
- James Patterson
- Jaroslav Malec
- Jens Diemer
- Jochen Voss
- Johan Vromans
- Karol Różycki
- Ken'ichi Kamada
- Lode Hoste
- Lord Landon Agahnim
- Marc Laporte
- Marc Pujol
- Marcin Dziadus
- Michael Jephcote
- Michael Tilli
- Pascal Jungblut
- Peter Hoeg
- Philippe Schommers
- Phill Luby
- Piotr Bejda
- Ryan Sullivan
- Sergey Mishin
- Stefan Tatschner
- Tim Abell
- Tobias Nygren
- Tomas Cerveny
- Tully Robinson
- Veeti Paananen
- Vil Brekin
-
-
-
-
-
- Syncthing includes the following software or portions thereof:
-
- The Go Programming Language , Copyright © 2012 The Go Authors.
- bkaradzic/go-lz4 , Copyright © 2011-2012 Branimir Karadzic, 2013 Damian Gryski.
- kardianos/osext , Copyright © 2012 Daniel Theophanes.
- golang/snappy , Copyright © 2011 The Snappy-Go Authors.
- juju/ratelimit , Copyright © 2015 Canonical Ltd.
- thejerf/suture , Copyright © 2014-2015 Barracuda Networks, Inc.
- syndtr/goleveldb , Copyright © 2012, Suryandaru Triandana
- vitrun/qart , Copyright © The Go Authors.
- AngularJS , Copyright © 2010-2015 Google, Inc.
- Bootstrap , Copyright © 2011-2015 Twitter, Inc.
-
-
-
-
-
-
-
-
-
-
-
-
- Be careful!
- Incorrect configuration may damage your folder contents and render Syncthing inoperable.
-
-
-
-
-
-
-
-
-
-
-
- Folder "{{folder.id}}"
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1260,13 +506,20 @@
+
+
+
+
+
+
+
@@ -1278,6 +531,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/app.js b/gui/scripts/syncthing/app.js
index 9d260efc..483ff9e7 100644
--- a/gui/scripts/syncthing/app.js
+++ b/gui/scripts/syncthing/app.js
@@ -11,7 +11,13 @@
var syncthing = angular.module('syncthing', [
'angularUtils.directives.dirPagination',
'pascalprecht.translate',
- 'syncthing.core'
+
+ 'syncthing.core',
+ 'syncthing.device',
+ 'syncthing.folder',
+ 'syncthing.settings',
+ 'syncthing.transfer',
+ 'syncthing.usagereport'
]);
var urlbase = 'rest';
diff --git a/gui/scripts/syncthing/core/directives/aboutModalDirective.js b/gui/scripts/syncthing/core/directives/aboutModalDirective.js
new file mode 100644
index 00000000..633fe2f6
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/aboutModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('aboutModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/aboutModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/majorUpgradeModalDirective.js b/gui/scripts/syncthing/core/directives/majorUpgradeModalDirective.js
new file mode 100644
index 00000000..1bddfea5
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/majorUpgradeModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('majorUpgradeModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/majorUpgradeModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/messageDialogs/httpErrorDialogDirective.js b/gui/scripts/syncthing/core/directives/messageDialogs/httpErrorDialogDirective.js
new file mode 100644
index 00000000..87894b28
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/messageDialogs/httpErrorDialogDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('httpErrorDialog', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/messageDialogs/httpErrorDialogView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/messageDialogs/networkErrorDialogDirective.js b/gui/scripts/syncthing/core/directives/messageDialogs/networkErrorDialogDirective.js
new file mode 100644
index 00000000..048e93b0
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/messageDialogs/networkErrorDialogDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('networkErrorDialog', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/messageDialogs/networkErrorDialogView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/messageDialogs/restartingDialogDirective.js b/gui/scripts/syncthing/core/directives/messageDialogs/restartingDialogDirective.js
new file mode 100644
index 00000000..0ebe5c43
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/messageDialogs/restartingDialogDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('restartingDialog', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/messageDialogs/restartingDialogView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/messageDialogs/shutdownDialogDirective.js b/gui/scripts/syncthing/core/directives/messageDialogs/shutdownDialogDirective.js
new file mode 100644
index 00000000..8f98bbe7
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/messageDialogs/shutdownDialogDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('shutdownDialog', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/messageDialogs/shutdownDialogView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/directives/messageDialogs/upgradingDialogDirective.js b/gui/scripts/syncthing/core/directives/messageDialogs/upgradingDialogDirective.js
new file mode 100644
index 00000000..fa69fa4c
--- /dev/null
+++ b/gui/scripts/syncthing/core/directives/messageDialogs/upgradingDialogDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.core')
+ .directive('upgradingDialog', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/core/views/directives/messageDialogs/upgradingDialogView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/core/views/directives/aboutModalView.html b/gui/scripts/syncthing/core/views/directives/aboutModalView.html
new file mode 100644
index 00000000..6c28c40a
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/aboutModalView.html
@@ -0,0 +1,83 @@
+
+ {{versionString()}}
+
+
+ Copyright © 2015 the following Contributors:
+
+
+
+ Aaron Bieber
+ Alexander Graf
+ Andrew Dunham
+ Arthur Axel fREW Schmidt
+ Audrius Butkevicius
+ Bart De Vries
+ Ben Curthoys
+ Ben Schulz
+ Ben Sidhom
+ Brandon Philips
+ Brendan Long
+ Caleb Callaway
+ Carsten Hagemann
+ Cathryne Linenweaver
+ Chris Howie
+ Chris Joel
+ Colin Kennedy
+ Daniel Martí
+ Dennis Wilson
+ Dominik Heidler
+ Elias Jarlebring
+ Emil Hessman
+ Federico Castagnini
+ Felix Ableitner
+ Felix Unterpaintner
+ Francois-Xavier Gsell
+ Gilli Sigurdsson
+ Jakob Borg
+ James Patterson
+ Jaroslav Malec
+ Jens Diemer
+ Jochen Voss
+ Johan Vromans
+ Karol Różycki
+ Ken'ichi Kamada
+ Lode Hoste
+ Lord Landon Agahnim
+ Marc Laporte
+ Marc Pujol
+ Marcin Dziadus
+ Michael Jephcote
+ Michael Tilli
+ Pascal Jungblut
+ Peter Hoeg
+ Philippe Schommers
+ Phill Luby
+ Piotr Bejda
+ Ryan Sullivan
+ Sergey Mishin
+ Stefan Tatschner
+ Tim Abell
+ Tobias Nygren
+ Tomas Cerveny
+ Tully Robinson
+ Veeti Paananen
+ Vil Brekin
+
+
+
+
+
+ Syncthing includes the following software or portions thereof:
+
+ The Go Programming Language , Copyright © 2012 The Go Authors.
+ bkaradzic/go-lz4 , Copyright © 2011-2012 Branimir Karadzic, 2013 Damian Gryski.
+ kardianos/osext , Copyright © 2012 Daniel Theophanes.
+ golang/snappy , Copyright © 2011 The Snappy-Go Authors.
+ juju/ratelimit , Copyright © 2015 Canonical Ltd.
+ thejerf/suture , Copyright © 2014-2015 Barracuda Networks, Inc.
+ syndtr/goleveldb , Copyright © 2012, Suryandaru Triandana
+ vitrun/qart , Copyright © The Go Authors.
+ AngularJS , Copyright © 2010-2015 Google, Inc.
+ Bootstrap , Copyright © 2011-2015 Twitter, Inc.
+
+
diff --git a/gui/scripts/syncthing/core/views/directives/majorUpgradeModalView.html b/gui/scripts/syncthing/core/views/directives/majorUpgradeModalView.html
new file mode 100644
index 00000000..1fb06336
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/majorUpgradeModalView.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ This is a major version upgrade.
+ A new major version may not be compatible with previous versions.
+ Please consult the release notes before performing a major upgrade.
+
+
+ Release Notes
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/core/views/directives/messageDialogs/httpErrorDialogView.html b/gui/scripts/syncthing/core/views/directives/messageDialogs/httpErrorDialogView.html
new file mode 100644
index 00000000..04fee56c
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/messageDialogs/httpErrorDialogView.html
@@ -0,0 +1,5 @@
+
+
+ Syncthing seems to be experiencing a problem processing your request. Please refresh the page or restart Syncthing if the problem persists.
+
+
diff --git a/gui/scripts/syncthing/core/views/directives/messageDialogs/networkErrorDialogView.html b/gui/scripts/syncthing/core/views/directives/messageDialogs/networkErrorDialogView.html
new file mode 100644
index 00000000..95441b54
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/messageDialogs/networkErrorDialogView.html
@@ -0,0 +1,5 @@
+
+
+ Syncthing seems to be down, or there is a problem with your Internet connection. Retrying…
+
+
diff --git a/gui/scripts/syncthing/core/views/directives/messageDialogs/restartingDialogView.html b/gui/scripts/syncthing/core/views/directives/messageDialogs/restartingDialogView.html
new file mode 100644
index 00000000..3fcccebc
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/messageDialogs/restartingDialogView.html
@@ -0,0 +1,3 @@
+
+ Syncthing is restarting. Please wait ...
+
diff --git a/gui/scripts/syncthing/core/views/directives/messageDialogs/shutdownDialogView.html b/gui/scripts/syncthing/core/views/directives/messageDialogs/shutdownDialogView.html
new file mode 100644
index 00000000..51c4b377
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/messageDialogs/shutdownDialogView.html
@@ -0,0 +1,3 @@
+
+ Syncthing has been shut down.
+
diff --git a/gui/scripts/syncthing/core/views/directives/messageDialogs/upgradingDialogView.html b/gui/scripts/syncthing/core/views/directives/messageDialogs/upgradingDialogView.html
new file mode 100644
index 00000000..86280046
--- /dev/null
+++ b/gui/scripts/syncthing/core/views/directives/messageDialogs/upgradingDialogView.html
@@ -0,0 +1,3 @@
+
+ Syncthing is upgrading. Please wait ...
+
diff --git a/gui/scripts/syncthing/device/directives/editDeviceModalDirective.js b/gui/scripts/syncthing/device/directives/editDeviceModalDirective.js
new file mode 100644
index 00000000..0da0a27a
--- /dev/null
+++ b/gui/scripts/syncthing/device/directives/editDeviceModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.device')
+ .directive('editDeviceModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/device/views/directives/editDeviceModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/device/directives/idqrModalDirective.js b/gui/scripts/syncthing/device/directives/idqrModalDirective.js
new file mode 100644
index 00000000..0fe58c57
--- /dev/null
+++ b/gui/scripts/syncthing/device/directives/idqrModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.device')
+ .directive('idqrModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/device/views/directives/idqrModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/device/module.js b/gui/scripts/syncthing/device/module.js
new file mode 100644
index 00000000..6b827ec8
--- /dev/null
+++ b/gui/scripts/syncthing/device/module.js
@@ -0,0 +1 @@
+angular.module('syncthing.device', []);
diff --git a/gui/scripts/syncthing/device/views/directives/editDeviceModalView.html b/gui/scripts/syncthing/device/views/directives/editDeviceModalView.html
new file mode 100644
index 00000000..8fbb07f4
--- /dev/null
+++ b/gui/scripts/syncthing/device/views/directives/editDeviceModalView.html
@@ -0,0 +1,77 @@
+
diff --git a/gui/scripts/syncthing/device/views/directives/idqrModalView.html b/gui/scripts/syncthing/device/views/directives/idqrModalView.html
new file mode 100644
index 00000000..6b5578a1
--- /dev/null
+++ b/gui/scripts/syncthing/device/views/directives/idqrModalView.html
@@ -0,0 +1,4 @@
+
+ {{myID}}
+
+
diff --git a/gui/scripts/syncthing/folder/directives/editFolderModalDirective.js b/gui/scripts/syncthing/folder/directives/editFolderModalDirective.js
new file mode 100644
index 00000000..1e9a6692
--- /dev/null
+++ b/gui/scripts/syncthing/folder/directives/editFolderModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.folder')
+ .directive('editFolderModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/folder/views/directives/editFolderModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/folder/directives/editIgnoresModalDirective.js b/gui/scripts/syncthing/folder/directives/editIgnoresModalDirective.js
new file mode 100644
index 00000000..1550314b
--- /dev/null
+++ b/gui/scripts/syncthing/folder/directives/editIgnoresModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.folder')
+ .directive('editIgnoresModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/folder/views/directives/editIgnoresModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/folder/module.js b/gui/scripts/syncthing/folder/module.js
new file mode 100644
index 00000000..2864e372
--- /dev/null
+++ b/gui/scripts/syncthing/folder/module.js
@@ -0,0 +1 @@
+angular.module('syncthing.folder', []);
diff --git a/gui/scripts/syncthing/folder/views/directives/editFolderModalView.html b/gui/scripts/syncthing/folder/views/directives/editFolderModalView.html
new file mode 100644
index 00000000..484799ec
--- /dev/null
+++ b/gui/scripts/syncthing/folder/views/directives/editFolderModalView.html
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
When adding a new folder, keep in mind that the Folder ID is used to tie folders together between devices. They are case sensitive and must match exactly between all devices.
+
+
+
+
+
diff --git a/gui/scripts/syncthing/folder/views/directives/editIgnoresModalView.html b/gui/scripts/syncthing/folder/views/directives/editIgnoresModalView.html
new file mode 100644
index 00000000..24c51fd0
--- /dev/null
+++ b/gui/scripts/syncthing/folder/views/directives/editIgnoresModalView.html
@@ -0,0 +1,28 @@
+
+
+
+
+
+
Enter ignore patterns, one per line.
+
+
+
+
+
Quick guide to supported patterns (full documentation ):
+
+ ! Inversion of the given condition (i.e. do not exclude)
+ * Single level wildcard (matches within a directory only)
+ ** Multi level wildcard (matches multiple directory levels)
+ // Comment, when used at the start of a line
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/settings/directives/advancedSettingsModalDirective.js b/gui/scripts/syncthing/settings/directives/advancedSettingsModalDirective.js
new file mode 100644
index 00000000..60bbae91
--- /dev/null
+++ b/gui/scripts/syncthing/settings/directives/advancedSettingsModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.settings')
+ .directive('advancedSettingsModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/settings/views/directives/advancedSettingsModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/settings/directives/settingsModalDirective.js b/gui/scripts/syncthing/settings/directives/settingsModalDirective.js
new file mode 100644
index 00000000..37654d30
--- /dev/null
+++ b/gui/scripts/syncthing/settings/directives/settingsModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.settings')
+ .directive('settingsModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/settings/views/directives/settingsModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/settings/module.js b/gui/scripts/syncthing/settings/module.js
new file mode 100644
index 00000000..81c9a3cc
--- /dev/null
+++ b/gui/scripts/syncthing/settings/module.js
@@ -0,0 +1 @@
+angular.module('syncthing.settings', []);
diff --git a/gui/scripts/syncthing/settings/views/directives/advancedSettingsModalView.html b/gui/scripts/syncthing/settings/views/directives/advancedSettingsModalView.html
new file mode 100644
index 00000000..0017cf20
--- /dev/null
+++ b/gui/scripts/syncthing/settings/views/directives/advancedSettingsModalView.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+ Be careful!
+ Incorrect configuration may damage your folder contents and render Syncthing inoperable.
+
+
+
+
+
+
+
+
+
+
+
+ Folder "{{folder.id}}"
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/settings/views/directives/settingsModalView.html b/gui/scripts/syncthing/settings/views/directives/settingsModalView.html
new file mode 100644
index 00000000..f5e0a2a1
--- /dev/null
+++ b/gui/scripts/syncthing/settings/views/directives/settingsModalView.html
@@ -0,0 +1,119 @@
+
diff --git a/gui/scripts/syncthing/transfer/directives/failedFilesModalDirective.js b/gui/scripts/syncthing/transfer/directives/failedFilesModalDirective.js
new file mode 100644
index 00000000..26b3a5e5
--- /dev/null
+++ b/gui/scripts/syncthing/transfer/directives/failedFilesModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.transfer')
+ .directive('failedFilesModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/transfer/views/directives/failedFilesModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/transfer/directives/neededFilesModalDirective.js b/gui/scripts/syncthing/transfer/directives/neededFilesModalDirective.js
new file mode 100644
index 00000000..5bcace9b
--- /dev/null
+++ b/gui/scripts/syncthing/transfer/directives/neededFilesModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.transfer')
+ .directive('neededFilesModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/transfer/views/directives/neededFilesModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/transfer/module.js b/gui/scripts/syncthing/transfer/module.js
new file mode 100644
index 00000000..a682c434
--- /dev/null
+++ b/gui/scripts/syncthing/transfer/module.js
@@ -0,0 +1 @@
+angular.module('syncthing.transfer', []);
diff --git a/gui/scripts/syncthing/transfer/views/directives/failedFilesModalView.html b/gui/scripts/syncthing/transfer/views/directives/failedFilesModalView.html
new file mode 100644
index 00000000..4c3841db
--- /dev/null
+++ b/gui/scripts/syncthing/transfer/views/directives/failedFilesModalView.html
@@ -0,0 +1,19 @@
+
+
+ The following items could not be synchronized.
+ They are retried automatically and will be synced when the error is resolved.
+
+
+
+ {{e.path | basename}}
+ {{e.error | lastErrorComponent}}
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/transfer/views/directives/neededFilesModalView.html b/gui/scripts/syncthing/transfer/views/directives/neededFilesModalView.html
new file mode 100644
index 00000000..b4076d14
--- /dev/null
+++ b/gui/scripts/syncthing/transfer/views/directives/neededFilesModalView.html
@@ -0,0 +1,54 @@
+
+
+
Reused
+
Copied from original
+
Copied from elsewhere
+
Downloaded
+
Downloading
+
+
+
+
+
+
+
+
+ {{needActions[f.action]}}
+
+
+ {{f.name | basename}}
+
+
+
+
+ {{f.name | basename}}
+
+
+
+
+
+
+
+
+
+
+
+ {{progress[neededFolder][f.name].bytesDone | binary}}B / {{progress[neededFolder][f.name].bytesTotal | binary}}B
+
+
+
+
+ {{f.size | binary}}B
+
+
+
+
+
+
+
+
+
diff --git a/gui/scripts/syncthing/usagereport/directives/usageReportModalDirective.js b/gui/scripts/syncthing/usagereport/directives/usageReportModalDirective.js
new file mode 100644
index 00000000..000a51a4
--- /dev/null
+++ b/gui/scripts/syncthing/usagereport/directives/usageReportModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.usagereport')
+ .directive('usageReportModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/usagereport/views/directives/usageReportModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/usagereport/directives/usageReportPreviewModalDirective.js b/gui/scripts/syncthing/usagereport/directives/usageReportPreviewModalDirective.js
new file mode 100644
index 00000000..675a8f8b
--- /dev/null
+++ b/gui/scripts/syncthing/usagereport/directives/usageReportPreviewModalDirective.js
@@ -0,0 +1,7 @@
+angular.module('syncthing.usagereport')
+ .directive('usageReportPreviewModal', function () {
+ return {
+ restrict: 'A',
+ templateUrl: 'scripts/syncthing/usagereport/views/directives/usageReportPreviewModalView.html'
+ };
+});
diff --git a/gui/scripts/syncthing/usagereport/module.js b/gui/scripts/syncthing/usagereport/module.js
new file mode 100644
index 00000000..37929674
--- /dev/null
+++ b/gui/scripts/syncthing/usagereport/module.js
@@ -0,0 +1 @@
+angular.module('syncthing.usagereport', []);
diff --git a/gui/scripts/syncthing/usagereport/views/directives/usageReportModalView.html b/gui/scripts/syncthing/usagereport/views/directives/usageReportModalView.html
new file mode 100644
index 00000000..ed3dcd2b
--- /dev/null
+++ b/gui/scripts/syncthing/usagereport/views/directives/usageReportModalView.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.
+
The aggregated statistics are publicly available at {%url%}.
+
Preview Usage Report
+
{{reportData | json}}
+
+
+
+
+
diff --git a/gui/scripts/syncthing/usagereport/views/directives/usageReportPreviewModalView.html b/gui/scripts/syncthing/usagereport/views/directives/usageReportPreviewModalView.html
new file mode 100644
index 00000000..96f427cd
--- /dev/null
+++ b/gui/scripts/syncthing/usagereport/views/directives/usageReportPreviewModalView.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.
+
The aggregated statistics are publicly available at {%url%}.
+
{{reportData | json}}
+
+
+
+
+