Skip to content

Commit

Permalink
Merge pull request #1 from kohactive/2017-darkohbooth
Browse files Browse the repository at this point in the history
Darkohbooth!
  • Loading branch information
andimal authored and Andy Richardson committed Oct 27, 2017
2 parents 2b14fe9 + 51d1eab commit e3de323
Show file tree
Hide file tree
Showing 141 changed files with 365 additions and 280 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

14 changes: 0 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .env.deploy.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWS_ACCESS_KEY_ID="***"
AWS_SECRET_ACCESS_KEY="****"
AWS_REGION="us-east-1"
AWS_BUCKET="psykohbooth"
AWS_BUCKET="darkohbooth.kohactive.com"
AWS_DIRECTORY=""
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true
},
rules: {
}
};
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
Expand All @@ -13,8 +13,14 @@
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
npm-debug.log*
yarn-error.log
testem.log
.DS_Store
.env.deploy.production
.env.deploy.staging

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
32 changes: 0 additions & 32 deletions .jshintrc

This file was deleted.

22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
language: node_js
node_js:
- "4"
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- node_modules
- $HOME/.npm

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

before_install:
- npm config set spin false
- npm install -g bower
- npm install phantomjs-prebuilt

install:
- npm install
- bower install

script:
- npm test
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
# Psykohbooth
# kohtobooth

This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.
* [2017 Halloween Party - darkohbooth.kohactive.com](http://darkohbooth.kohactive.com)
* [2016 Halloween Party - psykohbooth.kohactive.com](http://psykohbooth.kohactive.com)

## The Physical Photobooth Setup

* iPad on a stand with a ring light
* [Simple Booth Event Edition app](https://www.simplebooth.com/apps)

## How the Images Get to this App
* [ifttt](https://itunes.apple.com/us/app/ifttt/id660944635?mt=8) app pushes all new photos on the iPad to a Google Drive folder(currently [email protected]/Halloween Photo Booth/2017)
* The ifttt app must be running in the background for this to happen(should run every 5-10 mins), otherwise it will sync every time the ifttt app is opened.
* [Zapier](zapier.com) checks the Drive folder every 5 minutes and sends a new record to [Firebase](https://firebase.google.com) for each new photo

## Prerequisites

You will need the following things properly installed on your computer.

* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)
* [Bower](http://bower.io/)
* [Ember CLI](http://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)
* [Git](https://git-scm.com/)
* [Node.js](https://nodejs.org/) (with NPM)
* [Ember CLI](https://ember-cli.com/)
* [Google Chrome](https://google.com/chrome/)

## Installation

* `git clone <repository-url>` this repository
* change into the new directory
* `cd my-app`
* `npm install`
* `bower install`

## Running / Development

* `ember server`
* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
* Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Code Generators

Expand All @@ -45,9 +54,8 @@ Specify what it takes to deploy your app.

## Further Reading / Useful Links

* [ember.js](http://emberjs.com/)
* [ember-cli](http://ember-cli.com/)
* [ember.js](https://emberjs.com/)
* [ember-cli](https://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)

4 changes: 4 additions & 0 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import FirebaseAdapter from 'emberfire/adapters/firebase';

export default FirebaseAdapter.extend({
});
21 changes: 8 additions & 13 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import Ember from 'ember';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
ready: function() {
Ember.$(document).ready(function() {
new freezeframe().freeze();
});
},

const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Resolver,
ready: function() {
// Ember.$(document).ready(function() {
// new freezeframe().freeze();
// });
}
});

loadInitializers(App, config.modulePrefix);
Expand Down
12 changes: 9 additions & 3 deletions app/components/gif-thumbnail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import Ember from 'ember';
import Component from '@ember/component';

export default Ember.Component.extend({
classNames: ['gif col-sm-collapse-4 col-lg-collapse-3'],
export default Component.extend({
classNames : ['gif col-sm-collapse-4 col-lg-collapse-3'],
classNameBindings : ['image.id'],

didRender(){
this._super(...arguments);
$(`.${this.get('image.id')} img`).freezeframe();
},

click() {
this.sendAction('action', this.get('image'));
Expand Down
12 changes: 6 additions & 6 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PSYKOHBOOTH</title>
<title>Darkohbooth</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://www.kohactive.com/assets/images/favicon.ico" rel=icon type='image/x-icon'>

{{content-for "head"}}

<link href="https://fonts.googleapis.com/css?family=Raleway:600" rel="stylesheet">

<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/psykohbooth.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/darkohbooth.css">

{{content-for "head-footer"}}
</head>
<body>
{{content-for "body"}}

<script src="assets/vendor.js"></script>
<script src="assets/psykohbooth.js"></script>
<script src="{{rootURL}}assets/vendor.js"></script>
<script src="{{rootURL}}assets/darkohbooth.js"></script>

{{content-for "body-footer"}}
</body>
Expand Down
16 changes: 16 additions & 0 deletions app/models/image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import DS from 'ember-data';

export default DS.Model.extend({
direct_media_link : DS.attr('string'),
share_link : DS.attr('string'),
file : DS.attr('string'),
downloadUrl : DS.attr('string'),
embedLink : DS.attr('string'),
webContentLink : DS.attr('string'),

url: Ember.computed('downloadUrl', function() {
if(this.get('downloadUrl')){
return this.get('downloadUrl').split('&e')[0];
}
})
});
7 changes: 4 additions & 3 deletions app/router.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Ember from 'ember';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = Ember.Router.extend({
location: config.locationType
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});

Router.map(function() {
Expand Down
18 changes: 13 additions & 5 deletions app/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import Ember from 'ember';
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';

export default Ember.Route.extend({
images: Ember.inject.service(),
export default Route.extend({
images: service(),

model() {
return this.get('images').filenames();
// var newPost = this.store.createRecord('image', {
// title: 'EmberFire is flaming hot!',
// body: 'You can store and sync data in realtime without a backend.'
// });
// newPost.save();

// return this.get('images').filenames();
return this.store.findAll('image');
},

actions: {
showImage(image) {
this.transitionTo('index.image', image);
this.transitionTo('index.image', image.get('id'));
}
}
});
19 changes: 8 additions & 11 deletions app/routes/index/image.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import Ember from 'ember';
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';

export default Ember.Route.extend({
images: Ember.inject.service(),
export default Route.extend({
images: service(),

beforeModel(transition) {
if( this.get('images').notInFilenames(transition.params['index.image'].image) ) {
this.transitionTo('index');
}
// if( this.get('images').notInFilenames(transition.params['index.image'].image) ) {
// this.transitionTo('index');
// }
},

model(params) {
return params.image;
},

setupController(controller, model) {
controller.set('imgSrc', 'assets/images/gifs/' + model + '.gif');
return this.store.findRecord('image', params.image);
},

actions: {
Expand Down
4 changes: 2 additions & 2 deletions app/services/images.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ember from 'ember';
import Service from '@ember/service';

export default Ember.Service.extend({
export default Service.extend({
exclude: [1,2,7,71,96],

pad(n, width, z) {
Expand Down
Loading

0 comments on commit e3de323

Please sign in to comment.