Guest User

Untitled

a guest
Feb 22nd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.74 KB | None | 0 0
  1. <template>
  2. <div>
  3. <section>
  4. <v-parallax :src="require('../assets/hero.jpeg')" height="600">
  5. <v-layout
  6. column
  7. align-center
  8. justify-center
  9. class="white--text"
  10. >
  11. <img src="../assets/vuetify.png" alt="Vuetify.js" height="200">
  12. <h1 class="white--text mb-2 display-1 text-xs-center">Crypto File Sharing</h1>
  13. <div class="subheading mb-3 text-xs-center">Powered by Vue.js</div>
  14. <v-btn
  15. class="blue lighten-2 mt-5"
  16. dark
  17. large
  18. @click.stop="goToDashboard()"
  19. >
  20. Go to Dashboard
  21. </v-btn>
  22.  
  23.  
  24. <v-dialog v-model="loginDialog" max-width="500px">
  25. <v-card class="elevation-12">
  26. <v-toolbar dark color="primary">
  27. <v-btn icon @click.native="loginDialog = false" dark>
  28. <v-icon>close</v-icon>
  29. </v-btn>
  30. <v-toolbar-title>Login</v-toolbar-title>
  31. </v-toolbar>
  32. <v-card-text>
  33. <v-form>
  34. <v-text-field prepend-icon="person" label="Username" v-model="loginUsername" type="text"></v-text-field>
  35. <v-text-field prepend-icon="lock" label="Password" v-model="loginPassword" @keyup.enter="login()" type="password"></v-text-field>
  36. </v-form>
  37. <v-alert type="error" v-model='loginError'>
  38. {{ this.loginErrorText }}
  39. </v-alert>
  40. </v-card-text>
  41.  
  42. <v-card-actions>
  43. <v-btn color="primary"
  44. flat
  45. @click.stop="loginDialog = false; signupDialog = true"
  46. >
  47. New User? Signup
  48. </v-btn>
  49. <v-spacer></v-spacer>
  50. <v-btn
  51. color="primary"
  52. @click.stop="login()"
  53. >
  54. Login
  55. </v-btn>
  56. </v-card-actions>
  57. </v-card>
  58. </v-dialog>
  59.  
  60.  
  61. <v-dialog v-model="signupDialog" max-width="500px">
  62. <v-card class="elevation-12">
  63. <v-toolbar dark color="primary">
  64. <v-btn icon @click.native="signupDialog = false" dark>
  65. <v-icon>close</v-icon>
  66. </v-btn>
  67. <v-toolbar-title>Sign Up</v-toolbar-title>
  68. <v-spacer></v-spacer>
  69. <v-tooltip bottom>
  70.  
  71. <span>Source</span>
  72. </v-tooltip>
  73. </v-toolbar>
  74. <v-card-text>
  75. <v-form>
  76. <v-text-field prepend-icon="person" label="Name" v-model="signupName" type="text"></v-text-field>
  77. <v-text-field prepend-icon="perm_identity" label="Username" v-model="signupUsername" type="text"></v-text-field>
  78. <v-text-field prepend-icon="lock" label="Password" v-model="signupPassword" @keyup.enter="signup()" type="password"></v-text-field>
  79. </v-form>
  80. <v-alert type="error" v-model='signupError'>
  81. {{ this.signupErrorText }}
  82. </v-alert>
  83. </v-card-text>
  84. <v-card-actions>
  85.  
  86. <v-spacer></v-spacer>
  87. <v-btn
  88. color="primary"
  89. @click.stop="signup()"
  90. @keyup.enter="signup()"
  91. >
  92. Sign Up
  93. </v-btn>
  94.  
  95. </v-card-actions>
  96. </v-card>
  97. </v-dialog>
  98.  
  99. </v-layout>
  100. </v-parallax>
  101. </section>
  102.  
  103. <section>
  104. <v-layout
  105. column
  106. wrap
  107. class="my-5"
  108. align-center
  109. >
  110. <v-flex xs12 sm4 class="my-3">
  111. <div class="text-xs-center">
  112. <h2 class="headline">The best way to share your files</h2>
  113. <span class="subheading">
  114. Leakproof. Tamperproof. Foolproof
  115. </span>
  116. </div>
  117. </v-flex>
  118. <v-flex xs12>
  119. <v-container grid-list-xl>
  120. <v-layout row wrap align-center>
  121. <v-flex xs12 md4>
  122. <v-card class="elevation-0 transparent">
  123. <v-card-text class="text-xs-center">
  124. <v-icon x-large class="blue--text text--lighten-2">color_lens</v-icon>
  125. </v-card-text>
  126. <v-card-title primary-title class="layout justify-center">
  127. <div class="headline text-xs-center">Less Server, More You</div>
  128. </v-card-title>
  129. <v-card-text>
  130. Crypto File Sharing beats most leading File Sharing Systems by a mile. We make use of Client side resources to get your files zipped up and locked away in our custom built encryption vault.
  131. </v-card-text>
  132. </v-card>
  133. </v-flex>
  134. <v-flex xs12 md4>
  135. <v-card class="elevation-0 transparent">
  136. <v-card-text class="text-xs-center">
  137. <v-icon x-large class="blue--text text--lighten-2">flash_on</v-icon>
  138. </v-card-text>
  139. <v-card-title primary-title class="layout justify-center">
  140. <div class="headline">Multiple Layers of Security</div>
  141. </v-card-title>
  142. <v-card-text>
  143. We encrypt your data once. As if that werent enough (just kidding), we do it again, ensuring that no Hacker, black or white hat, gets hold of your files, as incriminating as they could be ;).
  144. </v-card-text>
  145. </v-card>
  146. </v-flex>
  147. <v-flex xs12 md4>
  148. <v-card class="elevation-0 transparent">
  149. <v-card-text class="text-xs-center">
  150. <v-icon x-large class="blue--text text--lighten-2">build</v-icon>
  151. </v-card-text>
  152. <v-card-title primary-title class="layout justify-center">
  153. <div class="headline text-xs-center">Completely Open Sourced</div>
  154. </v-card-title>
  155. <v-card-text>
  156. Crypto File Sharing is built from scratch using a wide array of technologies, all completely Open-Sourced, with the source code available for you to verify.
  157. </v-card-text>
  158. </v-card>
  159. </v-flex>
  160. </v-layout>
  161. </v-container>
  162. </v-flex>
  163. </v-layout>
  164. </section>
  165.  
  166. <section>
  167. <v-parallax :src="require('../assets/section.jpg')" height="380">
  168. <v-layout column align-center justify-center>
  169. <div class="headline white--text mb-3 text-xs-center">File Sharing has never been easier</div>
  170. <em>Call your friends, share your photos and music and videos.</em>
  171. <v-btn
  172. class="blue lighten-2 mt-5"
  173. dark
  174. large
  175. >
  176. Get Started
  177. </v-btn>
  178. </v-layout>
  179. </v-parallax>
  180. </section>
  181.  
  182. <section>
  183. <v-container grid-list-xl>
  184. <v-layout row wrap justify-center class="my-5">
  185. <v-flex xs12 sm4>
  186. <v-card class="elevation-0 transparent">
  187. <v-card-title primary-title class="layout justify-center">
  188. <div class="headline">Company info</div>
  189. </v-card-title>
  190. <v-card-text>
  191. Implementation of a secure file sharing application where users can send files and receive files while preserving security to a high degree. We propose a system that can send and receive files using encryption thus, eliminating the possibility of eavesdropping. Our system encrypts and decrypts the file uploaded transparently. This is a method for secure communication over the internet for people even without any technical knowledge.
  192. </v-card-text>
  193. </v-card>
  194. </v-flex>
  195. <v-flex xs12 sm4 offset-sm1>
  196. <v-card class="elevation-0 transparent">
  197. <v-card-title primary-title class="layout justify-center">
  198. <div class="headline">The Team</div>
  199. </v-card-title>
  200. <v-card-text>
  201. Adarsh J. Abraham
  202. Amal Jos
  203. Anna B. Mathew
  204. Jovin Jijo
  205. </v-card-text>
  206. <v-list class="transparent">
  207. <v-list-tile>
  208. <v-list-tile-action>
  209. <v-icon class="blue--text text--lighten-2">phone</v-icon>
  210. </v-list-tile-action>
  211. <v-list-tile-content>
  212. <v-list-tile-title>808-946-9170</v-list-tile-title>
  213. </v-list-tile-content>
  214. </v-list-tile>
  215. <v-list-tile>
  216. <v-list-tile-action>
  217. <v-icon class="blue--text text--lighten-2">place</v-icon>
  218. </v-list-tile-action>
  219. <v-list-tile-content>
  220. <v-list-tile-title>RSET, Kakkanad</v-list-tile-title>
  221. </v-list-tile-content>
  222. </v-list-tile>
  223. <v-list-tile>
  224. <v-list-tile-action>
  225. <v-icon class="blue--text text--lighten-2">email</v-icon>
  226. </v-list-tile-action>
  227. <v-list-tile-content>
  228. <v-list-tile-title>adarshjabraham@gmail.com</v-list-tile-title>
  229. </v-list-tile-content>
  230. </v-list-tile>
  231. </v-list>
  232. </v-card>
  233. </v-flex>
  234. </v-layout>
  235. </v-container>
  236. </section>
  237.  
  238. /*<v-footer class="blue darken-2">
  239. <v-layout row wrap align-center>
  240. <v-flex xs12>
  241. <div class="white--text ml-3">
  242. Made with
  243. <v-icon class="red--text">favorite</v-icon>
  244. by <a class="white--text" href="https://vuetifyjs.com" target="_blank">Vuetify</a>
  245. and <a class="white--text" href="https://github.com/vwxyzjn">Costa Huang</a>
  246. </div>
  247. </v-flex>
  248. </v-layout>
  249. </v-footer>*/
  250. </div>
  251. </template>
  252.  
  253. <script>
  254. export default {
  255. name: 'Home',
  256. data () {
  257. return {
  258. loginDialog: false,
  259. signupDialog: false,
  260. loginUsername: '',
  261. loginPassword: '',
  262. signupUsername: '',
  263. signupPassword: '',
  264. signupName: '',
  265. loginErrorText: '',
  266. loginError: false,
  267. signupError: false,
  268. signupErrorText: ''
  269.  
  270. }
  271. },
  272. methods: {
  273. login: function () {
  274. if (this.loginUsername === '' || this.loginPassword === '') {
  275. this.loginErrorText = 'Please enter vaid username and password'
  276. this.loginError = true
  277. } else {
  278. this.$auth.logIn(this.loginUsername, this.loginPassword).then(response => {
  279. // Successful login
  280. this.$router.push('/dashboard')
  281. }, err => {
  282. console.log(err.status)
  283. this.loginErrorText = 'Incorrect username or password'
  284. this.loginError = true
  285. })
  286. }
  287. },
  288. signup: function () {
  289. if (this.signupUsername === '' || this.signupPassword === '') {
  290. this.signupErrorText = 'Please enter vaid username and password'
  291. this.signupError = true
  292. } else {
  293. this.$auth.register(this.signupUsername, this.signupPassword).then(response => {
  294. // Successful signup
  295. this.$http.post('/api/registerdetails', {username: this.signupUsername, name: this.signupName}).then(response => {
  296. console.log('Register details successful' + this.$auth.isLoggedIn())
  297. this.$router.push('/dashboard')
  298. }, err => {
  299. console.log('ERROR: Node API Signup, Error Code : ' + err.status)
  300. })
  301. }, err => {
  302. console.log(err.status)
  303. this.signupErrorText = 'Please choose a different username'
  304. this.signupError = true
  305. })
  306. }
  307. },
  308. goToDashboard: function () {
  309. if (this.$auth.isLoggedIn()) {
  310. this.$router.push('/dashboard')
  311. } else {
  312. this.loginDialog = true
  313. }
  314. }
  315. },
  316. mounted: function () {
  317. this.$root.$on('loginClicked', () => {
  318. this.loginDialog = true
  319. })
  320. this.$root.$on('signupClicked', () => {
  321. this.signupDialog = true
  322. })
  323. }
  324. }
  325. </script>
Add Comment
Please, Sign In to add comment