mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-18 02:01:27 -05:00
9c6f0faff6
Conflicts: app/coffee/Features/User/UserPagesController.coffee app/views/layout.jade app/views/project/editor/dropbox.jade app/views/project/editor/file-tree.jade app/views/project/editor/pdf.jade app/views/project/list/project-list.jade app/views/user/settings.jade
41 lines
1.3 KiB
CoffeeScript
41 lines
1.3 KiB
CoffeeScript
UserLocator = require("./UserLocator")
|
|
dropboxHandler = require('../Dropbox/DropboxHandler')
|
|
logger = require("logger-sharelatex")
|
|
Settings = require("settings-sharelatex")
|
|
fs = require('fs')
|
|
|
|
module.exports =
|
|
|
|
registerPage : (req, res)->
|
|
sharedProjectData =
|
|
project_name:req.query.project_name
|
|
user_first_name:req.query.user_first_name
|
|
|
|
newTemplateData = {}
|
|
if req.session.templateData?
|
|
newTemplateData.templateName = req.session.templateData.templateName
|
|
|
|
res.render 'user/register',
|
|
title: 'register'
|
|
redir: req.query.redir
|
|
sharedProjectData: sharedProjectData
|
|
newTemplateData: newTemplateData
|
|
new_email:req.query.new_email || ""
|
|
|
|
loginPage : (req, res)->
|
|
res.render 'user/login',
|
|
title: 'login',
|
|
redir: req.query.redir
|
|
|
|
settingsPage : (req, res)->
|
|
logger.log user: req.session.user, "loading settings page"
|
|
UserLocator.findById req.session.user._id, (err, user)->
|
|
dropboxHandler.getUserRegistrationStatus user._id, (err, status)->
|
|
userIsRegisteredWithDropbox = !err? and status.registered
|
|
res.render 'user/settings',
|
|
title:'account_settings',
|
|
userHasDropboxFeature: user.features.dropbox
|
|
userIsRegisteredWithDropbox: userIsRegisteredWithDropbox
|
|
user: user,
|
|
languages: Settings.languages,
|
|
accountSettingsTabActive: true
|