├── l10n ├── .gitkeep ├── lo.json ├── bn_BD.json ├── km.json ├── lo.js ├── bn_BD.js ├── km.js ├── lb.json ├── az.json ├── lb.js ├── az.js ├── ia.json ├── ia.js ├── kab.json ├── kab.js ├── si.json ├── nn_NO.json ├── si.js ├── mn.json ├── nn_NO.js ├── mn.js ├── sr@latin.json ├── sr@latin.js ├── th.json ├── af.json ├── eo.json ├── ka_GE.json ├── th.js ├── cy_GB.json ├── af.js ├── eo.js ├── ka_GE.js ├── sq.json ├── cy_GB.js ├── es_419.json ├── es_CO.json ├── es_DO.json ├── es_GT.json ├── es_HN.json ├── es_NI.json ├── es_PA.json ├── es_PE.json ├── es_PR.json ├── es_PY.json ├── es_SV.json ├── es_UY.json ├── sq.js ├── es_419.js ├── es_CO.js ├── es_DO.js ├── es_GT.js ├── es_HN.js ├── es_NI.js ├── es_PA.js ├── es_PE.js ├── es_PR.js ├── es_PY.js ├── es_SV.js ├── es_UY.js ├── es_CL.json ├── es_CR.json ├── es_CL.js ├── es_CR.js ├── uz.json ├── uz.js ├── oc.json ├── es_AR.json ├── br.json ├── oc.js ├── es_AR.js ├── lv.json ├── br.js ├── lv.js ├── id.json ├── id.js ├── ast.json ├── ast.js ├── ka.json ├── ro.json ├── ka.js ├── ro.js ├── vi.json ├── vi.js ├── mk.json ├── mk.js ├── be.json ├── be.js ├── zh_TW.json ├── ko.json ├── sw.json ├── zh_TW.js ├── ko.js ├── sw.js ├── is.json ├── is.js ├── et_EE.json ├── et_EE.js ├── da.json ├── da.js ├── lt_LT.json ├── lt_LT.js ├── sv.json └── sv.js ├── .l10nignore ├── .npmignore ├── tests ├── stub.phpstub └── psalm-baseline.xml ├── SECURITY.md ├── templates └── main.php ├── .stylelintrc.js ├── screenshots ├── health-start.png ├── health-preview.png ├── health-weight.png └── health-person-start.png ├── webpack.js ├── krankerl.toml ├── stylelint.config.js ├── .gitignore ├── cypress ├── plugins │ └── index.js ├── e2e │ └── health.cy.js └── support │ └── e2e.js ├── .devcontainer ├── setup.sh └── devcontainer.json ├── .editorconfig ├── babel.config.js ├── cypress.config.js ├── .eslintrc.js ├── .tx └── config ├── .php-cs-fixer.dist.php ├── src ├── shared │ └── charts │ │ └── LineChart.js ├── modules │ ├── weight │ │ ├── contentParts │ │ │ └── TextResultsNoData.vue │ │ └── MixinBmi.js │ ├── smoking │ │ ├── SmokingSavedMoney.vue │ │ └── SmokingContent.vue │ ├── sleep │ │ ├── SleepSidebar.vue │ │ └── SleepContent.vue │ ├── feeling │ │ └── FeelingContent.vue │ └── activities │ │ └── ActivitiesContent.vue ├── Startpage.vue ├── main.js └── store │ ├── SleepApi.js │ ├── WeightApi.js │ ├── FeelingApi.js │ └── SmokingApi.js ├── img ├── app-dark.svg ├── app.svg └── weight.svg ├── .scripts └── sync-gh-workflows.sh ├── .nextcloudignore ├── .github ├── ISSUE_TEMPLATE │ ├── feature-request.yml │ └── bug-report.yml └── workflows │ ├── lint-info-xml.yml │ ├── lint-php-cs.yml │ └── lint-php.yml ├── lib ├── Db │ ├── MedicationPlan.php │ ├── Smokingdata.php │ ├── SleepdataMapper.php │ ├── MedicationdataMapper.php │ ├── SmokingdataMapper.php │ ├── ActivitiesdataMapper.php │ ├── Sleepdata.php │ ├── Medicationdata.php │ ├── Feelingdata.php │ ├── FeelingdataMapper.php │ ├── MeasurementdataMapper.php │ ├── Activitiesdata.php │ ├── Acl.php │ ├── WeightdataMapper.php │ ├── Weightdata.php │ └── MedicationPlanMapper.php ├── Controller │ └── PageController.php └── Migration │ ├── Version1200Date20210429000000.php │ ├── Version0142Date20201104200000.php │ ├── Version0230Date20210107000000.php │ └── Version0230Date20210110000000.php ├── composer.json ├── appinfo └── info.xml ├── psalm.xml └── package.json /l10n/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.l10nignore: -------------------------------------------------------------------------------- 1 | js/ 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /tests/stub.phpstub: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.stylelintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@nextcloud/stylelint-config') 2 | -------------------------------------------------------------------------------- /screenshots/health-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/health/HEAD/screenshots/health-start.png -------------------------------------------------------------------------------- /tests/psalm-baseline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /screenshots/health-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/health/HEAD/screenshots/health-preview.png -------------------------------------------------------------------------------- /screenshots/health-weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/health/HEAD/screenshots/health-weight.png -------------------------------------------------------------------------------- /webpack.js: -------------------------------------------------------------------------------- 1 | const webpackConfig = require('@nextcloud/webpack-vue-config') 2 | 3 | module.exports = webpackConfig 4 | -------------------------------------------------------------------------------- /screenshots/health-person-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/health/HEAD/screenshots/health-person-start.png -------------------------------------------------------------------------------- /krankerl.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | before_cmds = [ 3 | "composer install --no-dev", 4 | "npm install", 5 | "npm run build" 6 | ] 7 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | const stylelintConfig = require('@nextcloud/stylelint-config') 2 | 3 | module.exports = stylelintConfig 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | .DS_Store 3 | node_modules 4 | /build/ 5 | /.idea 6 | \.idea/ 7 | /js 8 | /.php-cs-fixer.cache 9 | /releaseNotes.md 10 | -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | const { downloadFile } = require('cypress-downloadfile/lib/addPlugin') 2 | module.exports = (on, config) => { 3 | on('task', { downloadFile }) 4 | } 5 | -------------------------------------------------------------------------------- /.devcontainer/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ( 4 | cd /tmp && /usr/local/bin/bootstrap.sh apache2ctl start 5 | ) 6 | 7 | composer install --no-dev 8 | npm ci 9 | npm run dev 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = tab 6 | indent_size = 4 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: ['@babel/plugin-syntax-dynamic-import'], 3 | presets: [ 4 | [ 5 | '@babel/preset-env', 6 | { 7 | modules: false 8 | } 9 | ] 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /cypress.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('cypress') 2 | 3 | module.exports = defineConfig({ 4 | projectId: 'ixbf9n', 5 | e2e: { 6 | baseUrl: 'http://nextcloud.local/index.php/', 7 | setupNodeEvents(on, config) { 8 | // implement node event listeners here 9 | }, 10 | pageLoadTimeout: 120000, 11 | }, 12 | }) 13 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '@nextcloud', 4 | ], 5 | rules: { 6 | // no ending html tag on a new line (was warn in "vue/strongly-recommended") 7 | 'vue/html-closing-bracket-newline': ['error', { multiline: 'always' }], 8 | // do not require JSDoc comments 9 | 'jsdoc/require-jsdoc': 'off', 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = cs_CZ: cs, fi_FI: fi, hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja, bg_BG: bg 4 | 5 | [o:nextcloud:p:nextcloud:r:health] 6 | file_filter = translationfiles//health.po 7 | source_file = translationfiles/templates/health.pot 8 | source_lang = en 9 | type = PO 10 | 11 | -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | getFinder() 12 | ->notPath('node_modules') 13 | ->notPath('build') 14 | ->notPath('l10n') 15 | ->notPath('src') 16 | ->notPath('vendor') 17 | ->in(__DIR__); 18 | return $config; 19 | -------------------------------------------------------------------------------- /cypress/e2e/health.cy.js: -------------------------------------------------------------------------------- 1 | let localUser 2 | 3 | describe('The Home Page', () => { 4 | 5 | before(function() { 6 | cy.createRandomUser().then(user => { 7 | localUser = user 8 | }) 9 | }) 10 | 11 | beforeEach(function() { 12 | cy.login(localUser) 13 | cy.visit('apps/health') 14 | }) 15 | 16 | it('successfully loads', () => { 17 | cy.get('h2').contains('Health').should('be.visible') 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /src/shared/charts/LineChart.js: -------------------------------------------------------------------------------- 1 | import { Line, mixins } from 'vue-chartjs' 2 | const { reactiveProp } = mixins 3 | 4 | export default { 5 | extends: Line, 6 | mixins: [reactiveProp], 7 | props: { 8 | options: { 9 | type: Object, 10 | default: null, 11 | }, 12 | }, 13 | mounted() { 14 | this.renderChart(this.chartData, this.options) 15 | }, 16 | watch: { 17 | options() { 18 | this.renderChart(this.chartData, this.options) 19 | }, 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /src/modules/weight/contentParts/TextResultsNoData.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /l10n/lo.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "ແບ່ງປັນ", 3 | "Activities" : "ບັນດາກິດຈະກຳ", 4 | "Duration" : "ໄລຍະ", 5 | "Date" : "ວັນທີ", 6 | "Job" : "ວຽກງານ", 7 | "Activity" : "ກິດຈະກໍາ", 8 | "None" : "ບໍ່ມີ", 9 | "Name" : "ຊື່", 10 | "Show details" : "ສະແດງລາຍລະອຽດ", 11 | "Delete" : "ລຶບ", 12 | "Information" : "ຂໍ້ມຸນ", 13 | "Group" : "ກຸ່ມ", 14 | "Can edit" : "ແກ້ໄຂໄດ້", 15 | "Today" : "ມື້ນີ້", 16 | "Cancel" : "ຍົກເລີກ" 17 | },"pluralForm" :"nplurals=1; plural=0;" 18 | } -------------------------------------------------------------------------------- /l10n/bn_BD.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "ভাগাভাগি কর", 3 | "Date" : "Date", 4 | "Other" : "অন্যান্য", 5 | "Comment" : "মন্তব্য", 6 | "Activity" : "সক্রিয়তা", 7 | "None" : "কোনটিই নয়", 8 | "Temperature" : "তাপমাত্রা", 9 | "Name" : "নাম", 10 | "Delete" : "মুছে", 11 | "Group" : "গোষ্ঠীসমূহ", 12 | "Can edit" : "Can edit", 13 | "Today" : "আজ", 14 | "Actions" : "পদক্ষেপসমূহ", 15 | "Cancel" : "বাতির", 16 | "Error" : "সমস্যা" 17 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 18 | } -------------------------------------------------------------------------------- /img/app-dark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /l10n/km.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "ចែក​រំលែក", 3 | "Activities" : "សកម្មភាពផ្សេងៗ", 4 | "Chart" : "ក្រាប", 5 | "Data" : "ទិន្នន័យ", 6 | "Date" : "Date", 7 | "Other" : "ផ្សេងៗ", 8 | "Comment" : "មតិ", 9 | "Activity" : "សកម្មភាព", 10 | "None" : "គ្មាន", 11 | "Name" : "ឈ្មោះ", 12 | "Delete" : "លុប", 13 | "Group" : "Group", 14 | "Can edit" : "Can edit", 15 | "Today" : "ថ្ងៃ​នេះ", 16 | "Cancel" : "បោះបង់", 17 | "Error" : "កំហុស" 18 | },"pluralForm" :"nplurals=1; plural=0;" 19 | } -------------------------------------------------------------------------------- /l10n/lo.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "ແບ່ງປັນ", 5 | "Activities" : "ບັນດາກິດຈະກຳ", 6 | "Duration" : "ໄລຍະ", 7 | "Date" : "ວັນທີ", 8 | "Job" : "ວຽກງານ", 9 | "Activity" : "ກິດຈະກໍາ", 10 | "None" : "ບໍ່ມີ", 11 | "Name" : "ຊື່", 12 | "Show details" : "ສະແດງລາຍລະອຽດ", 13 | "Delete" : "ລຶບ", 14 | "Information" : "ຂໍ້ມຸນ", 15 | "Group" : "ກຸ່ມ", 16 | "Can edit" : "ແກ້ໄຂໄດ້", 17 | "Today" : "ມື້ນີ້", 18 | "Cancel" : "ຍົກເລີກ" 19 | }, 20 | "nplurals=1; plural=0;"); 21 | -------------------------------------------------------------------------------- /src/Startpage.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 24 | -------------------------------------------------------------------------------- /img/app.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /l10n/bn_BD.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "ভাগাভাগি কর", 5 | "Date" : "Date", 6 | "Other" : "অন্যান্য", 7 | "Comment" : "মন্তব্য", 8 | "Activity" : "সক্রিয়তা", 9 | "None" : "কোনটিই নয়", 10 | "Temperature" : "তাপমাত্রা", 11 | "Name" : "নাম", 12 | "Delete" : "মুছে", 13 | "Group" : "গোষ্ঠীসমূহ", 14 | "Can edit" : "Can edit", 15 | "Today" : "আজ", 16 | "Actions" : "পদক্ষেপসমূহ", 17 | "Cancel" : "বাতির", 18 | "Error" : "সমস্যা" 19 | }, 20 | "nplurals=2; plural=(n != 1);"); 21 | -------------------------------------------------------------------------------- /l10n/km.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "ចែក​រំលែក", 5 | "Activities" : "សកម្មភាពផ្សេងៗ", 6 | "Chart" : "ក្រាប", 7 | "Data" : "ទិន្នន័យ", 8 | "Date" : "Date", 9 | "Other" : "ផ្សេងៗ", 10 | "Comment" : "មតិ", 11 | "Activity" : "សកម្មភាព", 12 | "None" : "គ្មាន", 13 | "Name" : "ឈ្មោះ", 14 | "Delete" : "លុប", 15 | "Group" : "Group", 16 | "Can edit" : "Can edit", 17 | "Today" : "ថ្ងៃ​នេះ", 18 | "Cancel" : "បោះបង់", 19 | "Error" : "កំហុស" 20 | }, 21 | "nplurals=1; plural=0;"); 22 | -------------------------------------------------------------------------------- /l10n/lb.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Deelen", 3 | "Activities" : "Aktivitéiten", 4 | "Date" : "Date", 5 | "Other" : "Aner", 6 | "Comment" : "Kommentar", 7 | "Activity" : "Aktivitéit", 8 | "None" : "Keng", 9 | "Temperature" : "Temperatur", 10 | "Name" : "Numm", 11 | "Delete" : "Läschen", 12 | "Group" : "Grupp", 13 | "Can edit" : "Can edit", 14 | "Today" : "Haut", 15 | "Actions" : "Aktiounen", 16 | "Cancel" : "Ofbriechen", 17 | "Error" : "Fehler" 18 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 19 | } -------------------------------------------------------------------------------- /img/weight.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /l10n/az.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Paylaş", 3 | "Category" : "Kateqoriya", 4 | "Date" : "Date", 5 | "Other" : "Digər", 6 | "Good" : "Yaxşı", 7 | "Comment" : "Komentariya", 8 | "Activity" : "Fəallıq", 9 | "None" : "Heç bir", 10 | "Name" : "Ad", 11 | "Delete" : "Sil", 12 | "Group" : "Qrup", 13 | "Can edit" : "Can edit", 14 | "Last year" : "Keçən il", 15 | "Today" : "Bu gün", 16 | "Actions" : "İşlər", 17 | "Cancel" : "Dayandır", 18 | "Error" : "Səhv" 19 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 20 | } -------------------------------------------------------------------------------- /l10n/lb.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Deelen", 5 | "Activities" : "Aktivitéiten", 6 | "Date" : "Date", 7 | "Other" : "Aner", 8 | "Comment" : "Kommentar", 9 | "Activity" : "Aktivitéit", 10 | "None" : "Keng", 11 | "Temperature" : "Temperatur", 12 | "Name" : "Numm", 13 | "Delete" : "Läschen", 14 | "Group" : "Grupp", 15 | "Can edit" : "Can edit", 16 | "Today" : "Haut", 17 | "Actions" : "Aktiounen", 18 | "Cancel" : "Ofbriechen", 19 | "Error" : "Fehler" 20 | }, 21 | "nplurals=2; plural=(n != 1);"); 22 | -------------------------------------------------------------------------------- /l10n/az.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Paylaş", 5 | "Category" : "Kateqoriya", 6 | "Date" : "Date", 7 | "Other" : "Digər", 8 | "Good" : "Yaxşı", 9 | "Comment" : "Komentariya", 10 | "Activity" : "Fəallıq", 11 | "None" : "Heç bir", 12 | "Name" : "Ad", 13 | "Delete" : "Sil", 14 | "Group" : "Qrup", 15 | "Can edit" : "Can edit", 16 | "Last year" : "Keçən il", 17 | "Today" : "Bu gün", 18 | "Actions" : "İşlər", 19 | "Cancel" : "Dayandır", 20 | "Error" : "Səhv" 21 | }, 22 | "nplurals=2; plural=(n != 1);"); 23 | -------------------------------------------------------------------------------- /l10n/ia.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Activitates", 4 | "Category" : "Categoria", 5 | "Date" : "Date", 6 | "Other" : "Altere", 7 | "Comment" : "Commentario", 8 | "Activity" : "Activitate", 9 | "None" : "Nulle", 10 | "Name" : "Nomine", 11 | "Delete" : "Deler", 12 | "Group" : "Gruppo", 13 | "Can edit" : "Can edit", 14 | "Last 24 hours" : "Ultime 24 horas", 15 | "Today" : "Hodie", 16 | "Actions" : "Actiones", 17 | "Cancel" : "Cancellar", 18 | "Error" : "Error" 19 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 20 | } -------------------------------------------------------------------------------- /l10n/ia.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Activitates", 6 | "Category" : "Categoria", 7 | "Date" : "Date", 8 | "Other" : "Altere", 9 | "Comment" : "Commentario", 10 | "Activity" : "Activitate", 11 | "None" : "Nulle", 12 | "Name" : "Nomine", 13 | "Delete" : "Deler", 14 | "Group" : "Gruppo", 15 | "Can edit" : "Can edit", 16 | "Last 24 hours" : "Ultime 24 horas", 17 | "Today" : "Hodie", 18 | "Actions" : "Actiones", 19 | "Cancel" : "Cancellar", 20 | "Error" : "Error" 21 | }, 22 | "nplurals=2; plural=(n != 1);"); 23 | -------------------------------------------------------------------------------- /l10n/kab.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Bḍu", 3 | "Activities" : "Irmuden", 4 | "Category" : "Taggayt", 5 | "Date" : "Azemz", 6 | "Other" : "Wayeḍ", 7 | "Comment" : "Commentaire", 8 | "Activity" : "Armud", 9 | "None" : "Ula d yiwen", 10 | "Temperature" : "Lḥamu", 11 | "Name" : "Nom", 12 | "Show details" : "Sken talqayt", 13 | "Delete" : "Kkes", 14 | "Group" : "Agraw", 15 | "Last year" : "Ilindi", 16 | "Show all" : "Sken-iten-id akk", 17 | "Today" : "Ass-a", 18 | "Actions" : "Tigawin", 19 | "Cancel" : "Sefsex", 20 | "Error" : "Erreur" 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /.scripts/sync-gh-workflows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Update GitHub workflows from the Nextcloud template repository. 4 | # This script is meant to be run from the root of the repository. 5 | 6 | # Sanity check 7 | [ ! -d ./.github/workflows/ ] && echo "Error: .github/workflows does not exist" && exit 1 8 | 9 | # Clone template repository 10 | temp="$(mktemp -d)" 11 | git clone --depth=1 https://github.com/nextcloud/.github.git "$temp" 12 | 13 | # Update workflows 14 | rsync -vr \ 15 | --existing \ 16 | --include='*/' \ 17 | --include='*.yml' \ 18 | --exclude='*' \ 19 | "$temp/workflow-templates/" \ 20 | ./.github/workflows/ 21 | 22 | # Cleanup 23 | rm -rf "$temp" 24 | -------------------------------------------------------------------------------- /l10n/kab.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Bḍu", 5 | "Activities" : "Irmuden", 6 | "Category" : "Taggayt", 7 | "Date" : "Azemz", 8 | "Other" : "Wayeḍ", 9 | "Comment" : "Commentaire", 10 | "Activity" : "Armud", 11 | "None" : "Ula d yiwen", 12 | "Temperature" : "Lḥamu", 13 | "Name" : "Nom", 14 | "Show details" : "Sken talqayt", 15 | "Delete" : "Kkes", 16 | "Group" : "Agraw", 17 | "Last year" : "Ilindi", 18 | "Show all" : "Sken-iten-id akk", 19 | "Today" : "Ass-a", 20 | "Actions" : "Tigawin", 21 | "Cancel" : "Sefsex", 22 | "Error" : "Erreur" 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/si.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "බෙදාගන්න", 3 | "Duration" : "කාල සීමාව", 4 | "Category" : "ප්‍රවර්ගය", 5 | "Date" : "දිනය", 6 | "Job" : "රැකියාව", 7 | "Other" : "වෙනත්", 8 | "Good" : "හොඳයි", 9 | "Bad" : "නරකයි", 10 | "Comment" : "අදහස", 11 | "Activity" : "ක්‍රියාකාරකම", 12 | "Name" : "නම", 13 | "Edit name" : "නම සංස්කරණය", 14 | "Information" : "තොරතුරු", 15 | "Group" : "සමූහය", 16 | "Last week" : "පසුගිය සතිය", 17 | "Last month" : "පසුගිය මාසය", 18 | "Today" : "අද", 19 | "Actions" : "ක්‍රියාමාර්ග", 20 | "Cancel" : "අවලංගු කරන්න", 21 | "Error" : "දෝෂය" 22 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 23 | } -------------------------------------------------------------------------------- /.nextcloudignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /.git 3 | /.github 4 | /docs/ 5 | /tests 6 | /babel.config.js 7 | /.editorconfig 8 | /.eslintrc.js 9 | /.nextcloudignore 10 | /webpack.*.js 11 | /.codecov.yml 12 | /composer.json 13 | /composer.lock 14 | /_config.yml 15 | /.drone.yml 16 | /.travis.yml 17 | /.eslintignore 18 | /.eslintrc.yml 19 | /.gitignore 20 | /issue_template.md 21 | /krankerl.toml 22 | /Makefile 23 | /mkdocs.yml 24 | /run-eslint.sh 25 | /package.json 26 | /package-lock.json 27 | /node_modules/ 28 | /src/ 29 | .gitattributes 30 | .l10nignore 31 | .php-cs-fixer.dist.php 32 | .tx 33 | phpunit.integration.xml 34 | phpunit.xml 35 | psalm.xml 36 | stylelint.config.js 37 | webpack.js 38 | releaseNotes.md 39 | /.scripts 40 | -------------------------------------------------------------------------------- /l10n/nn_NO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Del", 3 | "Activities" : "Aktivitetar", 4 | "Data" : "Data", 5 | "Category" : "Kategori", 6 | "Date" : "Dato", 7 | "Other" : "Anna", 8 | "Good" : "Bra", 9 | "Bad" : "Dårleg", 10 | "Comment" : "Kommentér", 11 | "Activity" : "Aktivitet", 12 | "None" : "Ingen", 13 | "Name" : "Namn", 14 | "Delete" : "Slett", 15 | "Information" : "Informasjon", 16 | "Group" : "Gruppe", 17 | "Can edit" : "Can edit", 18 | "Last 24 hours" : "Siste 24 timer", 19 | "Today" : "I dag", 20 | "Actions" : "Handlingar", 21 | "Cancel" : "Avbryt", 22 | "Error" : "Feil" 23 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 24 | } -------------------------------------------------------------------------------- /l10n/si.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "බෙදාගන්න", 5 | "Duration" : "කාල සීමාව", 6 | "Category" : "ප්‍රවර්ගය", 7 | "Date" : "දිනය", 8 | "Job" : "රැකියාව", 9 | "Other" : "වෙනත්", 10 | "Good" : "හොඳයි", 11 | "Bad" : "නරකයි", 12 | "Comment" : "අදහස", 13 | "Activity" : "ක්‍රියාකාරකම", 14 | "Name" : "නම", 15 | "Edit name" : "නම සංස්කරණය", 16 | "Information" : "තොරතුරු", 17 | "Group" : "සමූහය", 18 | "Last week" : "පසුගිය සතිය", 19 | "Last month" : "පසුගිය මාසය", 20 | "Today" : "අද", 21 | "Actions" : "ක්‍රියාමාර්ග", 22 | "Cancel" : "අවලංගු කරන්න", 23 | "Error" : "දෝෂය" 24 | }, 25 | "nplurals=2; plural=(n != 1);"); 26 | -------------------------------------------------------------------------------- /l10n/mn.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Түгээх", 3 | "Activities" : "Үйлдлүүд", 4 | "Category" : "Ангилал", 5 | "Date" : "Он сар өдөр", 6 | "Other" : "Бусад", 7 | "Good" : "Сайн", 8 | "Bad" : " Муу", 9 | "Comment" : "undefined", 10 | "Activity" : "Үйлдлүүд", 11 | "None" : "юу ч үгүй", 12 | "Normal" : "Хэвийн", 13 | "Name" : "Нэр", 14 | "Delete" : "Устгах", 15 | "Information" : "Мэдээлэл", 16 | "Group" : "Бүлэг", 17 | "Can edit" : "Can edit", 18 | "Last 24 hours" : "Сүүлийн 24 цаг", 19 | "Today" : "өнөөдөр", 20 | "Actions" : "Үйл ажиллагаа", 21 | "Cancel" : "болиулах", 22 | "Error" : "Алдаа" 23 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 24 | } -------------------------------------------------------------------------------- /l10n/nn_NO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Del", 5 | "Activities" : "Aktivitetar", 6 | "Data" : "Data", 7 | "Category" : "Kategori", 8 | "Date" : "Dato", 9 | "Other" : "Anna", 10 | "Good" : "Bra", 11 | "Bad" : "Dårleg", 12 | "Comment" : "Kommentér", 13 | "Activity" : "Aktivitet", 14 | "None" : "Ingen", 15 | "Name" : "Namn", 16 | "Delete" : "Slett", 17 | "Information" : "Informasjon", 18 | "Group" : "Gruppe", 19 | "Can edit" : "Can edit", 20 | "Last 24 hours" : "Siste 24 timer", 21 | "Today" : "I dag", 22 | "Actions" : "Handlingar", 23 | "Cancel" : "Avbryt", 24 | "Error" : "Feil" 25 | }, 26 | "nplurals=2; plural=(n != 1);"); 27 | -------------------------------------------------------------------------------- /l10n/mn.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Түгээх", 5 | "Activities" : "Үйлдлүүд", 6 | "Category" : "Ангилал", 7 | "Date" : "Он сар өдөр", 8 | "Other" : "Бусад", 9 | "Good" : "Сайн", 10 | "Bad" : " Муу", 11 | "Comment" : "undefined", 12 | "Activity" : "Үйлдлүүд", 13 | "None" : "юу ч үгүй", 14 | "Normal" : "Хэвийн", 15 | "Name" : "Нэр", 16 | "Delete" : "Устгах", 17 | "Information" : "Мэдээлэл", 18 | "Group" : "Бүлэг", 19 | "Can edit" : "Can edit", 20 | "Last 24 hours" : "Сүүлийн 24 цаг", 21 | "Today" : "өнөөдөр", 22 | "Actions" : "Үйл ажиллагаа", 23 | "Cancel" : "болиулах", 24 | "Error" : "Алдаа" 25 | }, 26 | "nplurals=2; plural=(n != 1);"); 27 | -------------------------------------------------------------------------------- /cypress/support/e2e.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/e2e.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /l10n/sr@latin.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Podeli", 3 | "Activities" : "Aktivnosti", 4 | "Category" : "Kategorija", 5 | "Date" : "Date", 6 | "Other" : "Ostali", 7 | "Good" : "Dobro", 8 | "Bad" : "Loše", 9 | "Medium" : "Srednji", 10 | "Comment" : "Komentar", 11 | "Activity" : "Aktivnost", 12 | "None" : "Ništa", 13 | "Normal" : "Normalna", 14 | "Name" : "Ime", 15 | "Delete" : "Obriši", 16 | "Group" : "Group", 17 | "Can edit" : "Can edit", 18 | "Last week" : "Prošle nedelje", 19 | "Last month" : "Prošlog meseca", 20 | "Today" : "Danas", 21 | "Cancel" : "Otkaži", 22 | "Error" : "Greška" 23 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" 24 | } -------------------------------------------------------------------------------- /l10n/sr@latin.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Podeli", 5 | "Activities" : "Aktivnosti", 6 | "Category" : "Kategorija", 7 | "Date" : "Date", 8 | "Other" : "Ostali", 9 | "Good" : "Dobro", 10 | "Bad" : "Loše", 11 | "Medium" : "Srednji", 12 | "Comment" : "Komentar", 13 | "Activity" : "Aktivnost", 14 | "None" : "Ništa", 15 | "Normal" : "Normalna", 16 | "Name" : "Ime", 17 | "Delete" : "Obriši", 18 | "Group" : "Group", 19 | "Can edit" : "Can edit", 20 | "Last week" : "Prošle nedelje", 21 | "Last month" : "Prošlog meseca", 22 | "Today" : "Danas", 23 | "Cancel" : "Otkaži", 24 | "Error" : "Greška" 25 | }, 26 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); 27 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "image": "ghcr.io/juliushaertl/nextcloud-dev-php80:latest", 3 | "forwardPorts": [80], 4 | "containerEnv": { 5 | "NEXTCLOUD_AUTOINSTALL_APPS": "health", 6 | "XDEBUG_MODE": "debug" 7 | }, 8 | "customizations": { 9 | "vscode": { 10 | "extensions": [ 11 | "felixfbecker.php-intellisense", 12 | "octref.vetur" 13 | ], 14 | "settings": { 15 | "php.suggest.basic": false, 16 | "git.alwaysSignOff": true 17 | } 18 | } 19 | }, 20 | "workspaceMount": "source=${localWorkspaceFolder},target=/var/www/html/apps-extra/health,type=bind", 21 | "workspaceFolder": "/var/www/html/apps-extra/health", 22 | "overrideCommand": true, 23 | "postAttachCommand": "bash ./.devcontainer/setup.sh", 24 | "portsAttributes": { 25 | "80": { 26 | "label": "Webserver" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /l10n/th.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "แชร์", 3 | "Activities" : "กิจกรรม", 4 | "Data" : "ข้อมูล", 5 | "Category" : "หมวดหมู่", 6 | "Date" : "วันที่", 7 | "Other" : "อื่น ๆ", 8 | "Good" : "ดี", 9 | "Bad" : "ไม่ดี", 10 | "Medium" : "ปานกลาง", 11 | "Comment" : "แสดงความคิดเห็น", 12 | "Activity" : "กิจกรรม", 13 | "None" : "ไม่มี", 14 | "Normal" : "ปกติ", 15 | "Name" : "ชื่อ", 16 | "Show details" : "แสดงข้อมูล", 17 | "Delete" : "ลบ", 18 | "Group" : "กลุ่ม", 19 | "Can edit" : "สามารถแก้ไข", 20 | "Last week" : "สัปดาห์ที่แล้ว", 21 | "Last month" : "เดือนที่แล้ว", 22 | "Last year" : "ปีที่แล้ว", 23 | "Today" : "วันนี้", 24 | "Actions" : "การกระทำ", 25 | "Cancel" : "ยกเลิก", 26 | "Error" : "ข้อผิดพลาด" 27 | },"pluralForm" :"nplurals=1; plural=0;" 28 | } -------------------------------------------------------------------------------- /l10n/af.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Deel", 3 | "Activities" : "Aktiwiteite", 4 | "Duration" : "Duur", 5 | "Category" : "Kategorie", 6 | "Date" : "Datum", 7 | "Other" : "Ander", 8 | "Good" : "Goed", 9 | "Bad" : "Sleg", 10 | "Comment" : "Kommentaar", 11 | "Activity" : "Aktiwiteit", 12 | "None" : "Geen", 13 | "Normal" : "Normaal", 14 | "Temperature" : "Temperatuur", 15 | "Name" : "Naam", 16 | "Delete" : "Skrap", 17 | "Information" : "Inligting", 18 | "No participants found" : "Geen deelnemers gevind", 19 | "Group" : "Groep", 20 | "Can edit" : "Kan redigeer", 21 | "Quality" : "Kwaliteit", 22 | "Last 24 hours" : "Afgelope 24 uur", 23 | "Today" : "Vandag", 24 | "Actions" : "Aksies", 25 | "Cancel" : "Kanselleer" 26 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 27 | } -------------------------------------------------------------------------------- /l10n/eo.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Kunhavigi", 3 | "Activities" : "Aktivaĵoj", 4 | "Data" : "Datumoj", 5 | "Category" : "Kategorio", 6 | "Date" : "Date", 7 | "Running" : "Kuras", 8 | "Other" : "Alia", 9 | "Good" : "Bona", 10 | "Bad" : "Malbona", 11 | "Comment" : "Komento", 12 | "Activity" : "Aktivaĵoj", 13 | "None" : "Nenio", 14 | "Temperature" : "Temperaturo", 15 | "Name" : "Nomo", 16 | "Show details" : "Montri la detalojn", 17 | "Delete" : "Forigi", 18 | "Group" : "Grupo", 19 | "Can edit" : "Povas redakti", 20 | "Strong" : "Forta", 21 | "Last year" : "Lasta jaro", 22 | "Last 24 hours" : "Lastaj 24 horoj", 23 | "Today" : "Hodiaŭ", 24 | "Actions" : "Agoj", 25 | "Cancel" : "Nuligi", 26 | "Error" : "Eraro" 27 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 28 | } -------------------------------------------------------------------------------- /l10n/ka_GE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "გაზიარება", 3 | "Activities" : "აქტივობები", 4 | "Category" : "კატეგორია", 5 | "Date" : "თარიღი", 6 | "Other" : "სხვა", 7 | "Good" : "კარგია", 8 | "Bad" : "ცუდი", 9 | "Comment" : "კომენტარი", 10 | "Activity" : "აქტივობა", 11 | "None" : "არც ერთი", 12 | "Normal" : "ნორმალური", 13 | "Temperature" : "ტემპერატურა", 14 | "General settings" : "მთავარი პარამეტრები", 15 | "Name" : "სახელი", 16 | "Delete" : "წაშლა", 17 | "Information" : "ინფორმაცია", 18 | "Group" : "ჯგუფი", 19 | "Can edit" : "შეუძლია შეცვალოს", 20 | "Strong" : "ძლიერია", 21 | "Last 24 hours" : "ბოლო 24 საათი", 22 | "Today" : "დღეს", 23 | "Actions" : "მოქმედებები", 24 | "Cancel" : "უარყოფა", 25 | "Error" : "შეცდომა" 26 | },"pluralForm" :"nplurals=2; plural=(n!=1);" 27 | } -------------------------------------------------------------------------------- /l10n/th.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "แชร์", 5 | "Activities" : "กิจกรรม", 6 | "Data" : "ข้อมูล", 7 | "Category" : "หมวดหมู่", 8 | "Date" : "วันที่", 9 | "Other" : "อื่น ๆ", 10 | "Good" : "ดี", 11 | "Bad" : "ไม่ดี", 12 | "Medium" : "ปานกลาง", 13 | "Comment" : "แสดงความคิดเห็น", 14 | "Activity" : "กิจกรรม", 15 | "None" : "ไม่มี", 16 | "Normal" : "ปกติ", 17 | "Name" : "ชื่อ", 18 | "Show details" : "แสดงข้อมูล", 19 | "Delete" : "ลบ", 20 | "Group" : "กลุ่ม", 21 | "Can edit" : "สามารถแก้ไข", 22 | "Last week" : "สัปดาห์ที่แล้ว", 23 | "Last month" : "เดือนที่แล้ว", 24 | "Last year" : "ปีที่แล้ว", 25 | "Today" : "วันนี้", 26 | "Actions" : "การกระทำ", 27 | "Cancel" : "ยกเลิก", 28 | "Error" : "ข้อผิดพลาด" 29 | }, 30 | "nplurals=1; plural=0;"); 31 | -------------------------------------------------------------------------------- /l10n/cy_GB.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Iechyd", 3 | "Share" : "Rhannu", 4 | "Activities" : "Gweithgareddau", 5 | "Duration" : "Hyd", 6 | "Category" : "Categori", 7 | "Date" : "Date", 8 | "Running" : "Rhedeg", 9 | "Biking" : "Beicio", 10 | "Driving" : "Yn gyrru", 11 | "Other" : "Arall", 12 | "Good" : "Da", 13 | "Bad" : "Drwg", 14 | "Comment" : "Sylw", 15 | "Activity" : "Gweithred", 16 | "None" : "Dim", 17 | "Normal" : "Arferol", 18 | "Name" : "Enw", 19 | "Edit name" : "Golygu enw", 20 | "Delete" : "Dileu", 21 | "Group" : "Grŵp", 22 | "Can edit" : "Can edit", 23 | "Today" : "Heddiw", 24 | "Actions" : "Gweithredoedd", 25 | "Cancel" : "Diddymu", 26 | "Error" : "Gwall" 27 | },"pluralForm" :"nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;" 28 | } -------------------------------------------------------------------------------- /l10n/af.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Deel", 5 | "Activities" : "Aktiwiteite", 6 | "Duration" : "Duur", 7 | "Category" : "Kategorie", 8 | "Date" : "Datum", 9 | "Other" : "Ander", 10 | "Good" : "Goed", 11 | "Bad" : "Sleg", 12 | "Comment" : "Kommentaar", 13 | "Activity" : "Aktiwiteit", 14 | "None" : "Geen", 15 | "Normal" : "Normaal", 16 | "Temperature" : "Temperatuur", 17 | "Name" : "Naam", 18 | "Delete" : "Skrap", 19 | "Information" : "Inligting", 20 | "No participants found" : "Geen deelnemers gevind", 21 | "Group" : "Groep", 22 | "Can edit" : "Kan redigeer", 23 | "Quality" : "Kwaliteit", 24 | "Last 24 hours" : "Afgelope 24 uur", 25 | "Today" : "Vandag", 26 | "Actions" : "Aksies", 27 | "Cancel" : "Kanselleer" 28 | }, 29 | "nplurals=2; plural=(n != 1);"); 30 | -------------------------------------------------------------------------------- /l10n/eo.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Kunhavigi", 5 | "Activities" : "Aktivaĵoj", 6 | "Data" : "Datumoj", 7 | "Category" : "Kategorio", 8 | "Date" : "Date", 9 | "Running" : "Kuras", 10 | "Other" : "Alia", 11 | "Good" : "Bona", 12 | "Bad" : "Malbona", 13 | "Comment" : "Komento", 14 | "Activity" : "Aktivaĵoj", 15 | "None" : "Nenio", 16 | "Temperature" : "Temperaturo", 17 | "Name" : "Nomo", 18 | "Show details" : "Montri la detalojn", 19 | "Delete" : "Forigi", 20 | "Group" : "Grupo", 21 | "Can edit" : "Povas redakti", 22 | "Strong" : "Forta", 23 | "Last year" : "Lasta jaro", 24 | "Last 24 hours" : "Lastaj 24 horoj", 25 | "Today" : "Hodiaŭ", 26 | "Actions" : "Agoj", 27 | "Cancel" : "Nuligi", 28 | "Error" : "Eraro" 29 | }, 30 | "nplurals=2; plural=(n != 1);"); 31 | -------------------------------------------------------------------------------- /l10n/ka_GE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "გაზიარება", 5 | "Activities" : "აქტივობები", 6 | "Category" : "კატეგორია", 7 | "Date" : "თარიღი", 8 | "Other" : "სხვა", 9 | "Good" : "კარგია", 10 | "Bad" : "ცუდი", 11 | "Comment" : "კომენტარი", 12 | "Activity" : "აქტივობა", 13 | "None" : "არც ერთი", 14 | "Normal" : "ნორმალური", 15 | "Temperature" : "ტემპერატურა", 16 | "General settings" : "მთავარი პარამეტრები", 17 | "Name" : "სახელი", 18 | "Delete" : "წაშლა", 19 | "Information" : "ინფორმაცია", 20 | "Group" : "ჯგუფი", 21 | "Can edit" : "შეუძლია შეცვალოს", 22 | "Strong" : "ძლიერია", 23 | "Last 24 hours" : "ბოლო 24 საათი", 24 | "Today" : "დღეს", 25 | "Actions" : "მოქმედებები", 26 | "Cancel" : "უარყოფა", 27 | "Error" : "შეცდომა" 28 | }, 29 | "nplurals=2; plural=(n!=1);"); 30 | -------------------------------------------------------------------------------- /l10n/sq.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Shpërndaje", 3 | "Activities" : "Aktivitetet", 4 | "Duration" : "Kohëzgjatja", 5 | "Category" : "Kategori", 6 | "Date" : "Data", 7 | "Other" : "Tjetër", 8 | "Good" : "I mirë", 9 | "Bad" : "Keq", 10 | "Comment" : "Koment", 11 | "Activity" : "Aktiviteti", 12 | "None" : "Asnjë", 13 | "Normal" : "Normal", 14 | "Temperature" : "Temperatura", 15 | "General settings" : "Opsjonet e Pergjithshme", 16 | "Name" : "Emri", 17 | "Delete" : "Fshij", 18 | "Information" : "Informacion", 19 | "Group" : "Grup", 20 | "Can edit" : "Can edit", 21 | "Strong" : "I fortë", 22 | "Last 24 hours" : "24 orët e fundit", 23 | "Today" : "Sot", 24 | "Actions" : "Veprimet", 25 | "Cancel" : "Anullo", 26 | "Error" : "Gabim" 27 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 28 | } -------------------------------------------------------------------------------- /l10n/cy_GB.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Iechyd", 5 | "Share" : "Rhannu", 6 | "Activities" : "Gweithgareddau", 7 | "Duration" : "Hyd", 8 | "Category" : "Categori", 9 | "Date" : "Date", 10 | "Running" : "Rhedeg", 11 | "Biking" : "Beicio", 12 | "Driving" : "Yn gyrru", 13 | "Other" : "Arall", 14 | "Good" : "Da", 15 | "Bad" : "Drwg", 16 | "Comment" : "Sylw", 17 | "Activity" : "Gweithred", 18 | "None" : "Dim", 19 | "Normal" : "Arferol", 20 | "Name" : "Enw", 21 | "Edit name" : "Golygu enw", 22 | "Delete" : "Dileu", 23 | "Group" : "Grŵp", 24 | "Can edit" : "Can edit", 25 | "Today" : "Heddiw", 26 | "Actions" : "Gweithredoedd", 27 | "Cancel" : "Diddymu", 28 | "Error" : "Gwall" 29 | }, 30 | "nplurals=4; plural=(n==1) ? 0 : (n==2) ? 1 : (n != 8 && n != 11) ? 2 : 3;"); 31 | -------------------------------------------------------------------------------- /l10n/es_419.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Data" : "Datos", 5 | "Category" : "Categoría", 6 | "Date" : "Fecha", 7 | "Other" : "Otro", 8 | "Good" : "Buena", 9 | "Bad" : "Malo", 10 | "Comment" : "Comentario", 11 | "Activity" : "Actividad", 12 | "None" : "Ninguno", 13 | "Normal" : "Normal", 14 | "Temperature" : "Temperatura", 15 | "General settings" : "Configuraciones generales", 16 | "Name" : "Nombre", 17 | "Delete" : "Borrar", 18 | "Information" : "Información", 19 | "Group" : "Grupo", 20 | "Can edit" : "Puede editar", 21 | "Strong" : "Fuerte", 22 | "Last 24 hours" : "Últimas 24 horas", 23 | "Today" : "Hoy", 24 | "Actions" : "Acciones", 25 | "Cancel" : "Cancelar" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_CO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Data" : "Datos", 5 | "Category" : "Categoría", 6 | "Date" : "Fecha", 7 | "Other" : "Otro", 8 | "Good" : "Buena", 9 | "Bad" : "Malo", 10 | "Comment" : "Comentario", 11 | "Activity" : "Actividad", 12 | "None" : "Ninguno", 13 | "Normal" : "Normal", 14 | "Temperature" : "Temperatura", 15 | "General settings" : "Configuraciones generales", 16 | "Name" : "Nombre", 17 | "Delete" : "Borrar", 18 | "Information" : "Información", 19 | "Group" : "Grupo", 20 | "Can edit" : "Puede editar", 21 | "Strong" : "Fuerte", 22 | "Last 24 hours" : "Últimas 24 horas", 23 | "Today" : "Hoy", 24 | "Actions" : "Acciones", 25 | "Cancel" : "Cancelar" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_DO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_GT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_HN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_NI.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_PA.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_PE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_PR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_PY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_SV.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/es_UY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Category" : "Categoría", 5 | "Date" : "Fecha", 6 | "Other" : "Otro", 7 | "Good" : "Buena", 8 | "Bad" : "Malo", 9 | "Comment" : "Comentario", 10 | "Activity" : "Actividad", 11 | "None" : "Ninguno", 12 | "Normal" : "Normal", 13 | "Temperature" : "Temperatura", 14 | "General settings" : "Configuraciones generales", 15 | "Name" : "Nombre", 16 | "Delete" : "Borrar", 17 | "Information" : "Información", 18 | "Group" : "Grupo", 19 | "Can edit" : "Puede editar", 20 | "Strong" : "Fuerte", 21 | "Last 24 hours" : "Últimas 24 horas", 22 | "Today" : "Hoy", 23 | "Actions" : "Acciones", 24 | "Cancel" : "Cancelar", 25 | "Error" : "Error" 26 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 27 | } -------------------------------------------------------------------------------- /l10n/sq.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Shpërndaje", 5 | "Activities" : "Aktivitetet", 6 | "Duration" : "Kohëzgjatja", 7 | "Category" : "Kategori", 8 | "Date" : "Data", 9 | "Other" : "Tjetër", 10 | "Good" : "I mirë", 11 | "Bad" : "Keq", 12 | "Comment" : "Koment", 13 | "Activity" : "Aktiviteti", 14 | "None" : "Asnjë", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Opsjonet e Pergjithshme", 18 | "Name" : "Emri", 19 | "Delete" : "Fshij", 20 | "Information" : "Informacion", 21 | "Group" : "Grup", 22 | "Can edit" : "Can edit", 23 | "Strong" : "I fortë", 24 | "Last 24 hours" : "24 orët e fundit", 25 | "Today" : "Sot", 26 | "Actions" : "Veprimet", 27 | "Cancel" : "Anullo", 28 | "Error" : "Gabim" 29 | }, 30 | "nplurals=2; plural=(n != 1);"); 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: You have a neat idea that should be implemented? 3 | labels: ["enhancement", "0. Needs triage"] 4 | body: 5 | - type: textarea 6 | id: description-problem 7 | attributes: 8 | label: Is your feature request related to a problem? Please describe. 9 | description: | 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | - type: textarea 12 | id: description-solution 13 | attributes: 14 | label: Describe the solution you'd like 15 | description: | 16 | A clear and concise description of what you want to happen. 17 | - type: textarea 18 | id: additional-context 19 | attributes: 20 | label: Additional context 21 | description: | 22 | Add any other context or screenshots about the feature request here. 23 | -------------------------------------------------------------------------------- /l10n/es_419.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Data" : "Datos", 7 | "Category" : "Categoría", 8 | "Date" : "Fecha", 9 | "Other" : "Otro", 10 | "Good" : "Buena", 11 | "Bad" : "Malo", 12 | "Comment" : "Comentario", 13 | "Activity" : "Actividad", 14 | "None" : "Ninguno", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Configuraciones generales", 18 | "Name" : "Nombre", 19 | "Delete" : "Borrar", 20 | "Information" : "Información", 21 | "Group" : "Grupo", 22 | "Can edit" : "Puede editar", 23 | "Strong" : "Fuerte", 24 | "Last 24 hours" : "Últimas 24 horas", 25 | "Today" : "Hoy", 26 | "Actions" : "Acciones", 27 | "Cancel" : "Cancelar" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_CO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Data" : "Datos", 7 | "Category" : "Categoría", 8 | "Date" : "Fecha", 9 | "Other" : "Otro", 10 | "Good" : "Buena", 11 | "Bad" : "Malo", 12 | "Comment" : "Comentario", 13 | "Activity" : "Actividad", 14 | "None" : "Ninguno", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Configuraciones generales", 18 | "Name" : "Nombre", 19 | "Delete" : "Borrar", 20 | "Information" : "Información", 21 | "Group" : "Grupo", 22 | "Can edit" : "Puede editar", 23 | "Strong" : "Fuerte", 24 | "Last 24 hours" : "Últimas 24 horas", 25 | "Today" : "Hoy", 26 | "Actions" : "Acciones", 27 | "Cancel" : "Cancelar" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_DO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_GT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_HN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_NI.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_PA.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_PE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_PR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_PY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_SV.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_UY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Comment" : "Comentario", 12 | "Activity" : "Actividad", 13 | "None" : "Ninguno", 14 | "Normal" : "Normal", 15 | "Temperature" : "Temperatura", 16 | "General settings" : "Configuraciones generales", 17 | "Name" : "Nombre", 18 | "Delete" : "Borrar", 19 | "Information" : "Información", 20 | "Group" : "Grupo", 21 | "Can edit" : "Puede editar", 22 | "Strong" : "Fuerte", 23 | "Last 24 hours" : "Últimas 24 horas", 24 | "Today" : "Hoy", 25 | "Actions" : "Acciones", 26 | "Cancel" : "Cancelar", 27 | "Error" : "Error" 28 | }, 29 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 30 | -------------------------------------------------------------------------------- /l10n/es_CL.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Data" : "Datos", 5 | "Category" : "Categoría", 6 | "Date" : "Fecha", 7 | "Other" : "Otro", 8 | "Good" : "Buena", 9 | "Bad" : "Malo", 10 | "Comment" : "Comentario", 11 | "Activity" : "Actividad", 12 | "None" : "Ninguno", 13 | "Normal" : "Normal", 14 | "Temperature" : "Temperatura", 15 | "General settings" : "Configuraciones generales", 16 | "Name" : "Nombre", 17 | "Delete" : "Borrar", 18 | "Information" : "Información", 19 | "Group" : "Grupo", 20 | "Can edit" : "Puede editar", 21 | "Strong" : "Fuerte", 22 | "Last 24 hours" : "Últimas 24 horas", 23 | "Today" : "Hoy", 24 | "Actions" : "Acciones", 25 | "Cancel" : "Cancelar", 26 | "Error" : "Error" 27 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 28 | } -------------------------------------------------------------------------------- /l10n/es_CR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Data" : "Datos", 5 | "Category" : "Categoría", 6 | "Date" : "Fecha", 7 | "Other" : "Otro", 8 | "Good" : "Buena", 9 | "Bad" : "Malo", 10 | "Comment" : "Comentario", 11 | "Activity" : "Actividad", 12 | "None" : "Ninguno", 13 | "Normal" : "Normal", 14 | "Temperature" : "Temperatura", 15 | "General settings" : "Configuraciones generales", 16 | "Name" : "Nombre", 17 | "Delete" : "Borrar", 18 | "Information" : "Información", 19 | "Group" : "Grupo", 20 | "Can edit" : "Puede editar", 21 | "Strong" : "Fuerte", 22 | "Last 24 hours" : "Últimas 24 horas", 23 | "Today" : "Hoy", 24 | "Actions" : "Acciones", 25 | "Cancel" : "Cancelar", 26 | "Error" : "Error" 27 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 28 | } -------------------------------------------------------------------------------- /l10n/es_CL.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Data" : "Datos", 7 | "Category" : "Categoría", 8 | "Date" : "Fecha", 9 | "Other" : "Otro", 10 | "Good" : "Buena", 11 | "Bad" : "Malo", 12 | "Comment" : "Comentario", 13 | "Activity" : "Actividad", 14 | "None" : "Ninguno", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Configuraciones generales", 18 | "Name" : "Nombre", 19 | "Delete" : "Borrar", 20 | "Information" : "Información", 21 | "Group" : "Grupo", 22 | "Can edit" : "Puede editar", 23 | "Strong" : "Fuerte", 24 | "Last 24 hours" : "Últimas 24 horas", 25 | "Today" : "Hoy", 26 | "Actions" : "Acciones", 27 | "Cancel" : "Cancelar", 28 | "Error" : "Error" 29 | }, 30 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 31 | -------------------------------------------------------------------------------- /l10n/es_CR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Data" : "Datos", 7 | "Category" : "Categoría", 8 | "Date" : "Fecha", 9 | "Other" : "Otro", 10 | "Good" : "Buena", 11 | "Bad" : "Malo", 12 | "Comment" : "Comentario", 13 | "Activity" : "Actividad", 14 | "None" : "Ninguno", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Configuraciones generales", 18 | "Name" : "Nombre", 19 | "Delete" : "Borrar", 20 | "Information" : "Información", 21 | "Group" : "Grupo", 22 | "Can edit" : "Puede editar", 23 | "Strong" : "Fuerte", 24 | "Last 24 hours" : "Últimas 24 horas", 25 | "Today" : "Hoy", 26 | "Actions" : "Acciones", 27 | "Cancel" : "Cancelar", 28 | "Error" : "Error" 29 | }, 30 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 31 | -------------------------------------------------------------------------------- /l10n/uz.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Ulashish", 3 | "Activities" : "Activities", 4 | "Duration" : "Davomiyligi", 5 | "Chart" : "Grafik", 6 | "Data" : "Ma'lumotlar", 7 | "Column selection" : "Ustunni tanlash", 8 | "Category" : "Kategoriya", 9 | "Date" : "Sana", 10 | "Other" : "Boshqa", 11 | "Medium" : "O'rta", 12 | "Comment" : "Izoh", 13 | "Activity" : "Faollik", 14 | "None" : "Yo'q", 15 | "Normal" : "Oddiy", 16 | "Name" : "Name", 17 | "Show details" : "Tafsilotlarni ko'rsatish", 18 | "Delete" : "O'chirish", 19 | "Can edit" : "Can edit", 20 | "in {unit}" : " {unit} da", 21 | "Last week" : "O`tgan yil", 22 | "Last month" : "Oxirgi oy", 23 | "Last year" : "O`tgan yil", 24 | "Show all" : "Hammasini ko'rsatish", 25 | "Today" : "Today", 26 | "Actions" : "Actions", 27 | "Edit {entityName}" : " {entityName}ni tahrirlash", 28 | "Cancel" : "Bekor qilish", 29 | "Error" : "Xatolik" 30 | },"pluralForm" :"nplurals=1; plural=0;" 31 | } -------------------------------------------------------------------------------- /l10n/uz.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Ulashish", 5 | "Activities" : "Activities", 6 | "Duration" : "Davomiyligi", 7 | "Chart" : "Grafik", 8 | "Data" : "Ma'lumotlar", 9 | "Column selection" : "Ustunni tanlash", 10 | "Category" : "Kategoriya", 11 | "Date" : "Sana", 12 | "Other" : "Boshqa", 13 | "Medium" : "O'rta", 14 | "Comment" : "Izoh", 15 | "Activity" : "Faollik", 16 | "None" : "Yo'q", 17 | "Normal" : "Oddiy", 18 | "Name" : "Name", 19 | "Show details" : "Tafsilotlarni ko'rsatish", 20 | "Delete" : "O'chirish", 21 | "Can edit" : "Can edit", 22 | "in {unit}" : " {unit} da", 23 | "Last week" : "O`tgan yil", 24 | "Last month" : "Oxirgi oy", 25 | "Last year" : "O`tgan yil", 26 | "Show all" : "Hammasini ko'rsatish", 27 | "Today" : "Today", 28 | "Actions" : "Actions", 29 | "Edit {entityName}" : " {entityName}ni tahrirlash", 30 | "Cancel" : "Bekor qilish", 31 | "Error" : "Xatolik" 32 | }, 33 | "nplurals=1; plural=0;"); 34 | -------------------------------------------------------------------------------- /.github/workflows/lint-info-xml.yml: -------------------------------------------------------------------------------- 1 | # This workflow is provided via the organization template repository 2 | # 3 | # https://github.com/nextcloud/.github 4 | # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization 5 | 6 | name: Lint info.xml 7 | 8 | on: pull_request 9 | 10 | permissions: 11 | contents: read 12 | 13 | concurrency: 14 | group: lint-info-xml-${{ github.head_ref || github.run_id }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | xml-linters: 19 | runs-on: ubuntu-latest 20 | 21 | name: info.xml lint 22 | steps: 23 | - name: Checkout 24 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 25 | 26 | - name: Download schema 27 | run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd 28 | 29 | - name: Lint info.xml 30 | uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2 31 | with: 32 | xml-file: ./appinfo/info.xml 33 | xml-schema-file: ./info.xsd 34 | -------------------------------------------------------------------------------- /l10n/oc.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Santat", 3 | "Share" : "Partejar", 4 | "Activities" : "Activitats", 5 | "Duration" : "Durada", 6 | "Intensity" : "Intensitat", 7 | "Distance" : "Distància", 8 | "Category" : "Categoria", 9 | "Date" : "Data", 10 | "kcal" : "kcal", 11 | "Other" : "Autre", 12 | "Good" : "Bon", 13 | "Bad" : "Marrit", 14 | "Comment" : "Comentaris", 15 | "Activity" : "Activitat", 16 | "None" : "Cap", 17 | "Normal" : "Normala", 18 | "General settings" : "Paramètres generals", 19 | "Name" : "Nom", 20 | "Edit name" : "Modificar lo nom", 21 | "Show details" : "Mostrar detalhs", 22 | "Delete" : "Suprimir", 23 | "Information" : "Informacions", 24 | "Group" : "Grop", 25 | "Can edit" : "Pòt modificar", 26 | "Last week" : "La setmana passada", 27 | "Last month" : "Lo mes passat", 28 | "Show all" : "O veire tot", 29 | "Today" : "Uèi", 30 | "Actions" : "Accions", 31 | "Download (CSV)" : "Telecargar (CSV)", 32 | "Cancel" : "Anullar", 33 | "Error" : "Error" 34 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 35 | } -------------------------------------------------------------------------------- /l10n/es_AR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Activities" : "Actividades", 4 | "Chart" : "Gráfico", 5 | "Data" : "Dato", 6 | "Category" : "Categoría", 7 | "Date" : "Fecha", 8 | "Other" : "Otro", 9 | "Good" : "Buena", 10 | "Bad" : "Malo", 11 | "Medium" : "Medio", 12 | "Comment" : "Comentario", 13 | "Activity" : "Actividad", 14 | "None" : "Ninguno", 15 | "Normal" : "Normal", 16 | "Temperature" : "Temperatura", 17 | "General settings" : "Configuraciones generales", 18 | "Name" : "Nombre", 19 | "Edit name" : "Editar nombre", 20 | "Show details" : "Mostrar detalles", 21 | "Delete" : "Eliminar", 22 | "Information" : "Información", 23 | "Group" : "Grupo", 24 | "Can edit" : "Puede editar", 25 | "Strong" : "Fuerte", 26 | "Last week" : "Semana pasada", 27 | "Last month" : "Mes pasado", 28 | "Last 24 hours" : "Últimas 24 horas", 29 | "Today" : "Hoy", 30 | "Actions" : "Acciones", 31 | "Cancel" : "Cancelar", 32 | "Error" : "Error" 33 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 34 | } -------------------------------------------------------------------------------- /l10n/br.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Yec'hed", 3 | "Share" : "Rannan", 4 | "Activities" : "Oberiantizoù", 5 | "Date" : "Deiz", 6 | "Running" : "O redek", 7 | "Job" : "Labour", 8 | "Biking" : "Marc'h-houarn", 9 | "Other" : "All", 10 | "Comment" : "Displegadenn", 11 | "Activity" : "Obererezh", 12 | "None" : "Hini ebet", 13 | "General settings" : "Stummoù hollek", 14 | "Name" : "Anv", 15 | "Edit name" : "Embann an anv", 16 | "Show details" : "Diskouel ar munudoù", 17 | "Delete" : "Dilemel", 18 | "Information" : "Titouroù", 19 | "Group" : "Stollad", 20 | "Can edit" : "Posuple eo embann", 21 | "in {unit}" : "e {unit}", 22 | "Today" : "Hiziv", 23 | "Actions" : "Oberoù", 24 | "Cancel" : "Nullañ", 25 | "Error" : "Fazi" 26 | },"pluralForm" :"nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);" 27 | } -------------------------------------------------------------------------------- /l10n/oc.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Santat", 5 | "Share" : "Partejar", 6 | "Activities" : "Activitats", 7 | "Duration" : "Durada", 8 | "Intensity" : "Intensitat", 9 | "Distance" : "Distància", 10 | "Category" : "Categoria", 11 | "Date" : "Data", 12 | "kcal" : "kcal", 13 | "Other" : "Autre", 14 | "Good" : "Bon", 15 | "Bad" : "Marrit", 16 | "Comment" : "Comentaris", 17 | "Activity" : "Activitat", 18 | "None" : "Cap", 19 | "Normal" : "Normala", 20 | "General settings" : "Paramètres generals", 21 | "Name" : "Nom", 22 | "Edit name" : "Modificar lo nom", 23 | "Show details" : "Mostrar detalhs", 24 | "Delete" : "Suprimir", 25 | "Information" : "Informacions", 26 | "Group" : "Grop", 27 | "Can edit" : "Pòt modificar", 28 | "Last week" : "La setmana passada", 29 | "Last month" : "Lo mes passat", 30 | "Show all" : "O veire tot", 31 | "Today" : "Uèi", 32 | "Actions" : "Accions", 33 | "Download (CSV)" : "Telecargar (CSV)", 34 | "Cancel" : "Anullar", 35 | "Error" : "Error" 36 | }, 37 | "nplurals=2; plural=(n > 1);"); 38 | -------------------------------------------------------------------------------- /l10n/es_AR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Activities" : "Actividades", 6 | "Chart" : "Gráfico", 7 | "Data" : "Dato", 8 | "Category" : "Categoría", 9 | "Date" : "Fecha", 10 | "Other" : "Otro", 11 | "Good" : "Buena", 12 | "Bad" : "Malo", 13 | "Medium" : "Medio", 14 | "Comment" : "Comentario", 15 | "Activity" : "Actividad", 16 | "None" : "Ninguno", 17 | "Normal" : "Normal", 18 | "Temperature" : "Temperatura", 19 | "General settings" : "Configuraciones generales", 20 | "Name" : "Nombre", 21 | "Edit name" : "Editar nombre", 22 | "Show details" : "Mostrar detalles", 23 | "Delete" : "Eliminar", 24 | "Information" : "Información", 25 | "Group" : "Grupo", 26 | "Can edit" : "Puede editar", 27 | "Strong" : "Fuerte", 28 | "Last week" : "Semana pasada", 29 | "Last month" : "Mes pasado", 30 | "Last 24 hours" : "Últimas 24 horas", 31 | "Today" : "Hoy", 32 | "Actions" : "Acciones", 33 | "Cancel" : "Cancelar", 34 | "Error" : "Error" 35 | }, 36 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 37 | -------------------------------------------------------------------------------- /l10n/lv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Veselība", 3 | "Share" : "Koplietot", 4 | "Activities" : "Darbības", 5 | "Duration" : "Ilgums", 6 | "Data" : "Dati", 7 | "Category" : "Kategorija", 8 | "Date" : "Datums", 9 | "Running" : "Skriešana", 10 | "Biking" : "Braukšana ar velosipēdu", 11 | "Driving" : "Braukšana", 12 | "Other" : "Cits", 13 | "Good" : "Labs", 14 | "Bad" : "Slikts", 15 | "Comment" : "Piebilde", 16 | "Activity" : "Darbības", 17 | "None" : "Nav", 18 | "Temperature" : "Temperatūra", 19 | "General settings" : "Vispārīgi iestatījumi", 20 | "Name" : "Vārds", 21 | "Show details" : "Rādīt informāciju", 22 | "Delete" : "Izdzēst", 23 | "Information" : "Informācija", 24 | "Group" : "Grupa", 25 | "Can edit" : "Var labot", 26 | "Quality" : "Kvalitāte", 27 | "Strong" : "Stipra", 28 | "in {unit}" : "{unit}", 29 | "Last 24 hours" : "Pēdējās 24 stundas", 30 | "Today" : "Šodien", 31 | "Actions" : "Darbības", 32 | "Cancel" : "Atcelt", 33 | "Error" : "Kļūda" 34 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" 35 | } -------------------------------------------------------------------------------- /l10n/br.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Yec'hed", 5 | "Share" : "Rannan", 6 | "Activities" : "Oberiantizoù", 7 | "Date" : "Deiz", 8 | "Running" : "O redek", 9 | "Job" : "Labour", 10 | "Biking" : "Marc'h-houarn", 11 | "Other" : "All", 12 | "Comment" : "Displegadenn", 13 | "Activity" : "Obererezh", 14 | "None" : "Hini ebet", 15 | "General settings" : "Stummoù hollek", 16 | "Name" : "Anv", 17 | "Edit name" : "Embann an anv", 18 | "Show details" : "Diskouel ar munudoù", 19 | "Delete" : "Dilemel", 20 | "Information" : "Titouroù", 21 | "Group" : "Stollad", 22 | "Can edit" : "Posuple eo embann", 23 | "in {unit}" : "e {unit}", 24 | "Today" : "Hiziv", 25 | "Actions" : "Oberoù", 26 | "Cancel" : "Nullañ", 27 | "Error" : "Fazi" 28 | }, 29 | "nplurals=5; plural=((n%10 == 1) && (n%100 != 11) && (n%100 !=71) && (n%100 !=91) ? 0 :(n%10 == 2) && (n%100 != 12) && (n%100 !=72) && (n%100 !=92) ? 1 :(n%10 ==3 || n%10==4 || n%10==9) && (n%100 < 10 || n% 100 > 19) && (n%100 < 70 || n%100 > 79) && (n%100 < 90 || n%100 > 99) ? 2 :(n != 0 && n % 1000000 == 0) ? 3 : 4);"); 30 | -------------------------------------------------------------------------------- /l10n/lv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Veselība", 5 | "Share" : "Koplietot", 6 | "Activities" : "Darbības", 7 | "Duration" : "Ilgums", 8 | "Data" : "Dati", 9 | "Category" : "Kategorija", 10 | "Date" : "Datums", 11 | "Running" : "Skriešana", 12 | "Biking" : "Braukšana ar velosipēdu", 13 | "Driving" : "Braukšana", 14 | "Other" : "Cits", 15 | "Good" : "Labs", 16 | "Bad" : "Slikts", 17 | "Comment" : "Piebilde", 18 | "Activity" : "Darbības", 19 | "None" : "Nav", 20 | "Temperature" : "Temperatūra", 21 | "General settings" : "Vispārīgi iestatījumi", 22 | "Name" : "Vārds", 23 | "Show details" : "Rādīt informāciju", 24 | "Delete" : "Izdzēst", 25 | "Information" : "Informācija", 26 | "Group" : "Grupa", 27 | "Can edit" : "Var labot", 28 | "Quality" : "Kvalitāte", 29 | "Strong" : "Stipra", 30 | "in {unit}" : "{unit}", 31 | "Last 24 hours" : "Pēdējās 24 stundas", 32 | "Today" : "Šodien", 33 | "Actions" : "Darbības", 34 | "Cancel" : "Atcelt", 35 | "Error" : "Kļūda" 36 | }, 37 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); 38 | -------------------------------------------------------------------------------- /.github/workflows/lint-php-cs.yml: -------------------------------------------------------------------------------- 1 | # This workflow is provided via the organization template repository 2 | # 3 | # https://github.com/nextcloud/.github 4 | # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization 5 | 6 | name: Lint php-cs 7 | 8 | on: pull_request 9 | 10 | permissions: 11 | contents: read 12 | 13 | concurrency: 14 | group: lint-php-cs-${{ github.head_ref || github.run_id }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | lint: 19 | runs-on: ubuntu-latest 20 | 21 | name: php-cs 22 | 23 | steps: 24 | - name: Checkout 25 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 26 | 27 | - name: Set up php8.2 28 | uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 29 | with: 30 | php-version: 8.2 31 | coverage: none 32 | ini-file: development 33 | env: 34 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 35 | 36 | - name: Install dependencies 37 | run: composer i 38 | 39 | - name: Lint 40 | run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) 41 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2020 Florian Steffens 3 | * 4 | * @author Florian Steffens 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import Vue from 'vue' 24 | import Vuex from 'vuex' 25 | import store from './store/store' 26 | import App from './App' 27 | 28 | Vue.use(Vuex) 29 | Vue.mixin({ methods: { t, n } }) 30 | 31 | export default new Vue({ 32 | el: '#content', 33 | store, 34 | render: h => h(App), 35 | }) 36 | -------------------------------------------------------------------------------- /l10n/id.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Bagikan", 3 | "Activities" : "Aktivitas", 4 | "Data" : "Data", 5 | "Column selection" : "Seleksi kolom", 6 | "Category" : "Kategori", 7 | "Date" : "Date", 8 | "Other" : "Lainnya", 9 | "Good" : "Bagus", 10 | "Bad" : "Buruk", 11 | "Medium" : "Sedang", 12 | "Comment" : "Komentar", 13 | "Activity" : "Aktivitas", 14 | "None" : "Tidak ada", 15 | "Normal" : "Normal", 16 | "Temperature" : "Suhu", 17 | "Values" : "Nilai", 18 | "Name" : "Nama", 19 | "Edit name" : "Edit nama", 20 | "Show details" : "Tampilkan detail", 21 | "Delete" : "Hapus", 22 | "Information" : "Informasi", 23 | "Donations" : "Donasi", 24 | "Height" : "Tinggi", 25 | "Group" : "Grup", 26 | "Can edit" : "Can edit", 27 | "Can manage" : "Dapat mengelola", 28 | "Quality" : "Kualitas", 29 | "Last week" : "Minggu lalu", 30 | "Last month" : "Bulan lalu", 31 | "Show all" : "Lihat semua", 32 | "Last 12 hours" : "12 jam lalu", 33 | "Last 24 hours" : "24 Jam lalu", 34 | "Today" : "Hari ini", 35 | "Actions" : "Tindakan", 36 | "Cancel" : "Membatalkan", 37 | "Error" : "Galat" 38 | },"pluralForm" :"nplurals=1; plural=0;" 39 | } -------------------------------------------------------------------------------- /l10n/id.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Bagikan", 5 | "Activities" : "Aktivitas", 6 | "Data" : "Data", 7 | "Column selection" : "Seleksi kolom", 8 | "Category" : "Kategori", 9 | "Date" : "Date", 10 | "Other" : "Lainnya", 11 | "Good" : "Bagus", 12 | "Bad" : "Buruk", 13 | "Medium" : "Sedang", 14 | "Comment" : "Komentar", 15 | "Activity" : "Aktivitas", 16 | "None" : "Tidak ada", 17 | "Normal" : "Normal", 18 | "Temperature" : "Suhu", 19 | "Values" : "Nilai", 20 | "Name" : "Nama", 21 | "Edit name" : "Edit nama", 22 | "Show details" : "Tampilkan detail", 23 | "Delete" : "Hapus", 24 | "Information" : "Informasi", 25 | "Donations" : "Donasi", 26 | "Height" : "Tinggi", 27 | "Group" : "Grup", 28 | "Can edit" : "Can edit", 29 | "Can manage" : "Dapat mengelola", 30 | "Quality" : "Kualitas", 31 | "Last week" : "Minggu lalu", 32 | "Last month" : "Bulan lalu", 33 | "Show all" : "Lihat semua", 34 | "Last 12 hours" : "12 jam lalu", 35 | "Last 24 hours" : "24 Jam lalu", 36 | "Today" : "Hari ini", 37 | "Actions" : "Tindakan", 38 | "Cancel" : "Membatalkan", 39 | "Error" : "Galat" 40 | }, 41 | "nplurals=1; plural=0;"); 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: Bug 2 | description: Have you encountered a bug? Submit a report and help us improve Nextcloud health. 3 | labels: ["bug", "0. Needs triage"] 4 | body: 5 | - type: textarea 6 | id: reproduce 7 | attributes: 8 | label: Steps to reproduce 9 | description: | 10 | Describe the steps to reproduce the bug. 11 | The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ answer. 12 | value: | 13 | 1. 14 | 2. 15 | 3. 16 | validations: 17 | required: true 18 | - type: textarea 19 | id: expected-behavior 20 | attributes: 21 | label: Expected behavior 22 | description: Tell us what should happen 23 | - type: textarea 24 | id: actual-behavior 25 | attributes: 26 | label: Actual behavior 27 | description: Tell us what happens instead 28 | - type: input 29 | id: health-app-version 30 | attributes: 31 | label: Health app version 32 | description: See apps admin page, e.g. 0.5.3 33 | - type: textarea 34 | id: additional-info 35 | attributes: 36 | label: Additional info 37 | description: Any additional information related to the issue (ex. screenshots, browser console errors, software versions, db backend, php version, ...). 38 | -------------------------------------------------------------------------------- /l10n/ast.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Compartir", 3 | "Weight" : "Pesu", 4 | "Activities" : "Actividaes", 5 | "Duration" : "Duración", 6 | "Distance" : "Distancia", 7 | "Data" : "Datos", 8 | "Category" : "Categoría", 9 | "Date" : "Data", 10 | "Good" : "Bien", 11 | "Bad" : "Mal", 12 | "Comment" : "Comentariu", 13 | "Activity" : "Actividá", 14 | "Energy" : "Enerxía", 15 | "None" : "Nada", 16 | "Normal" : "Normal", 17 | "Temperature" : "Temperatura", 18 | "General settings" : "Configuración xeneral", 19 | "Name" : "Nome", 20 | "Identifier" : "Identificador", 21 | "Edit name" : "Editar el nome", 22 | "Show details" : "Amosar los detalles", 23 | "Delete" : "Desaniciar", 24 | "Information" : "Información", 25 | "Age" : "Edá", 26 | "Height" : "Altor", 27 | "Group" : "Grupu", 28 | "Can edit" : "Pue editar", 29 | "Quality" : "Calidá", 30 | "BMI" : "IMC", 31 | "Body fat" : "Grasa corporal", 32 | "Last week" : "La selmana anterior", 33 | "Last month" : "El mes anterior", 34 | "Last year" : "L'añu pasáu", 35 | "Today" : "Güei", 36 | "Item" : "Elementu", 37 | "Actions" : "Aiciones", 38 | "Cancel" : "Encaboxar", 39 | "Error" : "Error", 40 | "Underweight" : "Infrapesu" 41 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 42 | } -------------------------------------------------------------------------------- /l10n/ast.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Compartir", 5 | "Weight" : "Pesu", 6 | "Activities" : "Actividaes", 7 | "Duration" : "Duración", 8 | "Distance" : "Distancia", 9 | "Data" : "Datos", 10 | "Category" : "Categoría", 11 | "Date" : "Data", 12 | "Good" : "Bien", 13 | "Bad" : "Mal", 14 | "Comment" : "Comentariu", 15 | "Activity" : "Actividá", 16 | "Energy" : "Enerxía", 17 | "None" : "Nada", 18 | "Normal" : "Normal", 19 | "Temperature" : "Temperatura", 20 | "General settings" : "Configuración xeneral", 21 | "Name" : "Nome", 22 | "Identifier" : "Identificador", 23 | "Edit name" : "Editar el nome", 24 | "Show details" : "Amosar los detalles", 25 | "Delete" : "Desaniciar", 26 | "Information" : "Información", 27 | "Age" : "Edá", 28 | "Height" : "Altor", 29 | "Group" : "Grupu", 30 | "Can edit" : "Pue editar", 31 | "Quality" : "Calidá", 32 | "BMI" : "IMC", 33 | "Body fat" : "Grasa corporal", 34 | "Last week" : "La selmana anterior", 35 | "Last month" : "El mes anterior", 36 | "Last year" : "L'añu pasáu", 37 | "Today" : "Güei", 38 | "Item" : "Elementu", 39 | "Actions" : "Aiciones", 40 | "Cancel" : "Encaboxar", 41 | "Error" : "Error", 42 | "Underweight" : "Infrapesu" 43 | }, 44 | "nplurals=2; plural=(n != 1);"); 45 | -------------------------------------------------------------------------------- /l10n/ka.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Health", 3 | "Share" : "Share", 4 | "Activities" : "Activities", 5 | "Duration" : "Duration", 6 | "Distance" : "Distance", 7 | "Data" : "მონაცემები", 8 | "Category" : "Category", 9 | "Date" : "Date", 10 | "Running" : "Running", 11 | "Biking" : "Biking", 12 | "Driving" : "Driving", 13 | "Other" : "Other", 14 | "Good" : "Good", 15 | "Bad" : "Bad", 16 | "Medium" : "Medium", 17 | "Comment" : "Comment", 18 | "Activity" : "Activity", 19 | "None" : "None", 20 | "Normal" : "Normal", 21 | "Temperature" : "Temperature", 22 | "General settings" : "General settings", 23 | "Name" : "Name", 24 | "Identifier" : "Identifier", 25 | "Edit name" : "Edit name", 26 | "Show details" : "Show details", 27 | "Delete" : "Delete", 28 | "Failed to create share with {displayName}" : "Failed to create share with {displayName}", 29 | "No participants found" : "No participants found", 30 | "Group" : "Group", 31 | "Can edit" : "Can edit", 32 | "Can manage" : "Can manage", 33 | "Strong" : "Strong", 34 | "Last week" : "Last week", 35 | "Last month" : "Last month", 36 | "Last year" : "Last year", 37 | "Today" : "Today", 38 | "Actions" : "Actions", 39 | "Cancel" : "Cancel", 40 | "Error" : "Error" 41 | },"pluralForm" :"nplurals=2; plural=(n!=1);" 42 | } -------------------------------------------------------------------------------- /l10n/ro.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Sănătate", 3 | "Share" : "Partajează", 4 | "Activities" : "Activități", 5 | "Duration" : "Durată", 6 | "Data" : "Date", 7 | "Category" : "Categorie", 8 | "Date" : "Date", 9 | "Running" : "Alergat", 10 | "Job" : "Job", 11 | "Biking" : "Ciclism", 12 | "Driving" : "Conducere", 13 | "Other" : "Altele", 14 | "Good" : "Bun", 15 | "Bad" : "Greșit", 16 | "Medium" : "Mediu", 17 | "Comment" : "Comentariu", 18 | "Activity" : "Activitate", 19 | "None" : "Niciuna", 20 | "Normal" : "Normal", 21 | "Name" : "Nume", 22 | "Edit name" : "Modifică numele", 23 | "Show details" : "Arată detaliile", 24 | "Delete" : "Șterge", 25 | "Information" : "Informații", 26 | "Failed to create share with {displayName}" : "Nu s-a creat partajarea cu {displayName}", 27 | "No participants found" : "Nu s-au găsit participanți", 28 | "Group" : "Grup", 29 | "Can edit" : "Poate edita", 30 | "Can manage" : "Poate administra", 31 | "Quality" : "Calitatea", 32 | "Last week" : "Săptămâna trecută ", 33 | "Last month" : "Luna trecută ", 34 | "Last year" : "Anul trecut", 35 | "Today" : "Astăzi", 36 | "Actions" : "Acțiuni", 37 | "Cancel" : "Anulare", 38 | "Error" : "Eroare" 39 | },"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));" 40 | } -------------------------------------------------------------------------------- /l10n/ka.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Health", 5 | "Share" : "Share", 6 | "Activities" : "Activities", 7 | "Duration" : "Duration", 8 | "Distance" : "Distance", 9 | "Data" : "მონაცემები", 10 | "Category" : "Category", 11 | "Date" : "Date", 12 | "Running" : "Running", 13 | "Biking" : "Biking", 14 | "Driving" : "Driving", 15 | "Other" : "Other", 16 | "Good" : "Good", 17 | "Bad" : "Bad", 18 | "Medium" : "Medium", 19 | "Comment" : "Comment", 20 | "Activity" : "Activity", 21 | "None" : "None", 22 | "Normal" : "Normal", 23 | "Temperature" : "Temperature", 24 | "General settings" : "General settings", 25 | "Name" : "Name", 26 | "Identifier" : "Identifier", 27 | "Edit name" : "Edit name", 28 | "Show details" : "Show details", 29 | "Delete" : "Delete", 30 | "Failed to create share with {displayName}" : "Failed to create share with {displayName}", 31 | "No participants found" : "No participants found", 32 | "Group" : "Group", 33 | "Can edit" : "Can edit", 34 | "Can manage" : "Can manage", 35 | "Strong" : "Strong", 36 | "Last week" : "Last week", 37 | "Last month" : "Last month", 38 | "Last year" : "Last year", 39 | "Today" : "Today", 40 | "Actions" : "Actions", 41 | "Cancel" : "Cancel", 42 | "Error" : "Error" 43 | }, 44 | "nplurals=2; plural=(n!=1);"); 45 | -------------------------------------------------------------------------------- /l10n/ro.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Sănătate", 5 | "Share" : "Partajează", 6 | "Activities" : "Activități", 7 | "Duration" : "Durată", 8 | "Data" : "Date", 9 | "Category" : "Categorie", 10 | "Date" : "Date", 11 | "Running" : "Alergat", 12 | "Job" : "Job", 13 | "Biking" : "Ciclism", 14 | "Driving" : "Conducere", 15 | "Other" : "Altele", 16 | "Good" : "Bun", 17 | "Bad" : "Greșit", 18 | "Medium" : "Mediu", 19 | "Comment" : "Comentariu", 20 | "Activity" : "Activitate", 21 | "None" : "Niciuna", 22 | "Normal" : "Normal", 23 | "Name" : "Nume", 24 | "Edit name" : "Modifică numele", 25 | "Show details" : "Arată detaliile", 26 | "Delete" : "Șterge", 27 | "Information" : "Informații", 28 | "Failed to create share with {displayName}" : "Nu s-a creat partajarea cu {displayName}", 29 | "No participants found" : "Nu s-au găsit participanți", 30 | "Group" : "Grup", 31 | "Can edit" : "Poate edita", 32 | "Can manage" : "Poate administra", 33 | "Quality" : "Calitatea", 34 | "Last week" : "Săptămâna trecută ", 35 | "Last month" : "Luna trecută ", 36 | "Last year" : "Anul trecut", 37 | "Today" : "Astăzi", 38 | "Actions" : "Acțiuni", 39 | "Cancel" : "Anulare", 40 | "Error" : "Eroare" 41 | }, 42 | "nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); 43 | -------------------------------------------------------------------------------- /l10n/vi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Sức khỏe", 3 | "Share" : "Chia sẻ", 4 | "Weight" : "Cân nặng", 5 | "Activities" : "Hoạt động", 6 | "Duration" : "Khoảng thời gian", 7 | "Data" : "Dữ liệu", 8 | "Category" : "Hạng mục", 9 | "Date" : "Date", 10 | "Running" : "Chạy bộ", 11 | "Biking" : "Đạp xe", 12 | "Driving" : "Lái xe", 13 | "Other" : "Khác", 14 | "Good" : "Tốt", 15 | "Bad" : "Xấu", 16 | "Medium" : "Trung bình", 17 | "Comment" : "Bình luận", 18 | "Activity" : "Hoạt động", 19 | "Energy" : "Năng lượng", 20 | "None" : "Không có", 21 | "Normal" : "Bình thường", 22 | "General settings" : "Cài đặt chung", 23 | "Name" : "Tên", 24 | "Edit name" : "Sửa đổi tên", 25 | "Show details" : "Hiển thị chi tiết", 26 | "Delete" : "Xóa", 27 | "Failed to create share with {displayName}" : "Không thể tạo chia sẻ với {displayName}", 28 | "No participants found" : "Không tìm thấy người tham gia", 29 | "Group" : "Nhóm", 30 | "Can edit" : "Có thể chỉnh sửa", 31 | "Can manage" : "Có thể quản lý", 32 | "Body fat" : "Mỡ cơ thể", 33 | "Last week" : "Tuần trước", 34 | "Last month" : "Tháng trước", 35 | "Last year" : "Năm ngoái", 36 | "Last 24 hours" : "24 giờ trước", 37 | "Today" : "Hôm nay", 38 | "Actions" : "Hành động", 39 | "Cancel" : "Hủy", 40 | "Error" : "Lỗi" 41 | },"pluralForm" :"nplurals=1; plural=0;" 42 | } -------------------------------------------------------------------------------- /l10n/vi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Sức khỏe", 5 | "Share" : "Chia sẻ", 6 | "Weight" : "Cân nặng", 7 | "Activities" : "Hoạt động", 8 | "Duration" : "Khoảng thời gian", 9 | "Data" : "Dữ liệu", 10 | "Category" : "Hạng mục", 11 | "Date" : "Date", 12 | "Running" : "Chạy bộ", 13 | "Biking" : "Đạp xe", 14 | "Driving" : "Lái xe", 15 | "Other" : "Khác", 16 | "Good" : "Tốt", 17 | "Bad" : "Xấu", 18 | "Medium" : "Trung bình", 19 | "Comment" : "Bình luận", 20 | "Activity" : "Hoạt động", 21 | "Energy" : "Năng lượng", 22 | "None" : "Không có", 23 | "Normal" : "Bình thường", 24 | "General settings" : "Cài đặt chung", 25 | "Name" : "Tên", 26 | "Edit name" : "Sửa đổi tên", 27 | "Show details" : "Hiển thị chi tiết", 28 | "Delete" : "Xóa", 29 | "Failed to create share with {displayName}" : "Không thể tạo chia sẻ với {displayName}", 30 | "No participants found" : "Không tìm thấy người tham gia", 31 | "Group" : "Nhóm", 32 | "Can edit" : "Có thể chỉnh sửa", 33 | "Can manage" : "Có thể quản lý", 34 | "Body fat" : "Mỡ cơ thể", 35 | "Last week" : "Tuần trước", 36 | "Last month" : "Tháng trước", 37 | "Last year" : "Năm ngoái", 38 | "Last 24 hours" : "24 giờ trước", 39 | "Today" : "Hôm nay", 40 | "Actions" : "Hành động", 41 | "Cancel" : "Hủy", 42 | "Error" : "Lỗi" 43 | }, 44 | "nplurals=1; plural=0;"); 45 | -------------------------------------------------------------------------------- /l10n/mk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Здравје", 3 | "Share" : "Сподели", 4 | "Activities" : "Активности", 5 | "Duration" : "Времетраење", 6 | "Distance" : "Дистанца", 7 | "Category" : "Категорија", 8 | "Date" : "Датум", 9 | "Running" : "Трчање", 10 | "Biking" : "Велосипедизам", 11 | "Driving" : "Возење", 12 | "Other" : "Останато", 13 | "Good" : "Добро", 14 | "Bad" : "Лошо", 15 | "Comment" : "Коментар", 16 | "Activity" : "Активност", 17 | "None" : "Ништо", 18 | "Temperature" : "Температура", 19 | "General settings" : "Општи параметри", 20 | "Name" : "Име", 21 | "Edit name" : "Уреди име", 22 | "Show details" : "Прикажи детали", 23 | "Delete" : "Избриши", 24 | "Failed to create share with {displayName}" : "Неможе да се сподели со {displayName}", 25 | "No participants found" : "Не се пронајдени учесници", 26 | "Group" : "Група", 27 | "Can edit" : "Може да се уредува", 28 | "Can manage" : "Може да ја менаџира", 29 | "Quality" : "Квалитет", 30 | "_%nh_::_%nh_" : ["%nч","%nч"], 31 | "Last week" : "Минатата недела", 32 | "Last month" : "Минатиот месец", 33 | "Last year" : "Предходна година", 34 | "Show all" : "Прикажи ги сите", 35 | "Last 24 hours" : "Последниве 24 часа", 36 | "Today" : "Денес", 37 | "Actions" : "Акции", 38 | "Cancel" : "Откажи", 39 | "Error" : "Грешка" 40 | },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" 41 | } -------------------------------------------------------------------------------- /l10n/mk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Здравје", 5 | "Share" : "Сподели", 6 | "Activities" : "Активности", 7 | "Duration" : "Времетраење", 8 | "Distance" : "Дистанца", 9 | "Category" : "Категорија", 10 | "Date" : "Датум", 11 | "Running" : "Трчање", 12 | "Biking" : "Велосипедизам", 13 | "Driving" : "Возење", 14 | "Other" : "Останато", 15 | "Good" : "Добро", 16 | "Bad" : "Лошо", 17 | "Comment" : "Коментар", 18 | "Activity" : "Активност", 19 | "None" : "Ништо", 20 | "Temperature" : "Температура", 21 | "General settings" : "Општи параметри", 22 | "Name" : "Име", 23 | "Edit name" : "Уреди име", 24 | "Show details" : "Прикажи детали", 25 | "Delete" : "Избриши", 26 | "Failed to create share with {displayName}" : "Неможе да се сподели со {displayName}", 27 | "No participants found" : "Не се пронајдени учесници", 28 | "Group" : "Група", 29 | "Can edit" : "Може да се уредува", 30 | "Can manage" : "Може да ја менаџира", 31 | "Quality" : "Квалитет", 32 | "_%nh_::_%nh_" : ["%nч","%nч"], 33 | "Last week" : "Минатата недела", 34 | "Last month" : "Минатиот месец", 35 | "Last year" : "Предходна година", 36 | "Show all" : "Прикажи ги сите", 37 | "Last 24 hours" : "Последниве 24 часа", 38 | "Today" : "Денес", 39 | "Actions" : "Акции", 40 | "Cancel" : "Откажи", 41 | "Error" : "Грешка" 42 | }, 43 | "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); 44 | -------------------------------------------------------------------------------- /.github/workflows/lint-php.yml: -------------------------------------------------------------------------------- 1 | # This workflow is provided via the organization template repository 2 | # 3 | # https://github.com/nextcloud/.github 4 | # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization 5 | 6 | name: Lint php 7 | 8 | on: pull_request 9 | 10 | permissions: 11 | contents: read 12 | 13 | concurrency: 14 | group: lint-php-${{ github.head_ref || github.run_id }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | php-lint: 19 | runs-on: ubuntu-latest 20 | strategy: 21 | matrix: 22 | php-versions: [ '8.0', '8.1', '8.2', '8.3' ] 23 | 24 | name: php-lint 25 | 26 | steps: 27 | - name: Checkout 28 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 29 | 30 | - name: Set up php ${{ matrix.php-versions }} 31 | uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 32 | with: 33 | php-version: ${{ matrix.php-versions }} 34 | coverage: none 35 | ini-file: development 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | 39 | - name: Lint 40 | run: composer run lint 41 | 42 | summary: 43 | permissions: 44 | contents: none 45 | runs-on: ubuntu-latest 46 | needs: php-lint 47 | 48 | if: always() 49 | 50 | name: php-lint-summary 51 | 52 | steps: 53 | - name: Summary status 54 | run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi 55 | -------------------------------------------------------------------------------- /lib/Db/MedicationPlan.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Marcus Nitzschke 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class MedicationPlan extends Entity implements JsonSerializable { 31 | 32 | protected $personId; 33 | protected $date; 34 | protected $comment; 35 | 36 | public function __construct() { 37 | $this->addType('id', 'integer'); 38 | $this->addType('personId', 'integer'); 39 | } 40 | 41 | public function jsonSerialize(): array { 42 | return [ 43 | 'id' => $this->id, 44 | 'personId' => $this->personId, 45 | 'date' => $this->date, 46 | 'comment' => $this->comment, 47 | ]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nextcloud/health", 3 | "description": "Lint config for nextcloud/health", 4 | "type": "project", 5 | "license": "AGPL", 6 | "authors": [ 7 | { 8 | "name": "Florian Steffens", 9 | "email": "dev@d10t.de" 10 | } 11 | ], 12 | "config": { 13 | "optimize-autoloader": true, 14 | "classmap-authoritative": true, 15 | "platform": { 16 | "php": "8.1" 17 | } 18 | }, 19 | "scripts": { 20 | "test": [ 21 | "@test:unit" 22 | ], 23 | "test:unit": "./vendor/bin/phpunit -c tests/unit/phpunit.xml", 24 | "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", 25 | "cs:check": "php-cs-fixer fix --dry-run --diff", 26 | "cs:fix": "php-cs-fixer fix", 27 | "psalm": "./vendor/bin/psalm --show-info=true --no-cache", 28 | "psalm:update-baseline": "./vendor/bin/psalm --update-baseline", 29 | "psalm:fix": "./vendor/bin/psalm --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType", 30 | "psalm:fix:dry": "./vendor/bin/psalm --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType --dry-run" 31 | }, 32 | "require": { 33 | "ext-json": "*" 34 | }, 35 | "require-dev": { 36 | "nextcloud/coding-standard": "^v1.0.0", 37 | "vimeo/psalm": "^5.6.0", 38 | "nextcloud/ocp": "dev-master", 39 | "phan/phan": "5.x", 40 | "staabm/annotate-pull-request-from-checkstyle": "^1.8", 41 | "phpunit/phpunit": "^9" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /l10n/be.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Share" : "Абагуліць", 3 | "Weight" : "Вага", 4 | "Activities" : "Актыўнасць", 5 | "Duration" : "Працягласць", 6 | "Data" : "Даныя", 7 | "Category" : "Катэгорыя", 8 | "Date" : "Дата", 9 | "Other" : "Іншае", 10 | "Comment" : "Каментарый", 11 | "Activity" : "Актыўнасць", 12 | "None" : "Няма", 13 | "Name" : "Назва", 14 | "Edit name" : "Рэдагаваць імя", 15 | "Show details" : "Паказаць падрабязнасці", 16 | "Delete" : "Выдаліць", 17 | "Donations" : "Ахвяраванні", 18 | "Age" : "Узрост", 19 | "Sex" : "Пол", 20 | "female" : "жанчына", 21 | "male" : "мужчына", 22 | "Currency" : "Валюта", 23 | "Group" : "Група", 24 | "Can edit" : "Можа рэдагаваць", 25 | "Quality" : "Якасць", 26 | "_%nh_::_%nh_" : ["%n г","%n г","%n г","%n г"], 27 | "in {unit}" : "у {unit}", 28 | "Last week" : "Мінулы тыдзень", 29 | "Last month" : "Мінулы месяц", 30 | "Last year" : "Мінулы год", 31 | "Last hour" : "Апошняя гадзіна", 32 | "Last 4 hours" : "Апошнія 4 гадзіны", 33 | "Last 12 hours" : "Апошнія 12 гадзін", 34 | "Last 24 hours" : "Апошнія 24 гадзіны", 35 | "Last 48 hours" : "Апошнія 48 гадзін", 36 | "Today" : "Сёння", 37 | "Item" : "Элемент", 38 | "Actions" : "Дзеянні", 39 | "Download (CSV)" : "Спампаваць (CSV)", 40 | "Edit {entityName}" : "Рэдагаваць {entityName}", 41 | "Send {eName}" : "Адправіць {eName}", 42 | "Cancel" : "Скасаваць", 43 | "Error" : "Памылка" 44 | },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" 45 | } -------------------------------------------------------------------------------- /l10n/be.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Share" : "Абагуліць", 5 | "Weight" : "Вага", 6 | "Activities" : "Актыўнасць", 7 | "Duration" : "Працягласць", 8 | "Data" : "Даныя", 9 | "Category" : "Катэгорыя", 10 | "Date" : "Дата", 11 | "Other" : "Іншае", 12 | "Comment" : "Каментарый", 13 | "Activity" : "Актыўнасць", 14 | "None" : "Няма", 15 | "Name" : "Назва", 16 | "Edit name" : "Рэдагаваць імя", 17 | "Show details" : "Паказаць падрабязнасці", 18 | "Delete" : "Выдаліць", 19 | "Donations" : "Ахвяраванні", 20 | "Age" : "Узрост", 21 | "Sex" : "Пол", 22 | "female" : "жанчына", 23 | "male" : "мужчына", 24 | "Currency" : "Валюта", 25 | "Group" : "Група", 26 | "Can edit" : "Можа рэдагаваць", 27 | "Quality" : "Якасць", 28 | "_%nh_::_%nh_" : ["%n г","%n г","%n г","%n г"], 29 | "in {unit}" : "у {unit}", 30 | "Last week" : "Мінулы тыдзень", 31 | "Last month" : "Мінулы месяц", 32 | "Last year" : "Мінулы год", 33 | "Last hour" : "Апошняя гадзіна", 34 | "Last 4 hours" : "Апошнія 4 гадзіны", 35 | "Last 12 hours" : "Апошнія 12 гадзін", 36 | "Last 24 hours" : "Апошнія 24 гадзіны", 37 | "Last 48 hours" : "Апошнія 48 гадзін", 38 | "Today" : "Сёння", 39 | "Item" : "Элемент", 40 | "Actions" : "Дзеянні", 41 | "Download (CSV)" : "Спампаваць (CSV)", 42 | "Edit {entityName}" : "Рэдагаваць {entityName}", 43 | "Send {eName}" : "Адправіць {eName}", 44 | "Cancel" : "Скасаваць", 45 | "Error" : "Памылка" 46 | }, 47 | "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); 48 | -------------------------------------------------------------------------------- /l10n/zh_TW.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "健康", 3 | "Share" : "分享", 4 | "Weight" : "重量", 5 | "Activities" : "活動", 6 | "Duration" : "持續時間", 7 | "Distance" : "距離", 8 | "Chart" : "圖表", 9 | "Data" : "資料", 10 | "Column selection" : "欄位選取", 11 | "Category" : "分類", 12 | "Date" : "日期", 13 | "Running" : "跑步", 14 | "Job" : "工作", 15 | "Biking" : "自行車", 16 | "Driving" : "駕駛", 17 | "Other" : "其他", 18 | "Good" : "不錯", 19 | "Bad" : "不佳", 20 | "Medium" : "中", 21 | "Comment" : "留言", 22 | "Activity" : "活動", 23 | "None" : "無", 24 | "Normal" : "一般", 25 | "Temperature" : "氣溫", 26 | "Values" : "值", 27 | "General settings" : "一般設定", 28 | "Name" : "名稱", 29 | "Edit name" : "編輯名稱", 30 | "Show details" : "顯示細節", 31 | "Delete" : "刪除", 32 | "Information" : "資訊", 33 | "Donations" : "捐款", 34 | "Age" : "年齡", 35 | "Height" : "高度", 36 | "Currency" : "貨幣", 37 | "Failed to create share with {displayName}" : "無法建立與 {displayName} 的分享", 38 | "No participants found" : "找不到參與者", 39 | "Group" : "群組", 40 | "Can edit" : "可以編輯", 41 | "Can manage" : "可以管理", 42 | "Quality" : "品質", 43 | "_%nh_::_%nh_" : ["%n小時"], 44 | "BMI" : "BMI", 45 | "Target" : "目標", 46 | "Body fat" : "體脂", 47 | "Last week" : "上週", 48 | "Last month" : "上月", 49 | "Last year" : "去年", 50 | "Show all" : "全部顯示", 51 | "Last hour" : "上個小時", 52 | "Last 24 hours" : "24小時前", 53 | "Today" : "今天", 54 | "Item" : "項目", 55 | "Actions" : "動作", 56 | "Edit {entityName}" : "編輯 {entityName}", 57 | "Cancel" : "取消", 58 | "Error" : "錯誤", 59 | "Could not load editor, text not available." : "無法載入編輯器,文字不可用。", 60 | "Underweight" : "過輕" 61 | },"pluralForm" :"nplurals=1; plural=0;" 62 | } -------------------------------------------------------------------------------- /l10n/ko.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "건강", 3 | "Share" : "공유", 4 | "Weight" : "몸무게", 5 | "Activities" : "활동", 6 | "Duration" : "길이", 7 | "Distance" : "거리", 8 | "Data" : "데이터", 9 | "Column selection" : "열 선택", 10 | "Category" : "분류", 11 | "Date" : "날짜", 12 | "Running" : "달리기", 13 | "Job" : "직업", 14 | "Biking" : "오토바이 타기", 15 | "Driving" : "운전", 16 | "Other" : "기타", 17 | "Good" : "좋음", 18 | "Bad" : "나쁨", 19 | "Low" : "낮음", 20 | "Medium" : "중간", 21 | "High" : "높음", 22 | "Comment" : "설명", 23 | "Activity" : "활동", 24 | "Energy" : "에너지", 25 | "None" : "없음", 26 | "Normal" : "일반", 27 | "Temperature" : "기온", 28 | "Values" : "값", 29 | "General settings" : "일반 설정", 30 | "Name" : "이름", 31 | "Identifier" : "식별자", 32 | "Edit name" : "이름 편집", 33 | "Show details" : "세부 정보", 34 | "Delete" : "삭제", 35 | "Information" : "정보", 36 | "Donations" : "후원", 37 | "Age" : "나이", 38 | "Height" : "신장", 39 | "Failed to create share with {displayName}" : "displayName}과(와) 공유를 생성하지 못했습니다.", 40 | "No participants found" : "참가자를 찾을 수 없음", 41 | "Group" : "그룹", 42 | "Can edit" : "편집 허용", 43 | "Can manage" : "관리 가능", 44 | "Quality" : "품질", 45 | "Moderate" : "중재", 46 | "Strong" : "강함", 47 | "Target" : "대상", 48 | "Body fat" : "신체 지방", 49 | "Last week" : "저번 주", 50 | "Last month" : "저번 달", 51 | "Last year" : "작년", 52 | "Show all" : "모두 보기", 53 | "Last 24 hours" : "지난 24시간", 54 | "Today" : "오늘", 55 | "Item" : "품목", 56 | "Actions" : "동작", 57 | "Cancel" : "취소", 58 | "Error" : "오류", 59 | "Could not load editor, text not available." : "편집기를 불러올 수 없음, 텍스트를 사용할 수 없음", 60 | "Underweight" : "저체중" 61 | },"pluralForm" :"nplurals=1; plural=0;" 62 | } -------------------------------------------------------------------------------- /l10n/sw.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Afya", 3 | "Share" : "Shirikisha", 4 | "Weight" : "Uzito", 5 | "Activities" : "Shughuli", 6 | "Duration" : "Muda", 7 | "Distance" : "Distance", 8 | "Chart" : "Chati", 9 | "Data" : "Data", 10 | "Column selection" : "Column selection", 11 | "Category" : "Kipengele", 12 | "Date" : "Tarehe", 13 | "Running" : "Running", 14 | "Other" : "Mengine", 15 | "Good" : "Nzuri", 16 | "Bad" : "Mbaya", 17 | "Medium" : "Medium", 18 | "Comment" : "Maoni", 19 | "Activity" : "Shughuli", 20 | "Energy" : "Energy", 21 | "None" : "Hakuna", 22 | "Normal" : "Kawaida", 23 | "Temperature" : "Temperature", 24 | "General settings" : "General settings", 25 | "Name" : "Jina", 26 | "Show details" : "Onesha maelezo", 27 | "Delete" : "Futa", 28 | "Information" : "Taarifa", 29 | "Age" : "Age", 30 | "Height" : "Urefu", 31 | "Currency" : "Currency", 32 | "Failed to create share with {displayName}" : "Imeshindwa kutengeneza ushiriki na {displayName}", 33 | "No participants found" : "Hakuna mshiriki aliyepatikana", 34 | "Group" : "Kundi", 35 | "Can edit" : "Inaweza kuhariri", 36 | "Can manage" : "Inaweza kusimamia", 37 | "Quality" : "Quality", 38 | "BMI" : "BMI", 39 | "in {unit}" : "Katika {unit}", 40 | "Last week" : "Wiki iliyopita", 41 | "Last month" : "Mwezi uliopita", 42 | "Last year" : "Mwaka uliopita", 43 | "Show all" : "Show all", 44 | "Last hour" : "Last hour", 45 | "Today" : "Leo", 46 | "Item" : "Kipengele", 47 | "Actions" : "Utendekaji", 48 | "Edit {entityName}" : "Hariri {entityName}", 49 | "Cancel" : "Cancel", 50 | "Error" : "Hitilafu", 51 | "Underweight" : "Underweight" 52 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 53 | } -------------------------------------------------------------------------------- /l10n/zh_TW.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "健康", 5 | "Share" : "分享", 6 | "Weight" : "重量", 7 | "Activities" : "活動", 8 | "Duration" : "持續時間", 9 | "Distance" : "距離", 10 | "Chart" : "圖表", 11 | "Data" : "資料", 12 | "Column selection" : "欄位選取", 13 | "Category" : "分類", 14 | "Date" : "日期", 15 | "Running" : "跑步", 16 | "Job" : "工作", 17 | "Biking" : "自行車", 18 | "Driving" : "駕駛", 19 | "Other" : "其他", 20 | "Good" : "不錯", 21 | "Bad" : "不佳", 22 | "Medium" : "中", 23 | "Comment" : "留言", 24 | "Activity" : "活動", 25 | "None" : "無", 26 | "Normal" : "一般", 27 | "Temperature" : "氣溫", 28 | "Values" : "值", 29 | "General settings" : "一般設定", 30 | "Name" : "名稱", 31 | "Edit name" : "編輯名稱", 32 | "Show details" : "顯示細節", 33 | "Delete" : "刪除", 34 | "Information" : "資訊", 35 | "Donations" : "捐款", 36 | "Age" : "年齡", 37 | "Height" : "高度", 38 | "Currency" : "貨幣", 39 | "Failed to create share with {displayName}" : "無法建立與 {displayName} 的分享", 40 | "No participants found" : "找不到參與者", 41 | "Group" : "群組", 42 | "Can edit" : "可以編輯", 43 | "Can manage" : "可以管理", 44 | "Quality" : "品質", 45 | "_%nh_::_%nh_" : ["%n小時"], 46 | "BMI" : "BMI", 47 | "Target" : "目標", 48 | "Body fat" : "體脂", 49 | "Last week" : "上週", 50 | "Last month" : "上月", 51 | "Last year" : "去年", 52 | "Show all" : "全部顯示", 53 | "Last hour" : "上個小時", 54 | "Last 24 hours" : "24小時前", 55 | "Today" : "今天", 56 | "Item" : "項目", 57 | "Actions" : "動作", 58 | "Edit {entityName}" : "編輯 {entityName}", 59 | "Cancel" : "取消", 60 | "Error" : "錯誤", 61 | "Could not load editor, text not available." : "無法載入編輯器,文字不可用。", 62 | "Underweight" : "過輕" 63 | }, 64 | "nplurals=1; plural=0;"); 65 | -------------------------------------------------------------------------------- /lib/Db/Smokingdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Smokingdata extends Entity implements JsonSerializable { 31 | 32 | protected $personId; 33 | protected $date; 34 | protected $cigarettes; 35 | protected $desireLevel; 36 | protected $comment; 37 | 38 | public function __construct() { 39 | $this->addType('id', 'integer'); 40 | $this->addType('personId', 'integer'); 41 | $this->addType('cigarettes', 'integer'); 42 | $this->addType('desireLevel', 'integer'); 43 | } 44 | 45 | public function jsonSerialize(): array { 46 | return [ 47 | 'id' => $this->id, 48 | 'personId' => $this->personId, 49 | 'date' => $this->date, 50 | 'cigarettes' => $this->cigarettes, 51 | 'desireLevel' => $this->desireLevel, 52 | 'comment' => $this->comment, 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /l10n/ko.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "건강", 5 | "Share" : "공유", 6 | "Weight" : "몸무게", 7 | "Activities" : "활동", 8 | "Duration" : "길이", 9 | "Distance" : "거리", 10 | "Data" : "데이터", 11 | "Column selection" : "열 선택", 12 | "Category" : "분류", 13 | "Date" : "날짜", 14 | "Running" : "달리기", 15 | "Job" : "직업", 16 | "Biking" : "오토바이 타기", 17 | "Driving" : "운전", 18 | "Other" : "기타", 19 | "Good" : "좋음", 20 | "Bad" : "나쁨", 21 | "Low" : "낮음", 22 | "Medium" : "중간", 23 | "High" : "높음", 24 | "Comment" : "설명", 25 | "Activity" : "활동", 26 | "Energy" : "에너지", 27 | "None" : "없음", 28 | "Normal" : "일반", 29 | "Temperature" : "기온", 30 | "Values" : "값", 31 | "General settings" : "일반 설정", 32 | "Name" : "이름", 33 | "Identifier" : "식별자", 34 | "Edit name" : "이름 편집", 35 | "Show details" : "세부 정보", 36 | "Delete" : "삭제", 37 | "Information" : "정보", 38 | "Donations" : "후원", 39 | "Age" : "나이", 40 | "Height" : "신장", 41 | "Failed to create share with {displayName}" : "displayName}과(와) 공유를 생성하지 못했습니다.", 42 | "No participants found" : "참가자를 찾을 수 없음", 43 | "Group" : "그룹", 44 | "Can edit" : "편집 허용", 45 | "Can manage" : "관리 가능", 46 | "Quality" : "품질", 47 | "Moderate" : "중재", 48 | "Strong" : "강함", 49 | "Target" : "대상", 50 | "Body fat" : "신체 지방", 51 | "Last week" : "저번 주", 52 | "Last month" : "저번 달", 53 | "Last year" : "작년", 54 | "Show all" : "모두 보기", 55 | "Last 24 hours" : "지난 24시간", 56 | "Today" : "오늘", 57 | "Item" : "품목", 58 | "Actions" : "동작", 59 | "Cancel" : "취소", 60 | "Error" : "오류", 61 | "Could not load editor, text not available." : "편집기를 불러올 수 없음, 텍스트를 사용할 수 없음", 62 | "Underweight" : "저체중" 63 | }, 64 | "nplurals=1; plural=0;"); 65 | -------------------------------------------------------------------------------- /l10n/sw.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Afya", 5 | "Share" : "Shirikisha", 6 | "Weight" : "Uzito", 7 | "Activities" : "Shughuli", 8 | "Duration" : "Muda", 9 | "Distance" : "Distance", 10 | "Chart" : "Chati", 11 | "Data" : "Data", 12 | "Column selection" : "Column selection", 13 | "Category" : "Kipengele", 14 | "Date" : "Tarehe", 15 | "Running" : "Running", 16 | "Other" : "Mengine", 17 | "Good" : "Nzuri", 18 | "Bad" : "Mbaya", 19 | "Medium" : "Medium", 20 | "Comment" : "Maoni", 21 | "Activity" : "Shughuli", 22 | "Energy" : "Energy", 23 | "None" : "Hakuna", 24 | "Normal" : "Kawaida", 25 | "Temperature" : "Temperature", 26 | "General settings" : "General settings", 27 | "Name" : "Jina", 28 | "Show details" : "Onesha maelezo", 29 | "Delete" : "Futa", 30 | "Information" : "Taarifa", 31 | "Age" : "Age", 32 | "Height" : "Urefu", 33 | "Currency" : "Currency", 34 | "Failed to create share with {displayName}" : "Imeshindwa kutengeneza ushiriki na {displayName}", 35 | "No participants found" : "Hakuna mshiriki aliyepatikana", 36 | "Group" : "Kundi", 37 | "Can edit" : "Inaweza kuhariri", 38 | "Can manage" : "Inaweza kusimamia", 39 | "Quality" : "Quality", 40 | "BMI" : "BMI", 41 | "in {unit}" : "Katika {unit}", 42 | "Last week" : "Wiki iliyopita", 43 | "Last month" : "Mwezi uliopita", 44 | "Last year" : "Mwaka uliopita", 45 | "Show all" : "Show all", 46 | "Last hour" : "Last hour", 47 | "Today" : "Leo", 48 | "Item" : "Kipengele", 49 | "Actions" : "Utendekaji", 50 | "Edit {entityName}" : "Hariri {entityName}", 51 | "Cancel" : "Cancel", 52 | "Error" : "Hitilafu", 53 | "Underweight" : "Underweight" 54 | }, 55 | "nplurals=2; plural=(n != 1);"); 56 | -------------------------------------------------------------------------------- /lib/Db/SleepdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\QBMapper; 27 | use OCP\IDBConnection; 28 | 29 | class SleepdataMapper extends QBMapper { 30 | 31 | public function __construct(IDBConnection $db) { 32 | parent::__construct($db, 'health_sleepdata', Sleepdata::class); 33 | } 34 | 35 | public function find(int $id) { 36 | $qb = $this->db->getQueryBuilder(); 37 | 38 | $qb->select('*') 39 | ->from($this->getTableName()) 40 | ->where( 41 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 42 | ); 43 | 44 | return $this->findEntity($qb); 45 | } 46 | 47 | public function findAll(int $personId) { 48 | $qb = $this->db->getQueryBuilder(); 49 | 50 | $qb->select('*') 51 | ->from($this->getTableName()) 52 | ->where( 53 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 54 | ); 55 | 56 | return $this->findEntities($qb); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | health 5 | Health 6 | Track your health privately. 7 | 17 | 2.2.2 18 | agpl 19 | Florian Steffens 20 | Health 21 | 22 | https://github.com/nextcloud/health/wiki 23 | https://github.com/nextcloud/health/wiki/API 24 | 25 | tools 26 | organization 27 | https://github.com/nextcloud/health 28 | https://github.com/nextcloud/health/issues/new 29 | https://github.com/nextcloud/health.git 30 | https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-start.png 31 | https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-person-start.png 32 | https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-weight.png 33 | 34 | 35 | 36 | 37 | 38 | Health 39 | health.page.index 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /lib/Db/MedicationdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Marcus Nitzschke 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\QBMapper; 27 | use OCP\IDBConnection; 28 | 29 | class MedicationdataMapper extends QBMapper { 30 | 31 | public function __construct(IDBConnection $db) { 32 | parent::__construct($db, 'health_medicationdata', Medicationdata::class); 33 | } 34 | 35 | public function find(int $id) { 36 | $qb = $this->db->getQueryBuilder(); 37 | 38 | $qb->select('*') 39 | ->from($this->getTableName()) 40 | ->where( 41 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 42 | ); 43 | 44 | return $this->findEntity($qb); 45 | } 46 | 47 | public function findAll(int $planId) { 48 | $qb = $this->db->getQueryBuilder(); 49 | 50 | $qb->select('*') 51 | ->from($this->getTableName()) 52 | ->where( 53 | $qb->expr()->eq('plan_id', $qb->createNamedParameter($planId)) 54 | ); 55 | 56 | return $this->findEntities($qb); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /lib/Db/SmokingdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\QBMapper; 27 | use OCP\IDBConnection; 28 | 29 | class SmokingdataMapper extends QBMapper { 30 | 31 | public function __construct(IDBConnection $db) { 32 | parent::__construct($db, 'health_smokingdata', Smokingdata::class); 33 | } 34 | 35 | public function find(int $id) { 36 | $qb = $this->db->getQueryBuilder(); 37 | 38 | $qb->select('*') 39 | ->from($this->getTableName()) 40 | ->where( 41 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 42 | ); 43 | 44 | return $this->findEntity($qb); 45 | } 46 | 47 | public function findAll(int $personId) { 48 | $qb = $this->db->getQueryBuilder(); 49 | 50 | $qb->select('*') 51 | ->from($this->getTableName()) 52 | ->where( 53 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 54 | ); 55 | 56 | return $this->findEntities($qb); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/modules/smoking/SmokingSavedMoney.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 30 | 31 | 71 | -------------------------------------------------------------------------------- /src/modules/sleep/SleepSidebar.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 40 | 41 | 56 | -------------------------------------------------------------------------------- /lib/Db/ActivitiesdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\Entity; 27 | use OCP\AppFramework\Db\QBMapper; 28 | use OCP\IDBConnection; 29 | 30 | class ActivitiesdataMapper extends QBMapper { 31 | 32 | public function __construct(IDBConnection $db) { 33 | parent::__construct($db, 'health_activitiesdata', Activitiesdata::class); 34 | } 35 | 36 | public function find(int $id): Entity { 37 | $qb = $this->db->getQueryBuilder(); 38 | 39 | $qb->select('*') 40 | ->from($this->getTableName()) 41 | ->where( 42 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 43 | ); 44 | 45 | return $this->findEntity($qb); 46 | } 47 | 48 | public function findAll(int $personId): array { 49 | $qb = $this->db->getQueryBuilder(); 50 | 51 | $qb->select('*') 52 | ->from($this->getTableName()) 53 | ->where( 54 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 55 | ); 56 | 57 | return $this->findEntities($qb); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /lib/Db/Sleepdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Sleepdata extends Entity implements JsonSerializable { 31 | 32 | protected $personId; 33 | protected $asleep; 34 | protected $wakeup; 35 | protected $quality; 36 | protected $countedWakeups; 37 | protected $durationWakeups; 38 | protected $comment; 39 | 40 | public function __construct() { 41 | $this->addType('id', 'integer'); 42 | $this->addType('quality', 'integer'); 43 | $this->addType('countedWakeups', 'integer'); 44 | $this->addType('durationWakeups', 'float'); 45 | } 46 | 47 | public function jsonSerialize(): array { 48 | return [ 49 | 'id' => $this->id, 50 | 'personId' => $this->personId, 51 | 'asleep' => $this->asleep, 52 | 'wakeup' => $this->wakeup, 53 | 'quality' => $this->quality, 54 | 'countedWakeups' => $this->countedWakeups, 55 | 'durationWakeups' => $this->durationWakeups, 56 | 'comment' => $this->comment, 57 | ]; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/Controller/PageController.php: -------------------------------------------------------------------------------- 1 | 6 | * 7 | * @author Florian Steffens 8 | * 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | namespace OCA\Health\Controller; 27 | 28 | use OCA\Text\Event\LoadEditor; 29 | use OCP\AppFramework\Controller; 30 | use OCP\AppFramework\Http\TemplateResponse; 31 | use OCP\EventDispatcher\IEventDispatcher; 32 | use OCP\IRequest; 33 | use OCP\Util; 34 | 35 | class PageController extends Controller { 36 | 37 | private IEventDispatcher $eventDispatcher; 38 | 39 | public function __construct($appName, IRequest $request, IEventDispatcher $eventDispatcher) { 40 | parent::__construct($appName, $request); 41 | $this->eventDispatcher = $eventDispatcher; 42 | } 43 | 44 | /** 45 | * @NoAdminRequired 46 | * @NoCSRFRequired 47 | */ 48 | public function index(): TemplateResponse { 49 | Util::addScript($this->appName, 'health-main'); 50 | 51 | if (class_exists(LoadEditor::class)) { 52 | $this->eventDispatcher->dispatchTyped(new LoadEditor()); 53 | } 54 | 55 | $response = new TemplateResponse($this->appName, 'main'); 56 | return $response; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /l10n/is.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Heilsa", 3 | "Share" : "Deila", 4 | "Activities" : "Aðgerðir", 5 | "Duration" : "Duration", 6 | "Distance" : "Vegalengd", 7 | "Category" : "Flokkur", 8 | "Date" : "Dagsetning", 9 | "Running" : "Hlaup", 10 | "Job" : "Job", 11 | "Biking" : "Hjólreiðar", 12 | "Driving" : "Akstur", 13 | "Other" : "Annað", 14 | "Good" : "Gott", 15 | "Bad" : "Vont", 16 | "Medium" : "miðlungs", 17 | "Comment" : "Athugasemd", 18 | "Activity" : "Virkni", 19 | "Energy" : "Energy", 20 | "None" : "Ekkert", 21 | "Anxiety" : "Kviði", 22 | "Normal" : "Venjulegt", 23 | "Temperature" : "Hitastig", 24 | "Heart rate" : "Hjartsláttartíðni", 25 | "Values" : "Gildi", 26 | "Blood pressure" : "Blóðþrýstingur", 27 | "General settings" : "Almennar stillingar", 28 | "Name" : "Heiti", 29 | "Identifier" : "Auðkenni", 30 | "Edit name" : "Breyta heiti", 31 | "Show details" : "Birta nánari upplýsingar", 32 | "Delete" : "Eyða", 33 | "Information" : "Upplýsingar", 34 | "Donations" : "Styrkir", 35 | "Age" : "Aldur", 36 | "Height" : "Hæð", 37 | "Currency" : "Gjaldmiðill", 38 | "Failed to create share with {displayName}" : "Gat ekki búið til sameign með {displayName}", 39 | "No participants found" : "No participants found", 40 | "Group" : "Hópur", 41 | "Can edit" : "Getur breytt", 42 | "Can manage" : "Gerur sýslað með", 43 | "Quality" : "Quality", 44 | "_%nh_::_%nh_" : ["%nklst","%nklst"], 45 | "Goal" : "Markmið", 46 | "Strong" : "Sterkt", 47 | "Last week" : "Í síðustu viku", 48 | "Last month" : "Í síðasta mánuði", 49 | "Last year" : "Á síðasta ári", 50 | "Show all" : "Birta allt", 51 | "Last 24 hours" : "Síðustu 24 klst", 52 | "Today" : "Í dag", 53 | "Actions" : "Aðgerðir", 54 | "Cancel" : "Hætta við", 55 | "Error" : "Villa" 56 | },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" 57 | } -------------------------------------------------------------------------------- /l10n/is.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Heilsa", 5 | "Share" : "Deila", 6 | "Activities" : "Aðgerðir", 7 | "Duration" : "Duration", 8 | "Distance" : "Vegalengd", 9 | "Category" : "Flokkur", 10 | "Date" : "Dagsetning", 11 | "Running" : "Hlaup", 12 | "Job" : "Job", 13 | "Biking" : "Hjólreiðar", 14 | "Driving" : "Akstur", 15 | "Other" : "Annað", 16 | "Good" : "Gott", 17 | "Bad" : "Vont", 18 | "Medium" : "miðlungs", 19 | "Comment" : "Athugasemd", 20 | "Activity" : "Virkni", 21 | "Energy" : "Energy", 22 | "None" : "Ekkert", 23 | "Anxiety" : "Kviði", 24 | "Normal" : "Venjulegt", 25 | "Temperature" : "Hitastig", 26 | "Heart rate" : "Hjartsláttartíðni", 27 | "Values" : "Gildi", 28 | "Blood pressure" : "Blóðþrýstingur", 29 | "General settings" : "Almennar stillingar", 30 | "Name" : "Heiti", 31 | "Identifier" : "Auðkenni", 32 | "Edit name" : "Breyta heiti", 33 | "Show details" : "Birta nánari upplýsingar", 34 | "Delete" : "Eyða", 35 | "Information" : "Upplýsingar", 36 | "Donations" : "Styrkir", 37 | "Age" : "Aldur", 38 | "Height" : "Hæð", 39 | "Currency" : "Gjaldmiðill", 40 | "Failed to create share with {displayName}" : "Gat ekki búið til sameign með {displayName}", 41 | "No participants found" : "No participants found", 42 | "Group" : "Hópur", 43 | "Can edit" : "Getur breytt", 44 | "Can manage" : "Gerur sýslað með", 45 | "Quality" : "Quality", 46 | "_%nh_::_%nh_" : ["%nklst","%nklst"], 47 | "Goal" : "Markmið", 48 | "Strong" : "Sterkt", 49 | "Last week" : "Í síðustu viku", 50 | "Last month" : "Í síðasta mánuði", 51 | "Last year" : "Á síðasta ári", 52 | "Show all" : "Birta allt", 53 | "Last 24 hours" : "Síðustu 24 klst", 54 | "Today" : "Í dag", 55 | "Actions" : "Aðgerðir", 56 | "Cancel" : "Hætta við", 57 | "Error" : "Villa" 58 | }, 59 | "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); 60 | -------------------------------------------------------------------------------- /lib/Db/Medicationdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Marcus Nitzschke 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Medicationdata extends Entity implements JsonSerializable { 31 | 32 | protected $planId; 33 | protected $name; 34 | protected $identifier; 35 | protected $morning; 36 | protected $noon; 37 | protected $evening; 38 | protected $night; 39 | protected $comment; 40 | 41 | public function __construct() { 42 | $this->addType('id', 'integer'); 43 | $this->addType('planId', 'integer'); 44 | $this->addType('morning', 'integer'); 45 | $this->addType('noon', 'integer'); 46 | $this->addType('evening', 'integer'); 47 | $this->addType('night', 'integer'); 48 | } 49 | 50 | public function jsonSerialize(): array { 51 | return [ 52 | 'id' => $this->id, 53 | 'planId' => $this->planId, 54 | 'name' => $this->name, 55 | 'identifier' => $this->identifier, 56 | 'morning' => $this->morning, 57 | 'noon' => $this->noon, 58 | 'evening' => $this->evening, 59 | 'night' => $this->night, 60 | 'comment' => $this->comment, 61 | ]; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /l10n/et_EE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Tervis", 3 | "Show sidebar" : "Näita külgriba", 4 | "Share" : "Jaga", 5 | "Weight" : "Kaal", 6 | "Activities" : "Tegevused", 7 | "Duration" : "Kestus", 8 | "Distance" : "Vahemaa", 9 | "Data" : "Andmed", 10 | "Column selection" : "Veergude valik", 11 | "Category" : "Kategooria", 12 | "Date" : "Kuupäev", 13 | "Running" : "Jooksmine", 14 | "Biking" : "Jalgrattaga sõitmine", 15 | "Other" : "Muu", 16 | "Good" : "Hea", 17 | "Bad" : "Halb", 18 | "Medium" : "Keskmine", 19 | "Comment" : "Kommentaar", 20 | "Activity" : "Tegevus", 21 | "Energy" : "Energiasisaldus", 22 | "None" : "Pole", 23 | "Normal" : "Tavaline", 24 | "Temperature" : "Temperatuur", 25 | "General settings" : "Üldised seadistusted", 26 | "Name" : "Nimi", 27 | "Edit name" : "Muuda nime", 28 | "Show details" : "Näita detaile", 29 | "Delete" : "Kustuta", 30 | "Information" : "Teave", 31 | "Donations" : "Annetused", 32 | "Age" : "Vanus", 33 | "Height" : "Kõrgus", 34 | "Currency" : "Valuuta", 35 | "Failed to create share with {displayName}" : "Jagamine ei õnnestunud: {displayName}", 36 | "No participants found" : "Osalejaid ei leidu", 37 | "Group" : "Grupp", 38 | "Can edit" : "Võib muuta", 39 | "Can manage" : "Võib hallata", 40 | "Quality" : "Kvaliteet", 41 | "_%nh_::_%nh_" : ["%n t","%n t"], 42 | "Strong" : "Tugev", 43 | "BMI" : "BMI", 44 | "Target" : "Eesmärk", 45 | "Body fat" : "Keharasv", 46 | "in {unit}" : "{unit} kuus", 47 | "Last week" : "Eelmine nädal", 48 | "Last month" : "Eelmine kuu", 49 | "Last year" : "Eelmisel aastal", 50 | "Show all" : "Kuva kõik", 51 | "Last hour" : "Viimase tunni jooksul", 52 | "Last 24 hours" : "Viimased 24 tundi", 53 | "Today" : "Täna", 54 | "Actions" : "Tegevused", 55 | "Edit {entityName}" : "Muuda „{entityName}“", 56 | "Cancel" : "Loobu", 57 | "Error" : "Viga", 58 | "Underweight" : "Alakaal" 59 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 60 | } -------------------------------------------------------------------------------- /psalm.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /l10n/et_EE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Tervis", 5 | "Show sidebar" : "Näita külgriba", 6 | "Share" : "Jaga", 7 | "Weight" : "Kaal", 8 | "Activities" : "Tegevused", 9 | "Duration" : "Kestus", 10 | "Distance" : "Vahemaa", 11 | "Data" : "Andmed", 12 | "Column selection" : "Veergude valik", 13 | "Category" : "Kategooria", 14 | "Date" : "Kuupäev", 15 | "Running" : "Jooksmine", 16 | "Biking" : "Jalgrattaga sõitmine", 17 | "Other" : "Muu", 18 | "Good" : "Hea", 19 | "Bad" : "Halb", 20 | "Medium" : "Keskmine", 21 | "Comment" : "Kommentaar", 22 | "Activity" : "Tegevus", 23 | "Energy" : "Energiasisaldus", 24 | "None" : "Pole", 25 | "Normal" : "Tavaline", 26 | "Temperature" : "Temperatuur", 27 | "General settings" : "Üldised seadistusted", 28 | "Name" : "Nimi", 29 | "Edit name" : "Muuda nime", 30 | "Show details" : "Näita detaile", 31 | "Delete" : "Kustuta", 32 | "Information" : "Teave", 33 | "Donations" : "Annetused", 34 | "Age" : "Vanus", 35 | "Height" : "Kõrgus", 36 | "Currency" : "Valuuta", 37 | "Failed to create share with {displayName}" : "Jagamine ei õnnestunud: {displayName}", 38 | "No participants found" : "Osalejaid ei leidu", 39 | "Group" : "Grupp", 40 | "Can edit" : "Võib muuta", 41 | "Can manage" : "Võib hallata", 42 | "Quality" : "Kvaliteet", 43 | "_%nh_::_%nh_" : ["%n t","%n t"], 44 | "Strong" : "Tugev", 45 | "BMI" : "BMI", 46 | "Target" : "Eesmärk", 47 | "Body fat" : "Keharasv", 48 | "in {unit}" : "{unit} kuus", 49 | "Last week" : "Eelmine nädal", 50 | "Last month" : "Eelmine kuu", 51 | "Last year" : "Eelmisel aastal", 52 | "Show all" : "Kuva kõik", 53 | "Last hour" : "Viimase tunni jooksul", 54 | "Last 24 hours" : "Viimased 24 tundi", 55 | "Today" : "Täna", 56 | "Actions" : "Tegevused", 57 | "Edit {entityName}" : "Muuda „{entityName}“", 58 | "Cancel" : "Loobu", 59 | "Error" : "Viga", 60 | "Underweight" : "Alakaal" 61 | }, 62 | "nplurals=2; plural=(n != 1);"); 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "health", 3 | "description": "Nextcloud health app", 4 | "version": "2.2.2", 5 | "author": "Florian Steffens ", 6 | "contributors": [ 7 | "Florian Steffens " 8 | ], 9 | "keywords": [ 10 | "nextcloud", 11 | "health", 12 | "app" 13 | ], 14 | "bugs": { 15 | "url": "https://github.com/nextcloud/health/issues/new?assignees=&labels=bug%2C0.+Needs+triage&projects=&template=bug-report.yml" 16 | }, 17 | "repository": { 18 | "url": "https://github.com/nextcloud/health", 19 | "type": "git" 20 | }, 21 | "homepage": "https://github.com/nextcloud/health", 22 | "license": "agpl", 23 | "private": true, 24 | "scripts": { 25 | "build": "NODE_ENV=production webpack --progress --config webpack.js", 26 | "dev": "NODE_ENV=development webpack --progress --config webpack.js", 27 | "watch": "NODE_ENV=development webpack --progress --watch --config webpack.js", 28 | "lint": "eslint --ext .js,.vue src", 29 | "lint:fix": "eslint --ext .js,.vue src --fix", 30 | "stylelint": "stylelint src", 31 | "stylelint:fix": "stylelint src --fix" 32 | }, 33 | "dependencies": { 34 | "@nextcloud/auth": "^1.3.0", 35 | "@nextcloud/axios": "^1.9.0", 36 | "@nextcloud/dialogs": "^3.1.2", 37 | "@nextcloud/moment": "^1.1.1", 38 | "@nextcloud/router": "^2.0.0", 39 | "@nextcloud/vue": "7.0.0", 40 | "chart.js": "^2.9.4", 41 | "lodash.debounce": "^4.0.8", 42 | "vue": "^2.7.13", 43 | "vue-chartjs": "^3.5.1", 44 | "debounce": "^2.0.0", 45 | "vue-json-csv": "^1.2.12", 46 | "vue-material-design-icons": "^5.1.2", 47 | "vuex": "^3.6.2" 48 | }, 49 | "browserslist": [ 50 | "extends @nextcloud/browserslist-config" 51 | ], 52 | "engines": { 53 | "node": ">=20.0.0", 54 | "npm": ">=9.0.0" 55 | }, 56 | "devDependencies": { 57 | "@nextcloud/babel-config": "^1.0.0", 58 | "@nextcloud/browserslist-config": "^2.2.0", 59 | "@nextcloud/cypress": "^1.0.0-beta.6", 60 | "@nextcloud/eslint-config": "^6.1.2", 61 | "@nextcloud/stylelint-config": "^2.1.2", 62 | "@nextcloud/webpack-vue-config": "^5.3.0", 63 | "cypress": "^13.6.1", 64 | "cypress-downloadfile": "^1.2.3" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Db/Feelingdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Feelingdata extends Entity implements JsonSerializable { 31 | 32 | protected $personId; 33 | protected $datetime; 34 | protected $mood; 35 | protected $sadnessLevel; 36 | protected $symptoms; 37 | protected $attacks; 38 | protected $medication; 39 | protected $pain; 40 | protected $energy; 41 | protected $comment; 42 | 43 | public function __construct() { 44 | $this->addType('id', 'integer'); 45 | $this->addType('mood', 'integer'); 46 | $this->addType('sadnessLevel', 'integer'); 47 | $this->addType('pain', 'integer'); 48 | $this->addType('energy', 'integer'); 49 | } 50 | 51 | public function jsonSerialize(): array { 52 | return [ 53 | 'id' => $this->id, 54 | 'personId' => $this->personId, 55 | 'datetime' => $this->datetime, 56 | 'mood' => $this->mood, 57 | 'sadnessLevel' => $this->sadnessLevel, 58 | 'symptoms' => $this->symptoms, 59 | 'attacks' => $this->attacks, 60 | 'medication' => $this->medication, 61 | 'pain' => $this->pain, 62 | 'energy' => $this->energy, 63 | 'comment' => $this->comment, 64 | ]; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Migration/Version1200Date20210429000000.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | namespace OCA\Health\Migration; 24 | 25 | use Closure; 26 | use Doctrine\DBAL\Schema\SchemaException; 27 | use OCP\DB\ISchemaWrapper; 28 | use OCP\IDBConnection; 29 | use OCP\Migration\IOutput; 30 | use OCP\Migration\SimpleMigrationStep; 31 | 32 | class Version1200Date20210429000000 extends SimpleMigrationStep { 33 | 34 | /** @var IDBConnection */ 35 | protected $connection; 36 | 37 | public function __construct(IDBConnection $connection) { 38 | $this->connection = $connection; 39 | } 40 | 41 | /** 42 | * @param IOutput $output 43 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` 44 | * @param array $options 45 | * @return null|ISchemaWrapper 46 | * @throws SchemaException 47 | */ 48 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { 49 | /** @var ISchemaWrapper $schema */ 50 | $schema = $schemaClosure(); 51 | 52 | if($schema->hasTable('health_weightdata')) { 53 | $table = $schema->getTable('health_weightdata'); 54 | if($table->hasColumn('bodyfat2')) { 55 | $table->dropColumn('bodyfat2'); 56 | } 57 | } 58 | 59 | return $schema; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /l10n/da.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Sundhedsstatus", 3 | "Share" : "Del", 4 | "Weight" : "Vægt", 5 | "Smoking" : "Rygning", 6 | "Activities" : "Aktiviteter", 7 | "Duration" : "Varighed", 8 | "Chart" : "Diagram", 9 | "Data" : "Data", 10 | "Column selection" : "Kolonnevalg", 11 | "Category" : "Kategori", 12 | "Date" : "Dato", 13 | "Running" : "Løber", 14 | "Job" : "Job", 15 | "Biking" : "Cykling", 16 | "Driving" : "Kørsel", 17 | "Other" : "Andet", 18 | "Good" : "Godt", 19 | "Okay" : "Okay", 20 | "Bad" : "Dårlig", 21 | "Medium" : "Medium", 22 | "Comment" : "Kommenter", 23 | "Activity" : "Aktivitet", 24 | "Energy" : "Energiindhold", 25 | "None" : "Ingen", 26 | "Normal" : "Normal", 27 | "Temperature" : "Temperatur", 28 | "General settings" : "Generelle indstillinger", 29 | "Name" : "Navn", 30 | "Edit name" : "Redigér navn", 31 | "Show details" : "Vis detaljer", 32 | "Delete" : "Slet", 33 | "Information" : "Information", 34 | "Donations" : "Donationer", 35 | "Height" : "Højde", 36 | "Currency" : "Valuta", 37 | "Failed to create share with {displayName}" : "Oprettelse af delt drev med {displayName} fejlede", 38 | "No participants found" : "Ingen deltagere fundet", 39 | "Group" : "Gruppe", 40 | "Can edit" : "Kan redigere", 41 | "Can manage" : "Kan administrere", 42 | "Quality" : "Kvalitet", 43 | "_%nh_::_%nh_" : ["%nt","%nt"], 44 | "Strong" : "Stærkt", 45 | "smoking data" : "rygedata", 46 | "Target" : "Mål", 47 | "Body fat" : "fedtprocent", 48 | "Last week" : "Seneste uge", 49 | "Last month" : "Seneste måned", 50 | "Last year" : "Sidste år", 51 | "Show all" : "Vis alle", 52 | "Last hour" : "Seneste time", 53 | "Last 24 hours" : "Seneste 24 timer", 54 | "Today" : "I dag", 55 | "Actions" : "Handlinger", 56 | "Edit {entityName}" : "Redigér {entityName}", 57 | "Cancel" : "Annuller", 58 | "Error" : "Fejl", 59 | "Could not load editor, text not available." : "Kunne ikke indlæse editor, tekst ikke tilgængelig." 60 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 61 | } -------------------------------------------------------------------------------- /lib/Db/FeelingdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\DoesNotExistException; 27 | use OCP\AppFramework\Db\MultipleObjectsReturnedException; 28 | use OCP\AppFramework\Db\QBMapper; 29 | use OCP\IDBConnection; 30 | 31 | class FeelingdataMapper extends QBMapper { 32 | 33 | public function __construct(IDBConnection $db) { 34 | parent::__construct($db, 'health_feelingdata', Feelingdata::class); 35 | } 36 | 37 | public function find(int $id): ?\OCP\AppFramework\Db\Entity { 38 | $qb = $this->db->getQueryBuilder(); 39 | 40 | $qb->select('*') 41 | ->from($this->getTableName()) 42 | ->where( 43 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 44 | ); 45 | 46 | try { 47 | return $this->findEntity($qb); 48 | } catch (DoesNotExistException | MultipleObjectsReturnedException $e) { 49 | return null; 50 | } 51 | } 52 | 53 | public function findAll(int $personId): array { 54 | $qb = $this->db->getQueryBuilder(); 55 | 56 | $qb->select('*') 57 | ->from($this->getTableName()) 58 | ->where( 59 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 60 | ); 61 | 62 | return $this->findEntities($qb); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/modules/sleep/SleepContent.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | 47 | 72 | -------------------------------------------------------------------------------- /src/modules/weight/MixinBmi.js: -------------------------------------------------------------------------------- 1 | import { mapGetters } from 'vuex' 2 | 3 | export default { 4 | components: { 5 | ...mapGetters(['person']), 6 | }, 7 | methods: { 8 | bmi(person, weight) { 9 | if (person.size === null || person.age === null || weight === null) { 10 | return null 11 | } 12 | const s = person.size / 100 13 | let bmi = 0 14 | 15 | if (person.weightUnit === 'lb') { 16 | bmi = (weight / 2.20462262) / (s * s) 17 | } else { 18 | bmi = weight / (s * s) 19 | } 20 | // console.debug('bmi: ' + bmi) 21 | return Math.round(bmi * 10) / 10 22 | }, 23 | status(bmi) { 24 | if (bmi === null) { 25 | return null 26 | } 27 | 28 | if (bmi < 18.5) { 29 | return t('health', 'Underweight') 30 | } else if (bmi >= 18.5 && bmi < 25) { 31 | return t('health', 'Normal weight') 32 | } else if (bmi >= 25 && bmi < 30) { 33 | return t('health', 'Pre-obesity') 34 | } else if (bmi >= 30 && bmi < 35) { 35 | return t('health', 'Obesity class I') 36 | } else if (bmi >= 35 && bmi < 40) { 37 | return t('health', 'Obesity class II') 38 | } else { 39 | return t('health', 'Obesity class III') 40 | } 41 | }, 42 | statusClass(bmi) { 43 | const data = { 44 | okay: false, 45 | good: false, 46 | warning: false, 47 | alert: false, 48 | danger: false, 49 | } 50 | 51 | if (bmi < 18.5) { 52 | data.okay = true 53 | } else if (bmi >= 18.5 && bmi < 25) { 54 | data.good = true 55 | } else if (bmi >= 25 && bmi < 30) { 56 | data.okay = true 57 | } else if (bmi >= 30 && bmi < 35) { 58 | data.warn = true 59 | } else if (bmi >= 35 && bmi < 40) { 60 | data.alert = true 61 | } else { 62 | data.danger = true 63 | } 64 | return data 65 | }, 66 | bodyfat(weight, age, sex) { 67 | if (!weight || !age || !sex) { 68 | return null 69 | } 70 | 71 | const bmi = this.bmi(this.person, weight) 72 | const sexNumber = sex === 'female' ? 0 : 1 73 | if (age <= 15) { 74 | return (1.51 * bmi) - (0.7 * age) - (3.6 * sexNumber) + 1.4 75 | } else { 76 | return (1.39 * bmi) + (0.16 * age) - (10.34 * sexNumber) - 9 77 | } 78 | }, 79 | }, 80 | } 81 | -------------------------------------------------------------------------------- /l10n/da.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Sundhedsstatus", 5 | "Share" : "Del", 6 | "Weight" : "Vægt", 7 | "Smoking" : "Rygning", 8 | "Activities" : "Aktiviteter", 9 | "Duration" : "Varighed", 10 | "Chart" : "Diagram", 11 | "Data" : "Data", 12 | "Column selection" : "Kolonnevalg", 13 | "Category" : "Kategori", 14 | "Date" : "Dato", 15 | "Running" : "Løber", 16 | "Job" : "Job", 17 | "Biking" : "Cykling", 18 | "Driving" : "Kørsel", 19 | "Other" : "Andet", 20 | "Good" : "Godt", 21 | "Okay" : "Okay", 22 | "Bad" : "Dårlig", 23 | "Medium" : "Medium", 24 | "Comment" : "Kommenter", 25 | "Activity" : "Aktivitet", 26 | "Energy" : "Energiindhold", 27 | "None" : "Ingen", 28 | "Normal" : "Normal", 29 | "Temperature" : "Temperatur", 30 | "General settings" : "Generelle indstillinger", 31 | "Name" : "Navn", 32 | "Edit name" : "Redigér navn", 33 | "Show details" : "Vis detaljer", 34 | "Delete" : "Slet", 35 | "Information" : "Information", 36 | "Donations" : "Donationer", 37 | "Height" : "Højde", 38 | "Currency" : "Valuta", 39 | "Failed to create share with {displayName}" : "Oprettelse af delt drev med {displayName} fejlede", 40 | "No participants found" : "Ingen deltagere fundet", 41 | "Group" : "Gruppe", 42 | "Can edit" : "Kan redigere", 43 | "Can manage" : "Kan administrere", 44 | "Quality" : "Kvalitet", 45 | "_%nh_::_%nh_" : ["%nt","%nt"], 46 | "Strong" : "Stærkt", 47 | "smoking data" : "rygedata", 48 | "Target" : "Mål", 49 | "Body fat" : "fedtprocent", 50 | "Last week" : "Seneste uge", 51 | "Last month" : "Seneste måned", 52 | "Last year" : "Sidste år", 53 | "Show all" : "Vis alle", 54 | "Last hour" : "Seneste time", 55 | "Last 24 hours" : "Seneste 24 timer", 56 | "Today" : "I dag", 57 | "Actions" : "Handlinger", 58 | "Edit {entityName}" : "Redigér {entityName}", 59 | "Cancel" : "Annuller", 60 | "Error" : "Fejl", 61 | "Could not load editor, text not available." : "Kunne ikke indlæse editor, tekst ikke tilgængelig." 62 | }, 63 | "nplurals=2; plural=(n != 1);"); 64 | -------------------------------------------------------------------------------- /lib/Db/MeasurementdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\DoesNotExistException; 27 | use OCP\AppFramework\Db\Entity; 28 | use OCP\AppFramework\Db\MultipleObjectsReturnedException; 29 | use OCP\AppFramework\Db\QBMapper; 30 | use OCP\IDBConnection; 31 | 32 | class MeasurementdataMapper extends QBMapper { 33 | 34 | public function __construct(IDBConnection $db) { 35 | parent::__construct($db, 'health_measurementdata', Measurementdata::class); 36 | } 37 | 38 | public function find(int $id): ?Entity { 39 | $qb = $this->db->getQueryBuilder(); 40 | 41 | $qb->select('*') 42 | ->from($this->getTableName()) 43 | ->where( 44 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 45 | ); 46 | 47 | try { 48 | return $this->findEntity($qb); 49 | } catch (DoesNotExistException | MultipleObjectsReturnedException $e) { 50 | return null; 51 | } 52 | } 53 | 54 | public function findAll(int $personId): array { 55 | $qb = $this->db->getQueryBuilder(); 56 | 57 | $qb->select('*') 58 | ->from($this->getTableName()) 59 | ->where( 60 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 61 | ); 62 | 63 | return $this->findEntities($qb); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /lib/Db/Activitiesdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Activitiesdata extends Entity implements JsonSerializable { 31 | 32 | protected $personId; 33 | protected $datetime; 34 | protected $calories; 35 | protected $duration; 36 | protected $category; 37 | protected $feeling; 38 | protected $intensity; 39 | protected $distance; 40 | protected $comment; 41 | 42 | public function __construct() { 43 | $this->addType('id', 'integer'); 44 | $this->addType('personId', 'integer'); 45 | $this->addType('duration', 'float'); 46 | $this->addType('category', 'integer'); 47 | $this->addType('feeling', 'integer'); 48 | $this->addType('intensity', 'integer'); 49 | $this->addType('distance', 'float'); 50 | } 51 | 52 | public function jsonSerialize(): array { 53 | return [ 54 | 'id' => $this->id, 55 | 'personId' => $this->personId, 56 | 'datetime' => $this->datetime, 57 | 'calories' => $this->calories, 58 | 'duration' => $this->duration, 59 | 'category' => $this->category, 60 | 'feeling' => $this->feeling, 61 | 'intensity' => $this->intensity, 62 | 'distance' => $this->distance, 63 | 'comment' => $this->comment, 64 | ]; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /l10n/lt_LT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Sveikata", 3 | "Share" : "Bendrinti", 4 | "Weight" : "Svoris", 5 | "Activities" : "Veiklos", 6 | "Duration" : "Trukmė", 7 | "Distance" : "Atstumas", 8 | "Data" : "Duomenys", 9 | "Category" : "Kategorija", 10 | "Date" : "Data", 11 | "Running" : "Bėgimas", 12 | "Biking" : "Dviratis", 13 | "Driving" : "Vairavimas", 14 | "Other" : "Kita", 15 | "Good" : "Geras", 16 | "Bad" : "Blogai", 17 | "Medium" : "Vidutinis", 18 | "Comment" : "Komentaras", 19 | "Activity" : "Veikla", 20 | "None" : "Nėra", 21 | "Normal" : "Normalus", 22 | "Temperature" : "Temperatūra", 23 | "General settings" : "Bendri nustatymai", 24 | "Name" : "Vardas, pavardė", 25 | "Identifier" : "Identifikatorius", 26 | "Edit name" : "Taisyti pavadinimą", 27 | "Show details" : "Rodyti išsamiau", 28 | "Delete" : "Ištrinti", 29 | "Information" : "Informacija", 30 | "Age" : "Amžius", 31 | "Height" : "Aukštis", 32 | "Sex" : "Lytis", 33 | "female" : "moteris", 34 | "male" : "vyras", 35 | "Failed to create share with {displayName}" : "Nepavyko sukurti viešinio su {displayName}", 36 | "No participants found" : "Nerasta jokių dalyvių", 37 | "Group" : "Grupė", 38 | "Can edit" : "Galima redaguoti", 39 | "Can manage" : "Gali tvarkyti", 40 | "Quality" : "Kokybė", 41 | "Strong" : "Stiprus", 42 | "Last week" : "Praeitą savaitę", 43 | "Last month" : "Praeitą mėnesį", 44 | "Show all" : "Rodyti visus", 45 | "Last hour" : "Paskutinė valanda", 46 | "Last 24 hours" : "Paskutinės 24 valandos", 47 | "Today" : "Šiandiena", 48 | "Actions" : "Veiksmai", 49 | "Download (CSV)" : "Atsisiųsti (CSV)", 50 | "No data yet" : "Kol kas duomenų nėra", 51 | "Cancel" : "Atsisakyti", 52 | "Error" : "Klaida", 53 | "Could not load editor, text not available." : "Nepavyko įkelti redaktoriaus, tekstas neprieinamas.", 54 | "Value successfully saved" : "Reikšmė sėkmingai įrašyta" 55 | },"pluralForm" :"nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);" 56 | } -------------------------------------------------------------------------------- /src/modules/feeling/FeelingContent.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | 47 | 72 | -------------------------------------------------------------------------------- /l10n/lt_LT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Sveikata", 5 | "Share" : "Bendrinti", 6 | "Weight" : "Svoris", 7 | "Activities" : "Veiklos", 8 | "Duration" : "Trukmė", 9 | "Distance" : "Atstumas", 10 | "Data" : "Duomenys", 11 | "Category" : "Kategorija", 12 | "Date" : "Data", 13 | "Running" : "Bėgimas", 14 | "Biking" : "Dviratis", 15 | "Driving" : "Vairavimas", 16 | "Other" : "Kita", 17 | "Good" : "Geras", 18 | "Bad" : "Blogai", 19 | "Medium" : "Vidutinis", 20 | "Comment" : "Komentaras", 21 | "Activity" : "Veikla", 22 | "None" : "Nėra", 23 | "Normal" : "Normalus", 24 | "Temperature" : "Temperatūra", 25 | "General settings" : "Bendri nustatymai", 26 | "Name" : "Vardas, pavardė", 27 | "Identifier" : "Identifikatorius", 28 | "Edit name" : "Taisyti pavadinimą", 29 | "Show details" : "Rodyti išsamiau", 30 | "Delete" : "Ištrinti", 31 | "Information" : "Informacija", 32 | "Age" : "Amžius", 33 | "Height" : "Aukštis", 34 | "Sex" : "Lytis", 35 | "female" : "moteris", 36 | "male" : "vyras", 37 | "Failed to create share with {displayName}" : "Nepavyko sukurti viešinio su {displayName}", 38 | "No participants found" : "Nerasta jokių dalyvių", 39 | "Group" : "Grupė", 40 | "Can edit" : "Galima redaguoti", 41 | "Can manage" : "Gali tvarkyti", 42 | "Quality" : "Kokybė", 43 | "Strong" : "Stiprus", 44 | "Last week" : "Praeitą savaitę", 45 | "Last month" : "Praeitą mėnesį", 46 | "Show all" : "Rodyti visus", 47 | "Last hour" : "Paskutinė valanda", 48 | "Last 24 hours" : "Paskutinės 24 valandos", 49 | "Today" : "Šiandiena", 50 | "Actions" : "Veiksmai", 51 | "Download (CSV)" : "Atsisiųsti (CSV)", 52 | "No data yet" : "Kol kas duomenų nėra", 53 | "Cancel" : "Atsisakyti", 54 | "Error" : "Klaida", 55 | "Could not load editor, text not available." : "Nepavyko įkelti redaktoriaus, tekstas neprieinamas.", 56 | "Value successfully saved" : "Reikšmė sėkmingai įrašyta" 57 | }, 58 | "nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);"); 59 | -------------------------------------------------------------------------------- /src/modules/activities/ActivitiesContent.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 46 | 47 | 72 | -------------------------------------------------------------------------------- /lib/Migration/Version0142Date20201104200000.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | namespace OCA\Health\Migration; 24 | 25 | use Closure; 26 | use Doctrine\DBAL\Schema\SchemaException; 27 | use OCP\DB\ISchemaWrapper; 28 | use OCP\Migration\IOutput; 29 | use OCP\Migration\SimpleMigrationStep; 30 | 31 | class Version0142Date20201104200000 extends SimpleMigrationStep { 32 | 33 | /** 34 | * @param IOutput $output 35 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` 36 | * @param array $options 37 | * @return null|ISchemaWrapper 38 | */ 39 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { 40 | /** @var ISchemaWrapper $schema */ 41 | $schema = $schemaClosure(); 42 | 43 | $this->extendPersons($schema); 44 | 45 | return $schema; 46 | 47 | } 48 | 49 | private function extendPersons(ISchemaWrapper $schema) { 50 | try { 51 | $table = $schema->getTable('health_persons'); 52 | $newColumns = [ 53 | 'enabled_module_measurement', 54 | 'enabled_module_sleep', 55 | 'enabled_module_nutrition', 56 | ]; 57 | foreach ($newColumns as $c) { 58 | if(!$table->hasColumn($c)) { 59 | $table->addColumn($c, 'boolean', [ 'default' => 0, 'notnull' => false ]); 60 | } 61 | } 62 | } catch (SchemaException $e) { 63 | return false; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /l10n/sv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Health" : "Hälsa", 3 | "Share" : "Dela", 4 | "Weight" : "Vikt", 5 | "Activities" : "Aktiviteter", 6 | "Duration" : "Varaktighet", 7 | "Distance" : "Distans", 8 | "Chart" : "Diagram", 9 | "Data" : "Data", 10 | "Column selection" : "Kolumnurval", 11 | "Category" : "Kategori", 12 | "Date" : "Datum", 13 | "Running" : "Löpning", 14 | "Job" : "Arbete", 15 | "Biking" : "Cykling", 16 | "Driving" : "Körning", 17 | "Other" : "Annat", 18 | "Good" : "Bra", 19 | "Bad" : "Dålig", 20 | "Medium" : "Medium", 21 | "Comment" : "Kommentar", 22 | "Activity" : "Aktivitet", 23 | "Energy" : "Energi", 24 | "None" : "Ingen", 25 | "Normal" : "Normal", 26 | "Temperature" : "Temperatur", 27 | "Blood pressure systolic" : "Blodtryck, systole", 28 | "Blood pressure diastolic" : "Blodtryck, diastole", 29 | "Blood sugar" : "Blodsocker", 30 | "Blood pressure" : "Blodtryck", 31 | "General settings" : "Allmänna inställningar", 32 | "Name" : "Namn", 33 | "Identifier" : "Identifierare", 34 | "Edit name" : "Ändra namn", 35 | "Show details" : "Visa detaljer", 36 | "Delete" : "Radera", 37 | "Information" : "Information", 38 | "Donations" : "Donationer", 39 | "Age" : "Ålder", 40 | "Height" : "Höjd", 41 | "Failed to create share with {displayName}" : "Kunde inte skapa delning med {displayName}", 42 | "Searching for users and groups …" : "Sök efter användare och grupper ...", 43 | "No participants found" : "Inga deltagare hittades", 44 | "Group" : "Grupp", 45 | "Can edit" : "Kan ändra", 46 | "Can manage" : "Kan hanter", 47 | "Quality" : "Kvalitet", 48 | "_%nh_::_%nh_" : ["%nt","%nt"], 49 | "Strong" : "Starkt", 50 | "Target" : "Mål", 51 | "Last week" : "Förra veckan", 52 | "Last month" : "Förra månaden", 53 | "Last year" : "Förra året", 54 | "Show all" : "Visa alla", 55 | "Last hour" : "Senaste timmen", 56 | "Last 24 hours" : "Senaste 24 timmarna", 57 | "Today" : "Idag", 58 | "Actions" : "Åtgärder", 59 | "Cancel" : "Avbryt", 60 | "Error" : "Fel", 61 | "Could not load editor, text not available." : "Det gick inte att ladda redigeraren, texten är inte tillgänglig.", 62 | "Underweight" : "Undervikt" 63 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 64 | } -------------------------------------------------------------------------------- /l10n/sv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "health", 3 | { 4 | "Health" : "Hälsa", 5 | "Share" : "Dela", 6 | "Weight" : "Vikt", 7 | "Activities" : "Aktiviteter", 8 | "Duration" : "Varaktighet", 9 | "Distance" : "Distans", 10 | "Chart" : "Diagram", 11 | "Data" : "Data", 12 | "Column selection" : "Kolumnurval", 13 | "Category" : "Kategori", 14 | "Date" : "Datum", 15 | "Running" : "Löpning", 16 | "Job" : "Arbete", 17 | "Biking" : "Cykling", 18 | "Driving" : "Körning", 19 | "Other" : "Annat", 20 | "Good" : "Bra", 21 | "Bad" : "Dålig", 22 | "Medium" : "Medium", 23 | "Comment" : "Kommentar", 24 | "Activity" : "Aktivitet", 25 | "Energy" : "Energi", 26 | "None" : "Ingen", 27 | "Normal" : "Normal", 28 | "Temperature" : "Temperatur", 29 | "Blood pressure systolic" : "Blodtryck, systole", 30 | "Blood pressure diastolic" : "Blodtryck, diastole", 31 | "Blood sugar" : "Blodsocker", 32 | "Blood pressure" : "Blodtryck", 33 | "General settings" : "Allmänna inställningar", 34 | "Name" : "Namn", 35 | "Identifier" : "Identifierare", 36 | "Edit name" : "Ändra namn", 37 | "Show details" : "Visa detaljer", 38 | "Delete" : "Radera", 39 | "Information" : "Information", 40 | "Donations" : "Donationer", 41 | "Age" : "Ålder", 42 | "Height" : "Höjd", 43 | "Failed to create share with {displayName}" : "Kunde inte skapa delning med {displayName}", 44 | "Searching for users and groups …" : "Sök efter användare och grupper ...", 45 | "No participants found" : "Inga deltagare hittades", 46 | "Group" : "Grupp", 47 | "Can edit" : "Kan ändra", 48 | "Can manage" : "Kan hanter", 49 | "Quality" : "Kvalitet", 50 | "_%nh_::_%nh_" : ["%nt","%nt"], 51 | "Strong" : "Starkt", 52 | "Target" : "Mål", 53 | "Last week" : "Förra veckan", 54 | "Last month" : "Förra månaden", 55 | "Last year" : "Förra året", 56 | "Show all" : "Visa alla", 57 | "Last hour" : "Senaste timmen", 58 | "Last 24 hours" : "Senaste 24 timmarna", 59 | "Today" : "Idag", 60 | "Actions" : "Åtgärder", 61 | "Cancel" : "Avbryt", 62 | "Error" : "Fel", 63 | "Could not load editor, text not available." : "Det gick inte att ladda redigeraren, texten är inte tillgänglig.", 64 | "Underweight" : "Undervikt" 65 | }, 66 | "nplurals=2; plural=(n != 1);"); 67 | -------------------------------------------------------------------------------- /lib/Db/Acl.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Marcus Nitzschke 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use JsonSerializable; 27 | 28 | use OCP\AppFramework\Db\Entity; 29 | 30 | class Acl extends Entity implements JsonSerializable { 31 | public const PERMISSION_READ = 0; 32 | public const PERMISSION_EDIT = 1; 33 | public const PERMISSION_MANAGE = 2; 34 | 35 | public const PERMISSION_TYPE_USER = 0; 36 | public const PERMISSION_TYPE_GROUP = 1; 37 | 38 | protected $participant; 39 | protected $type; 40 | protected $personId; 41 | protected $permissionEdit = false; 42 | protected $permissionManage = false; 43 | 44 | public function __construct() { 45 | $this->addType('id', 'integer'); 46 | $this->addType('personId', 'integer'); 47 | $this->addType('permissionEdit', 'boolean'); 48 | $this->addType('permissionManage', 'boolean'); 49 | $this->addType('type', 'integer'); 50 | } 51 | 52 | public function getPermission($permission) { 53 | switch ($permission) { 54 | case self::PERMISSION_READ: 55 | return true; 56 | case self::PERMISSION_EDIT: 57 | return $this->getPermissionEdit() ?? false; 58 | case self::PERMISSION_MANAGE: 59 | return $this->getPermissionManage() ?? false; 60 | } 61 | return false; 62 | } 63 | 64 | public function jsonSerialize(): array { 65 | return [ 66 | 'id' => $this->id, 67 | 'personId' => $this->personId, 68 | 'permissionEdit' => $this->permissionEdit, 69 | 'permissionManage' => $this->permissionManage, 70 | 'type' => $this->type, 71 | 'participant' => $this->participant 72 | ]; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/Migration/Version0230Date20210107000000.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | namespace OCA\Health\Migration; 24 | 25 | use Closure; 26 | use Doctrine\DBAL\Schema\SchemaException; 27 | use OCP\DB\ISchemaWrapper; 28 | use OCP\IDBConnection; 29 | use OCP\Migration\IOutput; 30 | use OCP\Migration\SimpleMigrationStep; 31 | 32 | class Version0230Date20210107000000 extends SimpleMigrationStep { 33 | 34 | /** @var IDBConnection */ 35 | protected $connection; 36 | 37 | public function __construct(IDBConnection $connection) { 38 | $this->connection = $connection; 39 | } 40 | /** 41 | * @param IOutput $output 42 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` 43 | * @param array $options 44 | * @return null|ISchemaWrapper 45 | * @throws SchemaException 46 | */ 47 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { 48 | /** @var ISchemaWrapper $schema */ 49 | $schema = $schemaClosure(); 50 | $table = $schema->getTable('health_weightdata'); 51 | 52 | // create tmp column 53 | if(!$table->hasColumn('bodyfat2')) { 54 | $table->addColumn('bodyfat2', 'float', [ 55 | 'notnull' => false, 56 | 'default' => null, 57 | ]); 58 | } 59 | return $schema; 60 | } 61 | 62 | public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { 63 | // copy data into tmp column 64 | $query = $this->connection->getQueryBuilder(); 65 | $query->update('health_weightdata') 66 | ->set('bodyfat2', 'bodyfat'); 67 | $query->executeStatement(); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/modules/smoking/SmokingContent.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 53 | 54 | 82 | -------------------------------------------------------------------------------- /lib/Db/WeightdataMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\DoesNotExistException; 27 | use OCP\AppFramework\Db\MultipleObjectsReturnedException; 28 | use OCP\AppFramework\Db\QBMapper; 29 | use OCP\IDBConnection; 30 | 31 | class WeightdataMapper extends QBMapper { 32 | 33 | public function __construct(IDBConnection $db) { 34 | parent::__construct($db, 'health_weightdata', Weightdata::class); 35 | } 36 | 37 | public function find(int $id) { 38 | $qb = $this->db->getQueryBuilder(); 39 | 40 | $qb->select('*') 41 | ->from($this->getTableName()) 42 | ->where( 43 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 44 | ); 45 | 46 | return $this->findEntity($qb); 47 | } 48 | 49 | public function findLast(int $personId) { 50 | $qb = $this->db->getQueryBuilder(); 51 | 52 | $qb->select('*') 53 | ->from($this->getTableName()) 54 | ->where($qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 55 | ); 56 | $qb->orderBy('date', 'desc'); 57 | $qb->setMaxResults(1); 58 | try { 59 | return $this->findEntity($qb); 60 | } catch (DoesNotExistException $e) { 61 | return null; 62 | } catch (MultipleObjectsReturnedException $e) { 63 | return null; 64 | } 65 | } 66 | 67 | public function findAll(int $personId) { 68 | $qb = $this->db->getQueryBuilder(); 69 | 70 | $qb->select('*') 71 | ->from($this->getTableName()) 72 | ->where( 73 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 74 | ); 75 | 76 | return $this->findEntities($qb); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /lib/Db/Weightdata.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use \JsonSerializable; 27 | use DateTime; 28 | 29 | use OCP\AppFramework\Db\Entity; 30 | 31 | /** 32 | * @method setDate(string $format) 33 | */ 34 | class Weightdata extends Entity implements JsonSerializable { 35 | 36 | protected $insertTime; 37 | protected $lastupdateTime; 38 | protected $personId; 39 | protected $bodyfat; 40 | protected $bodyfat2; 41 | protected $measurement; 42 | protected $weight; 43 | protected $date; 44 | protected $waistSize; 45 | protected $hipSize; 46 | protected $musclePart; 47 | protected $comment; 48 | 49 | public function __construct() { 50 | $this->addType('id', 'integer'); 51 | $this->addType('personId', 'integer'); 52 | $this->addType('bodyfat', 'float'); 53 | $this->addType('measurement', 'float'); 54 | $this->addType('weight', 'float'); 55 | $this->addType('waistSize', 'float'); 56 | $this->addType('hipSize', 'float'); 57 | $this->addType('musclePart', 'float'); 58 | } 59 | 60 | public function jsonSerialize(): array { 61 | $date = new DateTime($this->date); 62 | return [ 63 | 'id' => $this->id, 64 | 'insertTime' => $this->insertTime, 65 | 'lastupdateTime' => $this->lastupdateTime, 66 | 'personId' => $this->personId, 67 | 'bodyfat' => $this->bodyfat, 68 | 'measurement' => $this->measurement, 69 | 'weight' => $this->weight, 70 | 'date' => $date->format('Y-m-d'), 71 | 'waistSize' => $this->waistSize, 72 | 'hipSize' => $this->hipSize, 73 | 'musclePart' => $this->musclePart, 74 | 'comment' => $this->comment, 75 | ]; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/Db/MedicationPlanMapper.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Marcus Nitzschke 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | 24 | namespace OCA\Health\Db; 25 | 26 | use OCP\AppFramework\Db\DoesNotExistException; 27 | use OCP\AppFramework\Db\MultipleObjectsReturnedException; 28 | use OCP\AppFramework\Db\QBMapper; 29 | use OCP\IDBConnection; 30 | 31 | class MedicationPlanMapper extends QBMapper { 32 | 33 | public function __construct(IDBConnection $db) { 34 | parent::__construct($db, 'health_medicationplans', MedicationPlan::class); 35 | } 36 | 37 | public function find(int $id) { 38 | $qb = $this->db->getQueryBuilder(); 39 | 40 | $qb->select('*') 41 | ->from($this->getTableName()) 42 | ->where( 43 | $qb->expr()->eq('id', $qb->createNamedParameter($id)) 44 | ); 45 | 46 | return $this->findEntity($qb); 47 | } 48 | 49 | public function findAll(int $personId) { 50 | $qb = $this->db->getQueryBuilder(); 51 | 52 | $qb->select('*') 53 | ->from($this->getTableName()) 54 | ->where( 55 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 56 | ); 57 | 58 | return $this->findEntities($qb); 59 | } 60 | 61 | public function findLast(int $personId) { 62 | $qb = $this->db->getQueryBuilder(); 63 | 64 | $qb->select('*') 65 | ->from($this->getTableName()) 66 | ->where( 67 | $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) 68 | ) 69 | ->orderBy('date', 'desc') 70 | ->setMaxResults(1); 71 | try { 72 | return $this->findEntity($qb); 73 | } catch (DoesNotExistException $e) { 74 | return null; 75 | } catch (MultipleObjectsReturnedException $e) { 76 | return null; 77 | } 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /lib/Migration/Version0230Date20210110000000.php: -------------------------------------------------------------------------------- 1 | 4 | * 5 | * @author Florian Steffens 6 | * 7 | * @license GNU AGPL version 3 or any later version 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as 11 | * published by the Free Software Foundation, either version 3 of the 12 | * License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * 22 | */ 23 | namespace OCA\Health\Migration; 24 | 25 | use Closure; 26 | use Doctrine\DBAL\Schema\SchemaException; 27 | use OCP\DB\ISchemaWrapper; 28 | use OCP\IDBConnection; 29 | use OCP\Migration\IOutput; 30 | use OCP\Migration\SimpleMigrationStep; 31 | 32 | class Version0230Date20210110000000 extends SimpleMigrationStep { 33 | 34 | /** @var IDBConnection */ 35 | protected $connection; 36 | 37 | public function __construct(IDBConnection $connection) { 38 | $this->connection = $connection; 39 | } 40 | /** 41 | * @param IOutput $output 42 | * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` 43 | * @param array $options 44 | * @return null|ISchemaWrapper 45 | * @throws SchemaException 46 | */ 47 | public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { 48 | /** @var ISchemaWrapper $schema */ 49 | $schema = $schemaClosure(); 50 | $table = $schema->getTable('health_weightdata'); 51 | 52 | $table = $schema->getTable('health_weightdata'); 53 | if($table->hasColumn('bodyfat') && $table->hasColumn('bodyfat2')) { 54 | $table->dropColumn('bodyfat'); 55 | $table->addColumn('bodyfat', 'float', [ 56 | 'default' => null, 57 | 'notnull' => false, 58 | ]); 59 | } 60 | return $schema; 61 | } 62 | 63 | public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { 64 | // copy data into tmp column 65 | $query = $this->connection->getQueryBuilder(); 66 | $query->update('health_weightdata') 67 | ->set('bodyfat', 'bodyfat2'); 68 | $query->executeStatement(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/store/SleepApi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2020 Florian Steffens 3 | * 4 | * @author Florian Steffens 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import axios from '@nextcloud/axios' 24 | import { generateUrl } from '@nextcloud/router' 25 | 26 | export class SleepApi { 27 | 28 | url(url) { 29 | url = `/apps/health/sleep${url}` 30 | return generateUrl(url) 31 | } 32 | 33 | findDatasetsByPerson(personId) { 34 | return axios.get(this.url(`/dataset/person/${personId}`)) 35 | .then( 36 | (response) => { 37 | return Promise.resolve(response.data) 38 | }, 39 | (err) => { 40 | return Promise.reject(err) 41 | } 42 | ) 43 | .catch((err) => { 44 | return Promise.reject(err) 45 | }) 46 | } 47 | 48 | addSet(personId, set) { 49 | // console.debug('try to send new dataset to BE') 50 | return axios.post(this.url(`/dataset/person/${personId}`), set) 51 | .then( 52 | (response) => { 53 | return Promise.resolve(response.data) 54 | }, 55 | (err) => { 56 | return Promise.reject(err) 57 | } 58 | ) 59 | .catch((err) => { 60 | return Promise.reject(err) 61 | }) 62 | } 63 | 64 | deleteSet(set) { 65 | // console.debug('try to remove from BE', { set: set, url: this.url(`/dataset/${set.id}`) }) 66 | return axios.delete(this.url(`/dataset/${set.id}`)) 67 | .then( 68 | (response) => { 69 | return Promise.resolve(response.data) 70 | }, 71 | (err) => { 72 | return Promise.reject(err) 73 | } 74 | ) 75 | .catch((err) => { 76 | return Promise.reject(err) 77 | }) 78 | } 79 | 80 | updateSet(set) { 81 | return axios.put(this.url(`/dataset/${set.id}`), set) 82 | .then( 83 | (response) => { 84 | return Promise.resolve(response.data) 85 | }, 86 | (err) => { 87 | return Promise.reject(err) 88 | } 89 | ) 90 | .catch((err) => { 91 | return Promise.reject(err) 92 | }) 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/store/WeightApi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2020 Florian Steffens 3 | * 4 | * @author Florian Steffens 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import axios from '@nextcloud/axios' 24 | import { generateUrl } from '@nextcloud/router' 25 | 26 | export class WeightApi { 27 | 28 | url(url) { 29 | url = `/apps/health/weight${url}` 30 | return generateUrl(url) 31 | } 32 | 33 | findDatasetsByPerson(personId) { 34 | return axios.get(this.url(`/dataset/person/${personId}`)) 35 | .then( 36 | (response) => { 37 | return Promise.resolve(response.data) 38 | }, 39 | (err) => { 40 | return Promise.reject(err) 41 | } 42 | ) 43 | .catch((err) => { 44 | return Promise.reject(err) 45 | }) 46 | } 47 | 48 | addSet(personId, set) { 49 | // console.debug('try to send new dataset to BE') 50 | return axios.post(this.url(`/dataset/person/${personId}`), set) 51 | .then( 52 | (response) => { 53 | return Promise.resolve(response.data) 54 | }, 55 | (err) => { 56 | return Promise.reject(err) 57 | } 58 | ) 59 | .catch((err) => { 60 | return Promise.reject(err) 61 | }) 62 | } 63 | 64 | deleteSet(set) { 65 | // console.debug('try to remove from BE', { set: set, url: this.url(`/dataset/${set.id}`) }) 66 | return axios.delete(this.url(`/dataset/${set.id}`)) 67 | .then( 68 | (response) => { 69 | return Promise.resolve(response.data) 70 | }, 71 | (err) => { 72 | return Promise.reject(err) 73 | } 74 | ) 75 | .catch((err) => { 76 | return Promise.reject(err) 77 | }) 78 | } 79 | 80 | updateSet(set) { 81 | return axios.put(this.url(`/dataset/${set.id}`), set) 82 | .then( 83 | (response) => { 84 | return Promise.resolve(response.data) 85 | }, 86 | (err) => { 87 | return Promise.reject(err) 88 | } 89 | ) 90 | .catch((err) => { 91 | return Promise.reject(err) 92 | }) 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/store/FeelingApi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2020 Florian Steffens 3 | * 4 | * @author Florian Steffens 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import axios from '@nextcloud/axios' 24 | import { generateUrl } from '@nextcloud/router' 25 | 26 | export class FeelingApi { 27 | 28 | url(url) { 29 | url = `/apps/health/feeling${url}` 30 | return generateUrl(url) 31 | } 32 | 33 | findDatasetsByPerson(personId) { 34 | return axios.get(this.url(`/dataset/person/${personId}`)) 35 | .then( 36 | (response) => { 37 | return Promise.resolve(response.data) 38 | }, 39 | (err) => { 40 | return Promise.reject(err) 41 | } 42 | ) 43 | .catch((err) => { 44 | return Promise.reject(err) 45 | }) 46 | } 47 | 48 | addSet(personId, set) { 49 | // console.debug('try to send new dataset to BE') 50 | return axios.post(this.url(`/dataset/person/${personId}`), set) 51 | .then( 52 | (response) => { 53 | return Promise.resolve(response.data) 54 | }, 55 | (err) => { 56 | return Promise.reject(err) 57 | } 58 | ) 59 | .catch((err) => { 60 | return Promise.reject(err) 61 | }) 62 | } 63 | 64 | deleteSet(set) { 65 | // console.debug('try to remove from BE', { set: set, url: this.url(`/dataset/${set.id}`) }) 66 | return axios.delete(this.url(`/dataset/${set.id}`)) 67 | .then( 68 | (response) => { 69 | return Promise.resolve(response.data) 70 | }, 71 | (err) => { 72 | return Promise.reject(err) 73 | } 74 | ) 75 | .catch((err) => { 76 | return Promise.reject(err) 77 | }) 78 | } 79 | 80 | updateSet(set) { 81 | return axios.put(this.url(`/dataset/${set.id}`), set) 82 | .then( 83 | (response) => { 84 | return Promise.resolve(response.data) 85 | }, 86 | (err) => { 87 | return Promise.reject(err) 88 | } 89 | ) 90 | .catch((err) => { 91 | return Promise.reject(err) 92 | }) 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /src/store/SmokingApi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright Copyright (c) 2020 Florian Steffens 3 | * 4 | * @author Florian Steffens 5 | * 6 | * @license AGPL-3.0-or-later 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as 10 | * published by the Free Software Foundation, either version 3 of the 11 | * License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * 21 | */ 22 | 23 | import axios from '@nextcloud/axios' 24 | import { generateUrl } from '@nextcloud/router' 25 | 26 | export class SmokingApi { 27 | 28 | url(url) { 29 | url = `/apps/health/smoking${url}` 30 | return generateUrl(url) 31 | } 32 | 33 | findDatasetsByPerson(personId) { 34 | return axios.get(this.url(`/dataset/person/${personId}`)) 35 | .then( 36 | (response) => { 37 | return Promise.resolve(response.data) 38 | }, 39 | (err) => { 40 | return Promise.reject(err) 41 | } 42 | ) 43 | .catch((err) => { 44 | return Promise.reject(err) 45 | }) 46 | } 47 | 48 | addSet(personId, set) { 49 | // console.debug('try to send new dataset to BE') 50 | return axios.post(this.url(`/dataset/person/${personId}`), set) 51 | .then( 52 | (response) => { 53 | return Promise.resolve(response.data) 54 | }, 55 | (err) => { 56 | return Promise.reject(err) 57 | } 58 | ) 59 | .catch((err) => { 60 | return Promise.reject(err) 61 | }) 62 | } 63 | 64 | deleteSet(set) { 65 | // console.debug('try to remove from BE', { set: set, url: this.url(`/dataset/${set.id}`) }) 66 | return axios.delete(this.url(`/dataset/${set.id}`)) 67 | .then( 68 | (response) => { 69 | return Promise.resolve(response.data) 70 | }, 71 | (err) => { 72 | return Promise.reject(err) 73 | } 74 | ) 75 | .catch((err) => { 76 | return Promise.reject(err) 77 | }) 78 | } 79 | 80 | updateSet(set) { 81 | return axios.put(this.url(`/dataset/${set.id}`), set) 82 | .then( 83 | (response) => { 84 | return Promise.resolve(response.data) 85 | }, 86 | (err) => { 87 | return Promise.reject(err) 88 | } 89 | ) 90 | .catch((err) => { 91 | return Promise.reject(err) 92 | }) 93 | } 94 | 95 | } 96 | --------------------------------------------------------------------------------