<commit_before><!DOCTYPE html>
<!--
// 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 https://mozilla.org/MPL/2.0/.

-->
<html lang="en" ng-app="syncthing" ng-controller="SyncthingController" class="ng-cloak">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <meta name="description" content=""/>
  <meta name="author" content=""/>
  <link rel="shortcut icon" href="assets/img/favicon-{{syncthingStatus()}}.png"/>
  <link rel="mask-icon" href="assets/img/safari-pinned-tab.svg" color="#0882c8"/>

  <title ng-bind="thisDeviceName() + ' | Syncthing'"></title>
  <link href="vendor/bootstrap/css/bootstrap.css" rel="stylesheet"/>
  <link href="vendor/daterangepicker/daterangepicker.css" rel="stylesheet"/>
  <link href="assets/font/raleway.css" rel="stylesheet"/>
  <link href="vendor/fork-awesome/css/fork-awesome.css" rel="stylesheet"/>
  <link href="vendor/fork-awesome/css/v5-compat.css" rel="stylesheet"/>
  <link href="assets/css/overrides.css" rel="stylesheet"/>
  <link href="assets/css/theme.css" rel="stylesheet"/>
  <link href="vendor/fancytree/css/ui.fancytree.css" rel="stylesheet"/>
</head>

<body>
  <script type="text/javascript" src="syncthing/development/logbar.js"></script>
  <div ng-if="version.isBeta" ng-include="'syncthing/development/logbar.html'"></div>
  <!-- Top bar -->

  <nav class="navbar navbar-top navbar-default" role="navigation">
    <div class="container">
      <span class="navbar-brand" aria-hidden="true">
        <img class="logo hidden-xs" src="assets/img/logo-horizontal.svg" height="32" width="117" alt=""/>
        <img class="logo hidden visible-xs" src="assets/img/favicon-default.png" height="32" alt=""/>
      </span>
      <p class="navbar-text hidden-xs" ng-class="{'hidden-sm':upgradeInfo && upgradeInfo.newer}">{{thisDeviceName()}}</p>
      <ul class="nav navbar-nav navbar-right">
        <li ng-if="upgradeInfo && upgradeInfo.newer" class="upgrade-newer">
          <button type="button" class="btn navbar-btn btn-primary btn-sm" ng-click="upgrade()">
            <span class="fas fa-arrow-circle-up"></span>
            <span class="hidden-xs" translate translate-value-version="{{upgradeInfo.latest}}">Upgrade To {%version%}</span>
          </button>
        </li>
        <li ng-if="upgradeInfo && upgradeInfo.majorNewer" class="upgrade-newer-major">
          <button type="button" class="btn navbar-btn btn-danger btn-sm" data-toggle="modal" data-target="#majorUpgrade">
            <span class="fas fa-arrow-circle-up"></span>
            <span class="hidden-xs" translate translate-value-version="{{upgradeInfo.latest}}">Upgrade To {%version%}</span>
          </button>
        </li>
        <li class="dropdown" language-select></li>
        <li>
          <a class="navbar-link" href="https://docs.syncthing.net/intro/gui.html" target="_blank">
            <span class="fas fa-question-circle"></span>
            <span class="hidden-xs" translate>Help</span>
          </a>
        </li>
        <li class="dropdown action-menu">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
            <span class="fas fa-cog"></span>
            <span class="hidden-xs" translate>Actions</span>
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li><a href="" ng-click="editSettings()"><span class="fas fa-fw fa-cog"></span>&nbsp;<span translate>Settings</span></a></li>
            <li><a href="" data-toggle="modal" data-target="#idqr" ng-click="currentDevice=thisDevice()"><span class="fas fa-fw fa-qrcode"></span>&nbsp;<span translate>Show ID</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li><a href="" ng-click="shutdown()"><span class="fas fa-fw fa-power-off"></span>&nbsp;<span translate>Shutdown</span></a></li>
            <li><a href="" ng-click="restart()"><span class="fas fa-fw fa-refresh"></span>&nbsp;<span translate>Restart</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li class="visible-xs">
              <a href="https://docs.syncthing.net/intro/gui.html" target="_blank">
                <span class="fas fa-fw fa-question-circle"></span>&nbsp;<span translate>Help</span>
              </a>
            </li>
            <li><a href="" data-toggle="modal" data-target="#about"><span class="far fa-fw fa-heart"></span>&nbsp;<span translate>About</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li><a href="" ng-click="advanced()"><span class="fas fa-fw fa-cogs"></span>&nbsp;<span translate>Advanced</span></a></li>
            <li><a href="" ng-click="logging.show()"><span class="far fa-fw fa-file-alt"></span>&nbsp;<span translate>Logs</span></a></li>
            <li class="divider" aria-hidden="true" ng-if="config.gui.debugging"></li>
            <li><a href="/rest/debug/support" target="_blank" ng-if="config.gui.debugging"><span class="fa fa-user-md"></span>&nbsp;<span translate>Support Bundle</span></a></li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>

  <div class="container" id="content">

    <!-- Panel: Open, no auth -->

    <div ng-if="openNoAuth" class="row">
      <div class="col-md-12">
        <div class="panel panel-danger">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Danger!</span>
            </h3>
          </div>
          <div class="panel-body">
            <p>
            <span translate>The Syncthing admin interface is configured to allow remote access without a password.</span>
            <b><span translate>This can easily give hackers access to read and change any files on your computer.</span></b>
            <span translate>Please set a GUI Authentication User and Password in the Settings dialog.</span>
            </p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="editSettings()">
              <span class="fas fa-cog"></span>&nbsp;<span translate>Settings</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- Panel: Restart Needed -->

    <div ng-if="!configInSync" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Restart Needed</span>
            </h3>
          </div>
          <div class="panel-body">
            <p translate>The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.</p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="restart()">
              <span class="fas fa-refresh"></span>&nbsp;<span translate>Restart</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <div ng-if="config">

      <!-- Panel: Notifications -->

      <div ng-if="config.options && config.options.unackedNotificationIDs" ng-include="'syncthing/core/notifications.html'"></div>

      <!-- Panel: New Device -->

      <div ng-repeat="pendingDevice in config.pendingDevices" class="row">
        <div class="col-md-12">
          <div class="panel panel-warning">
            <div class="panel-heading">
              <h3 class="panel-title">
                <identicon class="panel-icon" data-value="device"></identicon>
                <span translate>New Device</span>
                <span class="pull-right">{{ pendingDevice.time | date:"yyyy-MM-dd HH:mm:ss" }}</span>
              </h3>
            </div>
            <div class="panel-body">
              <p>
                <span translate translate-value-device="{{ pendingDevice.deviceID }}" translate-value-address="{{ pendingDevice.address }}" translate-value-name="{{ pendingDevice.name }}">
                  Device "{%name%}" ({%device%} at {%address%}) wants to connect. Add new device?
                </span>
              </p>
            </div>
            <div class="panel-footer clearfix">
              <div class="pull-right">
                <button type="button" class="btn btn-sm btn-success" ng-click="addDevice(pendingDevice.deviceID, pendingDevice.name)">
                  <span class="fas fa-plus"></span>&nbsp;<span translate>Add Device</span>
                </button>
                <button type="button" class="btn btn-sm btn-danger" ng-click="ignoreDevice(pendingDevice)">
                  <span class="fas fa-times"></span>&nbsp;<span translate>Ignore</span>
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- Panel: New Folder -->
      <div ng-repeat="device in config.devices">
        <div ng-repeat="pendingFolder in device.pendingFolders" class="row reject">
          <div class="col-md-12">
            <div class="panel panel-warning">
              <div class="panel-heading">
                <h3 class="panel-title">
                  <div class="panel-icon">
                    <span class="fas fa-folder"></span>
                  </div>
                  <span translate ng-if="!folders[pendingFolder.id]">New Folder</span>
                  <span translate ng-if="folders[pendingFolder.id]">Share Folder</span>
                  <span class="pull-right">{{ pendingFolder.time | date:"yyyy-MM-dd HH:mm:ss" }}</span>
                </h3>
              </div>
              <div class="panel-body">
                <p>
                  <span ng-if="pendingFolder.label.length == 0" translate translate-value-device="{{ deviceName(findDevice(device.deviceID)) }}" translate-value-folder="{{ pendingFolder.id }}">
                    {%device%} wants to share folder "{%folder%}".
                  </span>
                  <span ng-if="pendingFolder.label.length != 0" translate translate-value-device="{{ deviceName(findDevice(device.deviceID)) }}" translate-value-folder="{{ pendingFolder.id }}" translate-value-folderlabel="{{ pendingFolder.label }}">
                    {%device%} wants to share folder "{%folderlabel%}" ({%folder%}).
                  </span>
                  <span translate ng-if="folders[pendingFolder.id]">Share this folder?</span>
                  <span translate ng-if="!folders[pendingFolder.id]">Add new folder?</span>
                </p>
              </div>
              <div class="panel-footer clearfix">
                <div class="pull-right">
                  <button type="button" class="btn btn-sm btn-success" ng-click="addFolderAndShare(pendingFolder.id, pendingFolder.label, device.deviceID)" ng-if="!folders[pendingFolder.id]">
                    <span class="fas fa-check"></span>&nbsp;<span translate>Add</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-success" ng-click="shareFolderWithDevice(pendingFolder.id, device.deviceID)" ng-if="folders[pendingFolder.id]">
                    <span class="fas fa-check"></span>&nbsp;<span translate>Share</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-danger" ng-click="ignoreFolder(device.deviceID, pendingFolder)">
                    <span class="fas fa-times"></span>&nbsp;<span translate>Ignore</span>
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>

    <!-- Panel: Notice -->

    <div ng-if="errorList().length > 0" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Notice</span>
            </h3>
          </div>
          <div class="panel-body">
            <p ng-repeat="err in errorList()">
              <small>{{err.when | date:"yyyy-MM-dd HH:mm:ss"}}:</small>
              <span ng-bind-html="friendlyDevices(err.message) | linky: '_blank'"></span>
            </p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="clearErrors()">
              <span class="fas fa-check"></span>&nbsp;<span translate>OK</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- Panel: FS watcher errors -->

    <div ng-if="sizeOf(fsWatcherErrorMap()) > 0" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Filesystem Watcher Errors</span>
            </h3>
          </div>
          <div class="panel-body">
            <p>
              <span translate>For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can't.</span>&emsp;<a href="https://forum.syncthing.net" target="_blank"><span class="fas fa-question-circle"></span>&nbsp;<span translate>Support</span></a>
            </p>
            <table>
              <tr ng-repeat="(id, err) in fsWatcherErrorMap()">
                <td>{{folderLabel(id)}}</td><td>{{err}}</td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>

    <!-- First regular row -->

    <div class="row">

      <!-- Folder list (top left) -->

      <div class="col-md-6" aria-labelledby="folder_list" role="region" >
        <h3 id="folder_list" translate>Folders</h3>
        <div class="panel-group" id="folders">
          <div class="panel panel-default" ng-repeat="folder in folderList()">
            <button class="btn panel-heading" data-toggle="collapse" data-parent="#folders" data-target="#folder-{{$index}}" aria-expanded="false">
              <div class="panel-progress" ng-show="folderStatus(folder) == 'syncing'" ng-attr-style="width: {{syncPercentage(folder.id) | percent}}"></div>
              <div class="panel-progress" ng-show="folderStatus(folder) == 'scanning' && scanProgress[folder.id] != undefined" ng-attr-style="width: {{scanPercentage(folder.id) | percent}}"></div>
              <h4 class="panel-title">
                <div class="panel-icon hidden-xs">
                  <span ng-if="folder.type == 'sendreceive'" class="fas fa-fw fa-folder"></span>
                  <span ng-if="folder.type == 'sendonly'" class="fas fa-fw fa-upload"></span>
                  <span ng-if="folder.type == 'receiveonly'" class="fas fa-fw fa-download"></span>
                </div>
                <div class="panel-status pull-right text-{{folderClass(folder)}}" ng-switch="folderStatus(folder)">
                  <span ng-switch-when="paused"><span class="hidden-xs" translate>Paused</span><span class="visible-xs" aria-label="{{'Paused' | translate}}"><i class="fas fa-fw fa-pause"></i></span></span>
                  <span ng-switch-when="unknown"><span class="hidden-xs" translate>Unknown</span><span class="visible-xs" aria-label="{{'Unknown' | translate}}"><i class="fas fa-fw fa-question-circle"></i></span></span>
                  <span ng-switch-when="unshared"><span class="hidden-xs" translate>Unshared</span><span class="visible-xs" aria-label="{{'Unshared' | translate}}"><i class="fas fa-fw fa-unlink"></i></span></span>
                  <span ng-switch-when="scan-waiting"><span class="hidden-xs" translate>Waiting to scan</span><span class="visible-xs" aria-label="{{'Waiting to scan' | translate}}"><i class="fas fa-fw fa-hourglass-half"></i></span></span>
                  <span ng-switch-when="stopped"><span class="hidden-xs" translate>Stopped</span><span class="visible-xs" aria-label="{{'Stopped' | translate}}"><i class="fas fa-fw fa-stop"></i></span></span>
                  <span ng-switch-when="scanning">
                    <span class="hidden-xs" translate>Scanning</span>
                    <span class="hidden-xs" ng-if="scanPercentage(folder.id) != undefined">
                      ({{scanPercentage(folder.id) | percent}})
                    </span>
                    <span class="visible-xs" aria-label="{{'Scanning' | translate}}"><i class="fas fa-fw fa-search"></i></span>
                  </span>
                  <span ng-switch-when="idle"><span class="hidden-xs" translate>Up to Date</span><span class="visible-xs" aria-label="{{'Up to Date' | translate}}"><i class="fas fa-fw fa-check"></i></span></span>
                  <span ng-switch-when="syncing">
                    <span class="hidden-xs" translate>Syncing</span>
                    <span ng-show="syncRemaining(folder.id)">({{syncPercentage(folder.id) | percent}}, {{syncRemaining(folder.id) | binary}}B)</span>
                  </span>
                  <span ng-switch-when="outofsync"><span class="hidden-xs" translate>Out of Sync</span><span class="visible-xs" aria-label="{{'Out of Sync' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
                  <span ng-switch-when="faileditems"><span class="hidden-xs" translate>Failed Items</span><span class="visible-xs" aria-label="{{'Failed Items' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
                </div>
                <div class="panel-title-text">
                  <span tooltip data-original-title="{{folder.label.length != 0 ? folder.id : ''}}">{{folder.label.length != 0 ? folder.label : folder.id}}</span>
                </div>
              </h4>
            </button>
            <div id="folder-{{$index}}" class="panel-collapse collapse">
              <div class="panel-body">
                <table class="table table-condensed table-striped table-auto">
                  <tbody>
                    <tr ng-show="folder.label != undefined && folder.label.length > 0">
                      <th><span class="fas fa-fw fa-info-circle"></span>&nbsp;<span translate>Folder ID</span></th>
                      <td class="text-right no-overflow-ellipse">{{folder.id}}</td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-folder-open"></span>&nbsp;<span translate>Folder Path</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{folder.path}}">{{folder.path}}</span>
                      </td>
                    </tr>
                    <tr ng-if="!folder.paused && (model[folder.id].invalid || model[folder.id].error)">
                      <th><span class="fas fa-fw fa-exclamation-triangle"></span>&nbsp;<span translate>Error</span></th>
                      <td class="text-right">{{model[folder.id].invalid || model[folder.id].error}}</td>
                    </tr>
                    <tr ng-if="!folder.paused">
                      <th><span class="fas fa-fw fa-globe"></span>&nbsp;<span translate>Global State</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{model[folder.id].globalFiles | alwaysNumber | localeNumber}} {{'files' | translate}}, {{model[folder.id].globalDirectories | alwaysNumber | localeNumber}} {{'directories' | translate}}, ~{{model[folder.id].globalBytes | binary}}B">
                          <span class="far fa-copy"></span>&nbsp;{{model[folder.id].globalFiles | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-folder"></span>&nbsp;{{model[folder.id].globalDirectories | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-hdd"></span>&nbsp;~{{model[folder.id].globalBytes | binary}}B
                        </span>
                      </td>
                    </tr>
                    <tr ng-if="!folder.paused">
                      <th><span class="fas fa-fw fa-home"></span>&nbsp;<span translate>Local State</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{model[folder.id].localFiles | alwaysNumber | localeNumber}} {{'files' | translate}}, {{model[folder.id].localDirectories | alwaysNumber | localeNumber}} {{'directories' | translate}}, ~{{model[folder.id].localBytes | binary}}B">
                          <span class="far fa-copy"></span>&nbsp;{{model[folder.id].localFiles | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-folder"></span>&nbsp;{{model[folder.id].localDirectories | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-hdd"></span>&nbsp;~{{model[folder.id].localBytes | binary}}B<!-- get rid of the annoying trailing whitespace
                          --><span ng-if="model[folder.id].ignorePatterns"><br/><i><small translate class="text-muted">Reduced by ignore patterns</small></i></span>
                        </span>
                      </td>
                    </tr>
                    <tr ng-if="model[folder.id].needTotalItems > 0">
                      <th><span class="fas fa-fw fa-cloud-download-alt"></span>&nbsp;<span translate>Out of Sync Items</span></th>
                      <td class="text-right">
                        <a href="" ng-click="showNeed(folder.id)">{{model[folder.id].needTotalItems | alwaysNumber | localeNumber}} <span translate>items</span>, ~{{model[folder.id].needBytes | binary}}B</a>
                      </td>
                    </tr>
                    <tr ng-if="folderStatus(folder) === 'scanning' && scanRate(folder.id) > 0">
                      <th><span class="fas fa-fw fa-hourglass-half"></span>&nbsp;<span translate>Scan Time Remaining</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{scanRate(folder.id) | binary}}B/s">~ {{scanRemaining(folder.id)}}</span>
                      </td>
                    </tr>
                    <tr ng-if="hasFailedFiles(folder.id)">
                      <th><span class="fas fa-fw fa-exclamation-circle"></span>&nbsp;<span translate>Failed Items</span></th>
                      <!-- Show the number of failed items as a link to bring up the list. -->
                      <td class="text-right">
                        <a href="" ng-click="showFailed(folder.id)">{{model[folder.id].pullErrors | alwaysNumber | localeNumber}}&nbsp;<span translate>items</span></a>
                      </td>
                    </tr>
                    <tr ng-if="folder.type == 'receiveonly' && canRevert(folder.id)">
                      <th><span class="fas fa-fw fa-exclamation-circle"></span>&nbsp;<span translate>Locally Changed Items</span></th>
                      <td class="text-right">
                        <a href="" ng-click="showLocalChanged(folder.id)">{{model[folder.id].receiveOnlyTotalItems | alwaysNumber | localeNumber}} <span translate>items</span>, ~{{model[folder.id].receiveOnlyBytes | binary}}B</a>
                      </td>
                    </tr>
                    <tr ng-if="folder.type != 'sendreceive'">
                      <th><span class="fas fa-fw fa-folder"></span>&nbsp;<span translate>Folder Type</span></th>
                      <td class="text-right">
                        <span ng-if="folder.type == 'sendonly'" translate>Send Only</span>
                        <span ng-if="folder.type == 'receiveonly'" translate>Receive Only</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.ignorePerms">
                      <th><span class="far fa-fw fa-minus-square"></span>&nbsp;<span translate>Ignore Permissions</span></th>
                      <td class="text-right">
                        <span translate>Yes</span>
                      </td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-refresh"></span>&nbsp;<span translate>Rescans</span></th>
                      <td class="text-right">
                        <div ng-if="folder.rescanIntervalS > 0">
                          <span ng-if="!folder.fsWatcherEnabled" tooltip data-original-title="{{'Periodic scanning at given interval and disabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Disabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && (!model[folder.id].watchError || folder.paused || folderStatus(folder) === 'stopped')" tooltip data-original-title="{{'Periodic scanning at given interval and enabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye"></span>&nbsp;<span translate>Enabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && !folder.paused && folderStatus(folder) !== 'stopped' && model[folder.id].watchError" tooltip data-original-title="{{'Periodic scanning at given interval and failed setting up watching for changes, retrying every 1m:' | translate}}<br/>{{model[folder.id].watchError}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Failed to setup, retrying</span>
                          </span>
                        </div>
                        <div ng-if="folder.rescanIntervalS <= 0">
                          <span ng-if="!folder.fsWatcherEnabled" tooltip data-original-title="{{'Disabled periodic scanning and disabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Disabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && (!model[folder.id].watchError || folder.paused || folderStatus(folder) === 'stopped')" tooltip data-original-title="{{'Disabled periodic scanning and enabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye"></span>&nbsp;<span translate>Enabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && !folder.paused && folderStatus(folder) !== 'stopped' && model[folder.id].watchError" tooltip data-original-title="{{'Disabled periodic scanning and failed setting up watching for changes, retrying every 1m:' | translate}}<br/>{{model[folder.id].watchError}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Failed to setup, retrying</span>
                          </span>
                        </div>
                      </td>
                    </tr>
                    <tr ng-if="folder.order != 'random'">
                      <th><span class="fas fa-fw fa-sort"></span>&nbsp;<span translate>File Pull Order</span></th>
                      <td class="text-right" ng-switch="folder.order">
                        <span ng-switch-when="random" translate>Random</span>
                        <span ng-switch-when="alphabetic" translate>Alphabetic</span>
                        <span ng-switch-when="smallestFirst" translate>Smallest First</span>
                        <span ng-switch-when="largestFirst" translate>Largest First</span>
                        <span ng-switch-when="oldestFirst" translate>Oldest First</span>
                        <span ng-switch-when="newestFirst" translate>Newest First</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.versioning.type">
                      <th><span class="far fa-fw fa-copy"></span>&nbsp;<span translate>File Versioning</span></th>
                      <td class="text-right" ng-switch="folder.versioning.type">
                        <span ng-switch-when="trashcan" translate>Trash Can File Versioning</span>
                        <span ng-switch-when="staggered" translate>Staggered File Versioning</span>
                        <span ng-switch-when="simple" translate>Simple File Versioning</span>
                        <span ng-switch-when="external" translate>External File Versioning</span>
                      </td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-share-alt"></span>&nbsp;<span translate>Shared With</span></th>
                      <td class="text-right" ng-attr-title="{{sharesFolder(folder)}}">{{sharesFolder(folder)}}</td>
                    </tr>
                    <tr ng-if="folderStats[folder.id].lastScan">
                      <th><span class="far fa-fw fa-clock"></span>&nbsp;<span translate>Last Scan</span></th>
                      <td translate ng-if="folderStats[folder.id].lastScanDays >= 365" class="text-right">Never</td>
                      <td ng-if="folderStats[folder.id].lastScanDays < 365" class="text-right">
                        <span>{{folderStats[folder.id].lastScan | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.type != 'sendonly' && folderStats[folder.id].lastFile && folderStats[folder.id].lastFile.filename">
                      <th><span class="fas fa-fw fa-exchange-alt"></span>&nbsp;<span translate>Latest Change</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{folderStats[folder.id].lastFile.filename}} @ {{folderStats[folder.id].lastFile.at | date:'yyyy-MM-dd HH:mm:ss'}}">
                          <span translate ng-if="!folderStats[folder.id].lastFile.deleted">Updated</span>
                          <span translate ng-if="folderStats[folder.id].lastFile.deleted">Deleted</span>
                          {{folderStats[folder.id].lastFile.filename | basename}}
                        </span>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
              <div class="panel-footer">
                <button type="button" class="btn btn-sm btn-danger pull-left" ng-click="override(folder.id)" ng-if="folderStatus(folder) == 'outofsync' && folder.type == 'sendonly'">
                  <span class="fas fa-arrow-circle-up"></span>&nbsp;<span translate>Override Changes</span>
                </button>
                <button type="button" class="btn btn-sm btn-danger pull-left" ng-click="revert(folder.id)" ng-if="canRevert(folder.id)">
                  <span class="fa fa-arrow-circle-down"></span>&nbsp;<span translate>Revert Local Changes</span>
                </button>
                <span class="pull-right">
                  <button ng-if="!folder.paused" type="button" class="btn btn-sm btn-default" ng-click="setFolderPause(folder.id, true)">
                    <span class="fas fa-pause"></span>&nbsp;<span translate>Pause</span>
                  </button>
                  <button ng-if="folder.paused" type="button" class="btn btn-sm btn-default" ng-click="setFolderPause(folder.id, false)">
                    <span class="fas fa-play"></span>&nbsp;<span translate>Resume</span>
                  </button>
                  <button type="button" class="btn btn-default btn-sm" ng-click="restoreVersions.show(folder.id)" ng-if="folder.versioning.type">
                    <span class="fas fa-undo"></span>&nbsp;<span translate>Versions</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-default" ng-click="rescanFolder(folder.id)" ng-disabled="['idle', 'stopped', 'unshared', 'outofsync'].indexOf(folderStatus(folder)) < 0">
                    <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-default" ng-click="editFolder(folder)">
                    <span class="fas fa-pencil-alt"></span>&nbsp;<span translate>Edit</span>
                  </button>
                </span>
                <div class="clearfix"></div>
              </div>
            </div>
          </div>
        </div>
        <span class="pull-right">
          <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(true)" ng-if="isAtleastOneFolderPausedStateSetTo(false)">
            <span class="fas fa-pause"></span>&nbsp;<span translate>Pause All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)">
            <span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()">
            <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="addFolder()">
            <span class="fas fa-plus"></span>&nbsp;<span translate>Add Folder</span><commit_msg>gui: Enable rescan button with failed items (fixes #5770) (#5771)<commit_after><!DOCTYPE html>
<!--
// 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 https://mozilla.org/MPL/2.0/.

-->
<html lang="en" ng-app="syncthing" ng-controller="SyncthingController" class="ng-cloak">
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <meta name="description" content=""/>
  <meta name="author" content=""/>
  <link rel="shortcut icon" href="assets/img/favicon-{{syncthingStatus()}}.png"/>
  <link rel="mask-icon" href="assets/img/safari-pinned-tab.svg" color="#0882c8"/>

  <title ng-bind="thisDeviceName() + ' | Syncthing'"></title>
  <link href="vendor/bootstrap/css/bootstrap.css" rel="stylesheet"/>
  <link href="vendor/daterangepicker/daterangepicker.css" rel="stylesheet"/>
  <link href="assets/font/raleway.css" rel="stylesheet"/>
  <link href="vendor/fork-awesome/css/fork-awesome.css" rel="stylesheet"/>
  <link href="vendor/fork-awesome/css/v5-compat.css" rel="stylesheet"/>
  <link href="assets/css/overrides.css" rel="stylesheet"/>
  <link href="assets/css/theme.css" rel="stylesheet"/>
  <link href="vendor/fancytree/css/ui.fancytree.css" rel="stylesheet"/>
</head>

<body>
  <script type="text/javascript" src="syncthing/development/logbar.js"></script>
  <div ng-if="version.isBeta" ng-include="'syncthing/development/logbar.html'"></div>
  <!-- Top bar -->

  <nav class="navbar navbar-top navbar-default" role="navigation">
    <div class="container">
      <span class="navbar-brand" aria-hidden="true">
        <img class="logo hidden-xs" src="assets/img/logo-horizontal.svg" height="32" width="117" alt=""/>
        <img class="logo hidden visible-xs" src="assets/img/favicon-default.png" height="32" alt=""/>
      </span>
      <p class="navbar-text hidden-xs" ng-class="{'hidden-sm':upgradeInfo && upgradeInfo.newer}">{{thisDeviceName()}}</p>
      <ul class="nav navbar-nav navbar-right">
        <li ng-if="upgradeInfo && upgradeInfo.newer" class="upgrade-newer">
          <button type="button" class="btn navbar-btn btn-primary btn-sm" ng-click="upgrade()">
            <span class="fas fa-arrow-circle-up"></span>
            <span class="hidden-xs" translate translate-value-version="{{upgradeInfo.latest}}">Upgrade To {%version%}</span>
          </button>
        </li>
        <li ng-if="upgradeInfo && upgradeInfo.majorNewer" class="upgrade-newer-major">
          <button type="button" class="btn navbar-btn btn-danger btn-sm" data-toggle="modal" data-target="#majorUpgrade">
            <span class="fas fa-arrow-circle-up"></span>
            <span class="hidden-xs" translate translate-value-version="{{upgradeInfo.latest}}">Upgrade To {%version%}</span>
          </button>
        </li>
        <li class="dropdown" language-select></li>
        <li>
          <a class="navbar-link" href="https://docs.syncthing.net/intro/gui.html" target="_blank">
            <span class="fas fa-question-circle"></span>
            <span class="hidden-xs" translate>Help</span>
          </a>
        </li>
        <li class="dropdown action-menu">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
            <span class="fas fa-cog"></span>
            <span class="hidden-xs" translate>Actions</span>
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
            <li><a href="" ng-click="editSettings()"><span class="fas fa-fw fa-cog"></span>&nbsp;<span translate>Settings</span></a></li>
            <li><a href="" data-toggle="modal" data-target="#idqr" ng-click="currentDevice=thisDevice()"><span class="fas fa-fw fa-qrcode"></span>&nbsp;<span translate>Show ID</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li><a href="" ng-click="shutdown()"><span class="fas fa-fw fa-power-off"></span>&nbsp;<span translate>Shutdown</span></a></li>
            <li><a href="" ng-click="restart()"><span class="fas fa-fw fa-refresh"></span>&nbsp;<span translate>Restart</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li class="visible-xs">
              <a href="https://docs.syncthing.net/intro/gui.html" target="_blank">
                <span class="fas fa-fw fa-question-circle"></span>&nbsp;<span translate>Help</span>
              </a>
            </li>
            <li><a href="" data-toggle="modal" data-target="#about"><span class="far fa-fw fa-heart"></span>&nbsp;<span translate>About</span></a></li>
            <li class="divider" aria-hidden="true"></li>
            <li><a href="" ng-click="advanced()"><span class="fas fa-fw fa-cogs"></span>&nbsp;<span translate>Advanced</span></a></li>
            <li><a href="" ng-click="logging.show()"><span class="far fa-fw fa-file-alt"></span>&nbsp;<span translate>Logs</span></a></li>
            <li class="divider" aria-hidden="true" ng-if="config.gui.debugging"></li>
            <li><a href="/rest/debug/support" target="_blank" ng-if="config.gui.debugging"><span class="fa fa-user-md"></span>&nbsp;<span translate>Support Bundle</span></a></li>
          </ul>
        </li>
      </ul>
    </div>
  </nav>

  <div class="container" id="content">

    <!-- Panel: Open, no auth -->

    <div ng-if="openNoAuth" class="row">
      <div class="col-md-12">
        <div class="panel panel-danger">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Danger!</span>
            </h3>
          </div>
          <div class="panel-body">
            <p>
            <span translate>The Syncthing admin interface is configured to allow remote access without a password.</span>
            <b><span translate>This can easily give hackers access to read and change any files on your computer.</span></b>
            <span translate>Please set a GUI Authentication User and Password in the Settings dialog.</span>
            </p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="editSettings()">
              <span class="fas fa-cog"></span>&nbsp;<span translate>Settings</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- Panel: Restart Needed -->

    <div ng-if="!configInSync" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Restart Needed</span>
            </h3>
          </div>
          <div class="panel-body">
            <p translate>The configuration has been saved but not activated. Syncthing must restart to activate the new configuration.</p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="restart()">
              <span class="fas fa-refresh"></span>&nbsp;<span translate>Restart</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <div ng-if="config">

      <!-- Panel: Notifications -->

      <div ng-if="config.options && config.options.unackedNotificationIDs" ng-include="'syncthing/core/notifications.html'"></div>

      <!-- Panel: New Device -->

      <div ng-repeat="pendingDevice in config.pendingDevices" class="row">
        <div class="col-md-12">
          <div class="panel panel-warning">
            <div class="panel-heading">
              <h3 class="panel-title">
                <identicon class="panel-icon" data-value="device"></identicon>
                <span translate>New Device</span>
                <span class="pull-right">{{ pendingDevice.time | date:"yyyy-MM-dd HH:mm:ss" }}</span>
              </h3>
            </div>
            <div class="panel-body">
              <p>
                <span translate translate-value-device="{{ pendingDevice.deviceID }}" translate-value-address="{{ pendingDevice.address }}" translate-value-name="{{ pendingDevice.name }}">
                  Device "{%name%}" ({%device%} at {%address%}) wants to connect. Add new device?
                </span>
              </p>
            </div>
            <div class="panel-footer clearfix">
              <div class="pull-right">
                <button type="button" class="btn btn-sm btn-success" ng-click="addDevice(pendingDevice.deviceID, pendingDevice.name)">
                  <span class="fas fa-plus"></span>&nbsp;<span translate>Add Device</span>
                </button>
                <button type="button" class="btn btn-sm btn-danger" ng-click="ignoreDevice(pendingDevice)">
                  <span class="fas fa-times"></span>&nbsp;<span translate>Ignore</span>
                </button>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- Panel: New Folder -->
      <div ng-repeat="device in config.devices">
        <div ng-repeat="pendingFolder in device.pendingFolders" class="row reject">
          <div class="col-md-12">
            <div class="panel panel-warning">
              <div class="panel-heading">
                <h3 class="panel-title">
                  <div class="panel-icon">
                    <span class="fas fa-folder"></span>
                  </div>
                  <span translate ng-if="!folders[pendingFolder.id]">New Folder</span>
                  <span translate ng-if="folders[pendingFolder.id]">Share Folder</span>
                  <span class="pull-right">{{ pendingFolder.time | date:"yyyy-MM-dd HH:mm:ss" }}</span>
                </h3>
              </div>
              <div class="panel-body">
                <p>
                  <span ng-if="pendingFolder.label.length == 0" translate translate-value-device="{{ deviceName(findDevice(device.deviceID)) }}" translate-value-folder="{{ pendingFolder.id }}">
                    {%device%} wants to share folder "{%folder%}".
                  </span>
                  <span ng-if="pendingFolder.label.length != 0" translate translate-value-device="{{ deviceName(findDevice(device.deviceID)) }}" translate-value-folder="{{ pendingFolder.id }}" translate-value-folderlabel="{{ pendingFolder.label }}">
                    {%device%} wants to share folder "{%folderlabel%}" ({%folder%}).
                  </span>
                  <span translate ng-if="folders[pendingFolder.id]">Share this folder?</span>
                  <span translate ng-if="!folders[pendingFolder.id]">Add new folder?</span>
                </p>
              </div>
              <div class="panel-footer clearfix">
                <div class="pull-right">
                  <button type="button" class="btn btn-sm btn-success" ng-click="addFolderAndShare(pendingFolder.id, pendingFolder.label, device.deviceID)" ng-if="!folders[pendingFolder.id]">
                    <span class="fas fa-check"></span>&nbsp;<span translate>Add</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-success" ng-click="shareFolderWithDevice(pendingFolder.id, device.deviceID)" ng-if="folders[pendingFolder.id]">
                    <span class="fas fa-check"></span>&nbsp;<span translate>Share</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-danger" ng-click="ignoreFolder(device.deviceID, pendingFolder)">
                    <span class="fas fa-times"></span>&nbsp;<span translate>Ignore</span>
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

    </div>

    <!-- Panel: Notice -->

    <div ng-if="errorList().length > 0" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Notice</span>
            </h3>
          </div>
          <div class="panel-body">
            <p ng-repeat="err in errorList()">
              <small>{{err.when | date:"yyyy-MM-dd HH:mm:ss"}}:</small>
              <span ng-bind-html="friendlyDevices(err.message) | linky: '_blank'"></span>
            </p>
          </div>
          <div class="panel-footer">
            <button type="button" class="btn btn-sm btn-default pull-right" ng-click="clearErrors()">
              <span class="fas fa-check"></span>&nbsp;<span translate>OK</span>
            </button>
            <div class="clearfix"></div>
          </div>
        </div>
      </div>
    </div>

    <!-- Panel: FS watcher errors -->

    <div ng-if="sizeOf(fsWatcherErrorMap()) > 0" class="row">
      <div class="col-md-12">
        <div class="panel panel-warning">
          <div class="panel-heading">
            <h3 class="panel-title">
              <div class="panel-icon">
                <span class="fas fa-exclamation-circle"></span>
              </div>
              <span translate>Filesystem Watcher Errors</span>
            </h3>
          </div>
          <div class="panel-body">
            <p>
              <span translate>For the following folders an error occurred while starting to watch for changes. It will be retried every minute, so the errors might go away soon. If they persist, try to fix the underlying issue and ask for help if you can't.</span>&emsp;<a href="https://forum.syncthing.net" target="_blank"><span class="fas fa-question-circle"></span>&nbsp;<span translate>Support</span></a>
            </p>
            <table>
              <tr ng-repeat="(id, err) in fsWatcherErrorMap()">
                <td>{{folderLabel(id)}}</td><td>{{err}}</td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>

    <!-- First regular row -->

    <div class="row">

      <!-- Folder list (top left) -->

      <div class="col-md-6" aria-labelledby="folder_list" role="region" >
        <h3 id="folder_list" translate>Folders</h3>
        <div class="panel-group" id="folders">
          <div class="panel panel-default" ng-repeat="folder in folderList()">
            <button class="btn panel-heading" data-toggle="collapse" data-parent="#folders" data-target="#folder-{{$index}}" aria-expanded="false">
              <div class="panel-progress" ng-show="folderStatus(folder) == 'syncing'" ng-attr-style="width: {{syncPercentage(folder.id) | percent}}"></div>
              <div class="panel-progress" ng-show="folderStatus(folder) == 'scanning' && scanProgress[folder.id] != undefined" ng-attr-style="width: {{scanPercentage(folder.id) | percent}}"></div>
              <h4 class="panel-title">
                <div class="panel-icon hidden-xs">
                  <span ng-if="folder.type == 'sendreceive'" class="fas fa-fw fa-folder"></span>
                  <span ng-if="folder.type == 'sendonly'" class="fas fa-fw fa-upload"></span>
                  <span ng-if="folder.type == 'receiveonly'" class="fas fa-fw fa-download"></span>
                </div>
                <div class="panel-status pull-right text-{{folderClass(folder)}}" ng-switch="folderStatus(folder)">
                  <span ng-switch-when="paused"><span class="hidden-xs" translate>Paused</span><span class="visible-xs" aria-label="{{'Paused' | translate}}"><i class="fas fa-fw fa-pause"></i></span></span>
                  <span ng-switch-when="unknown"><span class="hidden-xs" translate>Unknown</span><span class="visible-xs" aria-label="{{'Unknown' | translate}}"><i class="fas fa-fw fa-question-circle"></i></span></span>
                  <span ng-switch-when="unshared"><span class="hidden-xs" translate>Unshared</span><span class="visible-xs" aria-label="{{'Unshared' | translate}}"><i class="fas fa-fw fa-unlink"></i></span></span>
                  <span ng-switch-when="scan-waiting"><span class="hidden-xs" translate>Waiting to scan</span><span class="visible-xs" aria-label="{{'Waiting to scan' | translate}}"><i class="fas fa-fw fa-hourglass-half"></i></span></span>
                  <span ng-switch-when="stopped"><span class="hidden-xs" translate>Stopped</span><span class="visible-xs" aria-label="{{'Stopped' | translate}}"><i class="fas fa-fw fa-stop"></i></span></span>
                  <span ng-switch-when="scanning">
                    <span class="hidden-xs" translate>Scanning</span>
                    <span class="hidden-xs" ng-if="scanPercentage(folder.id) != undefined">
                      ({{scanPercentage(folder.id) | percent}})
                    </span>
                    <span class="visible-xs" aria-label="{{'Scanning' | translate}}"><i class="fas fa-fw fa-search"></i></span>
                  </span>
                  <span ng-switch-when="idle"><span class="hidden-xs" translate>Up to Date</span><span class="visible-xs" aria-label="{{'Up to Date' | translate}}"><i class="fas fa-fw fa-check"></i></span></span>
                  <span ng-switch-when="syncing">
                    <span class="hidden-xs" translate>Syncing</span>
                    <span ng-show="syncRemaining(folder.id)">({{syncPercentage(folder.id) | percent}}, {{syncRemaining(folder.id) | binary}}B)</span>
                  </span>
                  <span ng-switch-when="outofsync"><span class="hidden-xs" translate>Out of Sync</span><span class="visible-xs" aria-label="{{'Out of Sync' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
                  <span ng-switch-when="faileditems"><span class="hidden-xs" translate>Failed Items</span><span class="visible-xs" aria-label="{{'Failed Items' | translate}}"><i class="fas fa-fw fa-exclamation-circle"></i></span></span>
                </div>
                <div class="panel-title-text">
                  <span tooltip data-original-title="{{folder.label.length != 0 ? folder.id : ''}}">{{folder.label.length != 0 ? folder.label : folder.id}}</span>
                </div>
              </h4>
            </button>
            <div id="folder-{{$index}}" class="panel-collapse collapse">
              <div class="panel-body">
                <table class="table table-condensed table-striped table-auto">
                  <tbody>
                    <tr ng-show="folder.label != undefined && folder.label.length > 0">
                      <th><span class="fas fa-fw fa-info-circle"></span>&nbsp;<span translate>Folder ID</span></th>
                      <td class="text-right no-overflow-ellipse">{{folder.id}}</td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-folder-open"></span>&nbsp;<span translate>Folder Path</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{folder.path}}">{{folder.path}}</span>
                      </td>
                    </tr>
                    <tr ng-if="!folder.paused && (model[folder.id].invalid || model[folder.id].error)">
                      <th><span class="fas fa-fw fa-exclamation-triangle"></span>&nbsp;<span translate>Error</span></th>
                      <td class="text-right">{{model[folder.id].invalid || model[folder.id].error}}</td>
                    </tr>
                    <tr ng-if="!folder.paused">
                      <th><span class="fas fa-fw fa-globe"></span>&nbsp;<span translate>Global State</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{model[folder.id].globalFiles | alwaysNumber | localeNumber}} {{'files' | translate}}, {{model[folder.id].globalDirectories | alwaysNumber | localeNumber}} {{'directories' | translate}}, ~{{model[folder.id].globalBytes | binary}}B">
                          <span class="far fa-copy"></span>&nbsp;{{model[folder.id].globalFiles | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-folder"></span>&nbsp;{{model[folder.id].globalDirectories | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-hdd"></span>&nbsp;~{{model[folder.id].globalBytes | binary}}B
                        </span>
                      </td>
                    </tr>
                    <tr ng-if="!folder.paused">
                      <th><span class="fas fa-fw fa-home"></span>&nbsp;<span translate>Local State</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{model[folder.id].localFiles | alwaysNumber | localeNumber}} {{'files' | translate}}, {{model[folder.id].localDirectories | alwaysNumber | localeNumber}} {{'directories' | translate}}, ~{{model[folder.id].localBytes | binary}}B">
                          <span class="far fa-copy"></span>&nbsp;{{model[folder.id].localFiles | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-folder"></span>&nbsp;{{model[folder.id].localDirectories | alwaysNumber | localeNumber}}&ensp;
                          <span class="far fa-hdd"></span>&nbsp;~{{model[folder.id].localBytes | binary}}B<!-- get rid of the annoying trailing whitespace
                          --><span ng-if="model[folder.id].ignorePatterns"><br/><i><small translate class="text-muted">Reduced by ignore patterns</small></i></span>
                        </span>
                      </td>
                    </tr>
                    <tr ng-if="model[folder.id].needTotalItems > 0">
                      <th><span class="fas fa-fw fa-cloud-download-alt"></span>&nbsp;<span translate>Out of Sync Items</span></th>
                      <td class="text-right">
                        <a href="" ng-click="showNeed(folder.id)">{{model[folder.id].needTotalItems | alwaysNumber | localeNumber}} <span translate>items</span>, ~{{model[folder.id].needBytes | binary}}B</a>
                      </td>
                    </tr>
                    <tr ng-if="folderStatus(folder) === 'scanning' && scanRate(folder.id) > 0">
                      <th><span class="fas fa-fw fa-hourglass-half"></span>&nbsp;<span translate>Scan Time Remaining</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{scanRate(folder.id) | binary}}B/s">~ {{scanRemaining(folder.id)}}</span>
                      </td>
                    </tr>
                    <tr ng-if="hasFailedFiles(folder.id)">
                      <th><span class="fas fa-fw fa-exclamation-circle"></span>&nbsp;<span translate>Failed Items</span></th>
                      <!-- Show the number of failed items as a link to bring up the list. -->
                      <td class="text-right">
                        <a href="" ng-click="showFailed(folder.id)">{{model[folder.id].pullErrors | alwaysNumber | localeNumber}}&nbsp;<span translate>items</span></a>
                      </td>
                    </tr>
                    <tr ng-if="folder.type == 'receiveonly' && canRevert(folder.id)">
                      <th><span class="fas fa-fw fa-exclamation-circle"></span>&nbsp;<span translate>Locally Changed Items</span></th>
                      <td class="text-right">
                        <a href="" ng-click="showLocalChanged(folder.id)">{{model[folder.id].receiveOnlyTotalItems | alwaysNumber | localeNumber}} <span translate>items</span>, ~{{model[folder.id].receiveOnlyBytes | binary}}B</a>
                      </td>
                    </tr>
                    <tr ng-if="folder.type != 'sendreceive'">
                      <th><span class="fas fa-fw fa-folder"></span>&nbsp;<span translate>Folder Type</span></th>
                      <td class="text-right">
                        <span ng-if="folder.type == 'sendonly'" translate>Send Only</span>
                        <span ng-if="folder.type == 'receiveonly'" translate>Receive Only</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.ignorePerms">
                      <th><span class="far fa-fw fa-minus-square"></span>&nbsp;<span translate>Ignore Permissions</span></th>
                      <td class="text-right">
                        <span translate>Yes</span>
                      </td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-refresh"></span>&nbsp;<span translate>Rescans</span></th>
                      <td class="text-right">
                        <div ng-if="folder.rescanIntervalS > 0">
                          <span ng-if="!folder.fsWatcherEnabled" tooltip data-original-title="{{'Periodic scanning at given interval and disabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Disabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && (!model[folder.id].watchError || folder.paused || folderStatus(folder) === 'stopped')" tooltip data-original-title="{{'Periodic scanning at given interval and enabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye"></span>&nbsp;<span translate>Enabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && !folder.paused && folderStatus(folder) !== 'stopped' && model[folder.id].watchError" tooltip data-original-title="{{'Periodic scanning at given interval and failed setting up watching for changes, retrying every 1m:' | translate}}<br/>{{model[folder.id].watchError}}">
                            <span class="far fa-clock"></span>&nbsp;{{folder.rescanIntervalS | duration}}&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Failed to setup, retrying</span>
                          </span>
                        </div>
                        <div ng-if="folder.rescanIntervalS <= 0">
                          <span ng-if="!folder.fsWatcherEnabled" tooltip data-original-title="{{'Disabled periodic scanning and disabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Disabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && (!model[folder.id].watchError || folder.paused || folderStatus(folder) === 'stopped')" tooltip data-original-title="{{'Disabled periodic scanning and enabled watching for changes' | translate}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye"></span>&nbsp;<span translate>Enabled</span>
                          </span>
                          <span ng-if="folder.fsWatcherEnabled && !folder.paused && folderStatus(folder) !== 'stopped' && model[folder.id].watchError" tooltip data-original-title="{{'Disabled periodic scanning and failed setting up watching for changes, retrying every 1m:' | translate}}<br/>{{model[folder.id].watchError}}">
                            <span class="far fa-clock"></span>&nbsp;<span translate>Disabled</span>&ensp;
                            <span class="fas fa-eye-slash"></span>&nbsp;<span translate>Failed to setup, retrying</span>
                          </span>
                        </div>
                      </td>
                    </tr>
                    <tr ng-if="folder.order != 'random'">
                      <th><span class="fas fa-fw fa-sort"></span>&nbsp;<span translate>File Pull Order</span></th>
                      <td class="text-right" ng-switch="folder.order">
                        <span ng-switch-when="random" translate>Random</span>
                        <span ng-switch-when="alphabetic" translate>Alphabetic</span>
                        <span ng-switch-when="smallestFirst" translate>Smallest First</span>
                        <span ng-switch-when="largestFirst" translate>Largest First</span>
                        <span ng-switch-when="oldestFirst" translate>Oldest First</span>
                        <span ng-switch-when="newestFirst" translate>Newest First</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.versioning.type">
                      <th><span class="far fa-fw fa-copy"></span>&nbsp;<span translate>File Versioning</span></th>
                      <td class="text-right" ng-switch="folder.versioning.type">
                        <span ng-switch-when="trashcan" translate>Trash Can File Versioning</span>
                        <span ng-switch-when="staggered" translate>Staggered File Versioning</span>
                        <span ng-switch-when="simple" translate>Simple File Versioning</span>
                        <span ng-switch-when="external" translate>External File Versioning</span>
                      </td>
                    </tr>
                    <tr>
                      <th><span class="fas fa-fw fa-share-alt"></span>&nbsp;<span translate>Shared With</span></th>
                      <td class="text-right" ng-attr-title="{{sharesFolder(folder)}}">{{sharesFolder(folder)}}</td>
                    </tr>
                    <tr ng-if="folderStats[folder.id].lastScan">
                      <th><span class="far fa-fw fa-clock"></span>&nbsp;<span translate>Last Scan</span></th>
                      <td translate ng-if="folderStats[folder.id].lastScanDays >= 365" class="text-right">Never</td>
                      <td ng-if="folderStats[folder.id].lastScanDays < 365" class="text-right">
                        <span>{{folderStats[folder.id].lastScan | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                      </td>
                    </tr>
                    <tr ng-if="folder.type != 'sendonly' && folderStats[folder.id].lastFile && folderStats[folder.id].lastFile.filename">
                      <th><span class="fas fa-fw fa-exchange-alt"></span>&nbsp;<span translate>Latest Change</span></th>
                      <td class="text-right">
                        <span tooltip data-original-title="{{folderStats[folder.id].lastFile.filename}} @ {{folderStats[folder.id].lastFile.at | date:'yyyy-MM-dd HH:mm:ss'}}">
                          <span translate ng-if="!folderStats[folder.id].lastFile.deleted">Updated</span>
                          <span translate ng-if="folderStats[folder.id].lastFile.deleted">Deleted</span>
                          {{folderStats[folder.id].lastFile.filename | basename}}
                        </span>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
              <div class="panel-footer">
                <button type="button" class="btn btn-sm btn-danger pull-left" ng-click="override(folder.id)" ng-if="folderStatus(folder) == 'outofsync' && folder.type == 'sendonly'">
                  <span class="fas fa-arrow-circle-up"></span>&nbsp;<span translate>Override Changes</span>
                </button>
                <button type="button" class="btn btn-sm btn-danger pull-left" ng-click="revert(folder.id)" ng-if="canRevert(folder.id)">
                  <span class="fa fa-arrow-circle-down"></span>&nbsp;<span translate>Revert Local Changes</span>
                </button>
                <span class="pull-right">
                  <button ng-if="!folder.paused" type="button" class="btn btn-sm btn-default" ng-click="setFolderPause(folder.id, true)">
                    <span class="fas fa-pause"></span>&nbsp;<span translate>Pause</span>
                  </button>
                  <button ng-if="folder.paused" type="button" class="btn btn-sm btn-default" ng-click="setFolderPause(folder.id, false)">
                    <span class="fas fa-play"></span>&nbsp;<span translate>Resume</span>
                  </button>
                  <button type="button" class="btn btn-default btn-sm" ng-click="restoreVersions.show(folder.id)" ng-if="folder.versioning.type">
                    <span class="fas fa-undo"></span>&nbsp;<span translate>Versions</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-default" ng-click="rescanFolder(folder.id)" ng-disabled="['idle', 'stopped', 'unshared', 'outofsync', 'faileditems'].indexOf(folderStatus(folder)) < 0">
                    <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan</span>
                  </button>
                  <button type="button" class="btn btn-sm btn-default" ng-click="editFolder(folder)">
                    <span class="fas fa-pencil-alt"></span>&nbsp;<span translate>Edit</span>
                  </button>
                </span>
                <div class="clearfix"></div>
              </div>
            </div>
          </div>
        </div>
        <span class="pull-right">
          <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(true)" ng-if="isAtleastOneFolderPausedStateSetTo(false)">
            <span class="fas fa-pause"></span>&nbsp;<span translate>Pause All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="setAllFoldersPause(false)" ng-if="isAtleastOneFolderPausedStateSetTo(true)">
            <span class="fas fa-play"></span>&nbsp;<span translate>Resume All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="rescanAllFolders()">
            <span class="fas fa-refresh"></span>&nbsp;<span translate>Rescan All</span>
          </button>
          <button type="button" class="btn btn-sm btn-default" ng-click="addFolder()">
            <span class="fas fa-plus"></span>&nbsp;<span translate>Add Folder</span>
{'fraction_non_alphanumeric': 0.17181029880679277, 'fraction_numerical': 0.002221933659409312, 'mean_word_length': 2.144023588115219, 'pattern_counts': {'":': 0, '<': 1811, '<?xml version=': 0, '>': 1819, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1642781', 'n_tokens_mistral': 19866, 'n_tokens_neox': 19011, 'n_words': 3717}