Action menu updates, ionicons minimal

This commit is contained in:
Mo Bitar
2018-01-19 12:22:17 -06:00
parent 59fb649bd4
commit 5be2402f65
25 changed files with 185 additions and 5642 deletions

View File

@@ -4,33 +4,29 @@
%a.no-decoration{"ng-if" => "extensions.length == 0", "href" => "https://standardnotes.org/extensions", "target" => "blank"}
%menu-row{"title" => "'Download Actions'"}
.section{"ng-repeat" => "extension in extensions"}
%div{"ng-repeat" => "extension in extensions"}
.header{"ng-click" => "extension.hide = !extension.hide; $event.stopPropagation();"}
.column
%h4.title {{extension.name}}
.subtitle
Will submit your note
%strong {{accessTypeForExtension(extension)}}
.spinner.small.loading{"ng-if" => "extension.loading"}
%div{"ng-if" => "extension.hide"} …
%menu-row{"ng-if" => "!extension.hide", "ng-repeat" => "action in extension.actionsWithContextForItem(item)", "ng-click" => "executeAction(action, extension); $event.stopPropagation();",
"ng-class" => "{'faded' : !isActionEnabled(action, extension)}", "title" => "action.label", "subtitle" => "action.desc"}
.small.normal{"ng-if" => "!isActionEnabled(action, extension)"}
Requires {{action.access_type}} access to this note.
%menu-row{"ng-if" => "!extension.hide", "ng-repeat" => "action in extension.actionsWithContextForItem(item)",
"ng-click" => "executeAction(action, extension); $event.stopPropagation();", "title" => "action.label", "subtitle" => "action.desc",
"spinner-class" => "action.running ? 'info' : null", "sub-rows" => "action.subrows"}
.sublabel{"ng-if" => "action.access_type"}
Uses
%strong {{action.access_type}}
access to this note.
%div{"ng-if" => "action.showNestedActions"}
%ul.mt-10
%li.menu-item.white-bg.nested-hover{"ng-repeat" => "subaction in action.subactions", "ng-click" => "executeAction(subaction, extension, action); $event.stopPropagation();", "style" => "margin-top: -1px;"}
%label.menu-item-title {{subaction.label}}
.menu-item-subtitle {{subaction.desc}}
%span{"ng-if" => "subaction.running"}
.spinner.small{"style" => "margin-top: 3px;"}
%span{"ng-if" => "action.running"}
.spinner.small{"style" => "margin-top: 3px;"}
.extension-render-modal{"ng-if" => "renderData.showRenderModal", "ng-click" => "renderData.showRenderModal = false"}
.content
%h2 {{renderData.title}}
%p.normal{"style" => "white-space: pre-wrap; font-family: monospace; font-size: 16px;"} {{renderData.text}}
.modal.medium{"ng-if" => "renderData.showRenderModal", "ng-click" => "$event.stopPropagation();"}
.content
.sn-component
.panel
.header
%h1.title Preview
%a.close-button.info{"ng-click" => "renderData.showRenderModal = false; $event.stopPropagation();"} Close
.content.selectable
%h2 {{renderData.title}}
%p.normal{"style" => "white-space: pre-wrap; font-family: monospace; font-size: 16px;"} {{renderData.text}}

View File

@@ -9,7 +9,7 @@
"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
.row{"ng-if" => "component.conflict_of || offlineAvailableForComponent(editor)"}
.column
%strong.red.medium{"ng-if" => "editor.conflict_of"} Conflicted copy
.sublabel{"ng-if" => "offlineAvailableForComponent(editor)"}
@@ -22,8 +22,8 @@
%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
.row{"ng-if" => "component.conflict_of || offlineAvailableForComponent(component)"}
.column
%strong.red.medium{"ng-if" => "component.conflict_of"} Conflicted copy
.sublabel{"ng-if" => "component.local_url"}
.sublabel{"ng-if" => "offlineAvailableForComponent(component)"}
Available Offline

View File

@@ -9,6 +9,13 @@
.sublabel{"ng-if" => "subtitle"}
{{subtitle}}
%ng-transclude
.subrows{"ng-if" => "subRows && subRows.length > 0"}
%menu-row{"ng-repeat" => "row in subRows", "ng-click" => "row.onClick($event); $event.stopPropagation();",
"title" => "row.title", "subtitle" => "row.subtitle", "spinner-class" => "row.spinnerClass"}
.column{"ng-if" => "hasButton"}
.button.info{"ng-click" => "clickButton($event)", "ng-class" => "buttonClass"}
{{buttonText}}
.column{"ng-if" => "spinnerClass"}
.spinner.small{"ng-class" => "spinnerClass"}

View File

@@ -28,7 +28,7 @@
.right
.item{"ng-if" => "ctrl.newUpdateAvailable", "ng-click" => "ctrl.clickedNewUpdateAnnouncement()"}
%span.tinted.normal New update downloaded. Installs on app restart.
%span.info.normal New update downloaded. Installs on app restart.
.item.no-pointer{"ng-if" => "ctrl.lastSyncDate && !ctrl.isRefreshing"}
.label.subtle

View File

@@ -48,7 +48,7 @@
%strong.red.medium{"ng-if" => "note.errorDecrypting"} Error decrypting
.pinned.tinted{"ng-if" => "note.pinned", "ng-class" => "{'tinted-selected' : ctrl.selectedNote == note}"}
%i.icon.ion-ios-flag
%i.icon.ion-bookmark
%strong.medium Pinned
.archived.tinted{"ng-if" => "note.archived && !ctrl.tag.archiveTag", "ng-class" => "{'tinted-selected' : ctrl.selectedNote == note}"}