pull/1418/head
parent
bd037d11c8
commit
6c7a9814f0
@ -0,0 +1,37 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:rocketchat-ui-flextab', |
||||
version: '0.1.0', |
||||
// Brief, one-line summary of the package.
|
||||
summary: '', |
||||
// URL to the Git repository containing the source code for this package.
|
||||
git: '', |
||||
// By default, Meteor will default to using README.md for documentation.
|
||||
// To avoid submitting documentation, set this field to null.
|
||||
documentation: 'README.md' |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.2.1'); |
||||
|
||||
api.use([ |
||||
'mongo', |
||||
'ecmascript', |
||||
'templating', |
||||
'coffeescript', |
||||
'underscore', |
||||
'rocketchat:lib' |
||||
]); |
||||
|
||||
api.addFiles('flex-tab/flexTabBar.html', 'client'); |
||||
api.addFiles('flex-tab/tabs/membersList.html', 'client'); |
||||
api.addFiles('flex-tab/tabs/messageSearch.html', 'client'); |
||||
api.addFiles('flex-tab/tabs/uploadedFilesList.html', 'client'); |
||||
api.addFiles('flex-tab/tabs/userInfo.html', 'client'); |
||||
|
||||
api.addFiles('flex-tab/flexTabBar.coffee', 'client'); |
||||
api.addFiles('flex-tab/tabs/membersList.coffee', 'client'); |
||||
api.addFiles('flex-tab/tabs/messageSearch.coffee', 'client'); |
||||
api.addFiles('flex-tab/tabs/uploadedFilesList.coffee', 'client'); |
||||
api.addFiles('flex-tab/tabs/userInfo.coffee', 'client'); |
||||
|
||||
}); |
||||
@ -0,0 +1,12 @@ |
||||
<template name="error"> |
||||
<section class="full-page"> |
||||
<div class="wrapper"> |
||||
<header> |
||||
<a class="logo" href="/"> |
||||
<img src="/images/logo/logo.svg?v=3" /> |
||||
</a> |
||||
</header> |
||||
<h1>{{_ "Not_found_or_not_allowed"}}</h1> |
||||
</div> |
||||
</section> |
||||
</template> |
||||
@ -0,0 +1,24 @@ |
||||
<template name="loading"> |
||||
<svg class="rocket-loader" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve"> |
||||
<g> |
||||
<path class="outer" fill="#CC3333" d="M188.146,99.881c0-8.852-2.647-17.341-7.873-25.232c-4.691-7.083-11.263-13.354-19.533-18.637 |
||||
c-15.967-10.199-36.953-15.817-59.089-15.817c-7.395,0-14.682,0.625-21.751,1.863c-4.387-4.105-9.521-7.798-14.953-10.72 |
||||
c-29.024-14.066-53.094-0.331-53.094-0.331s22.379,18.383,18.739,34.499c-10.012,9.931-15.438,21.906-15.438,34.375 |
||||
c0,0.04,0.002,0.08,0.003,0.119c-0.001,0.04-0.003,0.08-0.003,0.119c0,12.469,5.426,24.443,15.438,34.375 |
||||
c3.64,16.114-18.739,34.498-18.739,34.498s24.069,13.735,53.094-0.33c5.433-2.922,10.566-6.615,14.953-10.721 |
||||
c7.069,1.239,14.356,1.863,21.751,1.863c22.136,0,43.122-5.617,59.089-15.816c8.271-5.282,14.842-11.554,19.533-18.637 |
||||
c5.226-7.892,7.873-16.38,7.873-25.232c0-0.04-0.002-0.08-0.002-0.119S188.146,99.92,188.146,99.881z"/> |
||||
<path class="inner" fill="#FFFFFF" d="M101.686,51.726c41.843,0,75.765,21.667,75.765,48.395c0,26.728-33.922,48.396-75.765,48.396 |
||||
c-9.317,0-18.239-1.076-26.483-3.042c-8.378,10.08-26.809,24.092-44.713,19.562c5.823-6.255,14.452-16.825,12.604-34.233 |
||||
c-10.731-8.351-17.173-19.037-17.173-30.683C25.921,73.393,59.842,51.726,101.686,51.726"/> |
||||
<g> |
||||
<circle fill="#CC3333" cx="136.68" cy="100.121" r="10.063"/> |
||||
<circle fill="#CC3333" cx="101.685" cy="100.121" r="10.064"/> |
||||
<circle fill="#CC3333" cx="66.691" cy="100.121" r="10.064"/> |
||||
</g> |
||||
<path class="inner" fill="#CCCCCC" d="M101.686,142.149c-9.317,0-18.239-0.933-26.483-2.636c-7.397,7.713-22.634,18.081-38.425,17.699 |
||||
c-2.079,3.153-4.34,5.732-6.288,7.824c17.904,4.53,36.335-9.481,44.713-19.562c8.244,1.966,17.166,3.042,26.483,3.042 |
||||
c41.507,0,75.214-21.324,75.752-47.755C176.899,123.67,143.192,142.149,101.686,142.149z"/> |
||||
</g> |
||||
</svg> |
||||
</template> |
||||
@ -0,0 +1,216 @@ |
||||
Template.body.onRendered -> |
||||
$(document.body).on 'keydown', (e) -> |
||||
if e.keyCode is 80 and (e.ctrlKey is true or e.metaKey is true) |
||||
e.preventDefault() |
||||
e.stopPropagation() |
||||
spotlight.show() |
||||
|
||||
if e.keyCode is 27 |
||||
spotlight.hide() |
||||
|
||||
unread = Session.get('unread') |
||||
if e.keyCode is 27 and e.shiftKey is true and unread? and unread isnt '' |
||||
e.preventDefault() |
||||
e.stopPropagation() |
||||
swal |
||||
title: t('Clear_all_unreads_question') |
||||
type: 'warning' |
||||
confirmButtonText: t('Yes_clear_all') |
||||
showCancelButton: true |
||||
cancelButtonText: t('Cancel') |
||||
confirmButtonColor: '#DD6B55' |
||||
, -> |
||||
subscriptions = ChatSubscription.find({open: true}, { fields: { unread: 1, alert: 1, rid: 1, t: 1, name: 1, ls: 1 } }) |
||||
for subscription in subscriptions.fetch() |
||||
if subscription.alert or subscription.unread > 0 |
||||
Meteor.call 'readMessages', subscription.rid |
||||
|
||||
|
||||
Tracker.autorun (c) -> |
||||
w = window |
||||
d = document |
||||
s = 'script' |
||||
l = 'dataLayer' |
||||
i = RocketChat.settings.get 'API_Analytics' |
||||
if Match.test(i, String) and i.trim() isnt '' |
||||
c.stop() |
||||
do (w,d,s,l,i) -> |
||||
w[l] = w[l] || [] |
||||
w[l].push {'gtm.start': new Date().getTime(), event:'gtm.js'} |
||||
f = d.getElementsByTagName(s)[0] |
||||
j = d.createElement(s) |
||||
dl = if l isnt 'dataLayer' then '&l=' + l else '' |
||||
j.async = true |
||||
j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl |
||||
f.parentNode.insertBefore j, f |
||||
|
||||
Tracker.autorun (c) -> |
||||
if RocketChat.settings.get 'Meta_language' |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'http-equiv' |
||||
property: 'content-language' |
||||
content: RocketChat.settings.get 'Meta_language' |
||||
Meta.set |
||||
name: 'name' |
||||
property: 'language' |
||||
content: RocketChat.settings.get 'Meta_language' |
||||
|
||||
Tracker.autorun (c) -> |
||||
if RocketChat.settings.get 'Meta_fb_app_id' |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'property' |
||||
property: 'fb:app_id' |
||||
content: RocketChat.settings.get 'Meta_fb_app_id' |
||||
|
||||
Tracker.autorun (c) -> |
||||
if RocketChat.settings.get 'Meta_robots' |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'name' |
||||
property: 'robots' |
||||
content: RocketChat.settings.get 'Meta_robots' |
||||
|
||||
Tracker.autorun (c) -> |
||||
if RocketChat.settings.get 'Meta_google-site-verification' |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'name' |
||||
property: 'google-site-verification' |
||||
content: RocketChat.settings.get 'Meta_google-site-verification' |
||||
|
||||
Tracker.autorun (c) -> |
||||
if RocketChat.settings.get 'Meta_msvalidate01' |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'name' |
||||
property: 'msvalidate.01' |
||||
content: RocketChat.settings.get 'Meta_msvalidate01' |
||||
|
||||
Tracker.autorun (c) -> |
||||
c.stop() |
||||
|
||||
Meta.set |
||||
name: 'name' |
||||
property: 'application-name' |
||||
content: RocketChat.settings.get 'Site_Name' |
||||
|
||||
Meta.set |
||||
name: 'name' |
||||
property: 'apple-mobile-web-app-title' |
||||
content: RocketChat.settings.get 'Site_Name' |
||||
|
||||
if Meteor.isCordova |
||||
$(document.body).addClass 'is-cordova' |
||||
|
||||
|
||||
Template.main.helpers |
||||
|
||||
siteName: -> |
||||
return RocketChat.settings.get 'Site_Name' |
||||
|
||||
logged: -> |
||||
if Meteor.userId()? |
||||
$('html').addClass("noscroll").removeClass("scroll") |
||||
return true |
||||
else |
||||
$('html').addClass("scroll").removeClass("noscroll") |
||||
return false |
||||
|
||||
subsReady: -> |
||||
return not Meteor.userId()? or (FlowRouter.subsReady('userData', 'activeUsers')) |
||||
|
||||
hasUsername: -> |
||||
return Meteor.userId()? and Meteor.user().username? |
||||
|
||||
flexOpened: -> |
||||
console.log 'layout.helpers flexOpened' if window.rocketDebug |
||||
return 'flex-opened' if RocketChat.TabBar.isFlexOpen() |
||||
|
||||
flexOpenedRTC1: -> |
||||
console.log 'layout.helpers flexOpenedRTC1' if window.rocketDebug |
||||
return 'layout1' if Session.equals('rtcLayoutmode', 1) |
||||
|
||||
flexOpenedRTC2: -> |
||||
console.log 'layout.helpers flexOpenedRTC2' if window.rocketDebug |
||||
return 'layout2' if (Session.get('rtcLayoutmode') > 1) |
||||
|
||||
|
||||
Template.main.events |
||||
|
||||
"click .burger": -> |
||||
console.log 'room click .burger' if window.rocketDebug |
||||
chatContainer = $("#rocket-chat") |
||||
menu.toggle() |
||||
|
||||
'touchstart': (e, t) -> |
||||
if document.body.clientWidth > 780 |
||||
return |
||||
|
||||
t.touchstartX = undefined |
||||
t.touchstartY = undefined |
||||
t.movestarted = false |
||||
t.blockmove = false |
||||
if $(e.currentTarget).closest('.main-content').length > 0 |
||||
t.touchstartX = e.originalEvent.touches[0].clientX |
||||
t.touchstartY = e.originalEvent.touches[0].clientY |
||||
t.mainContent = $('.main-content') |
||||
t.wrapper = $('.messages-box > .wrapper') |
||||
|
||||
'touchmove': (e, t) -> |
||||
if t.touchstartX? |
||||
touch = e.originalEvent.touches[0] |
||||
diffX = t.touchstartX - touch.clientX |
||||
diffY = t.touchstartY - touch.clientY |
||||
absX = Math.abs(diffX) |
||||
absY = Math.abs(diffY) |
||||
|
||||
if t.movestarted isnt true and t.blockmove isnt true and absY > 5 |
||||
t.blockmove = true |
||||
|
||||
if t.blockmove isnt true and (t.movestarted is true or absX > 5) |
||||
t.movestarted = true |
||||
|
||||
if menu.isOpen() |
||||
t.left = 260 - diffX |
||||
else |
||||
t.left = -diffX |
||||
|
||||
if t.left > 260 |
||||
t.left = 260 |
||||
if t.left < 0 |
||||
t.left = 0 |
||||
|
||||
t.mainContent.addClass('notransition') |
||||
t.mainContent.css('transform', 'translate('+t.left+'px)') |
||||
t.wrapper.css('overflow', 'hidden') |
||||
|
||||
'touchend': (e, t) -> |
||||
if t.movestarted is true |
||||
t.mainContent.removeClass('notransition') |
||||
t.mainContent.css('transform', ''); |
||||
t.wrapper.css('overflow', '') |
||||
|
||||
if menu.isOpen() |
||||
if t.left >= 200 |
||||
menu.open() |
||||
else |
||||
menu.close() |
||||
else |
||||
if t.left >= 60 |
||||
menu.open() |
||||
else |
||||
menu.close() |
||||
|
||||
|
||||
Template.main.onRendered -> |
||||
|
||||
# RTL Support - Need config option on the UI |
||||
if isRtl localStorage.getItem "userLanguage" |
||||
$('html').addClass "rtl" |
||||
@ -0,0 +1,70 @@ |
||||
<head> |
||||
<title>Rocket.Chat</title> |
||||
<meta charset="utf-8" /> |
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
||||
<meta http-equiv="expires" content="-1" /> |
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
<meta name="fragment" content="!" /> |
||||
<meta name="distribution" content="global" /> |
||||
<meta name="rating" content="general" /> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> |
||||
<meta name="msapplication-TileColor" content="#04436a"> |
||||
<meta name="msapplication-TileImage" content="/images/logo/mstile-144x144.png?v=3"> |
||||
<meta name="msapplication-config" content="/images/logo/browserconfig.xml?v=3"> |
||||
<meta name="theme-color" content="#04436a"> |
||||
<link rel="manifest" href="/images/logo/manifest.json?v=3"> |
||||
<link rel="icon" sizes="any" type="image/svg+xml" href="/images/logo/icon.svg?v=3"> |
||||
<link rel="icon" sizes="256x256" type="image/png" href="/images/logo/favicon-256x256.png?v=3"> |
||||
<link rel="icon" sizes="192x192" type="image/png" href="/images/logo/android-chrome-192x192.png?v=3"> |
||||
<link rel="icon" sizes="128x128" type="image/png" href="/images/logo/favicon-128x128.png?v=3"> |
||||
<link rel="icon" sizes="96x96" type="image/png" href="/images/logo/favicon-96x96.png?v=3"> |
||||
<link rel="icon" sizes="64x64" type="image/png" href="/images/logo/favicon-64x64.png?v=3"> |
||||
<!-- |
||||
<link rel="icon" sizes="48x48" type="image/png" href="/images/logo/favicon-48x48.png?v=3"> |
||||
<link rel="icon" sizes="32x32" type="image/png" href="/images/logo/favicon-32x32.png?v=3"> |
||||
<link rel="icon" sizes="16x16" type="image/png" href="/images/logo/favicon-16x16.png?v=3"> |
||||
--> |
||||
<link rel="shortcut icon" sizes="16x16 32x32 48x48" type="image/x-icon" href="/favicon.ico?v=3" /> |
||||
<link rel="apple-touch-icon" sizes="57x57" href="/images/logo/apple-touch-icon-57x57.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="60x60" href="/images/logo/apple-touch-icon-60x60.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="72x72" href="/images/logo/apple-touch-icon-72x72.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="76x76" href="/images/logo/apple-touch-icon-76x76.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="114x114" href="/images/logo/apple-touch-icon-114x114.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="120x120" href="/images/logo/apple-touch-icon-120x120.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="144x144" href="/images/logo/apple-touch-icon-144x144.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="152x152" href="/images/logo/apple-touch-icon-152x152.png?v=3"> |
||||
<link rel="apple-touch-icon" sizes="180x180" href="/images/logo/apple-touch-icon-180x180.png?v=3"> |
||||
</head> |
||||
|
||||
<body> |
||||
</body> |
||||
|
||||
<template name="main"> |
||||
{{#if subsReady}} |
||||
{{#unless logged}} |
||||
{{> loginLayout}} |
||||
{{else}} |
||||
{{#unless hasUsername}} |
||||
{{> username}} |
||||
{{else}} |
||||
{{> spotlight}} |
||||
{{> mobileMessageMenu}} |
||||
{{> videoCall overlay=true}} |
||||
<div id="user-card-popover"></div> |
||||
<div id="rocket-chat" class="menu-nav menu-closed"> |
||||
<div class="connection-status"> |
||||
{{> status}} |
||||
</div> |
||||
<div class="flex-tab-bar"> |
||||
{{> flexTabBar}} |
||||
</div> |
||||
<div class="main-content {{flexOpened}} {{flexOpenedRTC1}} {{flexOpenedRTC2}}"> |
||||
{{> Template.dynamic template=center}} |
||||
</div> |
||||
{{> sideNav }} |
||||
</div> |
||||
{{> audioNotification }} |
||||
{{/unless}} |
||||
{{/unless}} |
||||
{{/if}} |
||||
</template> |
||||
@ -0,0 +1,30 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:rocketchat-ui-master', |
||||
version: '0.1.0', |
||||
// Brief, one-line summary of the package.
|
||||
summary: '', |
||||
// URL to the Git repository containing the source code for this package.
|
||||
git: '', |
||||
// By default, Meteor will default to using README.md for documentation.
|
||||
// To avoid submitting documentation, set this field to null.
|
||||
documentation: 'README.md' |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.2.1'); |
||||
|
||||
api.use([ |
||||
'mongo', |
||||
'ecmascript', |
||||
'templating', |
||||
'coffeescript', |
||||
'underscore', |
||||
'rocketchat:lib' |
||||
]); |
||||
|
||||
api.addFiles('master/main.html', 'client'); |
||||
api.addFiles('master/loading.html', 'client'); |
||||
api.addFiles('master/error.html', 'client'); |
||||
|
||||
api.addFiles('master/main.coffee', 'client'); |
||||
}); |
||||
@ -1,37 +0,0 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:rocketchat-ui-message-input', |
||||
version: '0.1.0', |
||||
// Brief, one-line summary of the package.
|
||||
summary: '', |
||||
// URL to the Git repository containing the source code for this package.
|
||||
git: '', |
||||
// By default, Meteor will default to using README.md for documentation.
|
||||
// To avoid submitting documentation, set this field to null.
|
||||
documentation: 'README.md' |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.2.1'); |
||||
|
||||
api.use([ |
||||
'mongo', |
||||
'ecmascript', |
||||
'templating', |
||||
'coffeescript', |
||||
'underscore', |
||||
'rocketchat:lib@0.0.1' |
||||
]); |
||||
|
||||
api.addFiles("message-input/messagePopup.html", "client"); |
||||
api.addFiles("message-input/messagePopupChannel.html", "client"); |
||||
api.addFiles("message-input/messagePopupConfig.html", "client"); |
||||
api.addFiles("message-input/messagePopupEmoji.html", "client"); |
||||
api.addFiles("message-input/messagePopupSlashCommand.html", "client"); |
||||
api.addFiles("message-input/messagePopupUser.html", "client"); |
||||
|
||||
api.addFiles("message-input/messagePopup.coffee", "client"); |
||||
api.addFiles("message-input/messagePopupConfig.coffee", "client"); |
||||
api.addFiles("message-input/messagePopupEmoji.coffee", "client"); |
||||
|
||||
|
||||
}); |
||||
@ -0,0 +1,41 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:rocketchat-ui-message', |
||||
version: '0.1.0', |
||||
// Brief, one-line summary of the package.
|
||||
summary: '', |
||||
// URL to the Git repository containing the source code for this package.
|
||||
git: '', |
||||
// By default, Meteor will default to using README.md for documentation.
|
||||
// To avoid submitting documentation, set this field to null.
|
||||
documentation: 'README.md' |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.2.1'); |
||||
|
||||
api.use([ |
||||
'mongo', |
||||
'ecmascript', |
||||
'templating', |
||||
'coffeescript', |
||||
'underscore', |
||||
'rocketchat:lib' |
||||
]); |
||||
|
||||
api.addFiles('message/message.html', 'client'); |
||||
api.addFiles("message/messageBox.html", "client"); |
||||
api.addFiles("message/popup/messagePopup.html", "client"); |
||||
api.addFiles("message/popup/messagePopupChannel.html", "client"); |
||||
api.addFiles("message/popup/messagePopupConfig.html", "client"); |
||||
api.addFiles("message/popup/messagePopupEmoji.html", "client"); |
||||
api.addFiles("message/popup/messagePopupSlashCommand.html", "client"); |
||||
api.addFiles("message/popup/messagePopupUser.html", "client"); |
||||
|
||||
api.addFiles('message/message.coffee', 'client'); |
||||
api.addFiles('message/messageBox.coffee', 'client'); |
||||
api.addFiles("message/popup/messagePopup.coffee", "client"); |
||||
api.addFiles("message/popup/messagePopupConfig.coffee", "client"); |
||||
api.addFiles("message/popup/messagePopupEmoji.coffee", "client"); |
||||
|
||||
|
||||
}); |
||||
Loading…
Reference in new issue