PLT-93 cleaing up client side configs
Этот коммит содержится в:
@@ -50,7 +50,7 @@
|
||||
<div id="activity_log_modal"></div>
|
||||
<div id="removed_from_channel_modal"></div>
|
||||
<script>
|
||||
window.setup_channel_page('{{ .Props.TeamDisplayName }}', '{{ .Props.TeamType }}', '{{ .Props.TeamId }}', '{{ .Props.ChannelName }}', '{{ .Props.ChannelId }}');
|
||||
window.setup_channel_page({{ .Props }});
|
||||
$('body').tooltip( {selector: '[data-toggle=tooltip]'} );
|
||||
$('.modal-body').css('max-height', $(window).height() * 0.7);
|
||||
$('.modal-body').perfectScrollbar();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{define "footer"}}
|
||||
<div class="footer-pane col-xs-12">
|
||||
<div class="col-xs-12">
|
||||
<span class="pull-right footer-site-name">{{ .SiteName }}</span>
|
||||
<span class="pull-right footer-site-name">{{ .ClientProps.SiteName }}</span>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<span class="pull-right footer-link copyright">© 2015 SpinPunch</span>
|
||||
@@ -12,9 +12,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("help_link").setAttribute("href", config.HelpLink);
|
||||
document.getElementById("terms_link").setAttribute("href", config.TermsLink);
|
||||
document.getElementById("privacy_link").setAttribute("href", config.PrivacyLink);
|
||||
document.getElementById("about_link").setAttribute("href", config.AboutLink);
|
||||
document.getElementById("help_link").setAttribute("href", '/static/help/help.html');
|
||||
document.getElementById("terms_link").setAttribute("href", '/static/help/terms.html');
|
||||
document.getElementById("privacy_link").setAttribute("href", '/static/help/privacy.html');
|
||||
document.getElementById("about_link").setAttribute("href", '/static/help/about.html');
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
<title>{{ .Props.Title }}</title>
|
||||
|
||||
<!-- iOS add to homescreen -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-title" content="{{ .Title }}">
|
||||
<meta name="application-name" content="{{ .Title }}">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ .Props.Title }}">
|
||||
<meta name="application-name" content="{{ .Props.Title }}">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<!-- iOS add to homescreen -->
|
||||
|
||||
@@ -18,6 +18,11 @@
|
||||
<link rel="manifest" href="/static/config/manifest.json">
|
||||
<!-- Android add to homescreen -->
|
||||
|
||||
<script>
|
||||
window.config = {{ .ClientProps }};
|
||||
</script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-3.3.5.min.css">
|
||||
<link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
@@ -35,9 +40,7 @@
|
||||
|
||||
<script src="/static/js/jquery-dragster/jquery.dragster.js"></script>
|
||||
|
||||
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['annotationchart']}]}"></script>
|
||||
|
||||
<script type="text/javascript" src="https://cloudfront.loggly.com/js/loggly.tracker.js" async></script>
|
||||
<style id="antiClickjack">body{display:none !important;}</style>
|
||||
<script src="/static/js/bundle.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -46,17 +49,8 @@
|
||||
blocker.parentNode.removeChild(blocker);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
if (window.config == null) {
|
||||
window.config = {};
|
||||
}
|
||||
window.config.SiteName = '{{ .SiteName }}';
|
||||
window.config.ProfileWidth = '{{ .Props.ProfileWidth }}'
|
||||
window.config.ProfileHeight = '{{ .Props.ProfileHeight }}'
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (window.config.SegmentWriteKey != null && window.config.SegmentWriteKey !== "") {
|
||||
if (window.config.SegmentDeveloperKey != null && window.config.SegmentDeveloperKey !== "") {
|
||||
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
|
||||
analytics.load(window.config.SegmentWriteKey);
|
||||
var user = window.UserStore.getCurrentUser(true);
|
||||
@@ -77,7 +71,6 @@
|
||||
analytics = {};
|
||||
analytics.page = function(){};
|
||||
analytics.track = function(){};
|
||||
console.warn("config.js missing SegmentWriteKey, SegmentIO analytics is not tracking");
|
||||
}
|
||||
</script>
|
||||
<!-- Snowplow starts plowing -->
|
||||
@@ -89,7 +82,7 @@
|
||||
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.4.2/sp.js","snowplow"));
|
||||
|
||||
window.snowplow('newTracker', 'cf', '{{ .Props.AnalyticsUrl }}', {
|
||||
appId: '{{ .SiteName }}'
|
||||
appId: window.config.SiteName
|
||||
});
|
||||
|
||||
var user = window.UserStore.getCurrentUser(true);
|
||||
@@ -100,7 +93,6 @@
|
||||
window.snowplow('trackPageView');
|
||||
} else {
|
||||
window.snowplow = function(){};
|
||||
console.warn("config.json missing AnalyticsUrl, Snowplow analytics is not tracking");
|
||||
}
|
||||
</script>
|
||||
<!-- Snowplow stops plowing -->
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_home_page({{.Props.TeamURL}});
|
||||
window.setup_home_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_login_page('{{.Props.TeamDisplayName}}', '{{.Props.TeamName}}', '{{.Props.AuthServices}}');
|
||||
window.setup_login_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_password_reset_page('{{ .Props.IsReset }}', '{{ .Props.TeamDisplayName }}', '{{ .Props.TeamName }}', '{{ .Props.Hash }}', '{{ .Props.Data }}');
|
||||
window.setup_password_reset_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="signup-team__container">
|
||||
<img class="signup-team-logo" src="/static/images/logo.png" />
|
||||
<h1>{{ .SiteName }}</h1>
|
||||
<h1>{{ .ClientProps.SiteName }}</h1>
|
||||
<h4 class="color--light">All team communication in one place, searchable and accessible anywhere</h4>
|
||||
<div id="signup-team"></div>
|
||||
</div>
|
||||
@@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_signup_team_page('{{.Props.AuthServices}}');
|
||||
window.setup_signup_team_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_signup_team_complete_page('{{.Props.Email}}', '{{.Props.Data}}', '{{.Props.Hash}}');
|
||||
window.setup_signup_team_complete_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setup_signup_user_complete_page('{{.Props.Email}}', '{{.Props.TeamName}}', '{{.Props.TeamDisplayName}}', '{{.Props.TeamId}}', '{{.Props.Data}}', '{{.Props.Hash}}', '{{.Props.AuthServices}}');
|
||||
window.setup_signup_user_complete_page({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.setupVerifyPage('{{.Props.IsVerified}}', '{{.Props.TeamURL}}', '{{.Props.UserEmail}}');
|
||||
window.setupVerifyPage({{ .Props }});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="row main">
|
||||
<div class="app__content">
|
||||
<div class="welcome-info">
|
||||
<h1>Welcome to {{ .SiteName }}!</h1>
|
||||
<h1>Welcome to {{ .ClientProps.SiteName }}!</h1>
|
||||
<p>
|
||||
You do not appear to be part of any teams. Please contact your
|
||||
administrator to have him send you an invitation to a private team.
|
||||
|
||||
Ссылка в новой задаче
Block a user