forked from octobox/octobox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:octobox/octobox into ca/master/gi…
…thub-client-refactors-for-pat * 'master' of github.com:octobox/octobox: (27 commits) Uncheck all selected notifications after "Mark as Read" is done (octobox#1293) Remove some console.logs from search suggestions js (octobox#1291) Add a linked button to reply on GitHub to bottom of threads (octobox#1288) remove redundant .subject-link class (octobox#1292) Fix javascript error when opening external subject links (octobox#1290) Turn off autocomplete on all checkboxes (octobox#1289) Allow deleting notifications from search results (octobox#1287) Bump simple_form from 4.0.1 to 4.1.0 (octobox#1286) Disambiguate 'installing' from 'signing in' (octobox#1280) Only attempt to sync users who have an access token (octobox#1283) Involved users should always be ones that haven't been recently synced (octobox#1282) Skip enqueuing repository sync tasks if repo exists (octobox#1281) Skip syncing the repository if it's already present (octobox#1279) Use update rather than update_attributes when saving existing repos (octobox#1278) Add initial action_cable setup (octobox#1080) Enable momentum scrolling in thread view on iOS (octobox#1274) Always expand the last comment in a thread (octobox#1272) Show a spinner when loading a thread view (octobox#1271) Order comments from oldest to newest (octobox#1270) Order comments by date rather than ID (octobox#1269) ... # Conflicts: # app/models/subject.rb
- Loading branch information
Showing
42 changed files
with
319 additions
and
143 deletions.
There are no files selected for viewing
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,5 +1,4 @@ | ||
language: ruby | ||
sudo: false | ||
rvm: | ||
- 2.5.3 | ||
|
||
|
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Action Cable provides the framework to deal with WebSockets in Rails. | ||
// You can generate new channels where WebSocket features live using the `rails generate channel` command. | ||
// | ||
//= require action_cable | ||
//= require_self | ||
//= require_tree ./channels | ||
|
||
(function() { | ||
this.App || (this.App = {}); | ||
|
||
App.cable = ActionCable.createConsumer(); | ||
|
||
}).call(this); |
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,16 @@ | ||
$(document).on("turbolinks:load", function () { | ||
if ($("meta[name='push_notifications']").length >0) { | ||
App.sync = App.cable.subscriptions.create("NotificationsChannel", { | ||
received: function(data) { | ||
if($(data.id).length) { | ||
var selected = $(data.id).has("input:checked"); | ||
|
||
$(data.id)[0].outerHTML = data.html; | ||
if (selected.length) { | ||
$(data.id).find("input[type=checkbox]").prop('checked', true); | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
}); |
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
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 |
---|---|---|
|
@@ -130,3 +130,9 @@ | |
.blur-action { | ||
opacity: .5; | ||
} | ||
|
||
@include media-breakpoint-down(lg){ | ||
.not-a-nav{ | ||
background-color: $body-bg; | ||
} | ||
} |
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
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,4 @@ | ||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
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,19 @@ | ||
module ApplicationCable | ||
class Connection < ActionCable::Connection::Base | ||
identified_by :current_user | ||
|
||
def connect | ||
self.current_user = find_verified_user | ||
end | ||
|
||
private | ||
|
||
def find_verified_user | ||
if current_user = User.find_by(id: cookies.permanent.signed[:user_id]) | ||
current_user | ||
else | ||
reject_unauthorized_connection | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class NotificationsChannel < ApplicationCable::Channel | ||
def subscribed | ||
stream_from "notifications:#{current_user.id}" | ||
end | ||
|
||
def unsubscribed | ||
stop_all_streams | ||
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
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
Oops, something went wrong.