2014-09-20 11:49:04 -04:00
|
|
|
doctype html
|
|
|
|
//
|
|
|
|
Copyright (C) 2012-2013, The SwitchyOmega Authors. Please see the AUTHORS file
|
|
|
|
for details.
|
|
|
|
|
|
|
|
This file is part of SwitchyOmega.
|
|
|
|
|
|
|
|
SwitchyOmega is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
SwitchyOmega is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with SwitchyOmega. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
html(lang='en' ng-app='omegaPopup' ng-controller='PopupCtrl' ng-csp)
|
|
|
|
head
|
|
|
|
meta(charset='utf-8')
|
|
|
|
title {{'popup_title' | tr}}
|
|
|
|
link(rel='stylesheet' href='lib/bootstrap/css/bootstrap.min.css')
|
|
|
|
link(rel='stylesheet' href='css/popup.css')
|
|
|
|
body(ng-class='{"with-condition-form": showConditionForm}')
|
2015-02-17 07:31:53 -05:00
|
|
|
ul.popup-menu-nav.nav.nav-pills.nav-stacked(ng-hide='showConditionForm || proxyNotControllable || showRequestInfo')
|
2014-09-20 11:49:04 -04:00
|
|
|
li.profile(ng-repeat='profile in builtinProfiles' ng-class='{active: isActive(profile.name), "bg-info": isEffective(profile.name)}')
|
2015-01-13 02:13:15 -05:00
|
|
|
a(href='#' role='button' ng-attr-tabindex='{{100 + $index}}' ng-click='applyProfile(profile)' title='{{getProfileTitle(profile)}}'
|
|
|
|
data-shortcut='+{{profile.name}}')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='profile' icon='getIcon(profile)' options='availableProfiles' disp-name='dispNameFilter')
|
2015-02-17 07:31:53 -05:00
|
|
|
li.profile.external-profile(ng-show='!requestInfoProvided && !!externalProfile' ng-class='{active: isActive(""), "bg-info": isEffective("")}')
|
2015-01-13 02:13:15 -05:00
|
|
|
a(href='#' role='button' ng-click='nameExternal.open = true' title='{{getProfileTitle(externalProfile)}}' data-shortcut='external')
|
2014-09-20 11:49:04 -04:00
|
|
|
form(name='nameExternalForm' ng-submit='nameExternalForm.$valid && saveExternal()')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-icon='externalProfile' icon='getIcon(externalProfile, "normal")' options='availableProfiles' disp-name='dispNameFilter')
|
2014-09-20 11:49:04 -04:00
|
|
|
= ' '
|
|
|
|
span(ng-show='!nameExternal.open') {{'popup_externalProfile' | tr}}
|
|
|
|
input.form-control(ng-show='!!nameExternal.open' ng-model='externalProfile.name' ng-blur='nameExternalForm.submit()'
|
2014-10-14 22:11:33 -04:00
|
|
|
placeholder='{{"popup_externalProfileName" | tr}}' ui-validate='validateProfileName')
|
2015-02-17 07:31:53 -05:00
|
|
|
li.request-info(ng-show='!!requestInfoProvided' class='bg-warning')
|
|
|
|
a(href='#' role='button' ng-click='showRequestInfo = true' data-shortcut='requestInfo')
|
|
|
|
span.glyphicon.glyphicon-warning-sign.text-warning
|
|
|
|
= ' '
|
|
|
|
| {{'popup_requestErrorCount' | tr:[requestInfo.errorCount]}}
|
2014-09-20 11:49:04 -04:00
|
|
|
li.divider
|
2015-01-13 02:13:15 -05:00
|
|
|
li.profile.custom-profile(ng-repeat='profile in customProfiles' ng-class='{active: isActive(profile.name), "bg-info": isEffective(profile.name)}'
|
2014-10-25 11:41:39 -04:00
|
|
|
dropdown)
|
2014-12-19 07:55:03 -05:00
|
|
|
a(href='#' role='button' ng-click='applyProfile(profile)' ng-if='!profile.validResultProfiles' title='{{getProfileTitle(profile)}}')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='profile' icon='getIcon(profile)' options='availableProfiles' disp-name='dispNameFilter')
|
2014-12-19 07:55:03 -05:00
|
|
|
a.profile-with-default-edit(href='#' role='button' ng-click='applyProfile(profile)' ng-if='!!profile.validResultProfiles' title='{{getProfileTitle(profile)}}')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='profile' icon='getIcon(profile)' options='availableProfiles' disp-name='dispNameFilter')
|
|
|
|
= ' '
|
2014-10-25 11:41:39 -04:00
|
|
|
| [{{profile.defaultProfileName}}]
|
2015-02-10 23:41:16 -05:00
|
|
|
button.dropdown-toggle.btn.btn-default(role='button' dropdown-toggle href='#' ng-click='$event.stopPropagation()')
|
2014-10-25 11:41:39 -04:00
|
|
|
span.glyphicon.glyphicon-chevron-down
|
|
|
|
ul.dropdown-menu(ng-if='!!profile.validResultProfiles')
|
|
|
|
li(ng-repeat='p in profile.validResultProfiles' ng-class='{active: p.name == profile.defaultProfileName}')
|
2014-12-19 07:55:03 -05:00
|
|
|
a(href='#' role='button' ng-click='setDefaultProfile(profile.name, p.name)' title='{{getProfileTitle(profile)}}')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='p' options='availableProfiles' disp-name='dispNameFilter')
|
2014-10-13 09:23:41 -04:00
|
|
|
li.divider(ng-show='!!currentDomain && validResultProfiles.length')
|
2014-09-20 11:49:04 -04:00
|
|
|
li(ng-show='!!currentProfileCanAddRule')
|
2015-01-13 02:13:15 -05:00
|
|
|
a(href='#' role='button' ng-click='showConditionForm = true' data-shortcut='addRule')
|
2014-09-20 11:49:04 -04:00
|
|
|
span.glyphicon.glyphicon-plus
|
|
|
|
= ' '
|
|
|
|
span {{'popup_addCondition' | tr}}
|
2014-10-13 09:23:41 -04:00
|
|
|
li(ng-show='!!currentDomain && validResultProfiles.length' dropdown is-open="tempRuleMenu.open")
|
2015-02-10 23:41:16 -05:00
|
|
|
a.dropdown-toggle(href='#' role='button' dropdown-toggle data-shortcut='tempRule')
|
2014-09-20 11:49:04 -04:00
|
|
|
span.glyphicon.glyphicon-filter
|
|
|
|
= ' '
|
|
|
|
span.current-domain {{currentDomain}}
|
|
|
|
span.caret
|
|
|
|
ul.dropdown-menu
|
2014-10-13 09:23:41 -04:00
|
|
|
li(ng-repeat='profile in validResultProfiles' ng-class='{active: profile.name == currentTempRuleProfile}'
|
|
|
|
ng-show='!!currentTempRuleProfile || validResultProfiles.length == 1 || profile.name != currentProfileName')
|
2014-12-19 07:55:03 -05:00
|
|
|
a(href='#' role='button' ng-click='addTempRule(currentDomain, profile.name)' title='{{getProfileTitle(profile)}}')
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='profile' options='availableProfiles' disp-name='dispNameFilter')
|
2014-09-20 11:49:04 -04:00
|
|
|
li.divider
|
|
|
|
li
|
2015-01-13 02:13:15 -05:00
|
|
|
a(href='#' role='button' ng-click='openOptions()' data-shortcut='option')
|
2014-09-20 11:49:04 -04:00
|
|
|
span.glyphicon.glyphicon-wrench
|
|
|
|
= ' '
|
|
|
|
span {{'popup_showOptions' | tr}}
|
|
|
|
li
|
2015-01-13 02:13:15 -05:00
|
|
|
a.report-issue(href='https://github.com/FelisCatus/SwitchyOmega/issues'
|
|
|
|
target='_blank' data-shortcut='issue')
|
2014-09-20 11:49:04 -04:00
|
|
|
span.glyphicon.glyphicon-comment
|
|
|
|
= ' '
|
|
|
|
span {{'popup_reportIssues' | tr}}
|
|
|
|
li
|
2015-01-13 02:13:15 -05:00
|
|
|
a.error-log(href='#' role='button' data-shortcut='log')
|
2014-09-20 11:49:04 -04:00
|
|
|
span.glyphicon.glyphicon-download
|
|
|
|
= ' '
|
|
|
|
span {{'popup_errorLog' | tr}}
|
|
|
|
form.condition-form(name='conditionForm' style='display: none;'
|
|
|
|
ng-style='{display: showConditionForm ? "block" : "none"}'
|
|
|
|
ng-submit='addCondition(rule.condition, rule.profileName)')
|
|
|
|
fieldset
|
|
|
|
legend
|
|
|
|
| {{'popup_addConditionTo' | tr}}
|
|
|
|
= ' '
|
|
|
|
span.profile-inline
|
2014-10-27 10:42:23 -04:00
|
|
|
span(omega-profile-inline='currentProfile' options='availableProfiles' disp-name='dispNameFilter')
|
2014-09-20 11:49:04 -04:00
|
|
|
div.form-group
|
2014-10-10 00:33:02 -04:00
|
|
|
label
|
|
|
|
| {{'options_conditionType' | tr}}
|
|
|
|
= ' '
|
|
|
|
button.btn.btn-link.btn-sm.clear-padding(type='button' ng-click='openConditionHelp()')
|
|
|
|
| {{"options_showConditionTypeHelp" | tr}}
|
|
|
|
= ' '
|
|
|
|
span.glyphicon.glyphicon-new-window
|
2014-09-20 11:49:04 -04:00
|
|
|
select.form-control(ng-model='rule.condition.conditionType')
|
2014-10-10 00:33:02 -04:00
|
|
|
option(value='HostWildcardCondition') {{'condition_HostWildcardCondition' | tr}}
|
|
|
|
option(value='HostRegexCondition') {{'condition_HostRegexCondition' | tr}}
|
|
|
|
option(value='UrlWildcardCondition') {{'condition_UrlWildcardCondition' | tr}}
|
|
|
|
option(value='UrlRegexCondition') {{'condition_UrlRegexCondition' | tr}}
|
|
|
|
option(value='KeywordCondition') {{'condition_KeywordCondition' | tr}}
|
2014-09-20 11:49:04 -04:00
|
|
|
div.form-group
|
|
|
|
label {{'options_conditionDetails' | tr}}
|
|
|
|
input.form-control.condition-details(type='text' required ng-model='rule.condition.pattern')
|
|
|
|
div.form-group
|
|
|
|
label {{'options_resultProfile' | tr}}
|
2014-10-26 00:48:39 -04:00
|
|
|
div(omega-profile-select='validResultProfiles' ng-model='rule.profileName'
|
2014-10-27 10:42:23 -04:00
|
|
|
disp-name='dispNameFilter' options='availableProfiles')
|
2014-09-20 11:49:04 -04:00
|
|
|
div.condition-controls
|
|
|
|
button.btn.btn-default(type='button' ng-click='showConditionForm = false')
|
|
|
|
| {{'dialog_cancel' | tr}}
|
|
|
|
button.btn.btn-primary(type='submit' ng-disabled='conditionForm.$invalid') {{'popup_addCondition' | tr}}
|
|
|
|
div.proxy-not-controllable(ng-show='proxyNotControllable')
|
|
|
|
p.text-danger {{'popup_proxyNotControllable_' + proxyNotControllable | tr}}
|
2014-12-06 07:34:49 -05:00
|
|
|
p.help-block {{('popup_proxyNotControllableDetails_' + proxyNotControllable | tr) || ('popup_proxyNotControllableDetails' | tr)}}
|
|
|
|
p.proxy-not-controllable-controls
|
|
|
|
button.btn.btn-default(ng-click='closePopup()') {{'dialog_cancel' | tr}}
|
|
|
|
button.btn.btn-primary(ng-click='openManage()') {{'popup_proxyNotControllableManage' | tr}}
|
2015-02-17 07:31:53 -05:00
|
|
|
div.request-info-details(ng-show='showRequestInfo')
|
|
|
|
form.request-info-details(style='display: none;'
|
|
|
|
ng-style='{display: showRequestInfo ? "block" : "none"}'
|
|
|
|
ng-submit='addConditionForDomains(domainsForCondition, profileForDomains)')
|
|
|
|
fieldset
|
2015-02-27 08:09:07 -05:00
|
|
|
legend(ng-show='!!currentProfileCanAddRule')
|
2015-02-17 07:31:53 -05:00
|
|
|
| {{'popup_addConditionTo' | tr}}
|
|
|
|
= ' '
|
|
|
|
span.profile-inline
|
|
|
|
span(omega-profile-inline='currentProfile' options='availableProfiles' disp-name='dispNameFilter')
|
2015-02-27 08:09:07 -05:00
|
|
|
legend(ng-show='!currentProfileCanAddRule')
|
2015-02-27 11:44:42 -05:00
|
|
|
| {{'popup_requestErrorHeading' | tr}}
|
|
|
|
.text-warning {{'popup_requestErrorWarning' | tr}}
|
|
|
|
p.help-block {{'popup_requestErrorWarningHelp' | tr}}
|
2015-02-27 08:09:07 -05:00
|
|
|
p.help-block(ng-show='!!currentProfileCanAddRule') {{'popup_requestErrorAddCondition' | tr}}
|
2015-02-17 07:31:53 -05:00
|
|
|
.checkbox(ng-repeat='domain in requestInfo.domains')
|
|
|
|
label
|
|
|
|
input(type='checkbox' ng-model='domainsForCondition[domain.domain]')
|
|
|
|
span.label.label-warning {{domain.errorCount}}
|
2015-02-27 08:09:07 -05:00
|
|
|
=' {{domain.domain}}'
|
|
|
|
div.form-group(ng-show='!!currentProfileCanAddRule')
|
2015-02-17 07:31:53 -05:00
|
|
|
label {{'options_resultProfileForSelectedDomains' | tr}}
|
|
|
|
div(omega-profile-select='validResultProfiles' ng-model='profileForDomains'
|
|
|
|
disp-name='dispNameFilter' options='availableProfiles')
|
2015-02-27 11:44:42 -05:00
|
|
|
p.help-block(ng-show='!currentProfileCanAddRule')
|
|
|
|
| {{'popup_requestErrorCannotAddCondition' | tr}}
|
2015-02-17 07:31:53 -05:00
|
|
|
div.condition-controls
|
|
|
|
button.btn.btn-default(type='button' ng-click='showRequestInfo = false')
|
|
|
|
| {{'dialog_cancel' | tr}}
|
2015-02-27 08:09:07 -05:00
|
|
|
button.btn.btn-primary(type='submit' ng-show='!!currentProfileCanAddRule') {{'popup_addCondition' | tr}}
|
2015-04-19 08:08:20 -04:00
|
|
|
button.btn.btn-default.pull-right(type='button' ng-show='!currentProfileCanAddRule'
|
2015-02-27 11:44:42 -05:00
|
|
|
ng-click='openOptions("#/general")') {{'popup_configureMonitorWebRequests' | tr}}
|
2014-09-20 11:49:04 -04:00
|
|
|
|
|
|
|
script(src='js/log_error.js')
|
|
|
|
script(src='lib/FileSaver/FileSaver.js')
|
|
|
|
script(src='js/omega_target_web_basics.js')
|
|
|
|
script(src='js/popup_basics.js')
|
2014-12-19 07:55:03 -05:00
|
|
|
script(src='lib/jquery/jquery.min.js')
|
2014-09-20 11:49:04 -04:00
|
|
|
script(src='lib/angular/angular.min.js')
|
|
|
|
script(src='lib/angular-bootstrap/ui-bootstrap-tpls.min.js')
|
|
|
|
script(src='lib/angular-ui-utils/validate.min.js')
|
|
|
|
script(src='js/omega_target_web.js')
|
|
|
|
script(src='js/omega_decoration.js')
|
|
|
|
script(src='js/popup.js')
|