- client site insagram
This commit is contained in:
1 parent
883a510c5c
commit
ef3ebef8fd
3 files changed
+1
-48
No files matched your search
+1
-2
@@ -74,8 +74,7 @@ gulp.task('compile', () => {
|
|||||||
const doWatch = !isProduction;
|
const doWatch = !isProduction;
|
||||||
|
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'./src/client/app.js',
|
'./src/client/app.js'
|
||||||
'./src/client/instagram.js'
|
|
||||||
])
|
])
|
||||||
.pipe(named())
|
.pipe(named())
|
||||||
.pipe(webpack({
|
.pipe(webpack({
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
angular.module('hudozka.instagram', [])
|
|
||||||
.controller('InstagramController', function ($scope, $http) {
|
|
||||||
//$scope.auth = function() {
|
|
||||||
// $http.get("/instagram/auth/url")
|
|
||||||
// .success(function (data) {
|
|
||||||
// $window.location.href = data.url;
|
|
||||||
// });
|
|
||||||
//};
|
|
||||||
|
|
||||||
$http.get('/instagram/user')
|
|
||||||
.then(i => i.data)
|
|
||||||
.then(user => {
|
|
||||||
$scope.user = user;
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.invite = function() {
|
|
||||||
$http.get('/instagram/invite')
|
|
||||||
.then(i => i.data)
|
|
||||||
.success(data => {
|
|
||||||
$scope.inviteCode = data.code;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html ng-app="hudozka.instagram">
|
|
||||||
<head>
|
|
||||||
<base href="/">
|
|
||||||
<meta name="fragment" content="!">
|
|
||||||
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
|
|
||||||
|
|
||||||
<title ng-bind="title">ДШХ Шлиссельбурга</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/style.css">
|
|
||||||
|
|
||||||
<script src="/libs.js"></script>
|
|
||||||
<script src="/app.js"></script>
|
|
||||||
</head>
|
|
||||||
<body ng-controller="InstagramController">
|
|
||||||
<div class="controls">
|
|
||||||
<a href="/instagram/auth" ng-show="!user">Instagram</a>
|
|
||||||
<a href="//instagram.com/{{user.username}}" ng-show="user">{{user.full_name}}</a>
|
|
||||||
<button ng-click="invite()">Invite</button>
|
|
||||||
{{inviteCode}}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Reference in new issue
Block a user