|
@@ -1,6 +1,6 @@
|
1
|
1
|
webpackJsonp([1],{
|
2
|
2
|
|
3
|
|
-/***/ 109:
|
|
3
|
+/***/ 113:
|
4
|
4
|
/***/ (function(module, exports) {
|
5
|
5
|
|
6
|
6
|
function webpackEmptyAsyncContext(req) {
|
|
@@ -13,16 +13,16 @@ function webpackEmptyAsyncContext(req) {
|
13
|
13
|
webpackEmptyAsyncContext.keys = function() { return []; };
|
14
|
14
|
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
|
15
|
15
|
module.exports = webpackEmptyAsyncContext;
|
16
|
|
-webpackEmptyAsyncContext.id = 109;
|
|
16
|
+webpackEmptyAsyncContext.id = 113;
|
17
|
17
|
|
18
|
18
|
/***/ }),
|
19
|
19
|
|
20
|
|
-/***/ 150:
|
|
20
|
+/***/ 155:
|
21
|
21
|
/***/ (function(module, exports, __webpack_require__) {
|
22
|
22
|
|
23
|
23
|
var map = {
|
24
|
24
|
"../pages/channel/channel.module": [
|
25
|
|
- 270,
|
|
25
|
+ 279,
|
26
|
26
|
0
|
27
|
27
|
]
|
28
|
28
|
};
|
|
@@ -37,19 +37,117 @@ function webpackAsyncContext(req) {
|
37
|
37
|
webpackAsyncContext.keys = function webpackAsyncContextKeys() {
|
38
|
38
|
return Object.keys(map);
|
39
|
39
|
};
|
40
|
|
-webpackAsyncContext.id = 150;
|
|
40
|
+webpackAsyncContext.id = 155;
|
41
|
41
|
module.exports = webpackAsyncContext;
|
42
|
42
|
|
43
|
43
|
/***/ }),
|
44
|
44
|
|
45
|
|
-/***/ 194:
|
|
45
|
+/***/ 156:
|
|
46
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
47
|
+
|
|
48
|
+"use strict";
|
|
49
|
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MessageProvider; });
|
|
50
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
|
51
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_http__ = __webpack_require__(78);
|
|
52
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__user_user__ = __webpack_require__(79);
|
|
53
|
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
54
|
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
55
|
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
56
|
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
57
|
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
58
|
+};
|
|
59
|
+var __metadata = (this && this.__metadata) || function (k, v) {
|
|
60
|
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
61
|
+};
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+/*
|
|
66
|
+ Generated class for the MessageProvider provider.
|
|
67
|
+
|
|
68
|
+ See https://angular.io/guide/dependency-injection for more info on providers
|
|
69
|
+ and Angular DI.
|
|
70
|
+*/
|
|
71
|
+var MessageProvider = /** @class */ (function () {
|
|
72
|
+ function MessageProvider(http, userProvider) {
|
|
73
|
+ this.http = http;
|
|
74
|
+ this.userProvider = userProvider;
|
|
75
|
+ console.log('Hello MessageProvider Provider');
|
|
76
|
+ }
|
|
77
|
+ MessageProvider.prototype.getAll = function () {
|
|
78
|
+ var url = "http://localhost:8080/get_messages";
|
|
79
|
+ var header = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["a" /* Headers */]({
|
|
80
|
+ 'Authorization': this.userProvider.getToken()
|
|
81
|
+ });
|
|
82
|
+ var options = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["d" /* RequestOptions */]({ headers: header });
|
|
83
|
+ this.http.get(url, options).subscribe(function (result) {
|
|
84
|
+ console.log(result);
|
|
85
|
+ });
|
|
86
|
+ };
|
|
87
|
+ MessageProvider.prototype.post = function (channelId, message, callback) {
|
|
88
|
+ var _this = this;
|
|
89
|
+ var url = "http://localhost:8080/post";
|
|
90
|
+ var header = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["a" /* Headers */]({
|
|
91
|
+ 'Authorization': this.userProvider.getToken(),
|
|
92
|
+ 'Content-Type': 'application/json'
|
|
93
|
+ });
|
|
94
|
+ var options = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["d" /* RequestOptions */]({ headers: header });
|
|
95
|
+ var body = {
|
|
96
|
+ "channelId": channelId,
|
|
97
|
+ "message": message
|
|
98
|
+ };
|
|
99
|
+ this.http.post(url, body, options).subscribe(function (result) {
|
|
100
|
+ console.log(result);
|
|
101
|
+ _this.get(channelId, function (after) {
|
|
102
|
+ callback();
|
|
103
|
+ });
|
|
104
|
+ });
|
|
105
|
+ };
|
|
106
|
+ MessageProvider.prototype.get = function (channelId, callback) {
|
|
107
|
+ var url = "http://localhost:8080/messages?channelid=" + channelId;
|
|
108
|
+ var header = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["a" /* Headers */]({
|
|
109
|
+ 'Authorization': this.userProvider.getToken(),
|
|
110
|
+ 'Content-Type': 'application/json'
|
|
111
|
+ });
|
|
112
|
+ var options = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["d" /* RequestOptions */]({ headers: header });
|
|
113
|
+ this.http.get(url, options).subscribe(function (result) {
|
|
114
|
+ console.log(result);
|
|
115
|
+ callback(result);
|
|
116
|
+ });
|
|
117
|
+ };
|
|
118
|
+ MessageProvider.prototype.delete = function (messageId, callback) {
|
|
119
|
+ var url = "http://localhost:8080/delete?messageId=" + messageId;
|
|
120
|
+ var header = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["a" /* Headers */]({
|
|
121
|
+ 'Authorization': this.userProvider.getToken(),
|
|
122
|
+ 'Content-Type': 'application/json'
|
|
123
|
+ });
|
|
124
|
+ var options = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["d" /* RequestOptions */]({ headers: header });
|
|
125
|
+ this.http.delete(url, options).subscribe(function (result) {
|
|
126
|
+ console.log(result);
|
|
127
|
+ callback();
|
|
128
|
+ });
|
|
129
|
+ };
|
|
130
|
+ MessageProvider = __decorate([
|
|
131
|
+ Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* Injectable */])(),
|
|
132
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_http__["b" /* Http */], __WEBPACK_IMPORTED_MODULE_2__user_user__["a" /* UserProvider */]])
|
|
133
|
+ ], MessageProvider);
|
|
134
|
+ return MessageProvider;
|
|
135
|
+}());
|
|
136
|
+
|
|
137
|
+//# sourceMappingURL=message.js.map
|
|
138
|
+
|
|
139
|
+/***/ }),
|
|
140
|
+
|
|
141
|
+/***/ 200:
|
46
|
142
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
47
|
143
|
|
48
|
144
|
"use strict";
|
49
|
145
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomePage; });
|
50
|
146
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
51
|
147
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(32);
|
52
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel_channel__ = __webpack_require__(99);
|
|
148
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel_channel__ = __webpack_require__(50);
|
|
149
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_forms__ = __webpack_require__(15);
|
|
150
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__providers_user_user__ = __webpack_require__(79);
|
53
|
151
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
54
|
152
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
55
|
153
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -62,28 +160,52 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
62
|
160
|
|
63
|
161
|
|
64
|
162
|
|
|
163
|
+
|
|
164
|
+
|
65
|
165
|
var HomePage = /** @class */ (function () {
|
66
|
|
- function HomePage(navCtrl) {
|
|
166
|
+ function HomePage(navCtrl, formbuilder, userprovider) {
|
67
|
167
|
this.navCtrl = navCtrl;
|
|
168
|
+ this.formbuilder = formbuilder;
|
|
169
|
+ this.userprovider = userprovider;
|
|
170
|
+ this.formgroup = this.formbuilder.group({ username: ['', __WEBPACK_IMPORTED_MODULE_3__angular_forms__["f" /* Validators */].required],
|
|
171
|
+ password: ['', __WEBPACK_IMPORTED_MODULE_3__angular_forms__["f" /* Validators */].required]
|
|
172
|
+ });
|
|
173
|
+ this.username = this.formgroup.controls['username'];
|
|
174
|
+ this.password = this.formgroup.controls['password'];
|
68
|
175
|
}
|
69
|
176
|
HomePage.prototype.login = function () {
|
70
|
|
- this.navCtrl.push(__WEBPACK_IMPORTED_MODULE_2__channel_channel__["a" /* ChannelPage */]);
|
|
177
|
+ this.navCtrl.setRoot(__WEBPACK_IMPORTED_MODULE_2__channel_channel__["a" /* ChannelPage */]);
|
|
178
|
+ };
|
|
179
|
+ HomePage.prototype.sendLogin = function (loginForm) {
|
|
180
|
+ var _this = this;
|
|
181
|
+ this.userprovider.login(loginForm.username, loginForm.password, function (result) {
|
|
182
|
+ if (result.status == 200) {
|
|
183
|
+ console.log("Success!");
|
|
184
|
+ _this.userprovider.setToken(result.headers.get("authorization"));
|
|
185
|
+ console.log(_this.userprovider.getToken());
|
|
186
|
+ _this.navCtrl.setRoot(__WEBPACK_IMPORTED_MODULE_2__channel_channel__["a" /* ChannelPage */]);
|
|
187
|
+ }
|
|
188
|
+ else {
|
|
189
|
+ console.log("invalid login attempt");
|
|
190
|
+ }
|
|
191
|
+ });
|
|
192
|
+ };
|
|
193
|
+ HomePage.prototype.setLoginForm = function () {
|
71
|
194
|
};
|
72
|
195
|
HomePage = __decorate([
|
73
|
196
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
74
|
|
- selector: 'page-home',template:/*ion-inline-start:"/Users/jaehoonp/zipteamUIv2/src/pages/home/home.html"*/'<ion-header>\n\n</ion-header>\n\n<ion-content text-center class = "login">\n\n <br><br><br><br><br>\n <img src="../assets/imgs/fullLogo.png" alt="SLACK" class="rounded-corners">\n\n <br><br><br><br>\n \n<ion-list>\n\n <ion-item text-center>\n\n <ion-label fixed>Username</ion-label>\n <ion-input type="text" value=""></ion-input>\n </ion-item>\n\n <ion-item text-center>\n <ion-label fixed>Password</ion-label>\n <ion-input type="password"></ion-input>\n </ion-item>\n\n</ion-list>\n\n\n\n<button ion-button color="danger" round (click)="login()">Login</button>\n\n<!-- line break -->\n<br>\n\n<button ion-button color="danger" round>Sign Up</button>\n\n\n\n\n\n <!-- Toggle menu button -->\n <!-- <br>\n <button ion-button secondary menuToggle>Toggle Menu</button> -->\n</ion-content>\n'/*ion-inline-end:"/Users/jaehoonp/zipteamUIv2/src/pages/home/home.html"*/
|
|
197
|
+ selector: 'page-home',template:/*ion-inline-start:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/home/home.html"*/'<ion-header>\n</ion-header>\n\n\n\n<ion-content text-center class = "login">\n\n <br><br><br><br><br>\n <img src="../assets/imgs/fullLogo.png" alt="SLACK" class="rounded-corners">\n\n <br><br><br><br>\n \n\n\n <form [formGroup]="formgroup" (ngSubmit)="sendLogin(formgroup.value)">\n\n<ion-list>\n\n <ion-item text-center>\n\n\n <ion-label fixed>Username</ion-label>\n <ion-input type="text" formControlName="username"></ion-input>\n </ion-item>\n\n <ion-item text-center *ngIf="username.hasError(\'required\') && username.touched">\n <p> *Please enter your username</p>\n </ion-item>\n\n <ion-item text-center>\n <ion-label fixed>Password</ion-label>\n <ion-input type="password" formControlName="password"></ion-input>\n </ion-item>\n\n <ion-item text-center *ngIf="password.hasError(\'required\') && password.touched">\n <p> *Please enter your password</p>\n </ion-item>\n\n\n</ion-list>\n\n\n\n\n<button ion-button color="danger" round type="submit">Login</button>\n\n<!-- line break -->\n<br>\n\n<button ion-button color="danger" round>Sign Up</button>\n\n\n</form>\n\n\n <!-- <form [formGroup]="loginform" (ngSubmit)="sendLogin(loginForm.value)" *ngIf="loginForm">\n\n <ion-label fixed>Username</ion-label>\n <input type="text" name="name" formControlName="username">\n\n <ion-label fixed>Password</ion-label>\n <input type="text" name="name" formControlName="password">\n\n <input type="submit" class="cta-btn filled" value="Submit" [disabled]="!loginForm.valid">\n </form> -->\n\n\n\n\n\n <!-- Toggle menu button -->\n <!-- <br> -->\n <button ion-button secondary menuToggle>Toggle Menu</button> \n \n</ion-content>\n'/*ion-inline-end:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/home/home.html"*/
|
75
|
198
|
}),
|
76
|
|
- __metadata("design:paramtypes", [typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */] !== "undefined" && __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */]) === "function" && _a || Object])
|
|
199
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_3__angular_forms__["a" /* FormBuilder */], __WEBPACK_IMPORTED_MODULE_4__providers_user_user__["a" /* UserProvider */]])
|
77
|
200
|
], HomePage);
|
78
|
201
|
return HomePage;
|
79
|
|
- var _a;
|
80
|
202
|
}());
|
81
|
203
|
|
82
|
204
|
//# sourceMappingURL=home.js.map
|
83
|
205
|
|
84
|
206
|
/***/ }),
|
85
|
207
|
|
86
|
|
-/***/ 195:
|
|
208
|
+/***/ 201:
|
87
|
209
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
88
|
210
|
|
89
|
211
|
"use strict";
|
|
@@ -128,7 +250,7 @@ var ListPage = /** @class */ (function () {
|
128
|
250
|
};
|
129
|
251
|
ListPage = ListPage_1 = __decorate([
|
130
|
252
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
131
|
|
- selector: 'page-list',template:/*ion-inline-start:"/Users/jaehoonp/zipteamUIv2/src/pages/list/list.html"*/'<ion-header>\n <ion-navbar>\n <button ion-button menuToggle>\n <ion-icon name="menu"></ion-icon>\n </button>\n <ion-title>List</ion-title>\n </ion-navbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">\n <ion-icon [name]="item.icon" item-start></ion-icon>\n {{item.title}}\n <div class="item-note" item-end>\n {{item.note}}\n </div>\n </button>\n </ion-list>\n <div *ngIf="selectedItem" padding>\n You navigated here from <b>{{selectedItem.title}}</b>\n </div>\n</ion-content>\n'/*ion-inline-end:"/Users/jaehoonp/zipteamUIv2/src/pages/list/list.html"*/
|
|
253
|
+ selector: 'page-list',template:/*ion-inline-start:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/list/list.html"*/'<ion-header>\n <ion-navbar>\n <button ion-button menuToggle>\n <ion-icon name="menu"></ion-icon>\n </button>\n <ion-title>List</ion-title>\n </ion-navbar>\n</ion-header>\n\n<ion-content>\n <ion-list>\n <button ion-item *ngFor="let item of items" (click)="itemTapped($event, item)">\n <ion-icon [name]="item.icon" item-start></ion-icon>\n {{item.title}}\n <div class="item-note" item-end>\n {{item.note}}\n </div>\n </button>\n </ion-list>\n <div *ngIf="selectedItem" padding>\n You navigated here from <b>{{selectedItem.title}}</b>\n </div>\n</ion-content>\n'/*ion-inline-end:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/list/list.html"*/
|
132
|
254
|
}),
|
133
|
255
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
|
134
|
256
|
], ListPage);
|
|
@@ -140,13 +262,13 @@ var ListPage = /** @class */ (function () {
|
140
|
262
|
|
141
|
263
|
/***/ }),
|
142
|
264
|
|
143
|
|
-/***/ 196:
|
|
265
|
+/***/ 202:
|
144
|
266
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
145
|
267
|
|
146
|
268
|
"use strict";
|
147
|
269
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
148
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(197);
|
149
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(219);
|
|
270
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(203);
|
|
271
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__app_module__ = __webpack_require__(223);
|
150
|
272
|
|
151
|
273
|
|
152
|
274
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* platformBrowserDynamic */])().bootstrapModule(__WEBPACK_IMPORTED_MODULE_1__app_module__["a" /* AppModule */]);
|
|
@@ -154,20 +276,24 @@ Object(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__["a" /* pl
|
154
|
276
|
|
155
|
277
|
/***/ }),
|
156
|
278
|
|
157
|
|
-/***/ 219:
|
|
279
|
+/***/ 223:
|
158
|
280
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
159
|
281
|
|
160
|
282
|
"use strict";
|
161
|
283
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
|
162
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(30);
|
|
284
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(26);
|
163
|
285
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
164
|
286
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_ionic_angular__ = __webpack_require__(32);
|
165
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_component__ = __webpack_require__(262);
|
166
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(194);
|
167
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_list_list__ = __webpack_require__(195);
|
168
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pages_channel_channel__ = __webpack_require__(99);
|
169
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ionic_native_status_bar__ = __webpack_require__(190);
|
170
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ionic_native_splash_screen__ = __webpack_require__(193);
|
|
287
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_component__ = __webpack_require__(265);
|
|
288
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(200);
|
|
289
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_list_list__ = __webpack_require__(201);
|
|
290
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pages_channel_channel__ = __webpack_require__(50);
|
|
291
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ionic_native_status_bar__ = __webpack_require__(196);
|
|
292
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ionic_native_splash_screen__ = __webpack_require__(199);
|
|
293
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__providers_user_user__ = __webpack_require__(79);
|
|
294
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__angular_common_http__ = __webpack_require__(273);
|
|
295
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__angular_http__ = __webpack_require__(78);
|
|
296
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__providers_message_message__ = __webpack_require__(156);
|
171
|
297
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
172
|
298
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
173
|
299
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -183,6 +309,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
183
|
309
|
|
184
|
310
|
|
185
|
311
|
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
186
|
316
|
var AppModule = /** @class */ (function () {
|
187
|
317
|
function AppModule() {
|
188
|
318
|
}
|
|
@@ -201,6 +331,8 @@ var AppModule = /** @class */ (function () {
|
201
|
331
|
{ loadChildren: '../pages/channel/channel.module#ChannelPageModule', name: 'ChannelPage', segment: 'channel', priority: 'low', defaultHistory: [] }
|
202
|
332
|
]
|
203
|
333
|
}),
|
|
334
|
+ __WEBPACK_IMPORTED_MODULE_10__angular_common_http__["a" /* HttpClientModule */],
|
|
335
|
+ __WEBPACK_IMPORTED_MODULE_11__angular_http__["c" /* HttpModule */]
|
204
|
336
|
],
|
205
|
337
|
bootstrap: [__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["a" /* IonicApp */]],
|
206
|
338
|
entryComponents: [
|
|
@@ -212,7 +344,9 @@ var AppModule = /** @class */ (function () {
|
212
|
344
|
providers: [
|
213
|
345
|
__WEBPACK_IMPORTED_MODULE_7__ionic_native_status_bar__["a" /* StatusBar */],
|
214
|
346
|
__WEBPACK_IMPORTED_MODULE_8__ionic_native_splash_screen__["a" /* SplashScreen */],
|
215
|
|
- { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["u" /* ErrorHandler */], useClass: __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["b" /* IonicErrorHandler */] }
|
|
347
|
+ { provide: __WEBPACK_IMPORTED_MODULE_1__angular_core__["u" /* ErrorHandler */], useClass: __WEBPACK_IMPORTED_MODULE_2_ionic_angular__["b" /* IonicErrorHandler */] },
|
|
348
|
+ __WEBPACK_IMPORTED_MODULE_9__providers_user_user__["a" /* UserProvider */],
|
|
349
|
+ __WEBPACK_IMPORTED_MODULE_12__providers_message_message__["a" /* MessageProvider */]
|
216
|
350
|
]
|
217
|
351
|
})
|
218
|
352
|
], AppModule);
|
|
@@ -223,18 +357,18 @@ var AppModule = /** @class */ (function () {
|
223
|
357
|
|
224
|
358
|
/***/ }),
|
225
|
359
|
|
226
|
|
-/***/ 262:
|
|
360
|
+/***/ 265:
|
227
|
361
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
228
|
362
|
|
229
|
363
|
"use strict";
|
230
|
364
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyApp; });
|
231
|
365
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
232
|
366
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(32);
|
233
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(190);
|
234
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(193);
|
235
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(194);
|
236
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_list_list__ = __webpack_require__(195);
|
237
|
|
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pages_channel_channel__ = __webpack_require__(99);
|
|
367
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__ = __webpack_require__(196);
|
|
368
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__ = __webpack_require__(199);
|
|
369
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__pages_home_home__ = __webpack_require__(200);
|
|
370
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pages_list_list__ = __webpack_require__(201);
|
|
371
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__pages_channel_channel__ = __webpack_require__(50);
|
238
|
372
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
239
|
373
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
240
|
374
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -284,7 +418,7 @@ var MyApp = /** @class */ (function () {
|
284
|
418
|
__metadata("design:type", __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["e" /* Nav */])
|
285
|
419
|
], MyApp.prototype, "nav", void 0);
|
286
|
420
|
MyApp = __decorate([
|
287
|
|
- Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/jaehoonp/zipteamUIv2/src/app/app.html"*/'<ion-menu [content]="content">\n <ion-header>\n <ion-toolbar>\n <ion-title>Menu</ion-title>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <ion-list>\n <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">\n {{p.title}}\n </button>\n </ion-list>\n </ion-content>\n\n</ion-menu>\n\n<!-- Disable swipe-to-go-back because it\'s poor UX to combine STGB with side menus -->\n<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>'/*ion-inline-end:"/Users/jaehoonp/zipteamUIv2/src/app/app.html"*/
|
|
421
|
+ Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({template:/*ion-inline-start:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/app/app.html"*/'\n\n\n\n\n\n<ion-menu [content]="content">\n <ion-header>\n <ion-toolbar>\n <ion-title>Zip-Slack</ion-title>\n </ion-toolbar>\n </ion-header>\n\n <ion-content>\n <ion-list>\n <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">\n {{p.title}}\n </button>\n </ion-list>\n\n\n\n\n </ion-content>\n\n</ion-menu>\n\n<!-- Disable swipe-to-go-back because it\'s poor UX to combine STGB with side menus -->\n<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>\n\n\n\n'/*ion-inline-end:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/app/app.html"*/
|
288
|
422
|
}),
|
289
|
423
|
__metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["h" /* Platform */], __WEBPACK_IMPORTED_MODULE_2__ionic_native_status_bar__["a" /* StatusBar */], __WEBPACK_IMPORTED_MODULE_3__ionic_native_splash_screen__["a" /* SplashScreen */]])
|
290
|
424
|
], MyApp);
|
|
@@ -295,13 +429,14 @@ var MyApp = /** @class */ (function () {
|
295
|
429
|
|
296
|
430
|
/***/ }),
|
297
|
431
|
|
298
|
|
-/***/ 99:
|
|
432
|
+/***/ 50:
|
299
|
433
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
300
|
434
|
|
301
|
435
|
"use strict";
|
302
|
436
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChannelPage; });
|
303
|
437
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
304
|
438
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_ionic_angular__ = __webpack_require__(32);
|
|
439
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__providers_message_message__ = __webpack_require__(156);
|
305
|
440
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
306
|
441
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
307
|
442
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -313,6 +448,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
313
|
448
|
};
|
314
|
449
|
|
315
|
450
|
|
|
451
|
+
|
316
|
452
|
/**
|
317
|
453
|
* Generated class for the ChannelPage page.
|
318
|
454
|
*
|
|
@@ -320,25 +456,105 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
320
|
456
|
* Ionic pages and navigation.
|
321
|
457
|
*/
|
322
|
458
|
var ChannelPage = /** @class */ (function () {
|
323
|
|
- function ChannelPage(navCtrl, navParams) {
|
|
459
|
+ function ChannelPage(navCtrl, navParams, messageProvider) {
|
324
|
460
|
this.navCtrl = navCtrl;
|
325
|
461
|
this.navParams = navParams;
|
|
462
|
+ this.messageProvider = messageProvider;
|
|
463
|
+ this.messages = [
|
|
464
|
+ {
|
|
465
|
+ message: "Hello"
|
|
466
|
+ },
|
|
467
|
+ {
|
|
468
|
+ message: "sup"
|
|
469
|
+ }
|
|
470
|
+ ];
|
|
471
|
+ this.getMessages();
|
326
|
472
|
}
|
327
|
473
|
ChannelPage.prototype.ionViewDidLoad = function () {
|
328
|
474
|
console.log('ionViewDidLoad ChannelPage');
|
329
|
475
|
};
|
|
476
|
+ ChannelPage.prototype.getMessages = function () {
|
|
477
|
+ var _this = this;
|
|
478
|
+ this.messageProvider.get(1, function (after) {
|
|
479
|
+ _this.messages = after;
|
|
480
|
+ });
|
|
481
|
+ };
|
|
482
|
+ ChannelPage.prototype.deleteMessage = function (messageId) {
|
|
483
|
+ var _this = this;
|
|
484
|
+ this.messageProvider.delete(messageId, function (after) {
|
|
485
|
+ _this.getMessages();
|
|
486
|
+ });
|
|
487
|
+ };
|
330
|
488
|
ChannelPage = __decorate([
|
331
|
489
|
Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["m" /* Component */])({
|
332
|
|
- selector: 'page-channel',template:/*ion-inline-start:"/Users/jaehoonp/zipteamUIv2/src/pages/channel/channel.html"*/'<!--\n Generated template for the ChannelPage page.\n\n See http://ionicframework.com/docs/components/#navigation for more info on\n Ionic pages and navigation.\n-->\n<ion-header>\n\n <ion-navbar>\n <ion-title>channel</ion-title>\n </ion-navbar>\n\n</ion-header>\n\n\n<ion-content padding>\n\n</ion-content>\n'/*ion-inline-end:"/Users/jaehoonp/zipteamUIv2/src/pages/channel/channel.html"*/,
|
|
490
|
+ selector: 'page-channel',template:/*ion-inline-start:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/channel/channel.html"*/'\n\n\n<!-- <ion-buttons start>\n\n <button ion-button icon-only menuToggle>\n\n <ion-icon name="menu"></ion-icon>\n\n </button>\n\n</ion-buttons> -->\n\n\n\n<ion-header>\n\n <ion-navbar>\n <ion-title>Channel</ion-title>\n\n <ion-buttons start>\n\n <button ion-button icon-only menuToggle>\n \n <ion-icon name="menu"></ion-icon>\n \n </button>\n \n </ion-buttons>\n </ion-navbar>\n\n</ion-header>\n\n\n\n<ion-content padding>\n\n <ion-list padding>\n <ion-item-sliding *ngFor="let message of messages">\n <ion-item>{{message.message}}</ion-item>\n \n <ion-item-options side="right">\n \n <button ion-button>\n <ion-icon name="settings"></ion-icon>\n </button>\n \n <!-- <button color="danger" ion-button (click)="deleteMessage(todo.id)">\n <ion-icon name="trash"></ion-icon>\n </button> -->\n \n </ion-item-options>\n </ion-item-sliding>\n \n <!-- <ion-item>Todo 2</ion-item>\n <ion-item>Todo 3</ion-item> -->\n </ion-list>\n \n </ion-content>\n\n'/*ion-inline-end:"/Users/jaehoonp/ZipTeamPurple-FrontEnd/src/pages/channel/channel.html"*/,
|
333
|
491
|
}),
|
334
|
|
- __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */]])
|
|
492
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1_ionic_angular__["f" /* NavController */], __WEBPACK_IMPORTED_MODULE_1_ionic_angular__["g" /* NavParams */],
|
|
493
|
+ __WEBPACK_IMPORTED_MODULE_2__providers_message_message__["a" /* MessageProvider */]])
|
335
|
494
|
], ChannelPage);
|
336
|
495
|
return ChannelPage;
|
337
|
496
|
}());
|
338
|
497
|
|
339
|
498
|
//# sourceMappingURL=channel.js.map
|
340
|
499
|
|
|
500
|
+/***/ }),
|
|
501
|
+
|
|
502
|
+/***/ 79:
|
|
503
|
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
504
|
+
|
|
505
|
+"use strict";
|
|
506
|
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UserProvider; });
|
|
507
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
|
508
|
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_http__ = __webpack_require__(78);
|
|
509
|
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
510
|
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
511
|
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
512
|
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
513
|
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
514
|
+};
|
|
515
|
+var __metadata = (this && this.__metadata) || function (k, v) {
|
|
516
|
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
517
|
+};
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+/*
|
|
521
|
+ Generated class for the UserProvider provider.
|
|
522
|
+
|
|
523
|
+ See https://angular.io/guide/dependency-injection for more info on providers
|
|
524
|
+ and Angular DI.
|
|
525
|
+*/
|
|
526
|
+var UserProvider = /** @class */ (function () {
|
|
527
|
+ function UserProvider(http) {
|
|
528
|
+ this.http = http;
|
|
529
|
+ console.log('Hello UserProvider Provider');
|
|
530
|
+ }
|
|
531
|
+ UserProvider.prototype.getToken = function () { return this.token; };
|
|
532
|
+ UserProvider.prototype.setToken = function (token) { this.token = token; };
|
|
533
|
+ UserProvider.prototype.login = function (username, password, callback) {
|
|
534
|
+ var url = "http://localhost:8080/login";
|
|
535
|
+ var header = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["a" /* Headers */]({
|
|
536
|
+ 'content-type': 'application/json',
|
|
537
|
+ });
|
|
538
|
+ var options = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["d" /* RequestOptions */]({ headers: header });
|
|
539
|
+ var body = {
|
|
540
|
+ "username": username,
|
|
541
|
+ "password": password
|
|
542
|
+ };
|
|
543
|
+ this.http.post(url, body, options).subscribe(function (result) {
|
|
544
|
+ callback(result);
|
|
545
|
+ //console.log(result.headers.get("authorization"));
|
|
546
|
+ });
|
|
547
|
+ };
|
|
548
|
+ UserProvider = __decorate([
|
|
549
|
+ Object(__WEBPACK_IMPORTED_MODULE_0__angular_core__["A" /* Injectable */])(),
|
|
550
|
+ __metadata("design:paramtypes", [__WEBPACK_IMPORTED_MODULE_1__angular_http__["b" /* Http */]])
|
|
551
|
+ ], UserProvider);
|
|
552
|
+ return UserProvider;
|
|
553
|
+}());
|
|
554
|
+
|
|
555
|
+//# sourceMappingURL=user.js.map
|
|
556
|
+
|
341
|
557
|
/***/ })
|
342
|
558
|
|
343
|
|
-},[196]);
|
|
559
|
+},[202]);
|
344
|
560
|
//# sourceMappingURL=main.js.map
|