This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loading(promise) { | |
ctrl.submitting = true; | |
$ionicLoading.show(); | |
return promise.finally(function onFinally() { | |
ctrl.submitting = false; | |
$ionicLoading.hide(); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public struct UIKitLocalizedString { | |
public static func forKey(_ key: String) -> String { | |
guard let bundle = Bundle(identifier: "com.apple.UIKit") else { return key} | |
let localizedString = bundle.localizedString(forKey: key, value: nil, table: nil) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Photos | |
enum CameraSource: String { | |
case prompt = "PROMPT" | |
case camera = "CAMERA" | |
case photos = "PHOTOS" | |
} | |
enum CameraResultType: String { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/** | |
* Implement three common modal types: alert, confirm, and prompt | |
*/ | |
@objc(CAPModalsPlugin) | |
public class CAPModalsPlugin : CAPPlugin { | |
@objc public func alert(_ call: CAPPluginCall) { | |
guard let title = call.options["title"] as? String else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
open class SnackbarView: UIView { | |
internal let snackRemoval: Notification.Name = Notification.Name(rawValue: "snackbar.removalNotification") | |
// MARK: Properties | |
/// The controller for this view | |
internal var controller: CAPSnackbarPlugin? | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getPosition = function (options) { | |
return new Promise(function (resolve, reject) { | |
navigator.geolocation.getCurrentPosition(resolve, reject, options); | |
}); | |
} | |
getPosition() | |
.then((position) => { | |
console.log(position); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const models = require('../app/models') | |
const Sequelize = require('sequelize') | |
const fs = require('fs') | |
const path = require('path') | |
const sequelize = new Sequelize('', '', '', { | |
host: '', | |
dialect: 'postgres' | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": [ | |
"@softboxlab/eslint-config-gandalf-lint-react" | |
], | |
"rules": { | |
"import/order": [ | |
"error", | |
{ | |
"groups": [ | |
"builtin", |