mirror of
https://github.com/szimek/sharedrop.git
synced 2026-06-13 21:03:07 +08:00
Add link to create a room
This commit is contained in:
parent
fad2b33945
commit
a90b24d925
@ -50,6 +50,7 @@
|
||||
<script src="/scripts/vendor/filer.min.js"></script>
|
||||
<script src="/scripts/vendor/peer.js"></script>
|
||||
<script src="/scripts/vendor/ba-tiny-pubsub.js"></script>
|
||||
<script src="/scripts/vendor/jquery-uuid.js"></script>
|
||||
<!-- endbuild -->
|
||||
|
||||
<script>
|
||||
|
||||
@ -22,6 +22,10 @@ ShareDrop.App.ApplicationController = Ember.Controller.extend({
|
||||
|
||||
signOut: function () {
|
||||
navigator.id.logout();
|
||||
},
|
||||
|
||||
redirect: function () {
|
||||
this.transitionToRoute('room', $.uuid());
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
|
||||
<ul class="nav">
|
||||
<li>
|
||||
<a href="javascript:void(0)" class="about" {{action 'openModal' 'about'}}>?</a>
|
||||
<a href="javascript:void(0)" class="icon-circle icon-create-room" {{action 'redirect'}} title="Create a room. You'll leave the room you're currently in.">+</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)" class="icon-circle icon-about" {{action 'openModal' 'about'}} title="About">?</a>
|
||||
</li>
|
||||
{{#if you.email}}
|
||||
<li class="email">
|
||||
|
||||
13
app/scripts/vendor/jquery-uuid.js
vendored
Normal file
13
app/scripts/vendor/jquery-uuid.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* jQuery UUID plugin 1.0.0
|
||||
*
|
||||
* @author Eugene Burtsev
|
||||
*/
|
||||
(function($) {
|
||||
$.uuid = function() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
||||
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
@ -41,7 +41,7 @@
|
||||
img
|
||||
vertical-align: middle
|
||||
|
||||
.about
|
||||
.icon-circle
|
||||
+circle(18px)
|
||||
border: 1px solid #000
|
||||
font-size: 12px
|
||||
@ -50,6 +50,9 @@
|
||||
&:hover
|
||||
opacity: .6
|
||||
|
||||
&.icon-create-room
|
||||
line-height: 16px
|
||||
|
||||
.sign
|
||||
background: transparent image-url("/images/persona.svg") no-repeat left
|
||||
padding-left: 25px
|
||||
|
||||
Loading…
Reference in New Issue
Block a user