This repository has been archived by the owner on May 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2cd04f6
commit a870ba3
Showing
24 changed files
with
506 additions
and
61 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
class Api::V1::ApiController < ActionController::Base | ||
|
||
skip_before_action :verify_authenticity_token | ||
|
||
before_action :not_provisional | ||
|
||
private | ||
|
||
# Find the user that owns the access token | ||
def current_user | ||
User::User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token | ||
end | ||
|
||
def not_provisional | ||
if Doorkeeper::Application.find_by(id: doorkeeper_token.application_id).provisional? | ||
render plain: "425 Too Early - Provisional Client", status: 425 | ||
end | ||
end | ||
end |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import "controllers" | ||
import "@hotwired/turbo-rails" | ||
|
||
import "selectlist" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Controller } from "@hotwired/stimulus"; | ||
|
||
export default class extends Controller { | ||
static targets = [ "select" ] | ||
|
||
add({ formData }) { | ||
console.log("hii") | ||
formData.append(this.selectTarget.getAttribute("name"), this.selectTarget.value) | ||
} | ||
|
||
null() { | ||
return null | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Developers::ApplicationMailer < ApplicationMailer | ||
def app_created_email | ||
@app = params[:domain] | ||
mail(to: params[:email], subject: "Your app has been created!", message_stream: "outbound") | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<main ng-app="starter" no-scroll class="admin" domains="<%= @apps.to_json %>"> | ||
<h1>Review Apps</h1> | ||
<ion-pane ng-controller="CardsCtrl" > | ||
<td-cards> | ||
<td-card ng-repeat="card in cards" on-destroy="cardDestroyed($index)" on-swipe-left="cardSwipedLeft($index)" on-swipe-right="cardSwipedRight($index)" on-partial-swipe="cardPartialSwipe(amt)" class="card-{{$index}}"> | ||
<%= form_with method: :post, class: "image", "ng-controller": "CardCtrl", id: "form-{{card.resource_id}}" do |form| %> | ||
<h2>{{card.name}}</h2> | ||
<p><b>PLAN</b></p> | ||
<p>{{card.plan}}</p> | ||
<p><b>REDIRECT</b></p> | ||
<p>{{card.uri}}</p> | ||
<div class="no-text">⛔</div> | ||
<div class="yes-text">✅</div> | ||
<input type="hidden" name="application_id" value="{{card.resource_id}}"/> | ||
<input type="hidden" name="provisional_action" value="" class="action-field" /> | ||
<% end %> | ||
</td-card> | ||
<div class="none-left"> | ||
<h2>No more domains to review</h2> | ||
</div> | ||
</td-cards> | ||
<div class="no-text">REJECT</div> | ||
<div class="yes-text">APPROVE</div> | ||
</ion-pane> | ||
</main> | ||
|
||
<% content_for :head do %> | ||
|
||
<script src="https://code.ionicframework.com/collide/0.0.4/collide.js"></script> | ||
<script src="https://code.ionicframework.com/1.0.0-beta.14/js/ionic.bundle.js"></script> | ||
<script src="https://code.ionicframework.com/contrib/ionic-contrib-tinder-cards/ionic.tdcards.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script> | ||
|
||
<%= javascript_include_tag "tinder", "data-turbo-track": "reload" %> | ||
<% end %> | ||
|
||
<style> | ||
@import url("https://code.ionicframework.com/contrib/ionic-contrib-tinder-cards/ionic.tdcards.css"); | ||
@import url("https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"); | ||
|
||
.pane { | ||
background: #343434 !important; | ||
} | ||
|
||
td-cards { | ||
display: block; | ||
} | ||
|
||
main { | ||
width: 100%; | ||
height: 85%; | ||
position: relative; | ||
color: #343434; | ||
} | ||
|
||
td-card { | ||
position: absolute; | ||
left: 50%; | ||
margin-top: 80px; | ||
margin-bottom: 40px; | ||
margin-left: -150px; | ||
width: 300px; | ||
height: 300px; | ||
|
||
border: 1px solid #999; | ||
box-shadow: 0px 1px 3px rgba(0,0,0,0.2); | ||
border-radius: 6px; | ||
background: #F5F5F5; | ||
color: #343434; | ||
z-index: 1; | ||
} | ||
|
||
.none-left { | ||
position: absolute; | ||
left: 50%; | ||
margin-top: 80px; | ||
margin-bottom: 40px; | ||
margin-left: -150px; | ||
width: 300px; | ||
height: 300px; | ||
z-index: 0; | ||
} | ||
|
||
.none-left > h2 { | ||
color: #F5F5F5; | ||
text-align: center; | ||
} | ||
|
||
td-card .image { | ||
position: relative; | ||
padding: 1rem 1rem; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0rem; | ||
} | ||
|
||
.yes-text { | ||
position: absolute; | ||
bottom: 10px; | ||
right: 10px; | ||
font-size: 30px; | ||
color: #41EAD4; | ||
text-stroke: 0.5px black; | ||
-webkit-text-stroke: 0.5px black; | ||
opacity: 1 !important; | ||
} | ||
.no-text { | ||
position: absolute; | ||
bottom: 10px; | ||
left: 10px; | ||
font-size: 30px; | ||
color: var(--winter-sky); | ||
opacity: 1 !important; | ||
} | ||
|
||
.fade { | ||
-webkit-transition: 0.2s opacity linear; | ||
transition: 0.2s opacity linear; | ||
opacity: 0; | ||
} | ||
|
||
h1 { | ||
font-size: 3rem; | ||
} | ||
|
||
h2 { | ||
font-size: 30px; | ||
} | ||
|
||
.none-left > h2 { | ||
color: var(--winter-sky); | ||
} | ||
|
||
form { | ||
position: relative; | ||
height: 100%; | ||
} | ||
</style> |
This file contains 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
Oops, something went wrong.