mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-10 18:24:44 +00:00
Merge pull request #1299 from krozycki/master
Show information in folder panel if ignore patterns are active fixes #1279
This commit is contained in:
commit
d91b8ac444
@ -302,6 +302,15 @@ func restGetModel(m *model.Model, w http.ResponseWriter, r *http.Request) {
|
|||||||
res["state"], res["stateChanged"] = m.State(folder)
|
res["state"], res["stateChanged"] = m.State(folder)
|
||||||
res["version"] = m.CurrentLocalVersion(folder) + m.RemoteLocalVersion(folder)
|
res["version"] = m.CurrentLocalVersion(folder) + m.RemoteLocalVersion(folder)
|
||||||
|
|
||||||
|
ignorePatterns, _, _ := m.GetIgnores(folder)
|
||||||
|
res["ignorePatterns"] = false
|
||||||
|
for _, line := range ignorePatterns {
|
||||||
|
if len(line) > 0 && !strings.HasPrefix(line, "//") {
|
||||||
|
res["ignorePatterns"] = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
json.NewEncoder(w).Encode(res)
|
json.NewEncoder(w).Encode(res)
|
||||||
}
|
}
|
||||||
|
@ -224,6 +224,12 @@
|
|||||||
<span translate>Yes</span>
|
<span translate>Yes</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr ng-if="model[folder.ID].ignorePatterns">
|
||||||
|
<th><span class="glyphicon glyphicon-minus"></span> <span translate>Ignore Patterns</span></th>
|
||||||
|
<td class="text-right">
|
||||||
|
<span translate>Yes</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr ng-if="folder.IgnorePerms">
|
<tr ng-if="folder.IgnorePerms">
|
||||||
<th><span class="glyphicon glyphicon-unchecked"></span> <span translate>Ignore Permissions</span></th>
|
<th><span class="glyphicon glyphicon-unchecked"></span> <span translate>Ignore Permissions</span></th>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user