Files
standardnotes-app-web/app/assets/templates/frontend/directives/editor-menu.html.haml
2018-01-19 12:22:17 -06:00

30 lines
1.7 KiB
Plaintext

.sn-component
.menu-panel.dropdown-menu
.section
.header
%h4.title Note Editor
%menu-row{"title" => "'Plain Editor'", "circle" => "selectedEditor == null && 'success'", "ng-click" => "selectComponent($event, null)"}
%menu-row{"ng-repeat" => "editor in editors", "ng-click" => "selectComponent($event, editor)", "title" => "editor.name",
"circle" => "selectedEditor === editor && 'success'",
"has-button" => "selectedEditor == editor || defaultEditor == editor", "button-text" => "defaultEditor == editor ? 'Undefault' : 'Set Default'",
"button-action" => "toggleDefaultForEditor(editor)", "button-class" => "defaultEditor == editor ? 'warning' : 'info'"}
.row{"ng-if" => "component.conflict_of || offlineAvailableForComponent(editor)"}
.column
%strong.red.medium{"ng-if" => "editor.conflict_of"} Conflicted copy
.sublabel{"ng-if" => "offlineAvailableForComponent(editor)"}
Available Offline
%a.no-decoration{"ng-if" => "editors.length == 0", "href" => "https://standardnotes.org/extensions", "target" => "blank"}
%menu-row{"title" => "'Download More Editors'"}
.section{"ng-if" => "stack.length > 0"}
.header
%h4.title Editor Stack
%menu-row{"ng-repeat" => "component in stack", "ng-click" => "selectComponent($event, component)", "title" => "component.name",
"circle" => "component.active ? 'success' : 'danger'"}
.row{"ng-if" => "component.conflict_of || offlineAvailableForComponent(component)"}
.column
%strong.red.medium{"ng-if" => "component.conflict_of"} Conflicted copy
.sublabel{"ng-if" => "offlineAvailableForComponent(component)"}
Available Offline