Refactors most controllers and directives into classes for more organized and maintainable code

This commit is contained in:
Mo Bitar
2020-01-30 13:37:16 -06:00
parent badadba8f8
commit 3c8c43ac7e
144 changed files with 87972 additions and 5613 deletions

View File

@@ -1,23 +1,23 @@
.sn-component(ng-if='issueLoading')
.sn-component(ng-if='ctrl.issueLoading')
.sk-app-bar.no-edges.no-top-edge.dynamic-height
.left
.sk-app-bar-item
.sk-label.warning There was an issue loading {{component.name}}.
.sk-label.warning There was an issue loading {{ctrl.component.name}}.
.right
.sk-app-bar-item(ng-click='reloadComponent()')
.sk-app-bar-item(ng-click='ctrl.reloadComponent()')
.sk-button.info
.sk-label Reload
.sn-component(ng-if='showNoThemesMessage')
.sn-component(ng-if='ctrl.showNoThemesMessage')
.sk-app-bar.no-edges.no-top-edge.dynamic-height
.left
.sk-app-bar-item
.sk-label.warning This extension does not support themes.
.right
.sk-app-bar-item(ng-click='noThemesMessageDismiss()')
.sk-app-bar-item(ng-click='ctrl.dismissNoThemesMessage()')
.sk-label Dismiss
.sk-app-bar-item(ng-click='disableActiveTheme()')
.sk-app-bar-item(ng-click='ctrl.disableActiveTheme()')
.sk-label Disable Active Theme
.sn-component(ng-if='expired')
.sn-component(ng-if='ctrl.expired')
.sk-app-bar.no-edges.no-top-edge.dynamic-height
.left
.sk-app-bar-item
@@ -25,19 +25,29 @@
.sk-circle.danger.small
.sk-app-bar-item-column
div
a.sk-label.sk-base(href='https://dashboard.standardnotes.org', rel='noopener', target='_blank')
| Your Extended subscription expired on {{component.dateToLocalizedString(component.valid_until)}}.
a.sk-label.sk-base(
href='https://dashboard.standardnotes.org',
rel='noopener',
target='_blank'
)
| Your Extended subscription expired on
| {{ctrl.component.dateToLocalizedString(ctrl.component.valid_until)}}.
.sk-p
| Extensions are in a read-only state.
.right
.sk-app-bar-item(ng-click='reloadComponent()')
.sk-app-bar-item(ng-click='ctrl.reloadComponent()')
.sk-button.info
.sk-label Reload
.sk-app-bar-item
.sk-app-bar-item-column
.sk-button.warning
a.sk-label(href='https://standardnotes.org/help/41/expired', rel='noopener', target='_blank') Help
.sn-component(ng-if="error == 'offline-restricted'")
a.sk-label(
href='https://standardnotes.org/help/41/expired',
rel='noopener',
target='_blank'
) Help
.sn-component(ng-if="ctrl.error == 'offline-restricted'")
.sk-panel.static
.sk-panel-content
.sk-panel-section.stretch
@@ -51,22 +61,35 @@
ul
li.sk-p
strong Enable the Hosted option
| for this extension by opening the 'Extensions' menu and toggling 'Use hosted when local is unavailable' under this extension's options. Then press Reload below.
| for this extension by opening the 'Extensions' menu and
| toggling 'Use hosted when local is unavailable' under this
| extension's options. Then press Reload below.
li.sk-p
strong Use the Desktop application.
.sk-panel-row
.sk-button.info(ng-click='reloadStatus()', ng-if='!reloading')
.sk-button.info(
ng-click='ctrl.reloadStatus()',
ng-if='!ctrl.reloading'
)
.sk-label Reload
.sk-spinner.info.small(ng-if='reloading')
.sn-component(ng-if="error == 'url-missing'")
.sk-spinner.info.small(ng-if='ctrl.reloading')
.sn-component(ng-if="ctrl.error == 'url-missing'")
.sk-panel.static
.sk-panel-content
.sk-panel-section.stretch
.sk-panel-section-title This extension is not installed correctly.
p Please uninstall {{component.name}}, then re-install it.
p Please uninstall {{ctrl.component.name}}, then re-install it.
p
| This issue can occur if you access Standard Notes using an older version of the app.
| This issue can occur if you access Standard Notes using an older
| version of the app.
| Ensure you are running at least version 2.1 on all platforms.
iframe(data-component-id='{{component.uuid}}', frameborder='0', ng-attr-id='component-iframe-{{component.uuid}}', ng-if='component && componentValid', ng-src='{{getUrl() | trusted}}', sandbox='allow-scripts allow-top-navigation-by-user-activation allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals allow-forms')
iframe(
data-component-id='{{ctrl.component.uuid}}',
frameborder='0',
ng-attr-id='component-iframe-{{ctrl.component.uuid}}',
ng-if='ctrl.component && ctrl.componentValid',
ng-src='{{ctrl.getUrl() | trusted}}',
sandbox='allow-scripts allow-top-navigation-by-user-activation allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-modals allow-forms'
)
| Loading
.loading-overlay(ng-if='loading')
.loading-overlay(ng-if='ctrl.loading')