mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
removing export functionality to move to its own branch
This commit is contained in:
parent
4563d22bf0
commit
7042c97d5d
4 changed files with 7 additions and 78 deletions
|
|
@ -31,13 +31,6 @@
|
|||
"qrCode": "QR Code",
|
||||
"dataExport": "Data Export",
|
||||
"saveData": "Here are a few options for saving your Habit data.",
|
||||
"taskLists": "Task Lists",
|
||||
"taskData": "You can export lists of your current tasks (useful for sharing many items with another person)",
|
||||
"exportHabits": "Export Habits",
|
||||
"exportDailies": "Export Dailies",
|
||||
"exportToDos": "Export To-Dos",
|
||||
"exportRewards": "Export Rewards",
|
||||
"exportAllTasks": "Export All",
|
||||
"habitHistory": "Habit History",
|
||||
"exportHistory": "Export History:",
|
||||
"csv": "(CSV)",
|
||||
|
|
|
|||
|
|
@ -22,48 +22,6 @@ var request = require('request');
|
|||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
function buildTaskList(list) {
|
||||
var output = [];
|
||||
_.each(list, function(task) {
|
||||
output.push(task);
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
dataexport.habits = function(req, res) {
|
||||
return res.jsonstring({
|
||||
'habits': buildTaskList(res.locals.user.habits)
|
||||
});
|
||||
}
|
||||
|
||||
dataexport.dailies = function(req, res) {
|
||||
return res.jsonstring({
|
||||
'dailies': buildTaskList(res.locals.user.dailys)
|
||||
});
|
||||
}
|
||||
|
||||
dataexport.todos = function(req, res) {
|
||||
return res.jsonstring({
|
||||
'todos': buildTaskList(res.locals.user.todos)
|
||||
});
|
||||
}
|
||||
|
||||
dataexport.rewards = function(req, res) {
|
||||
return res.jsonstring({
|
||||
'rewards': buildTaskList(res.locals.user.rewards)
|
||||
});
|
||||
}
|
||||
|
||||
dataexport.tasks = function(req, res) {
|
||||
var user = res.locals.user;
|
||||
return res.jsonstring({
|
||||
'habits': buildTaskList(user.habits),
|
||||
'dailies': buildTaskList(user.dailys),
|
||||
'todos': buildTaskList(user.todos),
|
||||
'rewards': buildTaskList(user.rewards)
|
||||
});
|
||||
}
|
||||
|
||||
dataexport.history = function(req, res) {
|
||||
var user = res.locals.user;
|
||||
var output = [
|
||||
|
|
|
|||
|
|
@ -7,11 +7,6 @@ var i18n = require('../i18n');
|
|||
var middleware = require('../middleware.js');
|
||||
|
||||
/* Data export */
|
||||
router.get('/habits.json',auth.authWithSession,i18n.getUserLanguage,dataexport.habits); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/dailies.json',auth.authWithSession,i18n.getUserLanguage,dataexport.dailies); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/todos.json',auth.authWithSession,i18n.getUserLanguage,dataexport.todos); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/tasks.json',auth.authWithSession,i18n.getUserLanguage,dataexport.tasks); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/rewards.json',auth.authWithSession,i18n.getUserLanguage,dataexport.rewards); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/history.csv',auth.authWithSession,i18n.getUserLanguage,dataexport.history); //[todo] encode data output options in the data controller and use these to build routes
|
||||
router.get('/userdata.xml',auth.authWithSession,i18n.getUserLanguage,dataexport.leanuser,dataexport.userdata.xml);
|
||||
router.get('/userdata.json',auth.authWithSession,i18n.getUserLanguage,dataexport.leanuser,dataexport.userdata.json);
|
||||
|
|
|
|||
|
|
@ -33,15 +33,15 @@ script(type='text/ng-template', id='partials/options.settings.settings.html')
|
|||
.form-horizontal
|
||||
h5=env.t('language')
|
||||
select.form-control(ng-model='language.code', ng-options='lang.code as lang.name for lang in avalaibleLanguages', ng-change='changeLanguage()')
|
||||
small
|
||||
small
|
||||
!=env.t('americanEnglishGovern')
|
||||
br
|
||||
strong
|
||||
!=env.t('helpWithTranslation')
|
||||
|
||||
|
||||
.form-horizontal
|
||||
h5=env.t('dateFormat')
|
||||
select.form-control(ng-model='user.preferences.dateFormat', ng-options='DF for DF in availableFormats', ng-change='set({"preferences.dateFormat": user.preferences.dateFormat})')
|
||||
select.form-control(ng-model='user.preferences.dateFormat', ng-options='DF for DF in availableFormats', ng-change='set({"preferences.dateFormat": user.preferences.dateFormat})')
|
||||
.checkbox
|
||||
label
|
||||
input(type='checkbox', ng-click='hideHeader() ', ng-checked='user.preferences.hideHeader!==true')
|
||||
|
|
@ -110,7 +110,7 @@ script(type='text/ng-template', id='partials/options.settings.settings.html')
|
|||
input.btn.btn-default(type='submit', ng-disabled='localAuth.$invalid', value=env.t('submit'))
|
||||
|
||||
div(ng-if='user.auth.local.username')
|
||||
p=env.t('username')
|
||||
p=env.t('username')
|
||||
|: {{user.auth.local.username}}
|
||||
p
|
||||
small.muted
|
||||
|
|
@ -118,7 +118,7 @@ script(type='text/ng-template', id='partials/options.settings.settings.html')
|
|||
|
|
||||
a(href='/#/options/profile/profile')=env.t('loginNameDescription2')
|
||||
|
|
||||
=env.t('loginNameDescription3')
|
||||
=env.t('loginNameDescription3')
|
||||
p=env.t('email')
|
||||
|: {{user.auth.local.email}}
|
||||
hr
|
||||
|
|
@ -228,23 +228,6 @@ script(id='partials/options.settings.export.html', type="text/ng-template")
|
|||
.col-md-6
|
||||
h2=env.t('dataExport')
|
||||
small=env.t('saveData')
|
||||
h4=env.t('taskLists')
|
||||
small=env.t('taskData')
|
||||
p
|
||||
=env.t('exportHabits')
|
||||
a(href="/export/habits.json")= ' ' + env.t('json')
|
||||
p
|
||||
=env.t('exportDailies')
|
||||
a(href="/export/dailies.json")= ' ' + env.t('json')
|
||||
p
|
||||
=env.t('exportToDos')
|
||||
a(href="/export/todos.json")= ' ' + env.t('json')
|
||||
p
|
||||
=env.t('exportRewards')
|
||||
a(href="/export/rewards.json")= ' ' + env.t('json')
|
||||
p
|
||||
=env.t('exportAllTasks')
|
||||
a(href="/export/tasks.json")= ' ' + env.t('json')
|
||||
h4=env.t('habitHistory')
|
||||
=env.t('exportHistory')
|
||||
a(href="/export/history.csv")= ' ' + env.t('csv')
|
||||
|
|
@ -341,14 +324,14 @@ script(id='partials/options.settings.notifications.html', type="text/ng-template
|
|||
label
|
||||
input(type='checkbox', ng-disabled='user.preferences.emailNotifications.unsubscribeFromAll === true', ng-model='user.preferences.emailNotifications.importantAnnouncements', ng-change='set({"preferences.emailNotifications.importantAnnouncements": user.preferences.emailNotifications.importantAnnouncements ? true: false})')
|
||||
span=env.t('importantAnnouncements')
|
||||
|
||||
|
||||
hr
|
||||
|
||||
.checkbox
|
||||
label
|
||||
input(type='checkbox', ng-model='user.preferences.emailNotifications.unsubscribeFromAll', ng-change='set({"preferences.emailNotifications.unsubscribeFromAll": user.preferences.emailNotifications.unsubscribeFromAll ? true: false})')
|
||||
span=env.t('unsubscribeAllEmails')
|
||||
|
||||
|
||||
small=env.t('unsubscribeAllEmailsText')
|
||||
|
||||
script(id='partials/options.settings.subscription.html',type='text/ng-template')
|
||||
|
|
|
|||
Loading…
Reference in a new issue