├── l10n ├── .gitkeep ├── lb.json ├── sq.json ├── eo.json ├── ka_GE.json ├── ka.json ├── lb.js ├── sq.js ├── eo.js ├── ka_GE.js ├── es_CR.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 ├── es_419.json ├── ka.js ├── th.json ├── es_AR.json ├── es_CL.json ├── es_CO.json ├── es_CR.js ├── es_DO.js ├── es_GT.js ├── es_HN.js ├── es_MX.json ├── es_NI.js ├── es_PA.js ├── es_PE.js ├── es_PR.js ├── es_PY.js ├── es_SV.js ├── es_UY.js ├── es_419.js ├── uz.json ├── th.js ├── es_AR.js ├── es_CL.js ├── es_CO.js ├── es_MX.js ├── uz.js ├── oc.json ├── oc.js ├── vi.json ├── vi.js ├── be.json ├── pt_PT.json ├── ast.json ├── be.js ├── pt_PT.js ├── ast.js ├── ko.json ├── ko.js ├── ja.json ├── ja.js ├── he.json ├── is.json ├── lv.json ├── ro.json ├── he.js ├── is.js ├── lv.js ├── ro.js ├── id.json ├── id.js ├── sv.json ├── sv.js ├── et_EE.json ├── zh_CN.json ├── et_EE.js ├── zh_CN.js ├── ca.json ├── ca.js ├── nl.json ├── nl.js ├── hr.json ├── it.json ├── sc.json ├── lt_LT.json ├── sc.js ├── hr.js ├── it.js ├── lt_LT.js ├── sk.json ├── pl.json ├── sk.js ├── pl.js ├── da.json ├── da.js ├── sl.json ├── sl.js ├── ru.json ├── ru.js ├── fi.json ├── fi.js ├── zh_TW.json ├── mk.json ├── zh_HK.json ├── zh_TW.js ├── mk.js └── zh_HK.js ├── .l10nignore ├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── reuse.yml │ ├── lint-info-xml.yml │ ├── lint-php-cs.yml │ ├── lint-php.yml │ ├── lint-eslint.yml │ ├── psalm.yml │ ├── pr-feedback.yml │ └── node.yml ├── img ├── screenshot1.jpg ├── app.svg └── app-dark.svg ├── .gitignore ├── AUTHORS.md ├── css └── dashboard.css ├── templates ├── adminSettings.php ├── popupSuccess.php └── personalSettings.php ├── lib ├── Exceptions │ └── MaxDownloadSizeReachedException.php ├── BackgroundJob │ └── ImportOnedriveJob.php ├── Service │ ├── UserScopeService.php │ └── OnedriveColorService.php ├── Settings │ ├── Admin.php │ ├── PersonalSection.php │ ├── AdminSection.php │ └── Personal.php ├── AppInfo │ └── Application.php ├── Notification │ └── Notifier.php ├── Migration │ └── Version3300Date202410151354.php └── Controller │ └── OnedriveAPIController.php ├── src ├── bootstrap.js ├── popupSuccess.js ├── adminSettings.js ├── personalSettings.js ├── utils.js └── components │ ├── icons │ └── GroupIcon.vue │ └── AdminSettings.vue ├── .tx └── config ├── .php-cs-fixer.dist.php ├── .eslintrc.js ├── stylelint.config.js ├── LICENSES └── MIT.txt ├── composer.json ├── webpack.js ├── appinfo ├── routes.php └── info.xml ├── psalm.xml ├── README.md ├── REUSE.toml ├── package.json ├── tests └── psalm-baseline.xml ├── makefile └── CHANGELOG.md /l10n/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.l10nignore: -------------------------------------------------------------------------------- 1 | # compiled vue templates 2 | js/ 3 | vendor/ 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | /appinfo/info.xml @marcelklehr @julien-nc 2 | -------------------------------------------------------------------------------- /img/screenshot1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/integration_onedrive/HEAD/img/screenshot1.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | js/ 2 | .code-workspace 3 | .DS_Store 4 | .idea/ 5 | .vscode/ 6 | .vscode-upload.json 7 | .*.sw* 8 | node_modules 9 | vendor 10 | -------------------------------------------------------------------------------- /l10n/lb.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "Client ID", 3 | "Contacts" : "Kontakter", 4 | "Calendars" : "Kalenneren", 5 | "Import calendar" : "Kalenner importéiren" 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /l10n/sq.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID klienti", 3 | "Client secret" : "E fshehtë klienti", 4 | "Contacts" : "Kontaktet", 5 | "Import calendar" : "Importo kalendar" 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /l10n/eo.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "Klientidentigilo", 3 | "Client secret" : "Klientosekreto", 4 | "Contacts" : "Kontaktoj", 5 | "Import calendar" : "Enporti kalendaron" 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /l10n/ka_GE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "კლიენტის ID", 3 | "Client secret" : "კლიენტის საიდუმლო", 4 | "Contacts" : "კონტაქტები", 5 | "Import calendar" : "კალენდრის იმპორტი" 6 | },"pluralForm" :"nplurals=2; plural=(n!=1);" 7 | } -------------------------------------------------------------------------------- /l10n/ka.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "Client ID", 3 | "Client secret" : "Client secret", 4 | "Contacts" : "Contacts", 5 | "Calendars" : "Calendars", 6 | "Import calendar" : "Import calendar" 7 | },"pluralForm" :"nplurals=2; plural=(n!=1);" 8 | } -------------------------------------------------------------------------------- /l10n/lb.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "Client ID", 5 | "Contacts" : "Kontakter", 6 | "Calendars" : "Kalenneren", 7 | "Import calendar" : "Kalenner importéiren" 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /l10n/sq.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID klienti", 5 | "Client secret" : "E fshehtë klienti", 6 | "Contacts" : "Kontaktet", 7 | "Import calendar" : "Importo kalendar" 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /l10n/eo.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "Klientidentigilo", 5 | "Client secret" : "Klientosekreto", 6 | "Contacts" : "Kontaktoj", 7 | "Import calendar" : "Enporti kalendaron" 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /l10n/ka_GE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "კლიენტის ID", 5 | "Client secret" : "კლიენტის საიდუმლო", 6 | "Contacts" : "კონტაქტები", 7 | "Import calendar" : "კალენდრის იმპორტი" 8 | }, 9 | "nplurals=2; plural=(n!=1);"); 10 | -------------------------------------------------------------------------------- /l10n/es_CR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_DO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_GT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_HN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_NI.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_PA.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_PE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_PR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_PY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_SV.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_UY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/es_419.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Import calendar" : "Importar calendario" 6 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 7 | } -------------------------------------------------------------------------------- /l10n/ka.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "Client ID", 5 | "Client secret" : "Client secret", 6 | "Contacts" : "Contacts", 7 | "Calendars" : "Calendars", 8 | "Import calendar" : "Import calendar" 9 | }, 10 | "nplurals=2; plural=(n!=1);"); 11 | -------------------------------------------------------------------------------- /l10n/th.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "รหัสไคลเอ็นต์", 3 | "Client secret" : "ข้อมูลลับไคลเอ็นต์", 4 | "Connected as {user}" : "เชื่อมต่อเป็น {user} แล้ว", 5 | "Contacts" : "รายชื่อ", 6 | "Calendars" : "ปฏิทิน", 7 | "Import calendar" : "นำเข้าปฏิทิน" 8 | },"pluralForm" :"nplurals=1; plural=0;" 9 | } -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | 5 | # Authors 6 | 7 | * Julien Veyssier (Developper) 8 | * Marcel Klehr (maintainer) 9 | * Alexander Piskun (maintainer) 10 | -------------------------------------------------------------------------------- /l10n/es_AR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Calendars" : "Calendarios", 6 | "Import calendar" : "Importar calendario" 7 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 8 | } -------------------------------------------------------------------------------- /l10n/es_CL.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Calendars" : "Calendarios", 6 | "Import calendar" : "Importar calendario" 7 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 8 | } -------------------------------------------------------------------------------- /l10n/es_CO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Calendars" : "Calendarios", 6 | "Import calendar" : "Importar calendario" 7 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 8 | } -------------------------------------------------------------------------------- /l10n/es_CR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_DO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_GT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_HN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_MX.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Client ID" : "ID del cliente", 3 | "Client secret" : "Secreto del cliente", 4 | "Contacts" : "Contactos", 5 | "Calendars" : "Calendarios", 6 | "Import calendar" : "Importar calendario" 7 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 8 | } -------------------------------------------------------------------------------- /l10n/es_NI.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_PA.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_PE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_PR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_PY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_SV.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/es_UY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /css/dashboard.css: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | .icon-onedrive { 6 | background-image: url(./../img/app-dark.svg); 7 | } 8 | 9 | body.theme--dark .icon-onedrive { 10 | background-image: url(./../img/app.svg); 11 | } 12 | -------------------------------------------------------------------------------- /l10n/es_419.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Import calendar" : "Importar calendario" 8 | }, 9 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 10 | -------------------------------------------------------------------------------- /l10n/uz.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Bad credentials" : "Akkaunt ma'lumotlari xato", 3 | "Bad HTTP method" : "Yomon HTTP usuli", 4 | "Connected accounts" : "Ulangan akkauntlar", 5 | "Client ID" : "Mijoz identifikatori", 6 | "Contacts" : "Contacts", 7 | "Calendars" : "Taqvimlar" 8 | },"pluralForm" :"nplurals=1; plural=0;" 9 | } -------------------------------------------------------------------------------- /templates/adminSettings.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /templates/popupSuccess.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /templates/personalSettings.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | -------------------------------------------------------------------------------- /l10n/th.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "รหัสไคลเอ็นต์", 5 | "Client secret" : "ข้อมูลลับไคลเอ็นต์", 6 | "Connected as {user}" : "เชื่อมต่อเป็น {user} แล้ว", 7 | "Contacts" : "รายชื่อ", 8 | "Calendars" : "ปฏิทิน", 9 | "Import calendar" : "นำเข้าปฏิทิน" 10 | }, 11 | "nplurals=1; plural=0;"); 12 | -------------------------------------------------------------------------------- /l10n/es_AR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Calendars" : "Calendarios", 8 | "Import calendar" : "Importar calendario" 9 | }, 10 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 11 | -------------------------------------------------------------------------------- /l10n/es_CL.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Calendars" : "Calendarios", 8 | "Import calendar" : "Importar calendario" 9 | }, 10 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 11 | -------------------------------------------------------------------------------- /l10n/es_CO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Calendars" : "Calendarios", 8 | "Import calendar" : "Importar calendario" 9 | }, 10 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 11 | -------------------------------------------------------------------------------- /l10n/es_MX.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Client ID" : "ID del cliente", 5 | "Client secret" : "Secreto del cliente", 6 | "Contacts" : "Contactos", 7 | "Calendars" : "Calendarios", 8 | "Import calendar" : "Importar calendario" 9 | }, 10 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 11 | -------------------------------------------------------------------------------- /l10n/uz.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Bad credentials" : "Akkaunt ma'lumotlari xato", 5 | "Bad HTTP method" : "Yomon HTTP usuli", 6 | "Connected accounts" : "Ulangan akkauntlar", 7 | "Client ID" : "Mijoz identifikatori", 8 | "Contacts" : "Contacts", 9 | "Calendars" : "Taqvimlar" 10 | }, 11 | "nplurals=1; plural=0;"); 12 | -------------------------------------------------------------------------------- /lib/Exceptions/MaxDownloadSizeReachedException.php: -------------------------------------------------------------------------------- 1 | /integration_onedrive.po 7 | source_file = translationfiles/templates/integration_onedrive.pot 8 | source_lang = en 9 | type = PO 10 | 11 | -------------------------------------------------------------------------------- /l10n/oc.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Bad credentials" : "Marrits identificants", 3 | "Connected accounts" : "Comptes connectats", 4 | "Client ID" : "ID client", 5 | "Connected as {user}" : "Connectat coma {user}", 6 | "Contacts" : "Contactes", 7 | "Calendars" : "Calendièrs", 8 | "Import calendar" : "Importar un calendièr" 9 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 10 | } -------------------------------------------------------------------------------- /.php-cs-fixer.dist.php: -------------------------------------------------------------------------------- 1 | getFinder() 15 | ->in(__DIR__ . '/lib'); 16 | return $config; 17 | -------------------------------------------------------------------------------- /l10n/oc.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Bad credentials" : "Marrits identificants", 5 | "Connected accounts" : "Comptes connectats", 6 | "Client ID" : "ID client", 7 | "Connected as {user}" : "Connectat coma {user}", 8 | "Contacts" : "Contactes", 9 | "Calendars" : "Calendièrs", 10 | "Import calendar" : "Importar un calendièr" 11 | }, 12 | "nplurals=2; plural=(n > 1);"); 13 | -------------------------------------------------------------------------------- /src/popupSuccess.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | 6 | import { loadState } from '@nextcloud/initial-state' 7 | 8 | const state = loadState('integration_onedrive', 'popup-data') 9 | const username = state.user_name 10 | 11 | if (window.opener) { 12 | window.opener.postMessage({ username }) 13 | window.close() 14 | } 15 | -------------------------------------------------------------------------------- /l10n/vi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Bad credentials" : "Thông tin đăng nhập không hợp lệ.", 3 | "Bad HTTP method" : "Phương thức HTTP không hợp lệ", 4 | "Connected accounts" : "Đã kết nối tài khoản", 5 | "Client ID" : "ID khách hàng", 6 | "Connected as {user}" : "Kết nối bởi {user}", 7 | "Contacts" : "Danh bạ", 8 | "Calendars" : "Lịch", 9 | "Import calendar" : "Nhập lịch biểu" 10 | },"pluralForm" :"nplurals=1; plural=0;" 11 | } -------------------------------------------------------------------------------- /l10n/vi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Bad credentials" : "Thông tin đăng nhập không hợp lệ.", 5 | "Bad HTTP method" : "Phương thức HTTP không hợp lệ", 6 | "Connected accounts" : "Đã kết nối tài khoản", 7 | "Client ID" : "ID khách hàng", 8 | "Connected as {user}" : "Kết nối bởi {user}", 9 | "Contacts" : "Danh bạ", 10 | "Calendars" : "Lịch", 11 | "Import calendar" : "Nhập lịch biểu" 12 | }, 13 | "nplurals=1; plural=0;"); 14 | -------------------------------------------------------------------------------- /src/adminSettings.js: -------------------------------------------------------------------------------- 1 | /* jshint esversion: 6 */ 2 | 3 | /** 4 | * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors 5 | * SPDX-License-Identifier: AGPL-3.0-or-later 6 | */ 7 | 8 | import Vue from 'vue' 9 | import './bootstrap.js' 10 | import AdminSettings from './components/AdminSettings.vue' 11 | 12 | // eslint-disable-next-line 13 | 'use strict' 14 | 15 | // eslint-disable-next-line 16 | new Vue({ 17 | el: '#onedrive_prefs', 18 | render: h => h(AdminSettings), 19 | }) 20 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | module.exports = { 6 | globals: { 7 | appVersion: true 8 | }, 9 | parserOptions: { 10 | requireConfigFile: false 11 | }, 12 | extends: [ 13 | '@nextcloud' 14 | ], 15 | rules: { 16 | 'jsdoc/require-jsdoc': 'off', 17 | 'jsdoc/tag-lines': 'off', 18 | 'vue/first-attribute-linebreak': 'off', 19 | 'import/extensions': 'off' 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /l10n/be.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Памылка атрымання токена доступу OAuth", 3 | "OneDrive" : "OneDrive", 4 | "OAuth access token refused" : "Токен доступу OAuth адхілены", 5 | "Client ID" : "Ідэнтыфікатар кліента", 6 | "Contacts" : "Кантакты", 7 | "Calendars" : "Календары" 8 | },"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);" 9 | } -------------------------------------------------------------------------------- /src/personalSettings.js: -------------------------------------------------------------------------------- 1 | /* jshint esversion: 6 */ 2 | 3 | /** 4 | * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors 5 | * SPDX-License-Identifier: AGPL-3.0-or-later 6 | */ 7 | 8 | import Vue from 'vue' 9 | import './bootstrap.js' 10 | import PersonalSettings from './components/PersonalSettings.vue' 11 | 12 | // eslint-disable-next-line 13 | 'use strict' 14 | 15 | // eslint-disable-next-line 16 | new Vue({ 17 | el: '#onedrive_prefs', 18 | render: h => h(PersonalSettings), 19 | }) 20 | -------------------------------------------------------------------------------- /l10n/pt_PT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error during OAuth exchanges" : "Erro durante trocas com o OAuth", 3 | "Bad credentials" : "Credenciais inválidas", 4 | "Bad HTTP method" : "Método HTTP incorreto", 5 | "Client ID" : "Id. do Cliente", 6 | "Client secret" : "Segredo do cliente\\\\", 7 | "Contacts" : "Contactos", 8 | "Calendars" : "Calendários", 9 | "Import calendar" : "Importar calendário" 10 | },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 11 | } -------------------------------------------------------------------------------- /l10n/ast.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Data migration" : "Migración de los datos", 3 | "Client ID" : "ID de veceru", 4 | "Client secret" : "Secretu de veceru", 5 | "Failed to save OneDrive options" : "Nun se pue guardar la configuración d'OneDrive", 6 | "Failed to import calendar" : "Nun se pue importar el calendariu", 7 | "Failed to get number of contacts" : "Nun se pue consiguir el númberu de contautos", 8 | "Contacts" : "Contautos", 9 | "Calendars" : "Calendarios" 10 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 11 | } -------------------------------------------------------------------------------- /l10n/be.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Памылка атрымання токена доступу OAuth", 5 | "OneDrive" : "OneDrive", 6 | "OAuth access token refused" : "Токен доступу OAuth адхілены", 7 | "Client ID" : "Ідэнтыфікатар кліента", 8 | "Contacts" : "Кантакты", 9 | "Calendars" : "Календары" 10 | }, 11 | "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);"); 12 | -------------------------------------------------------------------------------- /l10n/pt_PT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error during OAuth exchanges" : "Erro durante trocas com o OAuth", 5 | "Bad credentials" : "Credenciais inválidas", 6 | "Bad HTTP method" : "Método HTTP incorreto", 7 | "Client ID" : "Id. do Cliente", 8 | "Client secret" : "Segredo do cliente\\\\", 9 | "Contacts" : "Contactos", 10 | "Calendars" : "Calendários", 11 | "Import calendar" : "Importar calendário" 12 | }, 13 | "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 14 | -------------------------------------------------------------------------------- /l10n/ast.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Data migration" : "Migración de los datos", 5 | "Client ID" : "ID de veceru", 6 | "Client secret" : "Secretu de veceru", 7 | "Failed to save OneDrive options" : "Nun se pue guardar la configuración d'OneDrive", 8 | "Failed to import calendar" : "Nun se pue importar el calendariu", 9 | "Failed to get number of contacts" : "Nun se pue consiguir el númberu de contautos", 10 | "Contacts" : "Contautos", 11 | "Calendars" : "Calendarios" 12 | }, 13 | "nplurals=2; plural=(n != 1);"); 14 | -------------------------------------------------------------------------------- /l10n/ko.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "OAuth 접근 토큰을 가져오는 중 오류 발생", 3 | "Error during OAuth exchanges" : "OAuth 교환 중 오류 발생", 4 | "Bad credentials" : "옳지 않은 자격 증명", 5 | "Bad HTTP method" : "옳지 않은 HTTP 메소드", 6 | "OAuth access token refused" : "OAuth 접근 토큰 거부됐습니다.", 7 | "Connected accounts" : "계정 연결됨", 8 | "Client ID" : "클라이언트 ID", 9 | "Client secret" : "클라이언트 비밀 값", 10 | "Connected as {user}" : "{user}로 연결됨", 11 | "Contacts" : "연락처", 12 | "Calendars" : "달력", 13 | "Import calendar" : "달력 가져오기" 14 | },"pluralForm" :"nplurals=1; plural=0;" 15 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: AGPL-3.0-or-later 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: composer 7 | directory: "/" 8 | schedule: 9 | interval: weekly 10 | day: saturday 11 | time: "03:00" 12 | timezone: Europe/Paris 13 | open-pull-requests-limit: 5 14 | - package-ecosystem: "github-actions" 15 | directory: "/" 16 | schedule: 17 | interval: weekly 18 | day: saturday 19 | time: "03:00" 20 | timezone: Europe/Paris 21 | open-pull-requests-limit: 5 22 | -------------------------------------------------------------------------------- /l10n/ko.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "OAuth 접근 토큰을 가져오는 중 오류 발생", 5 | "Error during OAuth exchanges" : "OAuth 교환 중 오류 발생", 6 | "Bad credentials" : "옳지 않은 자격 증명", 7 | "Bad HTTP method" : "옳지 않은 HTTP 메소드", 8 | "OAuth access token refused" : "OAuth 접근 토큰 거부됐습니다.", 9 | "Connected accounts" : "계정 연결됨", 10 | "Client ID" : "클라이언트 ID", 11 | "Client secret" : "클라이언트 비밀 값", 12 | "Connected as {user}" : "{user}로 연결됨", 13 | "Contacts" : "연락처", 14 | "Calendars" : "달력", 15 | "Import calendar" : "달력 가져오기" 16 | }, 17 | "nplurals=1; plural=0;"); 18 | -------------------------------------------------------------------------------- /l10n/ja.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "OAuth アクセストークン取得時のエラー", 3 | "Error during OAuth exchanges" : "OAuth 通信中のエラー", 4 | "Bad credentials" : "不正な資格情報", 5 | "Bad HTTP method" : "不正なHTTPメソッド", 6 | "OAuth access token refused" : "OAuth アクセストークンが拒否されました", 7 | "Connected accounts" : "接続済みアカウント", 8 | "Data migration" : "データ移行", 9 | "Client ID" : "クライアント ID", 10 | "Client secret" : "クライアントシークレット", 11 | "Enable navigation link" : "ナビゲーションリンクを有効化", 12 | "Connected as {user}" : "{user} に接続済み", 13 | "Contacts" : "連絡先", 14 | "Calendars" : "カレンダー", 15 | "Import calendar" : "カレンダーのインポート" 16 | },"pluralForm" :"nplurals=1; plural=0;" 17 | } -------------------------------------------------------------------------------- /l10n/ja.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "OAuth アクセストークン取得時のエラー", 5 | "Error during OAuth exchanges" : "OAuth 通信中のエラー", 6 | "Bad credentials" : "不正な資格情報", 7 | "Bad HTTP method" : "不正なHTTPメソッド", 8 | "OAuth access token refused" : "OAuth アクセストークンが拒否されました", 9 | "Connected accounts" : "接続済みアカウント", 10 | "Data migration" : "データ移行", 11 | "Client ID" : "クライアント ID", 12 | "Client secret" : "クライアントシークレット", 13 | "Enable navigation link" : "ナビゲーションリンクを有効化", 14 | "Connected as {user}" : "{user} に接続済み", 15 | "Contacts" : "連絡先", 16 | "Calendars" : "カレンダー", 17 | "Import calendar" : "カレンダーのインポート" 18 | }, 19 | "nplurals=1; plural=0;"); 20 | -------------------------------------------------------------------------------- /l10n/he.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "שגיאה בקבלת אסימון גישה עם OAuth", 3 | "Error during OAuth exchanges" : "שגיאה במהלך החלפות OAuth", 4 | "Bad credentials" : "פרטי גישה שגויים", 5 | "Bad HTTP method" : "שגיאה במתודת HTTP", 6 | "OAuth access token refused" : "אסימון הגישה ב־OAuth סורב", 7 | "Connected accounts" : "חשבונות מקושרים", 8 | "Data migration" : "הגירת נתונים", 9 | "Client ID" : "מזהה לקו", 10 | "Client secret" : "סוד לקוח", 11 | "Enable navigation link" : "הפעלת קישור ניווט", 12 | "Contacts" : "אנשי קשר", 13 | "Calendars" : "לוחות שנה", 14 | "Import calendar" : "ייבוא יומן" 15 | },"pluralForm" :"nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;" 16 | } -------------------------------------------------------------------------------- /l10n/is.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Villa við að ná í OAuth-aðgangsteikn", 3 | "Error during OAuth exchanges" : "Villa í OAuth-samskiptum", 4 | "Bad credentials" : "Gölluð auðkenni", 5 | "OAuth access token refused" : "OAuth-aðgangsteikni hafnað", 6 | "Connected accounts" : "Tengdir aðgangar", 7 | "Client ID" : "Biðlaraauðkenni", 8 | "Client secret" : "Leynilykill biðlara", 9 | "Enable navigation link" : "Virkja flakktengil", 10 | "Connected as {user}" : "Tengt sem {user}", 11 | "Import directory" : "Flytja möppu inn", 12 | "Contacts" : "Tengiliðir", 13 | "Calendars" : "Dagatöl", 14 | "Import calendar" : "Flytja inn dagatal" 15 | },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" 16 | } -------------------------------------------------------------------------------- /l10n/lv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Bad credentials" : "Nederīgi pieteikšanās dati", 3 | "Bad HTTP method" : "Nederīgs HTTP pieprasījuma veids", 4 | "Connected accounts" : "Sasaistītie konti", 5 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "Pēc tam Nextcloud lietotāji savos personiskajos iestatījumos redzēs pogu \"Savienoties ar OneDrive\".", 6 | "Client ID" : "Klienta ID", 7 | "Failed to get address book list" : "Neizdevās iegūt adrešu grāmatu sarakstu", 8 | "Connected as {user}" : "Savienojies kā {user}", 9 | "Contacts" : "Kontakti", 10 | "Calendars" : "Kalendāri", 11 | "Import calendar" : "Ievietot kalendāru" 12 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" 13 | } -------------------------------------------------------------------------------- /l10n/ro.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Eroare în obținerea token-ului OAuth", 3 | "Error during OAuth exchanges" : "Eroare în schimbarea OAuth", 4 | "OneDrive" : "OneDrive", 5 | "Bad credentials" : "Credențiale greșite", 6 | "Bad HTTP method" : "Metodă HTTP nepotrivită", 7 | "OAuth access token refused" : "Token-ul OAuth a fost refuzat", 8 | "Connected accounts" : "Conturile conectate", 9 | "Client ID" : "ID client", 10 | "Client secret" : "Secret client", 11 | "Enable navigation link" : "Pornește link-ul de navifare", 12 | "Contacts" : "Contacte", 13 | "Calendars" : "Calendare", 14 | "Import calendar" : "Import calendar" 15 | },"pluralForm" :"nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));" 16 | } -------------------------------------------------------------------------------- /l10n/he.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "שגיאה בקבלת אסימון גישה עם OAuth", 5 | "Error during OAuth exchanges" : "שגיאה במהלך החלפות OAuth", 6 | "Bad credentials" : "פרטי גישה שגויים", 7 | "Bad HTTP method" : "שגיאה במתודת HTTP", 8 | "OAuth access token refused" : "אסימון הגישה ב־OAuth סורב", 9 | "Connected accounts" : "חשבונות מקושרים", 10 | "Data migration" : "הגירת נתונים", 11 | "Client ID" : "מזהה לקו", 12 | "Client secret" : "סוד לקוח", 13 | "Enable navigation link" : "הפעלת קישור ניווט", 14 | "Contacts" : "אנשי קשר", 15 | "Calendars" : "לוחות שנה", 16 | "Import calendar" : "ייבוא יומן" 17 | }, 18 | "nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;"); 19 | -------------------------------------------------------------------------------- /l10n/is.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Villa við að ná í OAuth-aðgangsteikn", 5 | "Error during OAuth exchanges" : "Villa í OAuth-samskiptum", 6 | "Bad credentials" : "Gölluð auðkenni", 7 | "OAuth access token refused" : "OAuth-aðgangsteikni hafnað", 8 | "Connected accounts" : "Tengdir aðgangar", 9 | "Client ID" : "Biðlaraauðkenni", 10 | "Client secret" : "Leynilykill biðlara", 11 | "Enable navigation link" : "Virkja flakktengil", 12 | "Connected as {user}" : "Tengt sem {user}", 13 | "Import directory" : "Flytja möppu inn", 14 | "Contacts" : "Tengiliðir", 15 | "Calendars" : "Dagatöl", 16 | "Import calendar" : "Flytja inn dagatal" 17 | }, 18 | "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); 19 | -------------------------------------------------------------------------------- /l10n/lv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Bad credentials" : "Nederīgi pieteikšanās dati", 5 | "Bad HTTP method" : "Nederīgs HTTP pieprasījuma veids", 6 | "Connected accounts" : "Sasaistītie konti", 7 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "Pēc tam Nextcloud lietotāji savos personiskajos iestatījumos redzēs pogu \"Savienoties ar OneDrive\".", 8 | "Client ID" : "Klienta ID", 9 | "Failed to get address book list" : "Neizdevās iegūt adrešu grāmatu sarakstu", 10 | "Connected as {user}" : "Savienojies kā {user}", 11 | "Contacts" : "Kontakti", 12 | "Calendars" : "Kalendāri", 13 | "Import calendar" : "Ievietot kalendāru" 14 | }, 15 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); 16 | -------------------------------------------------------------------------------- /l10n/ro.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Eroare în obținerea token-ului OAuth", 5 | "Error during OAuth exchanges" : "Eroare în schimbarea OAuth", 6 | "OneDrive" : "OneDrive", 7 | "Bad credentials" : "Credențiale greșite", 8 | "Bad HTTP method" : "Metodă HTTP nepotrivită", 9 | "OAuth access token refused" : "Token-ul OAuth a fost refuzat", 10 | "Connected accounts" : "Conturile conectate", 11 | "Client ID" : "ID client", 12 | "Client secret" : "Secret client", 13 | "Enable navigation link" : "Pornește link-ul de navifare", 14 | "Contacts" : "Contacte", 15 | "Calendars" : "Calendare", 16 | "Import calendar" : "Import calendar" 17 | }, 18 | "nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));"); 19 | -------------------------------------------------------------------------------- /.github/workflows/reuse.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 | # SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. 7 | # 8 | # SPDX-License-Identifier: CC0-1.0 9 | 10 | name: REUSE Compliance Check 11 | 12 | on: [pull_request] 13 | 14 | jobs: 15 | reuse-compliance-check: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 20 | with: 21 | persist-credentials: false 22 | 23 | - name: REUSE Compliance Check 24 | uses: fsfe/reuse-action@676e2d560c9a403aa252096d99fcab3e1132b0f5 # v6.0.0 25 | -------------------------------------------------------------------------------- /l10n/id.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Terjadi kesalahan mendapatkan token akses OAuth", 3 | "Error during OAuth exchanges" : "Terjadi kesalahan saat penukaran OAuth", 4 | "Bad credentials" : "Kredensial tidak benar", 5 | "Bad HTTP method" : "Metode HTTP tidak benar", 6 | "OAuth access token refused" : "Token akses OAuth ditolak", 7 | "Connected accounts" : "Akun terhubung", 8 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Letakkan \"Client ID\" dan \"Client secret\" aplikasi OAuth di bawah.", 9 | "Client ID" : "ID Klien", 10 | "Client secret" : "Rahasia klien", 11 | "Use a popup to authenticate" : "Gunakan sembulan untuk mengautentikasi", 12 | "Enable navigation link" : "Aktifkan tautan navigasi", 13 | "Connected as {user}" : "Terhubung sebagai {user}", 14 | "Contacts" : "Kontak", 15 | "Calendars" : "Kalender" 16 | },"pluralForm" :"nplurals=1; plural=0;" 17 | } -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | module.exports = { 6 | extends: 'stylelint-config-recommended-vue', 7 | rules: { 8 | indentation: 'tab', 9 | 'selector-type-no-unknown': null, 10 | 'number-leading-zero': null, 11 | 'rule-empty-line-before': [ 12 | 'always', 13 | { 14 | ignore: ['after-comment', 'inside-block'], 15 | }, 16 | ], 17 | 'declaration-empty-line-before': [ 18 | 'never', 19 | { 20 | ignore: ['after-declaration'], 21 | }, 22 | ], 23 | 'comment-empty-line-before': null, 24 | 'selector-type-case': null, 25 | 'selector-list-comma-newline-after': null, 26 | 'no-descending-specificity': null, 27 | 'string-quotes': 'single', 28 | 'selector-pseudo-element-no-unknown': [ 29 | true, 30 | { 31 | ignorePseudoElements: ['v-deep'], 32 | }, 33 | ], 34 | }, 35 | plugins: ['stylelint-scss'], 36 | } 37 | -------------------------------------------------------------------------------- /l10n/id.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Terjadi kesalahan mendapatkan token akses OAuth", 5 | "Error during OAuth exchanges" : "Terjadi kesalahan saat penukaran OAuth", 6 | "Bad credentials" : "Kredensial tidak benar", 7 | "Bad HTTP method" : "Metode HTTP tidak benar", 8 | "OAuth access token refused" : "Token akses OAuth ditolak", 9 | "Connected accounts" : "Akun terhubung", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Letakkan \"Client ID\" dan \"Client secret\" aplikasi OAuth di bawah.", 11 | "Client ID" : "ID Klien", 12 | "Client secret" : "Rahasia klien", 13 | "Use a popup to authenticate" : "Gunakan sembulan untuk mengautentikasi", 14 | "Enable navigation link" : "Aktifkan tautan navigasi", 15 | "Connected as {user}" : "Terhubung sebagai {user}", 16 | "Contacts" : "Kontak", 17 | "Calendars" : "Kalender" 18 | }, 19 | "nplurals=1; plural=0;"); 20 | -------------------------------------------------------------------------------- /img/app.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /img/app-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /l10n/sv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Kunde inte hämta OAuth-token", 3 | "Error during OAuth exchanges" : "Fel vid utväxling av OAuth-token", 4 | "Bad credentials" : "Ogiltiga inloggningsuppgifter", 5 | "Bad HTTP method" : "Felaktig HTTP-metod", 6 | "OAuth access token refused" : "OAuth-token avvisades", 7 | "Connected accounts" : "Anslutna konton", 8 | "Data migration" : "Datamigrering", 9 | "Client ID" : "Klient-ID", 10 | "Client secret" : "Klienthemlighet", 11 | "Use a popup to authenticate" : "Använd en popup för att autentisera", 12 | "Choose where to write imported files" : "Välj var importerade filer ska skrivas", 13 | "Enable navigation link" : "Aktivera navigeringslänk", 14 | "Connected as {user}" : "Ansluten som {user}", 15 | "Import directory" : "Importera katalog", 16 | "Contacts" : "Kontakter", 17 | "Calendars" : "Kalendrar", 18 | "Import calendar" : "Importera kalender" 19 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 20 | } -------------------------------------------------------------------------------- /l10n/sv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Kunde inte hämta OAuth-token", 5 | "Error during OAuth exchanges" : "Fel vid utväxling av OAuth-token", 6 | "Bad credentials" : "Ogiltiga inloggningsuppgifter", 7 | "Bad HTTP method" : "Felaktig HTTP-metod", 8 | "OAuth access token refused" : "OAuth-token avvisades", 9 | "Connected accounts" : "Anslutna konton", 10 | "Data migration" : "Datamigrering", 11 | "Client ID" : "Klient-ID", 12 | "Client secret" : "Klienthemlighet", 13 | "Use a popup to authenticate" : "Använd en popup för att autentisera", 14 | "Choose where to write imported files" : "Välj var importerade filer ska skrivas", 15 | "Enable navigation link" : "Aktivera navigeringslänk", 16 | "Connected as {user}" : "Ansluten som {user}", 17 | "Import directory" : "Importera katalog", 18 | "Contacts" : "Kontakter", 19 | "Calendars" : "Kalendrar", 20 | "Import calendar" : "Importera kalender" 21 | }, 22 | "nplurals=2; plural=(n != 1);"); 23 | -------------------------------------------------------------------------------- /lib/BackgroundJob/ImportOnedriveJob.php: -------------------------------------------------------------------------------- 1 | service = $service; 29 | } 30 | 31 | /** 32 | * @param array{user_id: string} $argument 33 | * @return void 34 | */ 35 | public function run($argument): void { 36 | $userId = $argument['user_id']; 37 | $this->service->importOnedriveJob($userId); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | 6 | let mytimer = 0 7 | export function delay(callback, ms) { 8 | return function() { 9 | const context = this 10 | const args = arguments 11 | clearTimeout(mytimer) 12 | mytimer = setTimeout(function() { 13 | callback.apply(context, args) 14 | }, ms || 0) 15 | } 16 | } 17 | 18 | export function humanFileSize(bytes, approx = false, si = false, dp = 1) { 19 | const thresh = si ? 1000 : 1024 20 | 21 | if (Math.abs(bytes) < thresh) { 22 | return bytes + ' B' 23 | } 24 | 25 | const units = si 26 | ? ['kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] 27 | : ['KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'] 28 | let u = -1 29 | const r = 10 ** dp 30 | 31 | do { 32 | bytes /= thresh 33 | ++u 34 | } while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1) 35 | 36 | if (approx) { 37 | return Math.floor(bytes) + ' ' + units[u] 38 | } else { 39 | return bytes.toFixed(dp) + ' ' + units[u] 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /.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: 9 | pull_request: 10 | push: 11 | branches: 12 | - main 13 | - master 14 | - stable* 15 | 16 | permissions: 17 | contents: read 18 | 19 | concurrency: 20 | group: lint-info-xml-${{ github.head_ref || github.run_id }} 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | xml-linters: 25 | runs-on: ubuntu-latest 26 | 27 | name: info.xml lint 28 | steps: 29 | - name: Checkout 30 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 31 | 32 | - name: Download schema 33 | run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd 34 | 35 | - name: Lint info.xml 36 | uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2 37 | with: 38 | xml-file: ./appinfo/info.xml 39 | xml-schema-file: ./info.xsd 40 | -------------------------------------------------------------------------------- /.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 26 | 27 | - name: Set up php 28 | uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2 29 | with: 30 | php-version: "8.1" 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 | -------------------------------------------------------------------------------- /l10n/et_EE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Viga OAuth tunnusloa laadimisel", 3 | "Error during OAuth exchanges" : "Viga OAuth andmevahetusel", 4 | "Bad credentials" : "Vale kasutajanimi, salasõna või tunnusluba", 5 | "Bad HTTP method" : "Vigane HTTP-meetod", 6 | "OAuth access token refused" : "OAuthi tunnusluba pole õige.", 7 | "Connected accounts" : "Ühendatud kasutajakontod", 8 | "Data migration" : "Andmete ümbertõstmine", 9 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Sisesta alljärgnevalt OAuthi rakenduse klienditunnus („Client ID“) ja kliendisaladus („Client secret“).", 10 | "Client ID" : "Kliendi ID", 11 | "Client secret" : "Kliendi salasõna", 12 | "Use a popup to authenticate" : "Kasuta autentimiseks hüpikakent", 13 | "Choose where to write imported files" : "Vali, kuhu soovid salvestada imporditud failid", 14 | "Enable navigation link" : "Lisa menüülink", 15 | "Connected as {user}" : "Ühendatud kui {user}", 16 | "Import directory" : "Impordi kaust", 17 | "Contacts" : "Kontaktid", 18 | "Calendars" : "Kalendrid", 19 | "Import calendar" : "Impordi kalender" 20 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 21 | } -------------------------------------------------------------------------------- /l10n/zh_CN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "获取 OAUth 访问令牌出错", 4 | "Error during OAuth exchanges" : "OAuth 交换期间出错", 5 | "OneDrive" : "OneDrive", 6 | "Bad credentials" : "错误的凭据", 7 | "Bad HTTP method" : "错误的HTTP方法", 8 | "OAuth access token refused" : "OAuth 访问令牌被拒绝", 9 | "Connected accounts" : "关联账号", 10 | "Data migration" : "数据迁移", 11 | "OneDrive integration" : "OneDrive集成", 12 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive集成", 13 | "Make sure you set the \"Redirect URI\" to" : "确认您将\"重定向URI\"设置为", 14 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下面输入OAuth应用的“客户端ID”和“客户端密码”。", 15 | "Client ID" : "客户端ID", 16 | "Client secret" : "客户端 secret", 17 | "Use a popup to authenticate" : "使用弹出窗口进行验证", 18 | "Failed to get calendar list" : "获取日历列表失败", 19 | "Failed to get address book list" : "获取通讯录列表失败", 20 | "Enable navigation link" : "启用应用图标链接至实例", 21 | "Connected as {user}" : "以 {user} 身份连接", 22 | "Import directory" : "导入文件夹", 23 | "Contacts" : "联系人", 24 | "Calendars" : "日历", 25 | "Import calendar" : "导入日历" 26 | },"pluralForm" :"nplurals=1; plural=0;" 27 | } -------------------------------------------------------------------------------- /l10n/et_EE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Viga OAuth tunnusloa laadimisel", 5 | "Error during OAuth exchanges" : "Viga OAuth andmevahetusel", 6 | "Bad credentials" : "Vale kasutajanimi, salasõna või tunnusluba", 7 | "Bad HTTP method" : "Vigane HTTP-meetod", 8 | "OAuth access token refused" : "OAuthi tunnusluba pole õige.", 9 | "Connected accounts" : "Ühendatud kasutajakontod", 10 | "Data migration" : "Andmete ümbertõstmine", 11 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Sisesta alljärgnevalt OAuthi rakenduse klienditunnus („Client ID“) ja kliendisaladus („Client secret“).", 12 | "Client ID" : "Kliendi ID", 13 | "Client secret" : "Kliendi salasõna", 14 | "Use a popup to authenticate" : "Kasuta autentimiseks hüpikakent", 15 | "Choose where to write imported files" : "Vali, kuhu soovid salvestada imporditud failid", 16 | "Enable navigation link" : "Lisa menüülink", 17 | "Connected as {user}" : "Ühendatud kui {user}", 18 | "Import directory" : "Impordi kaust", 19 | "Contacts" : "Kontaktid", 20 | "Calendars" : "Kalendrid", 21 | "Import calendar" : "Impordi kalender" 22 | }, 23 | "nplurals=2; plural=(n != 1);"); 24 | -------------------------------------------------------------------------------- /l10n/zh_CN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "获取 OAUth 访问令牌出错", 6 | "Error during OAuth exchanges" : "OAuth 交换期间出错", 7 | "OneDrive" : "OneDrive", 8 | "Bad credentials" : "错误的凭据", 9 | "Bad HTTP method" : "错误的HTTP方法", 10 | "OAuth access token refused" : "OAuth 访问令牌被拒绝", 11 | "Connected accounts" : "关联账号", 12 | "Data migration" : "数据迁移", 13 | "OneDrive integration" : "OneDrive集成", 14 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive集成", 15 | "Make sure you set the \"Redirect URI\" to" : "确认您将\"重定向URI\"设置为", 16 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下面输入OAuth应用的“客户端ID”和“客户端密码”。", 17 | "Client ID" : "客户端ID", 18 | "Client secret" : "客户端 secret", 19 | "Use a popup to authenticate" : "使用弹出窗口进行验证", 20 | "Failed to get calendar list" : "获取日历列表失败", 21 | "Failed to get address book list" : "获取通讯录列表失败", 22 | "Enable navigation link" : "启用应用图标链接至实例", 23 | "Connected as {user}" : "以 {user} 身份连接", 24 | "Import directory" : "导入文件夹", 25 | "Contacts" : "联系人", 26 | "Calendars" : "日历", 27 | "Import calendar" : "导入日历" 28 | }, 29 | "nplurals=1; plural=0;"); 30 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": ">=8.1.0", 4 | "ortic/color-converter": "^0.1.0", 5 | "microsoft/kiota-http-guzzle": "^1.3", 6 | "symfony/http-client": "^6.4", 7 | "nyholm/psr7": "^1.8" 8 | }, 9 | "scripts": { 10 | "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l", 11 | "cs:check": "php-cs-fixer fix --dry-run --diff", 12 | "cs:fix": "php-cs-fixer fix", 13 | "psalm": "psalm.phar", 14 | "psalm:update-baseline": "psalm.phar --threads=1 --update-baseline", 15 | "psalm:update-baseline:force": "psalm.phar --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml", 16 | "psalm:clear": "psalm.phar --clear-cache && psalm.phar --clear-global-cache" 17 | }, 18 | "require-dev": { 19 | "friendsofphp/php-cs-fixer": "^3", 20 | "nextcloud/coding-standard": "^1", 21 | "psalm/phar": "6.7.x", 22 | "nextcloud/ocp": "dev-master", 23 | "sabre/dav": "^4.4.0" 24 | }, 25 | "config": { 26 | "platform": { 27 | "php": "8.1" 28 | }, 29 | "allow-plugins": { 30 | "php-http/discovery": true, 31 | "tbachert/spi": true 32 | } 33 | }, 34 | "replace": { 35 | "guzzlehttp/guzzle": "*" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /l10n/ca.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "S'ha produït un error en obtenir el testimoni d'accés d'OAuth", 3 | "Error during OAuth exchanges" : "S'ha produït un error durant els intercanvis d'OAuth", 4 | "Bad credentials" : "Credencials dolentes", 5 | "Bad HTTP method" : "Mètode HTTP incorrecte", 6 | "OAuth access token refused" : "S'ha rebutjat el testimoni d'accés d'OAuth", 7 | "Connected accounts" : "Comptes connectats", 8 | "Data migration" : "Migració de dades", 9 | "Make sure you set the \"Redirect URI\" to" : "Assegureu-vos de definir l'\"URI de redirecció\" a", 10 | "Client ID" : "ID del client", 11 | "Client secret" : "Secret del client", 12 | "Starting importing files in {targetPath} directory" : "S'està iniciant la importació de fitxers al directori {targetPath}", 13 | "Failed to get calendar list" : "No s'ha pogut obtenir la llista de calendaris", 14 | "Failed to get address book list" : "No s'ha pogut obtenir la llista de la llibreta d'adreces", 15 | "Enable navigation link" : "Habilita l'enllaç de navegació", 16 | "Connected as {user}" : "S'ha connectat com a {user}", 17 | "Import directory" : "Carpeta d'importació", 18 | "Contacts" : "Contactes", 19 | "Calendars" : "Calendaris", 20 | "Import calendar" : "Importa un calendari" 21 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 22 | } -------------------------------------------------------------------------------- /webpack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: AGPL-3.0-or-later 4 | */ 5 | const path = require('path') 6 | const webpackConfig = require('@nextcloud/webpack-vue-config') 7 | const ESLintPlugin = require('eslint-webpack-plugin') 8 | const StyleLintPlugin = require('stylelint-webpack-plugin') 9 | 10 | const buildMode = process.env.NODE_ENV 11 | const isDev = buildMode === 'development' 12 | webpackConfig.devtool = isDev ? 'cheap-source-map' : 'source-map' 13 | 14 | webpackConfig.stats = { 15 | colors: true, 16 | modules: false, 17 | } 18 | 19 | const appId = 'integration_onedrive' 20 | webpackConfig.entry = { 21 | personalSettings: { import: path.join(__dirname, 'src', 'personalSettings.js'), filename: appId + '-personalSettings.js' }, 22 | adminSettings: { import: path.join(__dirname, 'src', 'adminSettings.js'), filename: appId + '-adminSettings.js' }, 23 | popupSuccess: { import: path.join(__dirname, 'src', 'popupSuccess.js'), filename: appId + '-popupSuccess.js' }, 24 | } 25 | 26 | webpackConfig.plugins.push( 27 | new ESLintPlugin({ 28 | extensions: ['js', 'vue'], 29 | files: 'src', 30 | failOnError: !isDev, 31 | }) 32 | ) 33 | webpackConfig.plugins.push( 34 | new StyleLintPlugin({ 35 | files: 'src/**/*.{css,scss,vue}', 36 | failOnError: !isDev, 37 | }), 38 | ) 39 | 40 | module.exports = webpackConfig 41 | -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | [ 9 | ['name' => 'config#oauthRedirect', 'url' => '/oauth-redirect', 'verb' => 'GET'], 10 | ['name' => 'config#setConfig', 'url' => '/config', 'verb' => 'PUT'], 11 | ['name' => 'config#setAdminConfig', 'url' => '/admin-config', 'verb' => 'PUT'], 12 | ['name' => 'config#setSensitiveAdminConfig', 'url' => '/sensitive-admin-config', 'verb' => 'PUT'], 13 | ['name' => 'config#popupSuccessPage', 'url' => '/popup-success', 'verb' => 'GET'], 14 | 15 | ['name' => 'onedriveAPI#getStorageSize', 'url' => '/storage-size', 'verb' => 'GET'], 16 | ['name' => 'onedriveAPI#importOnedrive', 'url' => '/import-files', 'verb' => 'GET'], 17 | ['name' => 'onedriveAPI#getImportOnedriveInformation', 'url' => '/import-files-info', 'verb' => 'GET'], 18 | ['name' => 'onedriveAPI#getCalendarList', 'url' => '/calendars', 'verb' => 'GET'], 19 | ['name' => 'onedriveAPI#importCalendar', 'url' => '/import-calendar', 'verb' => 'GET'], 20 | ['name' => 'onedriveAPI#getContactNumber', 'url' => '/contact-number', 'verb' => 'GET'], 21 | ['name' => 'onedriveAPI#importContacts', 'url' => '/import-contacts', 'verb' => 'GET'], 22 | ['name' => 'config#getLocalAddressBooks', 'url' => '/local-addressbooks', 'verb' => 'GET'], 23 | ] 24 | ]; 25 | -------------------------------------------------------------------------------- /l10n/ca.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "S'ha produït un error en obtenir el testimoni d'accés d'OAuth", 5 | "Error during OAuth exchanges" : "S'ha produït un error durant els intercanvis d'OAuth", 6 | "Bad credentials" : "Credencials dolentes", 7 | "Bad HTTP method" : "Mètode HTTP incorrecte", 8 | "OAuth access token refused" : "S'ha rebutjat el testimoni d'accés d'OAuth", 9 | "Connected accounts" : "Comptes connectats", 10 | "Data migration" : "Migració de dades", 11 | "Make sure you set the \"Redirect URI\" to" : "Assegureu-vos de definir l'\"URI de redirecció\" a", 12 | "Client ID" : "ID del client", 13 | "Client secret" : "Secret del client", 14 | "Starting importing files in {targetPath} directory" : "S'està iniciant la importació de fitxers al directori {targetPath}", 15 | "Failed to get calendar list" : "No s'ha pogut obtenir la llista de calendaris", 16 | "Failed to get address book list" : "No s'ha pogut obtenir la llista de la llibreta d'adreces", 17 | "Enable navigation link" : "Habilita l'enllaç de navegació", 18 | "Connected as {user}" : "S'ha connectat com a {user}", 19 | "Import directory" : "Carpeta d'importació", 20 | "Contacts" : "Contactes", 21 | "Calendars" : "Calendaris", 22 | "Import calendar" : "Importa un calendari" 23 | }, 24 | "nplurals=2; plural=(n != 1);"); 25 | -------------------------------------------------------------------------------- /l10n/nl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Fout bij ophalen OAuth access token", 3 | "Error during OAuth exchanges" : "Fout tijdens OAuth uitwisselingen", 4 | "Bad credentials" : "Foute inloggegevens", 5 | "Bad HTTP method" : "Foute HTTP methode", 6 | "OAuth access token refused" : "OAuth toegangstoken geweigerd", 7 | "Connected accounts" : "Verbonden accounts", 8 | "Data migration" : "Gegevensmigratie", 9 | "Make sure you set the \"Redirect URI\" to" : "Zorg ervoor dat de \"Redirect URI\" is ingesteld op", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Zet de OAuth app \"Client ID\" en \"Client secret\" hieronder.", 11 | "Client ID" : "Client ID", 12 | "Client secret" : "Client secret", 13 | "Starting importing files in {targetPath} directory" : "Beginnen met importeren bestanden in {targetPath} directory", 14 | "Failed to get calendar list" : "Kalenderlijst ophalen mislukt", 15 | "Failed to get address book list" : "Adresboekentlijst ophalen mislukt", 16 | "Choose where to write imported files" : "Kies waar geïmporteerde bestanden moeten worden weggeschreven", 17 | "Enable navigation link" : "Inschakelen navigatielink", 18 | "Connected as {user}" : "Verbonden als {user}", 19 | "Import directory" : "Importdirectory", 20 | "Contacts" : "Contacten", 21 | "Calendars" : "Agenda's", 22 | "Import calendar" : "Importeer agenda" 23 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 24 | } -------------------------------------------------------------------------------- /l10n/nl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Fout bij ophalen OAuth access token", 5 | "Error during OAuth exchanges" : "Fout tijdens OAuth uitwisselingen", 6 | "Bad credentials" : "Foute inloggegevens", 7 | "Bad HTTP method" : "Foute HTTP methode", 8 | "OAuth access token refused" : "OAuth toegangstoken geweigerd", 9 | "Connected accounts" : "Verbonden accounts", 10 | "Data migration" : "Gegevensmigratie", 11 | "Make sure you set the \"Redirect URI\" to" : "Zorg ervoor dat de \"Redirect URI\" is ingesteld op", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Zet de OAuth app \"Client ID\" en \"Client secret\" hieronder.", 13 | "Client ID" : "Client ID", 14 | "Client secret" : "Client secret", 15 | "Starting importing files in {targetPath} directory" : "Beginnen met importeren bestanden in {targetPath} directory", 16 | "Failed to get calendar list" : "Kalenderlijst ophalen mislukt", 17 | "Failed to get address book list" : "Adresboekentlijst ophalen mislukt", 18 | "Choose where to write imported files" : "Kies waar geïmporteerde bestanden moeten worden weggeschreven", 19 | "Enable navigation link" : "Inschakelen navigatielink", 20 | "Connected as {user}" : "Verbonden als {user}", 21 | "Import directory" : "Importdirectory", 22 | "Contacts" : "Contacten", 23 | "Calendars" : "Agenda's", 24 | "Import calendar" : "Importeer agenda" 25 | }, 26 | "nplurals=2; plural=(n != 1);"); 27 | -------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | integration_onedrive 8 | OneDrive integration 9 | Integration of Microsoft OneDrive 10 | 11 | 3.5.0 12 | agpl 13 | Julien Veyssier 14 | Onedrive 15 | 16 | https://github.com/nextcloud/integration_onedrive 17 | 18 | integration 19 | dashboard 20 | https://github.com/nextcloud/integration_onedrive 21 | https://github.com/nextcloud/integration_onedrive/issues 22 | https://github.com/nextcloud/integration_onedrive/raw/main/img/screenshot1.jpg 23 | 24 | 25 | 26 | 27 | 28 | OCA\Onedrive\Settings\Admin 29 | OCA\Onedrive\Settings\AdminSection 30 | OCA\Onedrive\Settings\Personal 31 | OCA\Onedrive\Settings\PersonalSection 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/Service/UserScopeService.php: -------------------------------------------------------------------------------- 1 | userSession = $userSession; 20 | $this->userManager = $userManager; 21 | } 22 | 23 | /** 24 | * Set a valid user in IUserSession since lots of server logic is relying on obtaining 25 | * the current acting user from that 26 | * 27 | * @param $uid 28 | * @throws \InvalidArgumentException 29 | */ 30 | public function setUserScope(?string $uid = null): void { 31 | if ($uid === null) { 32 | return; 33 | } 34 | 35 | $user = $this->userManager->get($uid); 36 | if ($user === null) { 37 | throw new \InvalidArgumentException('No user found for the uid ' . $uid); 38 | } 39 | $this->userSession->setUser($user); 40 | } 41 | 42 | /** 43 | * Setup the FS which is needed to emit hooks 44 | * 45 | * This is required for versioning/activity as the legacy filesystem hooks 46 | * are not emitted if filesystem operations are executed though \OCP\Files\Node\File 47 | * 48 | * @param string $owner 49 | */ 50 | public function setFilesystemScope(string $owner): void { 51 | \OC_Util::tearDownFS(); 52 | \OC_Util::setupFS($owner); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /l10n/hr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Pogreška pri dohvaćanju tokena za pristup OAuth", 3 | "Error during OAuth exchanges" : "Pogreška tijekom razmjene radi autentifikacije OAuth", 4 | "Bad credentials" : "Pogrešne vjerodajnice", 5 | "Bad HTTP method" : "Pogrešna metoda HTTP-a", 6 | "OAuth access token refused" : "Odbijen token za pristup OAuth", 7 | "Connected accounts" : "Povezani računi", 8 | "Data migration" : "Migracija podataka", 9 | "Make sure you set the \"Redirect URI\" to" : "Obavezno postavite „URL za preusmjeravanje“ na", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "U nastavku unesite „ID klijenta“ i „Tajni ključ klijenta“ za aplikaciju OAuth.", 11 | "Client ID" : "ID klijenta", 12 | "Client secret" : "Tajni ključ klijenta", 13 | "Starting importing files in {targetPath} directory" : "Početak uvoza datoteka u direktorij {targetPath}", 14 | "Failed to get calendar list" : "Nije moguće dobiti popis kalendara", 15 | "Failed to get address book list" : "Nije moguće dobiti popis adresara", 16 | "Choose where to write imported files" : "Odaberite gdje želite zapisivati uvezene datoteke", 17 | "Enable navigation link" : "Omogući navigacijsku poveznicu", 18 | "Connected as {user}" : "Povezan kao {user}", 19 | "Import directory" : "Uvezi direktorij", 20 | "Contacts" : "Kontakti", 21 | "Calendars" : "Kalendari", 22 | "Import calendar" : "Uvezi kalendar" 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/it.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Errore durante il recupero del token di accesso OAuth", 3 | "Error during OAuth exchanges" : "Errore nello scambio dati OAuth", 4 | "Bad credentials" : "Credenziali non valide", 5 | "Bad HTTP method" : "Metodo HTTP non corretto", 6 | "OAuth access token refused" : "Token di accesso OAuth rifiutato", 7 | "Connected accounts" : "Account connessi", 8 | "Data migration" : "Migrazione dei dati", 9 | "Make sure you set the \"Redirect URI\" to" : "Assicurati di impostare \"URI di reindirizzamento\" a", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Inserisci sotto \"ID client\" e \"Password del client\" dell'applicazione OAuth.", 11 | "Client ID" : "ID client", 12 | "Client secret" : "Segreto del client", 13 | "Starting importing files in {targetPath} directory" : "Avvio dell'importazione file nella cartella {targetPath}", 14 | "Failed to get calendar list" : "Impossibile ottenere l'elenco dei calendari", 15 | "Failed to get address book list" : "Impossibile ottenere l'elenco delle rubriche", 16 | "Choose where to write imported files" : "Scegli dove scrivere i file importati", 17 | "Enable navigation link" : "Abilita collegamento di navigazione", 18 | "Connected as {user}" : "Connesso come {user}", 19 | "Import directory" : "Cartella di importazione", 20 | "Contacts" : "Contatti", 21 | "Calendars" : "Calendari", 22 | "Import calendar" : "Importa calendario" 23 | },"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" 24 | } -------------------------------------------------------------------------------- /l10n/sc.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Errore recuperende su token de intrada OAuth.", 3 | "Error during OAuth exchanges" : "Errore cuncambiende OAuth", 4 | "Bad credentials" : "Credentziales non bàlidas", 5 | "Bad HTTP method" : "Mètodu HTTP no bàlidu", 6 | "OAuth access token refused" : "Token de intrada OAuth refudadu", 7 | "Connected accounts" : "Contos connètidos", 8 | "Data migration" : "Tramudadura de datos", 9 | "Make sure you set the \"Redirect URI\" to" : "Assegura·ti de cunfigurare s'\"URI de ri-aderetada\" comente", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Pone su «ID de su cliente» e su «Segretu de cliente» de s'aplicatzione OAuth sighende.", 11 | "Client ID" : "ID cliente", 12 | "Client secret" : "Segretu de su cliente", 13 | "Starting importing files in {targetPath} directory" : "Aviamentu de s'importatzione de is archìvios in sa cartella {targetPath}", 14 | "Failed to get calendar list" : "No at fatu a otènnere s'elencu de is calendàrios.", 15 | "Failed to get address book list" : "No at fatu a otènnere s'elencu d is rubricas", 16 | "Choose where to write imported files" : "Sèbera in ue est a pònnere is archìvios importados", 17 | "Enable navigation link" : "Ativa su ligòngiu de navigatzione", 18 | "Connected as {user}" : "Connètidu comente {user}", 19 | "Import directory" : "Importa cartella", 20 | "Contacts" : "Cuntatos", 21 | "Calendars" : "Calendàrios", 22 | "Import calendar" : "Importa calendàrios" 23 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 24 | } -------------------------------------------------------------------------------- /lib/Settings/Admin.php: -------------------------------------------------------------------------------- 1 | config->getAppValue(Application::APP_ID, 'client_id'); 30 | /** @psalm-suppress DeprecatedMethod */ 31 | $clientSecret = $this->config->getAppValue(Application::APP_ID, 'client_secret'); 32 | /** @psalm-suppress DeprecatedMethod */ 33 | $usePopup = $this->config->getAppValue(Application::APP_ID, 'use_popup', '0'); 34 | 35 | $adminConfig = [ 36 | 'client_id' => $clientID, 37 | 'client_secret' => $clientSecret !== '' ? 'dummySecret' : '', 38 | 'use_popup' => ($usePopup === '1'), 39 | ]; 40 | $this->initialStateService->provideInitialState('admin-config', $adminConfig); 41 | return new TemplateResponse(Application::APP_ID, 'adminSettings'); 42 | } 43 | 44 | public function getSection(): string { 45 | return 'connected-accounts'; 46 | } 47 | 48 | public function getPriority(): int { 49 | return 10; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /l10n/lt_LT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Klaida gaunant „OAuth“ prieigos raktą", 3 | "Error during OAuth exchanges" : "Klaida „OAuth“ apsikeitimo metu", 4 | "Bad credentials" : "Blogi prisijungimo duomenys", 5 | "Bad HTTP method" : "Blogas HTTP metodas", 6 | "OAuth access token refused" : "„OAuth“ prieigos raktas atmestas", 7 | "Connected accounts" : "Prijungtos paskyros", 8 | "Data migration" : "Duomenų perkėlimas", 9 | "OneDrive integration" : "„OneDrive“ integracija", 10 | "Client ID" : "Kliento ID", 11 | "Client secret" : "Kliento paslaptis", 12 | "Connected to OneDrive!" : "Prisijungta prie „OneDrive“!", 13 | "Starting importing files in {targetPath} directory" : "Pradedamas failų importavimas į {targetPath} katalogą", 14 | "Failed to get calendar list" : "Nepavyko gauti kalendorių sąrašo", 15 | "Failed to import calendar" : "Nepavyko importuoti kalendoriaus", 16 | "Failed to get number of contacts" : "Nepavyko gauti adresatų skaičiaus", 17 | "Failed to get address book list" : "Nepavyko gauti adresų knygų sąrašo", 18 | "Connected as {user}" : "Prisijungta kaip {user}", 19 | "Onedrive storage" : "„OneDrive“ saugykla", 20 | "Import directory" : "Importuoti katalogą", 21 | "Contacts" : "Adresatai", 22 | "{amount} contacts" : "Adresatų: {amount}", 23 | "Calendars" : "Kalendoriai", 24 | "Import calendar" : "Importuoti kalendorių" 25 | },"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);" 26 | } -------------------------------------------------------------------------------- /l10n/sc.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Errore recuperende su token de intrada OAuth.", 5 | "Error during OAuth exchanges" : "Errore cuncambiende OAuth", 6 | "Bad credentials" : "Credentziales non bàlidas", 7 | "Bad HTTP method" : "Mètodu HTTP no bàlidu", 8 | "OAuth access token refused" : "Token de intrada OAuth refudadu", 9 | "Connected accounts" : "Contos connètidos", 10 | "Data migration" : "Tramudadura de datos", 11 | "Make sure you set the \"Redirect URI\" to" : "Assegura·ti de cunfigurare s'\"URI de ri-aderetada\" comente", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Pone su «ID de su cliente» e su «Segretu de cliente» de s'aplicatzione OAuth sighende.", 13 | "Client ID" : "ID cliente", 14 | "Client secret" : "Segretu de su cliente", 15 | "Starting importing files in {targetPath} directory" : "Aviamentu de s'importatzione de is archìvios in sa cartella {targetPath}", 16 | "Failed to get calendar list" : "No at fatu a otènnere s'elencu de is calendàrios.", 17 | "Failed to get address book list" : "No at fatu a otènnere s'elencu d is rubricas", 18 | "Choose where to write imported files" : "Sèbera in ue est a pònnere is archìvios importados", 19 | "Enable navigation link" : "Ativa su ligòngiu de navigatzione", 20 | "Connected as {user}" : "Connètidu comente {user}", 21 | "Import directory" : "Importa cartella", 22 | "Contacts" : "Cuntatos", 23 | "Calendars" : "Calendàrios", 24 | "Import calendar" : "Importa calendàrios" 25 | }, 26 | "nplurals=2; plural=(n != 1);"); 27 | -------------------------------------------------------------------------------- /.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: 9 | pull_request: 10 | push: 11 | branches: 12 | - main 13 | - master 14 | - stable* 15 | 16 | permissions: 17 | contents: read 18 | 19 | concurrency: 20 | group: lint-php-${{ github.head_ref || github.run_id }} 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | php-lint: 25 | runs-on: ubuntu-latest 26 | strategy: 27 | matrix: 28 | php-versions: ["8.1", "8.2", "8.3"] 29 | 30 | name: php-lint 31 | 32 | steps: 33 | - name: Checkout 34 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 35 | 36 | - name: Set up php ${{ matrix.php-versions }} 37 | uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2 38 | with: 39 | php-version: ${{ matrix.php-versions }} 40 | coverage: none 41 | ini-file: development 42 | env: 43 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 44 | 45 | - name: Lint 46 | run: composer run lint 47 | 48 | summary: 49 | permissions: 50 | contents: none 51 | runs-on: ubuntu-latest 52 | needs: php-lint 53 | 54 | if: always() 55 | 56 | name: php-lint-summary 57 | 58 | steps: 59 | - name: Summary status 60 | run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi 61 | -------------------------------------------------------------------------------- /l10n/hr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Pogreška pri dohvaćanju tokena za pristup OAuth", 5 | "Error during OAuth exchanges" : "Pogreška tijekom razmjene radi autentifikacije OAuth", 6 | "Bad credentials" : "Pogrešne vjerodajnice", 7 | "Bad HTTP method" : "Pogrešna metoda HTTP-a", 8 | "OAuth access token refused" : "Odbijen token za pristup OAuth", 9 | "Connected accounts" : "Povezani računi", 10 | "Data migration" : "Migracija podataka", 11 | "Make sure you set the \"Redirect URI\" to" : "Obavezno postavite „URL za preusmjeravanje“ na", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "U nastavku unesite „ID klijenta“ i „Tajni ključ klijenta“ za aplikaciju OAuth.", 13 | "Client ID" : "ID klijenta", 14 | "Client secret" : "Tajni ključ klijenta", 15 | "Starting importing files in {targetPath} directory" : "Početak uvoza datoteka u direktorij {targetPath}", 16 | "Failed to get calendar list" : "Nije moguće dobiti popis kalendara", 17 | "Failed to get address book list" : "Nije moguće dobiti popis adresara", 18 | "Choose where to write imported files" : "Odaberite gdje želite zapisivati uvezene datoteke", 19 | "Enable navigation link" : "Omogući navigacijsku poveznicu", 20 | "Connected as {user}" : "Povezan kao {user}", 21 | "Import directory" : "Uvezi direktorij", 22 | "Contacts" : "Kontakti", 23 | "Calendars" : "Kalendari", 24 | "Import calendar" : "Uvezi kalendar" 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 | -------------------------------------------------------------------------------- /l10n/it.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Errore durante il recupero del token di accesso OAuth", 5 | "Error during OAuth exchanges" : "Errore nello scambio dati OAuth", 6 | "Bad credentials" : "Credenziali non valide", 7 | "Bad HTTP method" : "Metodo HTTP non corretto", 8 | "OAuth access token refused" : "Token di accesso OAuth rifiutato", 9 | "Connected accounts" : "Account connessi", 10 | "Data migration" : "Migrazione dei dati", 11 | "Make sure you set the \"Redirect URI\" to" : "Assicurati di impostare \"URI di reindirizzamento\" a", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Inserisci sotto \"ID client\" e \"Password del client\" dell'applicazione OAuth.", 13 | "Client ID" : "ID client", 14 | "Client secret" : "Segreto del client", 15 | "Starting importing files in {targetPath} directory" : "Avvio dell'importazione file nella cartella {targetPath}", 16 | "Failed to get calendar list" : "Impossibile ottenere l'elenco dei calendari", 17 | "Failed to get address book list" : "Impossibile ottenere l'elenco delle rubriche", 18 | "Choose where to write imported files" : "Scegli dove scrivere i file importati", 19 | "Enable navigation link" : "Abilita collegamento di navigazione", 20 | "Connected as {user}" : "Connesso come {user}", 21 | "Import directory" : "Cartella di importazione", 22 | "Contacts" : "Contatti", 23 | "Calendars" : "Calendari", 24 | "Import calendar" : "Importa calendario" 25 | }, 26 | "nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); 27 | -------------------------------------------------------------------------------- /l10n/lt_LT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Klaida gaunant „OAuth“ prieigos raktą", 5 | "Error during OAuth exchanges" : "Klaida „OAuth“ apsikeitimo metu", 6 | "Bad credentials" : "Blogi prisijungimo duomenys", 7 | "Bad HTTP method" : "Blogas HTTP metodas", 8 | "OAuth access token refused" : "„OAuth“ prieigos raktas atmestas", 9 | "Connected accounts" : "Prijungtos paskyros", 10 | "Data migration" : "Duomenų perkėlimas", 11 | "OneDrive integration" : "„OneDrive“ integracija", 12 | "Client ID" : "Kliento ID", 13 | "Client secret" : "Kliento paslaptis", 14 | "Connected to OneDrive!" : "Prisijungta prie „OneDrive“!", 15 | "Starting importing files in {targetPath} directory" : "Pradedamas failų importavimas į {targetPath} katalogą", 16 | "Failed to get calendar list" : "Nepavyko gauti kalendorių sąrašo", 17 | "Failed to import calendar" : "Nepavyko importuoti kalendoriaus", 18 | "Failed to get number of contacts" : "Nepavyko gauti adresatų skaičiaus", 19 | "Failed to get address book list" : "Nepavyko gauti adresų knygų sąrašo", 20 | "Connected as {user}" : "Prisijungta kaip {user}", 21 | "Onedrive storage" : "„OneDrive“ saugykla", 22 | "Import directory" : "Importuoti katalogą", 23 | "Contacts" : "Adresatai", 24 | "{amount} contacts" : "Adresatų: {amount}", 25 | "Calendars" : "Kalendoriai", 26 | "Import calendar" : "Importuoti kalendorių" 27 | }, 28 | "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);"); 29 | -------------------------------------------------------------------------------- /l10n/sk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Chyba pri získavaní prístupového tokenu OAuth", 3 | "Error during OAuth exchanges" : "Chyba počas výmeny OAuth", 4 | "Bad credentials" : "Nesprávne prihlasovacie údaje", 5 | "Bad HTTP method" : "Zlá metóda HTTP", 6 | "OAuth access token refused" : "Prístupový token OAuth bol zamietnutý", 7 | "Connected accounts" : "Prepojené účty", 8 | "Data migration" : "Prenos údajov", 9 | "Make sure you set the \"Redirect URI\" to" : "Nezabudnite nastaviť \"Redirect URI\" na", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Nižšie vložte \"ID klienta\" a \"tajný kľúč\" OAuth aplikácie.", 11 | "Client ID" : "Client ID", 12 | "Client secret" : "Heslo klienta", 13 | "Use a popup to authenticate" : "Pre overenie použite kontextové okno", 14 | "Import job is currently running" : "Importovanie práve prebieha", 15 | "Starting importing files in {targetPath} directory" : "Spúšťa sa import súborov do adresára {targetPath}", 16 | "Failed to get calendar list" : "Nepodarilo sa získať zoznam kalendárov.", 17 | "Failed to get address book list" : "Nepodarilo sa získať zoznam adresárov", 18 | "Choose where to write imported files" : "Vyberte kam zapísať importované súbory", 19 | "Enable navigation link" : "Povoliť navigačný odkaz", 20 | "Connected as {user}" : "Pripojený ako {user}", 21 | "Import directory" : "Importovať adresár", 22 | "Contacts" : "Kontakty", 23 | "Calendars" : "Kalendáre", 24 | "Import calendar" : "Importovať kalendár" 25 | },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);" 26 | } -------------------------------------------------------------------------------- /src/components/icons/GroupIcon.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 26 | 27 | 46 | -------------------------------------------------------------------------------- /l10n/pl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Błąd podczas pobierania tokena dostępu OAuth", 3 | "Error during OAuth exchanges" : "Błąd podczas zamiany OAuth", 4 | "Bad credentials" : "Złe poświadczenia", 5 | "Bad HTTP method" : "Zła metoda HTTP", 6 | "OAuth access token refused" : "Odmowa tokena dostępu OAuth", 7 | "Connected accounts" : "Połączone konta", 8 | "Data migration" : "Migracja danych", 9 | "Make sure you set the \"Redirect URI\" to" : "Upewnij się, że ustawiłeś \"Redirection URI\" na", 10 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Umieść poniżej \"ID klienta\" i \"Tajny klucz klienta\" aplikacji OAuth.", 11 | "Client ID" : "ID klienta", 12 | "Client secret" : "Tajny klucz klienta", 13 | "Use a popup to authenticate" : "Użyj wyskakującego okienka do uwierzytelnienia", 14 | "Starting importing files in {targetPath} directory" : "Rozpoczynam importowanie plików w katalogu {targetPath}", 15 | "Failed to get calendar list" : "Nie udało się pobrać listy kalendarzy", 16 | "Failed to get address book list" : "Nie udało się pobrać listy książek adresowych", 17 | "Choose where to write imported files" : "Wybierz, gdzie zapisać zaimportowane pliki", 18 | "Enable navigation link" : "Włącz link nawigacyjny", 19 | "Connected as {user}" : "Połączono jako {user}", 20 | "Import directory" : "Importuj katalog", 21 | "Contacts" : "Kontakty", 22 | "Calendars" : "Kalendarze", 23 | "Import calendar" : "Importuj kalendarz" 24 | },"pluralForm" :"nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);" 25 | } -------------------------------------------------------------------------------- /l10n/sk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Chyba pri získavaní prístupového tokenu OAuth", 5 | "Error during OAuth exchanges" : "Chyba počas výmeny OAuth", 6 | "Bad credentials" : "Nesprávne prihlasovacie údaje", 7 | "Bad HTTP method" : "Zlá metóda HTTP", 8 | "OAuth access token refused" : "Prístupový token OAuth bol zamietnutý", 9 | "Connected accounts" : "Prepojené účty", 10 | "Data migration" : "Prenos údajov", 11 | "Make sure you set the \"Redirect URI\" to" : "Nezabudnite nastaviť \"Redirect URI\" na", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Nižšie vložte \"ID klienta\" a \"tajný kľúč\" OAuth aplikácie.", 13 | "Client ID" : "Client ID", 14 | "Client secret" : "Heslo klienta", 15 | "Use a popup to authenticate" : "Pre overenie použite kontextové okno", 16 | "Import job is currently running" : "Importovanie práve prebieha", 17 | "Starting importing files in {targetPath} directory" : "Spúšťa sa import súborov do adresára {targetPath}", 18 | "Failed to get calendar list" : "Nepodarilo sa získať zoznam kalendárov.", 19 | "Failed to get address book list" : "Nepodarilo sa získať zoznam adresárov", 20 | "Choose where to write imported files" : "Vyberte kam zapísať importované súbory", 21 | "Enable navigation link" : "Povoliť navigačný odkaz", 22 | "Connected as {user}" : "Pripojený ako {user}", 23 | "Import directory" : "Importovať adresár", 24 | "Contacts" : "Kontakty", 25 | "Calendars" : "Kalendáre", 26 | "Import calendar" : "Importovať kalendár" 27 | }, 28 | "nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"); 29 | -------------------------------------------------------------------------------- /psalm.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | -------------------------------------------------------------------------------- /lib/Settings/PersonalSection.php: -------------------------------------------------------------------------------- 1 | l = $l; 25 | $this->urlGenerator = $urlGenerator; 26 | } 27 | 28 | /** 29 | * returns the ID of the section. It is supposed to be a lower case string 30 | * 31 | * @returns string 32 | */ 33 | public function getID(): string { 34 | return 'migration'; //or a generic id if feasible 35 | } 36 | 37 | /** 38 | * returns the translated name as it should be displayed, e.g. 'LDAP / AD 39 | * integration'. Use the L10N service to translate it. 40 | * 41 | * @return string 42 | */ 43 | public function getName(): string { 44 | return $this->l->t('Data migration'); 45 | } 46 | 47 | /** 48 | * @return int whether the form should be rather on the top or bottom of 49 | * the settings navigation. The sections are arranged in ascending order of 50 | * the priority values. It is required to return a value between 0 and 99. 51 | */ 52 | public function getPriority(): int { 53 | return 80; 54 | } 55 | 56 | /** 57 | * @return string The relative path to a an icon describing the section 58 | */ 59 | public function getIcon(): string { 60 | return $this->urlGenerator->imagePath('core', 'actions/download.svg'); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /l10n/pl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Błąd podczas pobierania tokena dostępu OAuth", 5 | "Error during OAuth exchanges" : "Błąd podczas zamiany OAuth", 6 | "Bad credentials" : "Złe poświadczenia", 7 | "Bad HTTP method" : "Zła metoda HTTP", 8 | "OAuth access token refused" : "Odmowa tokena dostępu OAuth", 9 | "Connected accounts" : "Połączone konta", 10 | "Data migration" : "Migracja danych", 11 | "Make sure you set the \"Redirect URI\" to" : "Upewnij się, że ustawiłeś \"Redirection URI\" na", 12 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Umieść poniżej \"ID klienta\" i \"Tajny klucz klienta\" aplikacji OAuth.", 13 | "Client ID" : "ID klienta", 14 | "Client secret" : "Tajny klucz klienta", 15 | "Use a popup to authenticate" : "Użyj wyskakującego okienka do uwierzytelnienia", 16 | "Starting importing files in {targetPath} directory" : "Rozpoczynam importowanie plików w katalogu {targetPath}", 17 | "Failed to get calendar list" : "Nie udało się pobrać listy kalendarzy", 18 | "Failed to get address book list" : "Nie udało się pobrać listy książek adresowych", 19 | "Choose where to write imported files" : "Wybierz, gdzie zapisać zaimportowane pliki", 20 | "Enable navigation link" : "Włącz link nawigacyjny", 21 | "Connected as {user}" : "Połączono jako {user}", 22 | "Import directory" : "Importuj katalog", 23 | "Contacts" : "Kontakty", 24 | "Calendars" : "Kalendarze", 25 | "Import calendar" : "Importuj kalendarz" 26 | }, 27 | "nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);"); 28 | -------------------------------------------------------------------------------- /lib/Settings/AdminSection.php: -------------------------------------------------------------------------------- 1 | l = $l; 25 | $this->urlGenerator = $urlGenerator; 26 | } 27 | 28 | /** 29 | * returns the ID of the section. It is supposed to be a lower case string 30 | * 31 | * @returns string 32 | */ 33 | public function getID(): string { 34 | return 'connected-accounts'; //or a generic id if feasible 35 | } 36 | 37 | /** 38 | * returns the translated name as it should be displayed, e.g. 'LDAP / AD 39 | * integration'. Use the L10N service to translate it. 40 | * 41 | * @return string 42 | */ 43 | public function getName(): string { 44 | return $this->l->t('Connected accounts'); 45 | } 46 | 47 | /** 48 | * @return int whether the form should be rather on the top or bottom of 49 | * the settings navigation. The sections are arranged in ascending order of 50 | * the priority values. It is required to return a value between 0 and 99. 51 | */ 52 | public function getPriority(): int { 53 | return 80; 54 | } 55 | 56 | /** 57 | * @return string The relative path to a an icon describing the section 58 | */ 59 | public function getIcon(): string { 60 | return $this->urlGenerator->imagePath('core', 'categories/integration.svg'); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 5 | # Microsoft OneDrive integration into Nextcloud 6 | 7 | [![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/integration_onedrive)](https://api.reuse.software/info/github.com/nextcloud/integration_onedrive) 8 | 9 | 🗔 OneDrive integration allows you to automatically import your files into Nextcloud. 10 | 11 | **Note: This app does not work with OneDrive for Business** 12 | 13 | ### User settings 14 | 15 | The account configuration and data migration happen in the "Data migration" user settings section. 16 | 17 | ### Admin settings 18 | 19 | There also is a "Connected accounts" **admin** settings section that you must visit to configure a Microsoft Azure OAuth app to allow your Nextcloud users to authenticate to Microsoft services. 20 | 21 | ## **🛠️ State of maintenance** 22 | 23 | While there are many things that could be done to further improve this app, the app is currently maintained with **limited effort**. This means: 24 | 25 | - The main functionality works for the majority of the use cases 26 | - We will ensure that the app will continue to work like this for future releases and we will fix bugs that we classify as 'critical' 27 | - We will not invest further development resources ourselves in advancing the app with new features 28 | - We do review and enthusiastically welcome community PR's 29 | 30 | We would be more than excited if you would like to collaborate with us. We will merge pull requests for new features and fixes. We also would love to welcome co-maintainers. 31 | 32 | If there is a strong business case for any development of this app, we will consider your wishes for our roadmap. Please [contact your account manager](https://nextcloud.com/enterprise/) to talk about the possibilities. 33 | -------------------------------------------------------------------------------- /l10n/da.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : " Microsoft OneDrive", 3 | "Error getting OAuth access token" : "Fejl ved anmodning om OAuth adgangsnøgle", 4 | "Error during OAuth exchanges" : "Fejl under OAuth-udvekslinger", 5 | "OneDrive" : "OneDrive", 6 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["%n filer blev importeret fra Onedrive-lager.","%n filer blev importeret fra OneDrive lager."], 7 | "Bad credentials" : "Forkerte legitimationsoplysninger", 8 | "Bad HTTP method" : "Dårlig HTTP metode", 9 | "OAuth access token refused" : "OAuth adgangsnøgle afvist", 10 | "Microsoft Calendar import" : "Importér fra Microsoft kalender", 11 | "Connected accounts" : "Forbundne konti", 12 | "Data migration" : "Datamigrering", 13 | "OneDrive integration" : "Integration med OneDrive", 14 | "Integration of Microsoft OneDrive" : "Integration af Microsoft OneDrive", 15 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Integration med Microsoft Onedrive tillader dig automatisk at importere dine filer til Nextcloud. ", 16 | "OneDrive admin options saved" : "Administrationsindstillinger til OneDrive gemt", 17 | "Failed to save OneDrive admin options" : "Administrationsindstillinger til OneDrive kunne ikke gemmes", 18 | "Microsoft OneDrive integration" : "Integration af Microsoft OneDrive", 19 | "Client ID" : "Klient ID", 20 | "Client secret" : "Klienthemmelighed", 21 | "Enable navigation link" : "Aktiver navigationslink", 22 | "Connect to OneDrive" : "Forbind til OneDrive", 23 | "Connected as {user}" : "Forbundet som {user}", 24 | "Contacts" : "Kontakter", 25 | "{amount} contacts" : "{amount} kontakter", 26 | "Calendars" : "Kalendere", 27 | "Import calendar" : "Importér kalender" 28 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 29 | } -------------------------------------------------------------------------------- /l10n/da.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : " Microsoft OneDrive", 5 | "Error getting OAuth access token" : "Fejl ved anmodning om OAuth adgangsnøgle", 6 | "Error during OAuth exchanges" : "Fejl under OAuth-udvekslinger", 7 | "OneDrive" : "OneDrive", 8 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["%n filer blev importeret fra Onedrive-lager.","%n filer blev importeret fra OneDrive lager."], 9 | "Bad credentials" : "Forkerte legitimationsoplysninger", 10 | "Bad HTTP method" : "Dårlig HTTP metode", 11 | "OAuth access token refused" : "OAuth adgangsnøgle afvist", 12 | "Microsoft Calendar import" : "Importér fra Microsoft kalender", 13 | "Connected accounts" : "Forbundne konti", 14 | "Data migration" : "Datamigrering", 15 | "OneDrive integration" : "Integration med OneDrive", 16 | "Integration of Microsoft OneDrive" : "Integration af Microsoft OneDrive", 17 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Integration med Microsoft Onedrive tillader dig automatisk at importere dine filer til Nextcloud. ", 18 | "OneDrive admin options saved" : "Administrationsindstillinger til OneDrive gemt", 19 | "Failed to save OneDrive admin options" : "Administrationsindstillinger til OneDrive kunne ikke gemmes", 20 | "Microsoft OneDrive integration" : "Integration af Microsoft OneDrive", 21 | "Client ID" : "Klient ID", 22 | "Client secret" : "Klienthemmelighed", 23 | "Enable navigation link" : "Aktiver navigationslink", 24 | "Connect to OneDrive" : "Forbind til OneDrive", 25 | "Connected as {user}" : "Forbundet som {user}", 26 | "Contacts" : "Kontakter", 27 | "{amount} contacts" : "{amount} kontakter", 28 | "Calendars" : "Kalendere", 29 | "Import calendar" : "Importér kalender" 30 | }, 31 | "nplurals=2; plural=(n != 1);"); 32 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: AGPL-3.0-or-later 3 | version = 1 4 | SPDX-PackageName = "integration_onedrive" 5 | SPDX-PackageSupplier = "Nextcloud " 6 | SPDX-PackageDownloadLocation = "https://github.com/nextcloud/integration_onedrive/" 7 | 8 | [[annotations]] 9 | path = ["l10n/**.js", "l10n/**.json"] 10 | precedence = "aggregate" 11 | SPDX-FileCopyrightText = "2016 Nextcloud GmbH and Nextcloud contributors" 12 | SPDX-License-Identifier = "AGPL-3.0-or-later" 13 | 14 | [[annotations]] 15 | path = ["js/**.js.map", "js/**.js"] 16 | precedence = "aggregate" 17 | SPDX-FileCopyrightText = "2016 Nextcloud GmbH and Nextcloud contributors" 18 | SPDX-License-Identifier = "AGPL-3.0-or-later" 19 | 20 | [[annotations]] 21 | path = ["openapi.json", "openapi-**.json", "src/types/openapi/**.ts"] 22 | precedence = "aggregate" 23 | SPDX-FileCopyrightText = "2023 Nextcloud GmbH and Nextcloud contributors" 24 | SPDX-License-Identifier = "AGPL-3.0-or-later" 25 | 26 | [[annotations]] 27 | path = [".github/CODEOWNERS", ".github/workflows/**.yml"] 28 | precedence = "aggregate" 29 | SPDX-FileCopyrightText = "none" 30 | SPDX-License-Identifier = "CC0-1.0" 31 | 32 | [[annotations]] 33 | path = ["package.json", "package-lock.json", ".git-blame-ignore-revs", "**/package.json", "**/package-lock.json", "composer.json", "composer.lock", "**/composer.json", "**/composer.lock", ".gitignore", ".l10nignore", "psalm.xml", "psalm-baseline.xml", "tests/psalm-baseline.xml", "vendor-bin/**/composer.json", "vendor-bin/**/composer.lock", ".tx/config", "**/phpunit.xml", "tsconfig.json"] 34 | precedence = "aggregate" 35 | SPDX-FileCopyrightText = "none" 36 | SPDX-License-Identifier = "CC0-1.0" 37 | 38 | [[annotations]] 39 | path = ["img/**.svg", "img/**.png", "img/**.jpg"] 40 | precedence = "aggregate" 41 | SPDX-FileCopyrightText = "2023 Nextcloud GmbH and Nextcloud contributors" 42 | SPDX-License-Identifier = "AGPL-3.0-or-later" 43 | -------------------------------------------------------------------------------- /lib/Service/OnedriveColorService.php: -------------------------------------------------------------------------------- 1 | $color->getRed(), 31 | 'g' => $color->getGreen(), 32 | 'b' => $color->getBlue(), 33 | ]; 34 | // init 35 | $closestColor = 'black'; 36 | /** @var Color $black */ 37 | $black = Color::fromString(Named::CSS_COLORS['black']); 38 | $rgbBlack = [ 39 | 'r' => $black->getRed(), 40 | 'g' => $black->getGreen(), 41 | 'b' => $black->getBlue(), 42 | ]; 43 | $closestDiff = $this->colorDiff($rbgColor, $rgbBlack); 44 | 45 | foreach (Named::CSS_COLORS as $name => $hex) { 46 | /** @var Color $c */ 47 | $c = Color::fromString($hex); 48 | $rgb = [ 49 | 'r' => $c->getRed(), 50 | 'g' => $c->getGreen(), 51 | 'b' => $c->getBlue(), 52 | ]; 53 | $diff = $this->colorDiff($rbgColor, $rgb); 54 | if ($diff < $closestDiff) { 55 | $closestDiff = $diff; 56 | $closestColor = $name; 57 | } 58 | } 59 | 60 | return $closestColor; 61 | } 62 | 63 | /** 64 | * @param array{r:int, g:int, b:int} $rgb1 first color 65 | * @param array{r:int, g:int, b:int} $rgb2 second color 66 | * @return int the distance between colors 67 | * @psalm-return 0|positive-int the distance between colors 68 | */ 69 | private function colorDiff(array $rgb1, array $rgb2): int { 70 | return abs($rgb1['r'] - $rgb2['r']) + abs($rgb1['g'] - $rgb2['g']) + abs($rgb1['b'] - $rgb2['b']); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "integration_onedrive", 3 | "version": "3.0.1", 4 | "description": "Onedrive integration", 5 | "main": "index.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "scripts": { 10 | "build": "NODE_ENV=production webpack --progress --config webpack.js", 11 | "dev": "NODE_ENV=development webpack --progress --config webpack.js", 12 | "watch": "NODE_ENV=development webpack --progress --watch --config webpack.js", 13 | "lint": "eslint --ext .js,.vue src", 14 | "lint:fix": "eslint --ext .js,.vue src --fix", 15 | "stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css", 16 | "stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css --fix" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "https://github.com/nextcloud/integration_onedrive" 21 | }, 22 | "keywords": [ 23 | "onedrive" 24 | ], 25 | "author": "Julien Veyssier", 26 | "license": "AGPL-3.0", 27 | "bugs": { 28 | "url": "https://github.com/nextcloud/integration_onedrive/issues" 29 | }, 30 | "homepage": "https://github.com/nextcloud/integration_onedrive", 31 | "browserslist": [ 32 | "extends @nextcloud/browserslist-config" 33 | ], 34 | "engines": { 35 | "node": "^24.0.0", 36 | "npm": "^11.3.0" 37 | }, 38 | "dependencies": { 39 | "@nextcloud/auth": "^2.2.1", 40 | "@nextcloud/axios": "^2.4.0", 41 | "@nextcloud/dialogs": "^5.1.2", 42 | "@nextcloud/initial-state": "^2.1.0", 43 | "@nextcloud/l10n": "^2.2.0", 44 | "@nextcloud/moment": "^1.3.1", 45 | "@nextcloud/router": "^3.0.0", 46 | "@nextcloud/vue": "^8.8.1", 47 | "@nextcloud/password-confirmation": "^5.1.1", 48 | "vue": "^2.7.16", 49 | "vue-material-design-icons": "^5.3.0" 50 | }, 51 | "devDependencies": { 52 | "@nextcloud/babel-config": "^1.0.0", 53 | "@nextcloud/browserslist-config": "^3.0.0", 54 | "@nextcloud/eslint-config": "^8.3.0", 55 | "@nextcloud/stylelint-config": "^2.1.2", 56 | "@nextcloud/webpack-vue-config": "^5.0.0", 57 | "eslint-webpack-plugin": "^4.0.1", 58 | "stylelint-webpack-plugin": "^4.1.0" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /.github/workflows/lint-eslint.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 | # Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions 7 | # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks 8 | 9 | name: Lint eslint 10 | 11 | on: 12 | pull_request: 13 | paths: 14 | - '.github/workflows/**' 15 | - 'src/**' 16 | - 'appinfo/info.xml' 17 | - 'package.json' 18 | - 'package-lock.json' 19 | - 'tsconfig.json' 20 | - '.eslintrc.*' 21 | - '.eslintignore' 22 | - '**.js' 23 | - '**.ts' 24 | - '**.vue' 25 | 26 | permissions: 27 | contents: read 28 | 29 | concurrency: 30 | group: lint-eslint-${{ github.head_ref || github.run_id }} 31 | cancel-in-progress: true 32 | 33 | jobs: 34 | lint: 35 | runs-on: ubuntu-latest 36 | 37 | name: eslint 38 | 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 42 | 43 | - name: Read package.json node and npm engines version 44 | uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 45 | id: versions 46 | with: 47 | fallbackNode: '^16' 48 | fallbackNpm: '^7' 49 | 50 | - name: Set up node ${{ steps.versions.outputs.nodeVersion }} 51 | uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v3 52 | with: 53 | node-version: ${{ steps.versions.outputs.nodeVersion }} 54 | 55 | - name: Set up npm ${{ steps.versions.outputs.npmVersion }} 56 | run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" 57 | 58 | - name: Install dependencies 59 | run: npm ci 60 | 61 | - name: Lint 62 | run: npm run lint 63 | -------------------------------------------------------------------------------- /.github/workflows/psalm.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 | # SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors 7 | # SPDX-License-Identifier: MIT 8 | 9 | name: Static analysis 10 | 11 | on: pull_request 12 | 13 | concurrency: 14 | group: psalm-${{ github.head_ref || github.run_id }} 15 | cancel-in-progress: true 16 | 17 | permissions: 18 | contents: read 19 | 20 | jobs: 21 | static-analysis: 22 | runs-on: ubuntu-latest 23 | 24 | name: static-psalm-analysis 25 | steps: 26 | - name: Checkout 27 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 28 | with: 29 | persist-credentials: false 30 | 31 | - name: Get php version 32 | id: versions 33 | uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 34 | 35 | - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml 36 | run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml 37 | 38 | - name: Set up php${{ steps.versions.outputs.php-available }} 39 | uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0 40 | with: 41 | php-version: ${{ steps.versions.outputs.php-available }} 42 | extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite 43 | coverage: none 44 | ini-file: development 45 | # Temporary workaround for missing pcntl_* in PHP 8.3 46 | ini-values: disable_functions= 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 | 50 | - name: Install dependencies 51 | run: | 52 | composer remove nextcloud/ocp --dev --no-scripts 53 | composer i 54 | 55 | - name: Install nextcloud/ocp 56 | run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies 57 | 58 | - name: Run coding standards check 59 | run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github 60 | -------------------------------------------------------------------------------- /tests/psalm-baseline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 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 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /l10n/sl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "Napaka pri pridobivanju žetona OAuth za dostop", 4 | "Error during OAuth exchanges" : "Napaka med izmenjavo podatkov OAuth", 5 | "Bad credentials" : "Neustrezna poverila", 6 | "Bad HTTP method" : "Neustrezen način HTTP", 7 | "OAuth access token refused" : "Žeton OAuth za dostop je bil zavrnjen", 8 | "Microsoft Calendar import" : "Uvoz koledarja Microsoft", 9 | "Connected accounts" : "Povezani računi", 10 | "Data migration" : "Preselitev podatkov", 11 | "OneDrive integration" : "Združevalnik OneDrive", 12 | "Integration of Microsoft OneDrive" : "Združevalnik programa Microsoft OneDrive", 13 | "Make sure you set the \"Redirect URI\" to" : "Poskrbite, da bo »preusmeritveni naslov URI« nastavljen na", 14 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Vpisati je treba »ID programa« in »geslo programa«.", 15 | "Client ID" : "ID Odjemalca", 16 | "Client secret" : "Skrivni ključ odjemalca", 17 | "Use a popup to authenticate" : "Uporabi pojavno okno za overitev", 18 | "Import job is currently running" : "Trenutno poteka opravilo uvažanja podatkov", 19 | "Onedrive import process will begin soon" : "Opravilo uvoza datotek z oblaka OneDrive bo kmalu začeta", 20 | "Connected to OneDrive!" : "Povezava z OneDrive je vzpostavljena!", 21 | "OneDrive OAuth error:" : "Napaka overitve OAuth za OneDrive:", 22 | "Starting importing files in {targetPath} directory" : "Začeto je uvažanje datotek v mapo {targetPath}.", 23 | "Failed to get calendar list" : "Pridobivanje seznama koledarja je spodletelo", 24 | "Failed to get address book list" : "Pridobivanje seznama imenika je spodletelo", 25 | "Choose where to write imported files" : "Izbor mesta za shranjevanje uvoženih datotek", 26 | "Enable navigation link" : "Omogoči povezave za krmarjenje", 27 | "Connected as {user}" : "Povezan je uporabniški račun {user}", 28 | "Onedrive storage" : "Shramba Onedrive", 29 | "Import directory" : "Uvozi mapo", 30 | "Onedrive storage ({formSize})" : "Shramba Onedrive ({formSize})", 31 | "Import Onedrive files" : "Uvozi datoteke Onedrive", 32 | "Cancel Onedrive files import" : "Prekliči uvoz datotek z oblaka OneDrive", 33 | "Contacts" : "Stiki", 34 | "{amount} contacts" : "{amount} stikov", 35 | "Import Contacts in Nextcloud" : "Uvozi Stike v Nextcloud", 36 | "Calendars" : "Koledarji", 37 | "Import calendar" : "Uvozi koledar" 38 | },"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" 39 | } -------------------------------------------------------------------------------- /l10n/sl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "Napaka pri pridobivanju žetona OAuth za dostop", 6 | "Error during OAuth exchanges" : "Napaka med izmenjavo podatkov OAuth", 7 | "Bad credentials" : "Neustrezna poverila", 8 | "Bad HTTP method" : "Neustrezen način HTTP", 9 | "OAuth access token refused" : "Žeton OAuth za dostop je bil zavrnjen", 10 | "Microsoft Calendar import" : "Uvoz koledarja Microsoft", 11 | "Connected accounts" : "Povezani računi", 12 | "Data migration" : "Preselitev podatkov", 13 | "OneDrive integration" : "Združevalnik OneDrive", 14 | "Integration of Microsoft OneDrive" : "Združevalnik programa Microsoft OneDrive", 15 | "Make sure you set the \"Redirect URI\" to" : "Poskrbite, da bo »preusmeritveni naslov URI« nastavljen na", 16 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Vpisati je treba »ID programa« in »geslo programa«.", 17 | "Client ID" : "ID Odjemalca", 18 | "Client secret" : "Skrivni ključ odjemalca", 19 | "Use a popup to authenticate" : "Uporabi pojavno okno za overitev", 20 | "Import job is currently running" : "Trenutno poteka opravilo uvažanja podatkov", 21 | "Onedrive import process will begin soon" : "Opravilo uvoza datotek z oblaka OneDrive bo kmalu začeta", 22 | "Connected to OneDrive!" : "Povezava z OneDrive je vzpostavljena!", 23 | "OneDrive OAuth error:" : "Napaka overitve OAuth za OneDrive:", 24 | "Starting importing files in {targetPath} directory" : "Začeto je uvažanje datotek v mapo {targetPath}.", 25 | "Failed to get calendar list" : "Pridobivanje seznama koledarja je spodletelo", 26 | "Failed to get address book list" : "Pridobivanje seznama imenika je spodletelo", 27 | "Choose where to write imported files" : "Izbor mesta za shranjevanje uvoženih datotek", 28 | "Enable navigation link" : "Omogoči povezave za krmarjenje", 29 | "Connected as {user}" : "Povezan je uporabniški račun {user}", 30 | "Onedrive storage" : "Shramba Onedrive", 31 | "Import directory" : "Uvozi mapo", 32 | "Onedrive storage ({formSize})" : "Shramba Onedrive ({formSize})", 33 | "Import Onedrive files" : "Uvozi datoteke Onedrive", 34 | "Cancel Onedrive files import" : "Prekliči uvoz datotek z oblaka OneDrive", 35 | "Contacts" : "Stiki", 36 | "{amount} contacts" : "{amount} stikov", 37 | "Import Contacts in Nextcloud" : "Uvozi Stike v Nextcloud", 38 | "Calendars" : "Koledarji", 39 | "Import calendar" : "Uvozi koledar" 40 | }, 41 | "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"); 42 | -------------------------------------------------------------------------------- /lib/AppInfo/Application.php: -------------------------------------------------------------------------------- 1 | registerNotifierService(Notifier::class); 38 | } 39 | 40 | public function boot(IBootContext $context): void { 41 | $context->injectFn(Closure::fromCallable([$this, 'registerNavigation'])); 42 | } 43 | 44 | public function registerNavigation(IUserSession $userSession): void { 45 | $user = $userSession->getUser(); 46 | if ($user !== null) { 47 | $userId = $user->getUID(); 48 | /** @var ContainerInterface $container */ 49 | $container = $this->getContainer(); 50 | $config = $container->get(IConfig::class); 51 | 52 | if ($config->getUserValue($userId, self::APP_ID, 'navigation_enabled', '0') === '1') { 53 | /** @var INavigationManager $navManager */ 54 | $navManager = $container->get(INavigationManager::class); 55 | $navManager->add(function () use ($container) { 56 | /** @var IURLGenerator $urlGenerator */ 57 | $urlGenerator = $container->get(IURLGenerator::class); 58 | /** @var IL10N $l10n */ 59 | $l10n = $container->get(IL10N::class); 60 | return [ 61 | 'id' => self::APP_ID, 62 | 63 | 'order' => 10, 64 | 65 | // the route that will be shown on startup 66 | 'href' => 'https://onedrive.live.com', 67 | 68 | // the icon that will be shown in the navigation 69 | // this file needs to exist in img/ 70 | 'icon' => $urlGenerator->imagePath(self::APP_ID, 'app.svg'), 71 | 72 | // the title of your application. This will be used in the 73 | // navigation or on the settings page of your app 74 | 'name' => $l10n->t('Microsoft OneDrive'), 75 | ]; 76 | }); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/Settings/Personal.php: -------------------------------------------------------------------------------- 1 | config->getUserValue($this->userId, Application::APP_ID, 'token'); 34 | $navigationEnabled = $this->config->getUserValue($this->userId, Application::APP_ID, 'navigation_enabled', '0'); 35 | $userName = $this->config->getUserValue($this->userId, Application::APP_ID, 'user_name'); 36 | 37 | // for OAuth 38 | /** @psalm-suppress DeprecatedMethod */ 39 | $clientID = $this->config->getAppValue(Application::APP_ID, 'client_id'); 40 | /** @psalm-suppress DeprecatedMethod */ 41 | $clientSecret = $this->config->getAppValue(Application::APP_ID, 'client_secret') !== ''; 42 | /** @psalm-suppress DeprecatedMethod */ 43 | $usePopup = $this->config->getAppValue(Application::APP_ID, 'use_popup', '0'); 44 | 45 | // get free space 46 | $userFolder = $this->root->getUserFolder($this->userId); 47 | $freeSpace = $userFolder->getStorage()->free_space('/'); 48 | $user = $this->userManager->get($this->userId); 49 | 50 | $onedriveOutputDir = $this->config->getUserValue($this->userId, Application::APP_ID, 'onedrive_output_dir', '/OneDrive import'); 51 | 52 | $userConfig = [ 53 | 'token' => $token !== '' ? 'dummyToken' : '', 54 | 'client_id' => $clientID, 55 | 'client_secret' => $clientSecret, 56 | 'use_popup' => ($usePopup === '1'), 57 | 'navigation_enabled' => ($navigationEnabled === '1'), 58 | 'user_name' => $userName, 59 | 'free_space' => $freeSpace, 60 | 'user_quota' => $user !== null? $user->getQuota() : '', 61 | 'onedrive_output_dir' => $onedriveOutputDir, 62 | ]; 63 | $this->initialStateService->provideInitialState('user-config', $userConfig); 64 | return new TemplateResponse(Application::APP_ID, 'personalSettings'); 65 | } 66 | 67 | public function getSection(): string { 68 | return 'migration'; 69 | } 70 | 71 | public function getPriority(): int { 72 | return 10; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /.github/workflows/pr-feedback.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 | # SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors 7 | # SPDX-FileCopyrightText: 2023 Marcel Klehr 8 | # SPDX-FileCopyrightText: 2023 Joas Schilling <213943+nickvergessen@users.noreply.github.com> 9 | # SPDX-FileCopyrightText: 2023 Daniel Kesselberg 10 | # SPDX-FileCopyrightText: 2023 Florian Steffens 11 | # SPDX-License-Identifier: MIT 12 | 13 | name: 'Ask for feedback on PRs' 14 | on: 15 | schedule: 16 | - cron: '30 1 * * *' 17 | 18 | jobs: 19 | pr-feedback: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: The get-github-handles-from-website action 23 | uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1 24 | id: scrape 25 | with: 26 | website: 'https://nextcloud.com/team/' 27 | 28 | - name: Get blocklist 29 | id: blocklist 30 | run: | 31 | blocklist=$(curl https://raw.githubusercontent.com/nextcloud/.github/master/non-community-usernames.txt | paste -s -d, -) 32 | echo "blocklist=$blocklist" >> "$GITHUB_OUTPUT" 33 | 34 | - uses: marcelklehr/pr-feedback-action@1883b38a033fb16f576875e0cf45f98b857655c4 35 | with: 36 | feedback-message: | 37 | Hello there, 38 | Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. 39 | 40 | We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. 41 | 42 | Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 43 | 44 | Thank you for contributing to Nextcloud and we hope to hear from you soon! 45 | 46 | (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) 47 | days-before-feedback: 14 48 | start-date: "2024-04-30" 49 | exempt-authors: "${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot" 50 | exempt-bots: true 51 | -------------------------------------------------------------------------------- /l10n/ru.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Error getting OAuth access token" : "Ошибка получения токена доступа OAuth", 3 | "Error during OAuth exchanges" : "Ошибка по время обмена OAuth", 4 | "Bad credentials" : "Неверные учетные данные", 5 | "Bad HTTP method" : "Неверный метод HTTP", 6 | "OAuth access token refused" : "Токен доступа OAuth был отклонен", 7 | "Connected accounts" : "Подключённые учётные записи", 8 | "Data migration" : "Перенос данных", 9 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Интеграция с Microsoft OneDrive позволяет автоматически импортировать файлы OneDrive в Nextcloud.", 10 | "Microsoft OneDrive integration" : "Интеграция с Microsoft OneDrive", 11 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "Если вы хотите разрешить пользователям Nextcloud использовать OAuth для аутентификации на https://onedrive.live.com, создайте приложение OAuth в настройках Azure.", 12 | "Make sure you set the \"Redirect URI\" to" : "Убедитесь, что вы установили \"URI перенаправления\" на", 13 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "Предоставьте своему приложению разрешения API «Contacts.Read», «Calendars.Read», «MailboxSettings.Read», «Files.Read» и «User.Read».", 14 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Поместите «Идентификатор клиента» и «Секрет клиента» приложения OAuth ниже.", 15 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "После этого ваши пользователи Nextcloud увидят кнопку «Подключиться к OneDrive» в своих личных настройках.", 16 | "Client ID" : "ID клиента", 17 | "Client secret" : "Клиентский ключ ", 18 | "Use a popup to authenticate" : "Используйте всплывающее окно для аутентификации", 19 | "Import job is currently running" : "Задание импорта в настоящее время выполняется", 20 | "Sign in with OneDrive" : "Войти через OneDrive", 21 | "Starting importing files in {targetPath} directory" : "Начало импорта файлов в каталог {targetPath}", 22 | "Failed to get calendar list" : "Не удалось получить список календарей", 23 | "Failed to get address book list" : "Не удалось получить список адресных книг", 24 | "Choose where to write imported files" : "Выберите, куда сохранять импортированные файлы", 25 | "Enable navigation link" : "Включить ссылку для навигации", 26 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "Попросите администратора Nextcloud настроить параметры OneDrive OAuth для использования этой интеграции.", 27 | "Connected as {user}" : "Подключено под именем {user}", 28 | "Import directory" : "Каталог импорта", 29 | "Contacts" : "Контакты", 30 | "Calendars" : "Календари", 31 | "Import calendar" : "Импорт календаря" 32 | },"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);" 33 | } -------------------------------------------------------------------------------- /l10n/ru.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Error getting OAuth access token" : "Ошибка получения токена доступа OAuth", 5 | "Error during OAuth exchanges" : "Ошибка по время обмена OAuth", 6 | "Bad credentials" : "Неверные учетные данные", 7 | "Bad HTTP method" : "Неверный метод HTTP", 8 | "OAuth access token refused" : "Токен доступа OAuth был отклонен", 9 | "Connected accounts" : "Подключённые учётные записи", 10 | "Data migration" : "Перенос данных", 11 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Интеграция с Microsoft OneDrive позволяет автоматически импортировать файлы OneDrive в Nextcloud.", 12 | "Microsoft OneDrive integration" : "Интеграция с Microsoft OneDrive", 13 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "Если вы хотите разрешить пользователям Nextcloud использовать OAuth для аутентификации на https://onedrive.live.com, создайте приложение OAuth в настройках Azure.", 14 | "Make sure you set the \"Redirect URI\" to" : "Убедитесь, что вы установили \"URI перенаправления\" на", 15 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "Предоставьте своему приложению разрешения API «Contacts.Read», «Calendars.Read», «MailboxSettings.Read», «Files.Read» и «User.Read».", 16 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Поместите «Идентификатор клиента» и «Секрет клиента» приложения OAuth ниже.", 17 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "После этого ваши пользователи Nextcloud увидят кнопку «Подключиться к OneDrive» в своих личных настройках.", 18 | "Client ID" : "ID клиента", 19 | "Client secret" : "Клиентский ключ ", 20 | "Use a popup to authenticate" : "Используйте всплывающее окно для аутентификации", 21 | "Import job is currently running" : "Задание импорта в настоящее время выполняется", 22 | "Sign in with OneDrive" : "Войти через OneDrive", 23 | "Starting importing files in {targetPath} directory" : "Начало импорта файлов в каталог {targetPath}", 24 | "Failed to get calendar list" : "Не удалось получить список календарей", 25 | "Failed to get address book list" : "Не удалось получить список адресных книг", 26 | "Choose where to write imported files" : "Выберите, куда сохранять импортированные файлы", 27 | "Enable navigation link" : "Включить ссылку для навигации", 28 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "Попросите администратора Nextcloud настроить параметры OneDrive OAuth для использования этой интеграции.", 29 | "Connected as {user}" : "Подключено под именем {user}", 30 | "Import directory" : "Каталог импорта", 31 | "Contacts" : "Контакты", 32 | "Calendars" : "Календари", 33 | "Import calendar" : "Импорт календаря" 34 | }, 35 | "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);"); 36 | -------------------------------------------------------------------------------- /lib/Notification/Notifier.php: -------------------------------------------------------------------------------- 1 | factory = $factory; 44 | $this->userManager = $userManager; 45 | $this->notificationManager = $notificationManager; 46 | $this->url = $urlGenerator; 47 | } 48 | 49 | /** 50 | * Identifier of the notifier, only use [a-z0-9_] 51 | * 52 | * @return string 53 | * @since 17.0.0 54 | */ 55 | public function getID(): string { 56 | return 'integration_onedrive'; 57 | } 58 | /** 59 | * Human readable name describing the notifier 60 | * 61 | * @return string 62 | * @since 17.0.0 63 | */ 64 | public function getName(): string { 65 | return $this->factory->get('integration_onedrive')->t('OneDrive'); 66 | } 67 | 68 | /** 69 | * @param INotification $notification 70 | * @param string $languageCode The code of the language that should be used to prepare the notification 71 | * @return INotification 72 | * @throws InvalidArgumentException When the notification was not prepared by a notifier 73 | * @since 9.0.0 74 | */ 75 | public function prepare(INotification $notification, string $languageCode): INotification { 76 | if ($notification->getApp() !== 'integration_onedrive') { 77 | // Not my app => throw 78 | throw new InvalidArgumentException(); 79 | } 80 | 81 | $l = $this->factory->get('integration_onedrive', $languageCode); 82 | 83 | switch ($notification->getSubject()) { 84 | case 'import_onedrive_finished': 85 | /** @var array{nbImported?: string, targetPath: string} $p */ 86 | $p = $notification->getSubjectParameters(); 87 | $nbImported = (int)($p['nbImported'] ?? 0); 88 | $targetPath = $p['targetPath']; 89 | $content = $l->n('%n file was imported from OneDrive storage.', '%n files were imported from OneDrive storage.', $nbImported); 90 | 91 | $notification->setParsedSubject($content) 92 | ->setIcon($this->url->getAbsoluteURL($this->url->imagePath(Application::APP_ID, 'app-dark.svg'))) 93 | ->setLink($this->url->linkToRouteAbsolute('files.view.index', ['dir' => $targetPath])); 94 | return $notification; 95 | 96 | default: 97 | // Unknown subject => Unknown notification => throw 98 | throw new InvalidArgumentException(); 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /.github/workflows/node.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 | # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors 7 | # SPDX-License-Identifier: MIT 8 | 9 | name: Node 10 | 11 | on: pull_request 12 | 13 | permissions: 14 | contents: read 15 | 16 | concurrency: 17 | group: node-${{ github.head_ref || github.run_id }} 18 | cancel-in-progress: true 19 | 20 | jobs: 21 | changes: 22 | runs-on: ubuntu-latest-low 23 | permissions: 24 | contents: read 25 | pull-requests: read 26 | 27 | outputs: 28 | src: ${{ steps.changes.outputs.src}} 29 | 30 | steps: 31 | - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 32 | id: changes 33 | continue-on-error: true 34 | with: 35 | filters: | 36 | src: 37 | - '.github/workflows/**' 38 | - 'src/**' 39 | - 'appinfo/info.xml' 40 | - 'package.json' 41 | - 'package-lock.json' 42 | - 'tsconfig.json' 43 | - '**.js' 44 | - '**.ts' 45 | - '**.vue' 46 | 47 | build: 48 | runs-on: ubuntu-latest 49 | 50 | needs: changes 51 | if: needs.changes.outputs.src != 'false' 52 | 53 | name: NPM build 54 | steps: 55 | - name: Checkout 56 | uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 57 | with: 58 | persist-credentials: false 59 | 60 | - name: Read package.json node and npm engines version 61 | uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 62 | id: versions 63 | with: 64 | fallbackNode: '^20' 65 | fallbackNpm: '^10' 66 | 67 | - name: Set up node ${{ steps.versions.outputs.nodeVersion }} 68 | uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 69 | with: 70 | node-version: ${{ steps.versions.outputs.nodeVersion }} 71 | 72 | - name: Set up npm ${{ steps.versions.outputs.npmVersion }} 73 | run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' 74 | 75 | - name: Install dependencies & build 76 | env: 77 | CYPRESS_INSTALL_BINARY: 0 78 | PUPPETEER_SKIP_DOWNLOAD: true 79 | run: | 80 | npm ci 81 | npm run build --if-present 82 | 83 | - name: Check webpack build changes 84 | run: | 85 | bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)" 86 | 87 | - name: Show changes on failure 88 | if: failure() 89 | run: | 90 | git status 91 | git --no-pager diff 92 | exit 1 # make it red to grab attention 93 | 94 | summary: 95 | permissions: 96 | contents: none 97 | runs-on: ubuntu-latest-low 98 | needs: [changes, build] 99 | 100 | if: always() 101 | 102 | # This is the summary, we just avoid to rename it so that branch protection rules still match 103 | name: node 104 | 105 | steps: 106 | - name: Summary status 107 | run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi 108 | -------------------------------------------------------------------------------- /l10n/fi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "Virhe OAuth-valtuutuksen hakemisessa", 4 | "Error during OAuth exchanges" : "Virhe OAuth-tunnistautumisessa", 5 | "Bad credentials" : "Virheelliset kirjautumistiedot", 6 | "Bad HTTP method" : "Virheellinen HTTP-metodi", 7 | "OAuth access token refused" : "OAuth-valtuutus hylätty", 8 | "Microsoft Calendar import" : "Microsoft-kalenterin tuonti", 9 | "Connected accounts" : "Yhdistetyt tilit", 10 | "Data migration" : "Tietojen migraatio", 11 | "OneDrive integration" : "OneDrive-integraatio", 12 | "Integration of Microsoft OneDrive" : "Microsoft OneDriven integraatio", 13 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive -integraatio mahdollistaa OneDrive-tiedostojen tuomisen automaattisesti Nextcloudiin.", 14 | "Microsoft OneDrive integration" : "Microsoft OneDriven integraatio", 15 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Syötä OAuth-sovelluksen Asiakas-ID ja Asiakassalasana-arvot alas.", 16 | "Client ID" : "Asiakas-ID", 17 | "Client secret" : "Asiakassalasana", 18 | "Use a popup to authenticate" : "Käytä ponnahdusikkunaa tunnistautumista varten", 19 | "Import job is currently running" : "Tuontityö on meneillään", 20 | "Import job is scheduled" : "Tuontityö on ajastettu", 21 | "Last Onedrive import job at {date}" : "Viimeisin Onedrive-tuonti {date}", 22 | "Onedrive import process will begin soon" : "OneDrive-tuonti alkaa pian", 23 | "Connected to OneDrive!" : "Yhdistetty OneDriveen!", 24 | "OneDrive OAuth error:" : "OneDriven OAuth-virhe:", 25 | "OneDrive options saved" : "OneDrive-asetukset tallennettu", 26 | "Failed to save OneDrive options" : "OneDrive-asetusten tallentaminen epäonnistui", 27 | "Sign in with OneDrive" : "Kirjaudu sisään OneDrivella", 28 | "Starting importing files in {targetPath} directory" : "Aloitetaan tiedostojen tuonti kohteeseen {targetPath}", 29 | "Failed to get calendar list" : "Kalenterilistan hakeminen epäonnistui", 30 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} tapahtuma tuotu kalenteriin {name}","{number} tapahtumaa tuotu kalenteriin {name}"], 31 | "Failed to import calendar" : "Kalenterin tuonti epäonnistui", 32 | "Failed to get address book list" : "Osoitekirjalistan hakeminen epäonnistui", 33 | "Choose where to write imported files" : "Valitse, mihin tiedostot tuodaan", 34 | "Enable navigation link" : "Näytä navigointipalkissa", 35 | "Connect to OneDrive" : "Yhdistä OneDriveen", 36 | "Connected as {user}" : "Yhdistetty käyttäjänä {user}", 37 | "Disconnect from OneDrive" : "Katkaise yhteys OneDriveen", 38 | "Onedrive storage" : "OneDrive-tallennustila", 39 | "Import directory" : "Tuo kansio", 40 | "Onedrive storage ({formSize})" : "Onedrive-tallennustila ({formSize})", 41 | "Import Onedrive files" : "Tuo OneDrive-tiedostoja", 42 | "Cancel Onedrive files import" : "Peruuta OneDrive-tiedostojen tuonti", 43 | "Contacts" : "Yhteystiedot", 44 | "{amount} contacts" : "{amount} yhteystietoa", 45 | "Import Contacts in Nextcloud" : "Tuo yhteystiedot Nextcloudiin", 46 | "Calendars" : "Kalenterit", 47 | "Import calendar" : "Tuo kalenteri", 48 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["{amount} tiedosto tuotu ({formImported}) ({progress}%)","{amount} tiedostoa tuotu ({formImported}) ({progress}%)"] 49 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 50 | } -------------------------------------------------------------------------------- /lib/Migration/Version3300Date202410151354.php: -------------------------------------------------------------------------------- 1 | config->getAppValue(Application::APP_ID, 'client_secret'); 44 | if ($clientSecret !== '') { 45 | $clientSecret = $this->crypto->encrypt($clientSecret); 46 | /** @psalm-suppress DeprecatedMethod */ 47 | $this->config->setAppValue(Application::APP_ID, 'client_secret', $clientSecret); 48 | } 49 | 50 | // encrypt user tokens 51 | $qbUpdate = $this->connection->getQueryBuilder(); 52 | $qbUpdate->update('preferences') 53 | ->set('configvalue', $qbUpdate->createParameter('updateValue')) 54 | ->where( 55 | $qbUpdate->expr()->eq('appid', $qbUpdate->createNamedParameter(Application::APP_ID, IQueryBuilder::PARAM_STR)) 56 | ) 57 | ->andWhere( 58 | $qbUpdate->expr()->eq('configkey', $qbUpdate->createParameter('updateConfigKey')) 59 | ); 60 | $qbUpdate->andWhere( 61 | $qbUpdate->expr()->eq('userid', $qbUpdate->createParameter('updateUserId')) 62 | ); 63 | 64 | $qbSelect = $this->connection->getQueryBuilder(); 65 | $qbSelect->select(['userid', 'configvalue', 'configkey']) 66 | ->from('preferences') 67 | ->where( 68 | $qbSelect->expr()->eq('appid', $qbSelect->createNamedParameter(Application::APP_ID, IQueryBuilder::PARAM_STR)) 69 | ); 70 | 71 | $or = $qbSelect->expr()->orx(); 72 | $or->add($qbSelect->expr()->eq('configkey', $qbSelect->createNamedParameter('token', IQueryBuilder::PARAM_STR))); 73 | $or->add($qbSelect->expr()->eq('configkey', $qbSelect->createNamedParameter('refresh_token', IQueryBuilder::PARAM_STR))); 74 | $qbSelect->andWhere($or); 75 | 76 | $qbSelect->andWhere( 77 | $qbSelect->expr()->nonEmptyString('configvalue') 78 | ) 79 | ->andWhere( 80 | $qbSelect->expr()->isNotNull('configvalue') 81 | ); 82 | $req = $qbSelect->executeQuery(); 83 | 84 | while ($row = $req->fetch()) { 85 | /** @var array{userid: string, configkey: string, configvalue: string} $row */ 86 | $userId = $row['userid']; 87 | $configKey = $row['configkey']; 88 | $storedClearValue = $row['configvalue']; 89 | $encryptedValue = $this->crypto->encrypt($storedClearValue); 90 | $qbUpdate->setParameter('updateUserId', $userId, IQueryBuilder::PARAM_STR); 91 | $qbUpdate->setParameter('updateConfigKey', $configKey, IQueryBuilder::PARAM_STR); 92 | $qbUpdate->setParameter('updateValue', $encryptedValue, IQueryBuilder::PARAM_STR); 93 | $qbUpdate->executeStatement(); 94 | } 95 | $req->closeCursor(); 96 | return null; 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /l10n/fi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "Virhe OAuth-valtuutuksen hakemisessa", 6 | "Error during OAuth exchanges" : "Virhe OAuth-tunnistautumisessa", 7 | "Bad credentials" : "Virheelliset kirjautumistiedot", 8 | "Bad HTTP method" : "Virheellinen HTTP-metodi", 9 | "OAuth access token refused" : "OAuth-valtuutus hylätty", 10 | "Microsoft Calendar import" : "Microsoft-kalenterin tuonti", 11 | "Connected accounts" : "Yhdistetyt tilit", 12 | "Data migration" : "Tietojen migraatio", 13 | "OneDrive integration" : "OneDrive-integraatio", 14 | "Integration of Microsoft OneDrive" : "Microsoft OneDriven integraatio", 15 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive -integraatio mahdollistaa OneDrive-tiedostojen tuomisen automaattisesti Nextcloudiin.", 16 | "Microsoft OneDrive integration" : "Microsoft OneDriven integraatio", 17 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Syötä OAuth-sovelluksen Asiakas-ID ja Asiakassalasana-arvot alas.", 18 | "Client ID" : "Asiakas-ID", 19 | "Client secret" : "Asiakassalasana", 20 | "Use a popup to authenticate" : "Käytä ponnahdusikkunaa tunnistautumista varten", 21 | "Import job is currently running" : "Tuontityö on meneillään", 22 | "Import job is scheduled" : "Tuontityö on ajastettu", 23 | "Last Onedrive import job at {date}" : "Viimeisin Onedrive-tuonti {date}", 24 | "Onedrive import process will begin soon" : "OneDrive-tuonti alkaa pian", 25 | "Connected to OneDrive!" : "Yhdistetty OneDriveen!", 26 | "OneDrive OAuth error:" : "OneDriven OAuth-virhe:", 27 | "OneDrive options saved" : "OneDrive-asetukset tallennettu", 28 | "Failed to save OneDrive options" : "OneDrive-asetusten tallentaminen epäonnistui", 29 | "Sign in with OneDrive" : "Kirjaudu sisään OneDrivella", 30 | "Starting importing files in {targetPath} directory" : "Aloitetaan tiedostojen tuonti kohteeseen {targetPath}", 31 | "Failed to get calendar list" : "Kalenterilistan hakeminen epäonnistui", 32 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} tapahtuma tuotu kalenteriin {name}","{number} tapahtumaa tuotu kalenteriin {name}"], 33 | "Failed to import calendar" : "Kalenterin tuonti epäonnistui", 34 | "Failed to get address book list" : "Osoitekirjalistan hakeminen epäonnistui", 35 | "Choose where to write imported files" : "Valitse, mihin tiedostot tuodaan", 36 | "Enable navigation link" : "Näytä navigointipalkissa", 37 | "Connect to OneDrive" : "Yhdistä OneDriveen", 38 | "Connected as {user}" : "Yhdistetty käyttäjänä {user}", 39 | "Disconnect from OneDrive" : "Katkaise yhteys OneDriveen", 40 | "Onedrive storage" : "OneDrive-tallennustila", 41 | "Import directory" : "Tuo kansio", 42 | "Onedrive storage ({formSize})" : "Onedrive-tallennustila ({formSize})", 43 | "Import Onedrive files" : "Tuo OneDrive-tiedostoja", 44 | "Cancel Onedrive files import" : "Peruuta OneDrive-tiedostojen tuonti", 45 | "Contacts" : "Yhteystiedot", 46 | "{amount} contacts" : "{amount} yhteystietoa", 47 | "Import Contacts in Nextcloud" : "Tuo yhteystiedot Nextcloudiin", 48 | "Calendars" : "Kalenterit", 49 | "Import calendar" : "Tuo kalenteri", 50 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["{amount} tiedosto tuotu ({formImported}) ({progress}%)","{amount} tiedostoa tuotu ({formImported}) ({progress}%)"] 51 | }, 52 | "nplurals=2; plural=(n != 1);"); 53 | -------------------------------------------------------------------------------- /l10n/zh_TW.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "取得 OAuth 存取權杖時發生錯誤", 4 | "Error during OAuth exchanges" : "OAuth 交換時發生錯誤", 5 | "OneDrive" : "OneDrive", 6 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["從 OneDrive 儲存空間匯入了 %n 個檔案。"], 7 | "Bad credentials" : "錯誤的憑證", 8 | "Bad HTTP method" : "錯誤的 HTTP 方法", 9 | "OAuth access token refused" : "OAuth 存取權杖被拒絕", 10 | "Microsoft Calendar import" : "匯入 Microsoft 日曆", 11 | "Connected accounts" : "已連結的帳號", 12 | "Data migration" : "資料遷移", 13 | "OneDrive integration" : "OneDrive 整合", 14 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive 整合", 15 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive 整合讓您自動匯入您的 OneDrive 檔案至 Nextcloud。", 16 | "OneDrive admin options saved" : "已儲存 OneDrive 管理員選項", 17 | "Failed to save OneDrive admin options" : "儲存 OneDrive 管理員選項失敗", 18 | "Microsoft OneDrive integration" : "Microsoft OneDrive 整合", 19 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "如果您想要允許您的 Nextcloud 使用者使用 OAuth 對 https://onedrive.live.com 進行身份驗證,在您的 Azure 設定中建立 OAuth 應用程式。", 20 | "Azure App registrations page" : "Azure 應用程式註冊頁面", 21 | "Set \"Application name\" to a value that will make sense to your Nextcloud users as they will see it when connecting to OneDrive using your OAuth app." : "將「應用程式名稱」設定為對 Nextcloud 使用者有意義的值,因為他們在使用 OAuth 應用程式連結至 OneDrive 時會看到它。", 22 | "Make sure you set the \"Redirect URI\" to" : "確保您將「重新導向 URI」設定為", 23 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "為您的應用程式授予「Contacts.Read」、「Calendars.Read」、「MailboxSettings.Read」、「Files.Read」與「User.Read」API 權限。", 24 | "Create a client secret in \"Certificates & secrets\"." : "在「憑證與密碼」中建立一個客戶端密碼。", 25 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下方輸入 OAuth 應用程式「客戶端 ID」與「客戶端密碼」。", 26 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "您的 Nextcloud 使用者將會在他們的個人設定中看到「連結至 OneDrive」按鈕", 27 | "Client ID" : "客戶端 ID", 28 | "Client ID of your OneDrive application" : "您的 OneDrive 應用程式客戶端 ID", 29 | "Client secret" : "客戶端密碼", 30 | "Client secret of your OneDrive application" : "您 OneDrive 應用程式的客戶端密碼", 31 | "Use a popup to authenticate" : "使用彈出式視窗進行驗證", 32 | "Import job is currently running" : "匯入作業正在執行", 33 | "Import job is scheduled" : "已排程匯入作業", 34 | "Last Onedrive import job at {date}" : "上次 OneDrive 匯入作業執行於 {date}", 35 | "Onedrive import process will begin soon" : "OneDrive 匯入流程即將開始", 36 | "Connected to OneDrive!" : "連結至 OneDrive!", 37 | "OneDrive OAuth error:" : "OneDrive OAuth 錯誤:", 38 | "OneDrive options saved" : "已儲存 OneDrive 選項", 39 | "Failed to save OneDrive options" : "儲存 OneDrive 選項失敗", 40 | "Sign in with OneDrive" : "使用 OneDrive 登入", 41 | "Failed to save OneDrive OAuth state" : "儲存 OneDrive OAuth 狀態失敗", 42 | "Failed to get OneDrive storage information" : "取得 OneDrive 儲存空間資訊失敗", 43 | "Starting importing files in {targetPath} directory" : "開始匯入檔案至 {targetPath} 目錄", 44 | "Failed to start importing Onedrive storage" : "無法開始匯入 OneDrive 儲存空間", 45 | "Failed to get calendar list" : "取得日曆清單失敗", 46 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} 事件成功匯入至 {name}"], 47 | "Failed to import calendar" : "匯入日曆失敗", 48 | "Failed to get number of contacts" : "無法取得聯絡人數量", 49 | "_{nbAdded} contact created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_::_{nbAdded} contacts created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_" : ["建立了 {nbAdded} 個聯絡人、已更新 {nbUpdated} 個、略過 {nbSkipped} 個、{nbFailed} 個失敗"], 50 | "Failed to get address book list" : "取得通訊錄清單失敗", 51 | "Choose where to write imported files" : "選擇要寫入匯入檔案的位置", 52 | "Enable navigation link" : "啟用導覽連結", 53 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "要求您的 Nextcloud 管理員設定 OneDrive OAuth 設定以使用此整合。", 54 | "Connect to OneDrive" : "連結至 OneDrive", 55 | "Connected as {user}" : "以 {user} 身份連線", 56 | "Disconnect from OneDrive" : "與 OneDrive 斷開連結", 57 | "Onedrive storage" : "OneDrive 儲存空間", 58 | "Import directory" : "匯入目錄", 59 | "Onedrive storage ({formSize})" : "OneDrive 儲存空間({formSize})", 60 | "Import Onedrive files" : "匯入 OneDrive 檔案", 61 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "您的 OneDrive 儲存空間大於您的剩餘空間 ({formSpace})", 62 | "Cancel Onedrive files import" : "取消 OneDrive 檔案匯入", 63 | "Contacts" : "聯絡人", 64 | "{amount} contacts" : "{amount} 位聯絡人", 65 | "Import Contacts in Nextcloud" : "將聯絡人匯入至 Nextcloud", 66 | "Calendars" : "日曆", 67 | "Import calendar" : "匯入日曆", 68 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["匯入了 {amount} 個檔案({formImported})({progress}%)"] 69 | },"pluralForm" :"nplurals=1; plural=0;" 70 | } -------------------------------------------------------------------------------- /l10n/mk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "Грешка при добивање на OAuth пристапен токен", 4 | "Error during OAuth exchanges" : "Грешка при размена на податоци со OAuth ", 5 | "OneDrive" : "OneDrive", 6 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["%s датотека е увезена од OneDrive.","%s датотеки се увезени од OneDrive."], 7 | "Bad credentials" : "Неточни акредитиви", 8 | "OAuth access token refused" : "Одбиен OAuth пристапен токен ", 9 | "Microsoft Calendar import" : "Увоз на Microsoft календар", 10 | "Connected accounts" : "Поврзани сметки", 11 | "Data migration" : "Мигрирање на податоци", 12 | "OneDrive integration" : "OneDrive интеграција", 13 | "Integration of Microsoft OneDrive" : "Интеграција на Microsoft OneDrive", 14 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive интеграцијата ви овозможува автоматско увезување на датотеките од OneDrive на Nextcloud.", 15 | "OneDrive admin options saved" : "Зачувани се OneDrive административни параметри", 16 | "Failed to save OneDrive admin options" : "Неуспешно зачувување на OneDrive административни параметри", 17 | "Microsoft OneDrive integration" : "Microsoft OneDrive интеграција", 18 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "Доколку сакате да им ивозможите на вашите корисници да се пријават со https://onedrive.live.com, креирајте OAuth апликација во вашите Azure параматри.", 19 | "Azure App registrations page" : "Azure App страница за регистрација", 20 | "Make sure you set the \"Redirect URI\" to" : "И бидете сигурни дека сте ја поставиле \"Redirect URI\" во", 21 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Внесете ги OAuth app \"Клиент ИД\" и \"Тајна на клиент\" овде.", 22 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "Корисниците ќе видат копче \"Поврзи со OneDrive\" во нивните параметри.", 23 | "Client ID" : "Клиент ИД", 24 | "Client ID of your OneDrive application" : "Клиент ИД на вашата OneDrive апликација", 25 | "Client secret" : "Тајна на клиент", 26 | "Client secret of your OneDrive application" : "Клиент тајна на вашата OneDrive апликација", 27 | "Use a popup to authenticate" : "користи скокачки прозор за автентификација", 28 | "Last Onedrive import job at {date}" : "Последни увезени Onedrive податоци на {date}", 29 | "Onedrive import process will begin soon" : "Увоз на Onedrive податоците ќе започне наскоро", 30 | "Connected to OneDrive!" : "Поврзано со OneDrive!", 31 | "OneDrive options saved" : "Зачувани се OneDrive параметри", 32 | "Failed to save OneDrive options" : "Неуспешно зачувување на OneDrive параметри", 33 | "Sign in with OneDrive" : "Најави се со OneDrive", 34 | "Failed to save OneDrive OAuth state" : "Неуспешно зачувување на OneDrive OAuth состојба", 35 | "Failed to get OneDrive storage information" : "Неуспешно добивање на OneDrive информации", 36 | "Starting importing files in {targetPath} directory" : "Почеток на увоз на датотеки во папката {targetPath}", 37 | "Failed to start importing Onedrive storage" : "Неуспешен почеток на увоз на Onedrive", 38 | "Failed to get calendar list" : "Неуспешно добивање на листа со календари", 39 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} настан е успешно увезен во {name}","{number} настани се успешно увезени во {name}"], 40 | "Failed to import calendar" : "Неуспешен увоз на календар", 41 | "Failed to get number of contacts" : "Неуспешно добивање на број на контакти", 42 | "Failed to get address book list" : "Неуспешно добивање на листа со адресари", 43 | "Choose where to write imported files" : "Избери каде да ги увезете датотеките", 44 | "Enable navigation link" : "Овозможи линк за навигација", 45 | "Connect to OneDrive" : "Поврзи со OneDrive", 46 | "Connected as {user}" : "Поврзан како {user}", 47 | "Disconnect from OneDrive" : "Исклучи се од OneDrive", 48 | "Onedrive storage" : "Onedrive складиште", 49 | "Import directory" : "Увези папка", 50 | "Onedrive storage ({formSize})" : "Onedrive складиште ({formSize})", 51 | "Import Onedrive files" : "Увези Onedrive датотеки", 52 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "Вашиот Onedrive е поголем одколку што имате слободно место ({formSpace})", 53 | "Cancel Onedrive files import" : "Прекини увоз на Onedrive податоци", 54 | "Contacts" : "Контакти", 55 | "{amount} contacts" : "{amount} контакти", 56 | "Import Contacts in Nextcloud" : "Увези ги контактите", 57 | "Calendars" : "Календари", 58 | "Import calendar" : "Увези календар", 59 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["{amount} датотека е увезена ({formImported}) ({progress}%)","{amount} датотеки се увезени ({formImported}) ({progress}%)"] 60 | },"pluralForm" :"nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;" 61 | } -------------------------------------------------------------------------------- /l10n/zh_HK.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Microsoft OneDrive" : "Microsoft OneDrive", 3 | "Error getting OAuth access token" : "擷取 OAuth 存取權杖時發生錯誤", 4 | "Error during OAuth exchanges" : "OAuth 交換時發生錯誤", 5 | "OneDrive" : "OneDrive", 6 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["從 OneDrive 儲存空間導入了 %n 個檔案。"], 7 | "Bad credentials" : "錯誤的憑證", 8 | "Bad HTTP method" : "不正確的 HTTP 方法", 9 | "OAuth access token refused" : "OAuth 存取權杖被拒絕", 10 | "Microsoft Calendar import" : "匯入 Microsoft 日曆", 11 | "Connected accounts" : "已連線的賬號", 12 | "Data migration" : "數據遷移", 13 | "OneDrive integration" : "OneDrive 整合", 14 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive 整合", 15 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive整合讓您自動導入您的 OneDrive 檔案至 Nextcloud。", 16 | "OneDrive admin options saved" : "已儲存 OneDrive 管理員選項", 17 | "Failed to save OneDrive admin options" : "儲存 OneDrive 管理員選項失敗", 18 | "Microsoft OneDrive integration" : "Microsoft OneDrive 整合", 19 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "如果您想要允許您的 Nextcloud 用戶使用 OAuth 對 https://onedrive.live.com 進行身分驗證,在您的 Azure 設定中建立 OAuth 應用程式。", 20 | "Azure App registrations page" : "Azure 應用程式註冊頁面", 21 | "Set \"Application name\" to a value that will make sense to your Nextcloud users as they will see it when connecting to OneDrive using your OAuth app." : "將「應用程式名稱」設置為對 Nextcloud 用戶有意義的值,因為他們在使用 OAuth 應用程式連接到 OneDrive 時會看到它。", 22 | "Make sure you set the \"Redirect URI\" to" : "確保您將「重新導向 URI」設定為", 23 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "向您的應用程式授予「Contacts.Read」、「Calendars.Read」、「MailboxSettings.Read」、「Files.Read」和「User.Read」API 權限。", 24 | "Create a client secret in \"Certificates & secrets\"." : "在“證書和密碼”中創建一個客戶端密碼。", 25 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下方放置 OAuth 應用程式「客戶端 ID」與「客戶端密碼」。", 26 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "然後,您的 Nextcloud 用戶將在其個人設置中看到【連接到 OneDrive】按鈕。", 27 | "Client ID" : "客戶端 ID", 28 | "Client ID of your OneDrive application" : "您 OneDrive 應用程式的客戶端 ID", 29 | "Client secret" : "客戶端密碼", 30 | "Client secret of your OneDrive application" : "您 OneDrive 應用程式的客戶端密碼", 31 | "Use a popup to authenticate" : "使用彈出窗口進行身份驗證", 32 | "Import job is currently running" : "導入作業目前正在運行", 33 | "Import job is scheduled" : "已排程匯入", 34 | "Last Onedrive import job at {date}" : "上次 OneDrive 導入作業於 {date} 執行", 35 | "Onedrive import process will begin soon" : "Onedrive 導入後台作業進程即將開始。", 36 | "Connected to OneDrive!" : "已連線至 OneDrive!", 37 | "OneDrive OAuth error:" : "OneDrive OAuth 錯誤:", 38 | "OneDrive options saved" : "已儲存 OneDrive 選項", 39 | "Failed to save OneDrive options" : "儲存 OneDrive 選項失敗", 40 | "Sign in with OneDrive" : "使用 OneDrive 登入", 41 | "Failed to save OneDrive OAuth state" : "儲存 OneDrive OAuth 狀態失敗", 42 | "Failed to get OneDrive storage information" : "無法獲取 OneDrive 儲存空間資訊", 43 | "Starting importing files in {targetPath} directory" : "開始將檔案導入到 {targetPath} 目錄", 44 | "Failed to start importing Onedrive storage" : "無法開始導入Onedrive 儲存空間", 45 | "Failed to get calendar list" : "讀取日曆清單失敗", 46 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} 項活動已成功導入{name}中"], 47 | "Failed to import calendar" : "無法匯入日曆", 48 | "Failed to get number of contacts" : "無法獲取聯絡人數量", 49 | "_{nbAdded} contact created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_::_{nbAdded} contacts created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_" : ["創建了 {nbAdded} 個聯絡人,更新了 {nbUpdated} 個,跳過了 {nbSkipped} 個,{nbFailed} 個失敗了"], 50 | "Failed to get address book list" : "讀取通訊錄清單失敗", 51 | "Choose where to write imported files" : "選擇寫入導入檔案的位置", 52 | "Enable navigation link" : "啟用導覽連結", 53 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "請您的 Nextcloud 管理員配置 OneDrive OAuth 應用程式,以便能夠連接到該服務。", 54 | "Connect to OneDrive" : "連接到 OneDrive", 55 | "Connected as {user}" : "以 {user} 身份連線", 56 | "Disconnect from OneDrive" : "與 OneDrive 斷開連線", 57 | "Onedrive storage" : "Onedrive 儲存", 58 | "Import directory" : "導入資料夾", 59 | "Onedrive storage ({formSize})" : "Onedrive 儲存 ({formSize})", 60 | "Import Onedrive files" : "導入 Onedrive 檔案", 61 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "您的 Onedrive 儲存大於剩餘空間({formSpace})", 62 | "Cancel Onedrive files import" : "取消 Onedrive 導入", 63 | "Contacts" : "通訊錄", 64 | "{amount} contacts" : "{amount} 位聯絡人", 65 | "Import Contacts in Nextcloud" : "將 Contacts 匯入 Nextcloud", 66 | "Calendars" : "日曆", 67 | "Import calendar" : "導入日曆", 68 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["導入了 {amount} 個檔案 ({formImported})({progress}%)"] 69 | },"pluralForm" :"nplurals=1; plural=0;" 70 | } -------------------------------------------------------------------------------- /l10n/zh_TW.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "取得 OAuth 存取權杖時發生錯誤", 6 | "Error during OAuth exchanges" : "OAuth 交換時發生錯誤", 7 | "OneDrive" : "OneDrive", 8 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["從 OneDrive 儲存空間匯入了 %n 個檔案。"], 9 | "Bad credentials" : "錯誤的憑證", 10 | "Bad HTTP method" : "錯誤的 HTTP 方法", 11 | "OAuth access token refused" : "OAuth 存取權杖被拒絕", 12 | "Microsoft Calendar import" : "匯入 Microsoft 日曆", 13 | "Connected accounts" : "已連結的帳號", 14 | "Data migration" : "資料遷移", 15 | "OneDrive integration" : "OneDrive 整合", 16 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive 整合", 17 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive 整合讓您自動匯入您的 OneDrive 檔案至 Nextcloud。", 18 | "OneDrive admin options saved" : "已儲存 OneDrive 管理員選項", 19 | "Failed to save OneDrive admin options" : "儲存 OneDrive 管理員選項失敗", 20 | "Microsoft OneDrive integration" : "Microsoft OneDrive 整合", 21 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "如果您想要允許您的 Nextcloud 使用者使用 OAuth 對 https://onedrive.live.com 進行身份驗證,在您的 Azure 設定中建立 OAuth 應用程式。", 22 | "Azure App registrations page" : "Azure 應用程式註冊頁面", 23 | "Set \"Application name\" to a value that will make sense to your Nextcloud users as they will see it when connecting to OneDrive using your OAuth app." : "將「應用程式名稱」設定為對 Nextcloud 使用者有意義的值,因為他們在使用 OAuth 應用程式連結至 OneDrive 時會看到它。", 24 | "Make sure you set the \"Redirect URI\" to" : "確保您將「重新導向 URI」設定為", 25 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "為您的應用程式授予「Contacts.Read」、「Calendars.Read」、「MailboxSettings.Read」、「Files.Read」與「User.Read」API 權限。", 26 | "Create a client secret in \"Certificates & secrets\"." : "在「憑證與密碼」中建立一個客戶端密碼。", 27 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下方輸入 OAuth 應用程式「客戶端 ID」與「客戶端密碼」。", 28 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "您的 Nextcloud 使用者將會在他們的個人設定中看到「連結至 OneDrive」按鈕", 29 | "Client ID" : "客戶端 ID", 30 | "Client ID of your OneDrive application" : "您的 OneDrive 應用程式客戶端 ID", 31 | "Client secret" : "客戶端密碼", 32 | "Client secret of your OneDrive application" : "您 OneDrive 應用程式的客戶端密碼", 33 | "Use a popup to authenticate" : "使用彈出式視窗進行驗證", 34 | "Import job is currently running" : "匯入作業正在執行", 35 | "Import job is scheduled" : "已排程匯入作業", 36 | "Last Onedrive import job at {date}" : "上次 OneDrive 匯入作業執行於 {date}", 37 | "Onedrive import process will begin soon" : "OneDrive 匯入流程即將開始", 38 | "Connected to OneDrive!" : "連結至 OneDrive!", 39 | "OneDrive OAuth error:" : "OneDrive OAuth 錯誤:", 40 | "OneDrive options saved" : "已儲存 OneDrive 選項", 41 | "Failed to save OneDrive options" : "儲存 OneDrive 選項失敗", 42 | "Sign in with OneDrive" : "使用 OneDrive 登入", 43 | "Failed to save OneDrive OAuth state" : "儲存 OneDrive OAuth 狀態失敗", 44 | "Failed to get OneDrive storage information" : "取得 OneDrive 儲存空間資訊失敗", 45 | "Starting importing files in {targetPath} directory" : "開始匯入檔案至 {targetPath} 目錄", 46 | "Failed to start importing Onedrive storage" : "無法開始匯入 OneDrive 儲存空間", 47 | "Failed to get calendar list" : "取得日曆清單失敗", 48 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} 事件成功匯入至 {name}"], 49 | "Failed to import calendar" : "匯入日曆失敗", 50 | "Failed to get number of contacts" : "無法取得聯絡人數量", 51 | "_{nbAdded} contact created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_::_{nbAdded} contacts created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_" : ["建立了 {nbAdded} 個聯絡人、已更新 {nbUpdated} 個、略過 {nbSkipped} 個、{nbFailed} 個失敗"], 52 | "Failed to get address book list" : "取得通訊錄清單失敗", 53 | "Choose where to write imported files" : "選擇要寫入匯入檔案的位置", 54 | "Enable navigation link" : "啟用導覽連結", 55 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "要求您的 Nextcloud 管理員設定 OneDrive OAuth 設定以使用此整合。", 56 | "Connect to OneDrive" : "連結至 OneDrive", 57 | "Connected as {user}" : "以 {user} 身份連線", 58 | "Disconnect from OneDrive" : "與 OneDrive 斷開連結", 59 | "Onedrive storage" : "OneDrive 儲存空間", 60 | "Import directory" : "匯入目錄", 61 | "Onedrive storage ({formSize})" : "OneDrive 儲存空間({formSize})", 62 | "Import Onedrive files" : "匯入 OneDrive 檔案", 63 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "您的 OneDrive 儲存空間大於您的剩餘空間 ({formSpace})", 64 | "Cancel Onedrive files import" : "取消 OneDrive 檔案匯入", 65 | "Contacts" : "聯絡人", 66 | "{amount} contacts" : "{amount} 位聯絡人", 67 | "Import Contacts in Nextcloud" : "將聯絡人匯入至 Nextcloud", 68 | "Calendars" : "日曆", 69 | "Import calendar" : "匯入日曆", 70 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["匯入了 {amount} 個檔案({formImported})({progress}%)"] 71 | }, 72 | "nplurals=1; plural=0;"); 73 | -------------------------------------------------------------------------------- /l10n/mk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "Грешка при добивање на OAuth пристапен токен", 6 | "Error during OAuth exchanges" : "Грешка при размена на податоци со OAuth ", 7 | "OneDrive" : "OneDrive", 8 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["%s датотека е увезена од OneDrive.","%s датотеки се увезени од OneDrive."], 9 | "Bad credentials" : "Неточни акредитиви", 10 | "OAuth access token refused" : "Одбиен OAuth пристапен токен ", 11 | "Microsoft Calendar import" : "Увоз на Microsoft календар", 12 | "Connected accounts" : "Поврзани сметки", 13 | "Data migration" : "Мигрирање на податоци", 14 | "OneDrive integration" : "OneDrive интеграција", 15 | "Integration of Microsoft OneDrive" : "Интеграција на Microsoft OneDrive", 16 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive интеграцијата ви овозможува автоматско увезување на датотеките од OneDrive на Nextcloud.", 17 | "OneDrive admin options saved" : "Зачувани се OneDrive административни параметри", 18 | "Failed to save OneDrive admin options" : "Неуспешно зачувување на OneDrive административни параметри", 19 | "Microsoft OneDrive integration" : "Microsoft OneDrive интеграција", 20 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "Доколку сакате да им ивозможите на вашите корисници да се пријават со https://onedrive.live.com, креирајте OAuth апликација во вашите Azure параматри.", 21 | "Azure App registrations page" : "Azure App страница за регистрација", 22 | "Make sure you set the \"Redirect URI\" to" : "И бидете сигурни дека сте ја поставиле \"Redirect URI\" во", 23 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "Внесете ги OAuth app \"Клиент ИД\" и \"Тајна на клиент\" овде.", 24 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "Корисниците ќе видат копче \"Поврзи со OneDrive\" во нивните параметри.", 25 | "Client ID" : "Клиент ИД", 26 | "Client ID of your OneDrive application" : "Клиент ИД на вашата OneDrive апликација", 27 | "Client secret" : "Тајна на клиент", 28 | "Client secret of your OneDrive application" : "Клиент тајна на вашата OneDrive апликација", 29 | "Use a popup to authenticate" : "користи скокачки прозор за автентификација", 30 | "Last Onedrive import job at {date}" : "Последни увезени Onedrive податоци на {date}", 31 | "Onedrive import process will begin soon" : "Увоз на Onedrive податоците ќе започне наскоро", 32 | "Connected to OneDrive!" : "Поврзано со OneDrive!", 33 | "OneDrive options saved" : "Зачувани се OneDrive параметри", 34 | "Failed to save OneDrive options" : "Неуспешно зачувување на OneDrive параметри", 35 | "Sign in with OneDrive" : "Најави се со OneDrive", 36 | "Failed to save OneDrive OAuth state" : "Неуспешно зачувување на OneDrive OAuth состојба", 37 | "Failed to get OneDrive storage information" : "Неуспешно добивање на OneDrive информации", 38 | "Starting importing files in {targetPath} directory" : "Почеток на увоз на датотеки во папката {targetPath}", 39 | "Failed to start importing Onedrive storage" : "Неуспешен почеток на увоз на Onedrive", 40 | "Failed to get calendar list" : "Неуспешно добивање на листа со календари", 41 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} настан е успешно увезен во {name}","{number} настани се успешно увезени во {name}"], 42 | "Failed to import calendar" : "Неуспешен увоз на календар", 43 | "Failed to get number of contacts" : "Неуспешно добивање на број на контакти", 44 | "Failed to get address book list" : "Неуспешно добивање на листа со адресари", 45 | "Choose where to write imported files" : "Избери каде да ги увезете датотеките", 46 | "Enable navigation link" : "Овозможи линк за навигација", 47 | "Connect to OneDrive" : "Поврзи со OneDrive", 48 | "Connected as {user}" : "Поврзан како {user}", 49 | "Disconnect from OneDrive" : "Исклучи се од OneDrive", 50 | "Onedrive storage" : "Onedrive складиште", 51 | "Import directory" : "Увези папка", 52 | "Onedrive storage ({formSize})" : "Onedrive складиште ({formSize})", 53 | "Import Onedrive files" : "Увези Onedrive датотеки", 54 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "Вашиот Onedrive е поголем одколку што имате слободно место ({formSpace})", 55 | "Cancel Onedrive files import" : "Прекини увоз на Onedrive податоци", 56 | "Contacts" : "Контакти", 57 | "{amount} contacts" : "{amount} контакти", 58 | "Import Contacts in Nextcloud" : "Увези ги контактите", 59 | "Calendars" : "Календари", 60 | "Import calendar" : "Увези календар", 61 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["{amount} датотека е увезена ({formImported}) ({progress}%)","{amount} датотеки се увезени ({formImported}) ({progress}%)"] 62 | }, 63 | "nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;"); 64 | -------------------------------------------------------------------------------- /l10n/zh_HK.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "integration_onedrive", 3 | { 4 | "Microsoft OneDrive" : "Microsoft OneDrive", 5 | "Error getting OAuth access token" : "擷取 OAuth 存取權杖時發生錯誤", 6 | "Error during OAuth exchanges" : "OAuth 交換時發生錯誤", 7 | "OneDrive" : "OneDrive", 8 | "_%n file was imported from OneDrive storage._::_%n files were imported from OneDrive storage._" : ["從 OneDrive 儲存空間導入了 %n 個檔案。"], 9 | "Bad credentials" : "錯誤的憑證", 10 | "Bad HTTP method" : "不正確的 HTTP 方法", 11 | "OAuth access token refused" : "OAuth 存取權杖被拒絕", 12 | "Microsoft Calendar import" : "匯入 Microsoft 日曆", 13 | "Connected accounts" : "已連線的賬號", 14 | "Data migration" : "數據遷移", 15 | "OneDrive integration" : "OneDrive 整合", 16 | "Integration of Microsoft OneDrive" : "Microsoft OneDrive 整合", 17 | "Microsoft OneDrive integration allows you to automatically import your OneDrive files into Nextcloud." : "Microsoft OneDrive整合讓您自動導入您的 OneDrive 檔案至 Nextcloud。", 18 | "OneDrive admin options saved" : "已儲存 OneDrive 管理員選項", 19 | "Failed to save OneDrive admin options" : "儲存 OneDrive 管理員選項失敗", 20 | "Microsoft OneDrive integration" : "Microsoft OneDrive 整合", 21 | "If you want to allow your Nextcloud users to use OAuth to authenticate to https://onedrive.live.com, create an OAuth application in your Azure settings." : "如果您想要允許您的 Nextcloud 用戶使用 OAuth 對 https://onedrive.live.com 進行身分驗證,在您的 Azure 設定中建立 OAuth 應用程式。", 22 | "Azure App registrations page" : "Azure 應用程式註冊頁面", 23 | "Set \"Application name\" to a value that will make sense to your Nextcloud users as they will see it when connecting to OneDrive using your OAuth app." : "將「應用程式名稱」設置為對 Nextcloud 用戶有意義的值,因為他們在使用 OAuth 應用程式連接到 OneDrive 時會看到它。", 24 | "Make sure you set the \"Redirect URI\" to" : "確保您將「重新導向 URI」設定為", 25 | "Give the \"Contacts.Read\", \"Calendars.Read\", \"MailboxSettings.Read\", \"Files.Read\" and \"User.Read\" API permission to your app." : "向您的應用程式授予「Contacts.Read」、「Calendars.Read」、「MailboxSettings.Read」、「Files.Read」和「User.Read」API 權限。", 26 | "Create a client secret in \"Certificates & secrets\"." : "在“證書和密碼”中創建一個客戶端密碼。", 27 | "Put the OAuth app \"Client ID\" and \"Client secret\" below." : "在下方放置 OAuth 應用程式「客戶端 ID」與「客戶端密碼」。", 28 | "Your Nextcloud users will then see a \"Connect to OneDrive\" button in their personal settings." : "然後,您的 Nextcloud 用戶將在其個人設置中看到【連接到 OneDrive】按鈕。", 29 | "Client ID" : "客戶端 ID", 30 | "Client ID of your OneDrive application" : "您 OneDrive 應用程式的客戶端 ID", 31 | "Client secret" : "客戶端密碼", 32 | "Client secret of your OneDrive application" : "您 OneDrive 應用程式的客戶端密碼", 33 | "Use a popup to authenticate" : "使用彈出窗口進行身份驗證", 34 | "Import job is currently running" : "導入作業目前正在運行", 35 | "Import job is scheduled" : "已排程匯入", 36 | "Last Onedrive import job at {date}" : "上次 OneDrive 導入作業於 {date} 執行", 37 | "Onedrive import process will begin soon" : "Onedrive 導入後台作業進程即將開始。", 38 | "Connected to OneDrive!" : "已連線至 OneDrive!", 39 | "OneDrive OAuth error:" : "OneDrive OAuth 錯誤:", 40 | "OneDrive options saved" : "已儲存 OneDrive 選項", 41 | "Failed to save OneDrive options" : "儲存 OneDrive 選項失敗", 42 | "Sign in with OneDrive" : "使用 OneDrive 登入", 43 | "Failed to save OneDrive OAuth state" : "儲存 OneDrive OAuth 狀態失敗", 44 | "Failed to get OneDrive storage information" : "無法獲取 OneDrive 儲存空間資訊", 45 | "Starting importing files in {targetPath} directory" : "開始將檔案導入到 {targetPath} 目錄", 46 | "Failed to start importing Onedrive storage" : "無法開始導入Onedrive 儲存空間", 47 | "Failed to get calendar list" : "讀取日曆清單失敗", 48 | "_{number} event successfully imported in {name}_::_{number} events successfully imported in {name}_" : ["{number} 項活動已成功導入{name}中"], 49 | "Failed to import calendar" : "無法匯入日曆", 50 | "Failed to get number of contacts" : "無法獲取聯絡人數量", 51 | "_{nbAdded} contact created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_::_{nbAdded} contacts created, {nbUpdated} updated, {nbSkipped} skipped, {nbFailed} failed_" : ["創建了 {nbAdded} 個聯絡人,更新了 {nbUpdated} 個,跳過了 {nbSkipped} 個,{nbFailed} 個失敗了"], 52 | "Failed to get address book list" : "讀取通訊錄清單失敗", 53 | "Choose where to write imported files" : "選擇寫入導入檔案的位置", 54 | "Enable navigation link" : "啟用導覽連結", 55 | "Ask your Nextcloud administrator to configure OneDrive OAuth settings in order to use this integration." : "請您的 Nextcloud 管理員配置 OneDrive OAuth 應用程式,以便能夠連接到該服務。", 56 | "Connect to OneDrive" : "連接到 OneDrive", 57 | "Connected as {user}" : "以 {user} 身份連線", 58 | "Disconnect from OneDrive" : "與 OneDrive 斷開連線", 59 | "Onedrive storage" : "Onedrive 儲存", 60 | "Import directory" : "導入資料夾", 61 | "Onedrive storage ({formSize})" : "Onedrive 儲存 ({formSize})", 62 | "Import Onedrive files" : "導入 Onedrive 檔案", 63 | "Your Onedrive storage is bigger than your remaining space left ({formSpace})" : "您的 Onedrive 儲存大於剩餘空間({formSpace})", 64 | "Cancel Onedrive files import" : "取消 Onedrive 導入", 65 | "Contacts" : "通訊錄", 66 | "{amount} contacts" : "{amount} 位聯絡人", 67 | "Import Contacts in Nextcloud" : "將 Contacts 匯入 Nextcloud", 68 | "Calendars" : "日曆", 69 | "Import calendar" : "導入日曆", 70 | "_{amount} file imported ({formImported}) ({progress}%)_::_{amount} files imported ({formImported}) ({progress}%)_" : ["導入了 {amount} 個檔案 ({formImported})({progress}%)"] 71 | }, 72 | "nplurals=1; plural=0;"); 73 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Bernhard Posselt 2 | # SPDX-License-Identifier: AGPL-3.0-or-later 3 | 4 | # Generic Makefile for building and packaging a Nextcloud app which uses npm and 5 | # Composer. 6 | # 7 | # Dependencies: 8 | # * make 9 | # * which 10 | # * curl: used if phpunit and composer are not installed to fetch them from the web 11 | # * tar: for building the archive 12 | # * npm: for building and testing everything JS 13 | # 14 | # If no composer.json is in the app root directory, the Composer step 15 | # will be skipped. The same goes for the package.json which can be located in 16 | # the app root or the js/ directory. 17 | # 18 | # The npm command by launches the npm build script: 19 | # 20 | # npm run build 21 | # 22 | # The npm test command launches the npm test script: 23 | # 24 | # npm run test 25 | # 26 | # The idea behind this is to be completely testing and build tool agnostic. All 27 | # build tools and additional package managers should be installed locally in 28 | # your project, since this won't pollute people's global namespace. 29 | # 30 | # The following npm scripts in your package.json install and update the bower 31 | # and npm dependencies and use gulp as build system (notice how everything is 32 | # run from the node_modules folder): 33 | # 34 | # "scripts": { 35 | # "test": "node node_modules/gulp-cli/bin/gulp.js karma", 36 | # "prebuild": "npm install && node_modules/bower/bin/bower install && node_modules/bower/bin/bower update", 37 | # "build": "node node_modules/gulp-cli/bin/gulp.js" 38 | # }, 39 | 40 | app_name=$(notdir $(CURDIR)) 41 | build_tools_directory=$(CURDIR)/build/tools 42 | source_build_directory=$(CURDIR)/build/artifacts/source 43 | sign_dir=$(CURDIR)/build/artifacts/sign 44 | cert_dir=$(HOME)/.nextcloud/certificates 45 | source_package_name=$(source_build_directory)/$(app_name) 46 | appstore_build_directory=$(CURDIR)/build/artifacts/appstore 47 | appstore_package_name=$(appstore_build_directory)/$(app_name) 48 | npm=$(shell which npm 2> /dev/null) 49 | composer=$(shell which composer 2> /dev/null) 50 | 51 | all: build 52 | 53 | # Fetches the PHP and JS dependencies and compiles the JS. If no composer.json 54 | # is present, the composer step is skipped, if no package.json or js/package.json 55 | # is present, the npm step is skipped 56 | .PHONY: build 57 | build: 58 | ifneq (,$(wildcard $(CURDIR)/composer.json)) 59 | make composer 60 | endif 61 | ifneq (,$(wildcard $(CURDIR)/package.json)) 62 | make npm 63 | endif 64 | ifneq (,$(wildcard $(CURDIR)/js/package.json)) 65 | make npm 66 | endif 67 | 68 | # Installs and updates the composer dependencies. If composer is not installed 69 | # a copy is fetched from the web 70 | .PHONY: composer 71 | composer: 72 | ifeq (, $(composer)) 73 | @echo "No composer command available, downloading a copy from the web" 74 | mkdir -p $(build_tools_directory) 75 | curl -sS https://getcomposer.org/installer | php 76 | mv composer.phar $(build_tools_directory) 77 | php $(build_tools_directory)/composer.phar install --prefer-dist 78 | else 79 | composer install --prefer-dist 80 | endif 81 | 82 | # Installs npm dependencies 83 | .PHONY: npm 84 | npm: 85 | ifeq (,$(wildcard $(CURDIR)/package.json)) 86 | cd js && $(npm) run build 87 | else 88 | npm ci 89 | npm run build 90 | endif 91 | 92 | .PHONY: pack-models 93 | pack-models: 94 | cd models; \ 95 | $(foreach lang,$(LANGS),tar cvzf $(lang).tar.gz $(lang);) 96 | 97 | # Removes the appstore build 98 | .PHONY: clean 99 | clean: 100 | rm -rf ./build 101 | 102 | # Same as clean but also removes dependencies installed by composer, bower and 103 | # npm 104 | .PHONY: distclean 105 | distclean: clean 106 | rm -rf vendor 107 | rm -rf node_modules 108 | rm -rf js/vendor 109 | rm -rf js/node_modules 110 | 111 | # Builds the source and appstore package 112 | .PHONY: dist 113 | dist: 114 | make source 115 | make appstore 116 | 117 | # Builds the source package 118 | .PHONY: source 119 | source: 120 | rm -rf $(source_build_directory) 121 | mkdir -p $(source_build_directory) 122 | tar cvzf $(source_package_name).tar.gz ../$(app_name) \ 123 | --exclude-vcs \ 124 | --exclude="../$(app_name)/build" \ 125 | --exclude="../$(app_name)/js/node_modules" \ 126 | --exclude="../$(app_name)/node_modules" \ 127 | --exclude="../$(app_name)/*.log" \ 128 | --exclude="../$(app_name)/js/*.log" \ 129 | 130 | # Builds the source package for the app store, ignores php and js tests 131 | .PHONY: appstore 132 | appstore: 133 | rm -rf $(sign_dir) 134 | mkdir -p $(sign_dir) 135 | rm -rf $(appstore_build_directory) 136 | mkdir -p $(appstore_build_directory) 137 | composer install --no-dev 138 | rsync -a --delete \ 139 | --include=/CHANGELOG.md \ 140 | --include=/README.md \ 141 | --include=/AUTHORS.md \ 142 | --include=/COPYING \ 143 | --include=/package.json \ 144 | --include=/package-lock.json \ 145 | --include=/composer.json \ 146 | --include=/composer.lock \ 147 | --include=/src \ 148 | --include=/lib \ 149 | --include=/css \ 150 | --include=/img \ 151 | --include=/appinfo \ 152 | --include=/templates \ 153 | --include=/vendor \ 154 | --include=/js \ 155 | --include=/l10n \ 156 | --exclude=/* \ 157 | $(CURDIR)/ $(sign_dir)/$(app_name) 158 | tar -czf $(appstore_package_name).tar.gz \ 159 | -C $(sign_dir) $(app_name) 160 | @if [ -f $(cert_dir)/$(app_name).key ]; then \ 161 | echo "Signing package…"; \ 162 | openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(appstore_package_name).tar.gz | openssl base64; \ 163 | fi 164 | 165 | .PHONY: test 166 | test: composer 167 | $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.xml 168 | $(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml -------------------------------------------------------------------------------- /lib/Controller/OnedriveAPIController.php: -------------------------------------------------------------------------------- 1 | config->getUserValue($this->userId, Application::APP_ID, 'token'); 39 | $this->accessToken = $accessToken === '' ? '' : $this->crypto->decrypt($accessToken); 40 | } 41 | 42 | #[NoAdminRequired] 43 | public function getStorageSize(): DataResponse { 44 | if ($this->accessToken === '' || $this->userId === null) { 45 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 46 | } 47 | /** @var array{error: string} $result */ 48 | $result = $this->onedriveStorageApiService->getStorageSize($this->userId); 49 | if (isset($result['error'])) { 50 | $response = new DataResponse($result['error'], 401); 51 | } else { 52 | $response = new DataResponse($result); 53 | } 54 | return $response; 55 | } 56 | 57 | #[NoAdminRequired] 58 | public function importOnedrive(): DataResponse { 59 | if ($this->accessToken === '' || $this->userId === null) { 60 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 61 | } 62 | /** @var array{error: string} $result */ 63 | $result = $this->onedriveStorageApiService->startImportOnedrive($this->userId); 64 | if (isset($result['error'])) { 65 | $response = new DataResponse($result['error'], 401); 66 | } else { 67 | $response = new DataResponse($result); 68 | } 69 | return $response; 70 | } 71 | 72 | #[NoAdminRequired] 73 | public function getImportOnedriveInformation(): DataResponse { 74 | if ($this->accessToken === '' || $this->userId === null) { 75 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 76 | } 77 | return new DataResponse([ 78 | 'importing_onedrive' => $this->config->getUserValue($this->userId, Application::APP_ID, 'importing_onedrive') === '1', 79 | 'onedrive_import_running' => $this->config->getUserValue($this->userId, Application::APP_ID, 'onedrive_import_running') === '1', 80 | 'last_onedrive_import_timestamp' => (int)$this->config->getUserValue($this->userId, Application::APP_ID, 'last_onedrive_import_timestamp', '0'), 81 | 'imported_size' => (int)$this->config->getUserValue($this->userId, Application::APP_ID, 'imported_size', '0'), 82 | 'nb_imported_files' => (int)$this->config->getUserValue($this->userId, Application::APP_ID, 'nb_imported_files', '0'), 83 | ]); 84 | } 85 | 86 | #[NoAdminRequired] 87 | public function getCalendarList(): DataResponse { 88 | if ($this->accessToken === '' || $this->userId === null) { 89 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 90 | } 91 | /** @var array{error: string} $result */ 92 | $result = $this->onedriveCalendarApiService->getCalendarList($this->userId); 93 | if (isset($result['error'])) { 94 | $response = new DataResponse($result['error'], 401); 95 | } else { 96 | $response = new DataResponse($result); 97 | } 98 | return $response; 99 | } 100 | 101 | #[NoAdminRequired] 102 | public function importCalendar(string $calId, string $calName, ?string $color = null): DataResponse { 103 | if ($this->accessToken === '' || $this->userId === null) { 104 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 105 | } 106 | /** @var array{error: string} $result */ 107 | $result = $this->onedriveCalendarApiService->importCalendar($this->userId, $calId, $calName, $color); 108 | if (isset($result['error'])) { 109 | $response = new DataResponse($result['error'], 401); 110 | } else { 111 | $response = new DataResponse($result); 112 | } 113 | return $response; 114 | } 115 | 116 | #[NoAdminRequired] 117 | public function getContactNumber(): DataResponse { 118 | if ($this->accessToken === '' || $this->userId === null) { 119 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 120 | } 121 | /** @var array{error: string} $result */ 122 | $result = $this->onedriveContactApiService->getContactNumber($this->userId); 123 | if (isset($result['error'])) { 124 | $response = new DataResponse($result['error'], 401); 125 | } else { 126 | $response = new DataResponse($result); 127 | } 128 | return $response; 129 | } 130 | 131 | #[NoAdminRequired] 132 | public function importContacts(): DataResponse { 133 | if ($this->accessToken === '' || $this->userId === null) { 134 | return new DataResponse([], Http::STATUS_BAD_REQUEST); 135 | } 136 | /** @var array{error: string} $result */ 137 | $result = $this->onedriveContactApiService->importContacts($this->userId); 138 | if (isset($result['error'])) { 139 | $response = new DataResponse($result['error'], 401); 140 | } else { 141 | $response = new DataResponse($result); 142 | } 143 | return $response; 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/components/AdminSettings.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 59 | 60 | 137 | 138 | 176 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 5 | # Change Log 6 | All notable changes to this project will be documented in this file. 7 | 8 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 9 | and this project adheres to [Semantic Versioning](http://semver.org/). 10 | 11 | ## [3.5.0] - 2025-11-13 12 | 13 | ### Added 14 | - Added support for Nextcloud 33 15 | 16 | ### Changed 17 | - Update dependencies & translations 18 | 19 | ## [3.4.0] - 2025-05-29 20 | 21 | ### Changed 22 | - Added support for NC 32, removed support for NC 28 23 | 24 | ### Fixed 25 | - Removed non-existing filter which lead to error in syncing. Thanks to @floriantraber 26 | - Updated PHP packages to fix conflicts with Server, which leads to broken `webdav`. Thanks to @stefanclark 27 | - Changed UserAgent to comply with RFC 9110. Thanks to @baywet 28 | - Optimized directory listing to use less requests 29 | - Refactored to use direct file downloading to remove `memory exceed` errors 30 | 31 | ## [3.3.1] - 2024-11-28 32 | 33 | ### Changed 34 | - Bumped js libs 35 | 36 | ### Fixed 37 | - Encrypt secrets in the database and not expose them to UI 38 | 39 | ## [3.3.0] - 2024-09-24 40 | 41 | ### Changes 42 | - Bumped js libs 43 | 44 | ### Fixed 45 | - Added a `ratelimit` response processing handler so that it doesn't fail when loading large amounts of data. Thanks to @baywet 46 | 47 | ## [3.2.2] - 2024-07-24 48 | 49 | ### Changes 50 | - Added support for NC 30, removed support for NC 27 51 | - Bumped js libs 52 | 53 | ## [3.2.1] - 2024-04-18 54 | 55 | ### Fixed 56 | - Don't allow shared folder as a target folder for import 57 | 58 | ## [3.2.0] - 2024-03-24 59 | 60 | ### Changes 61 | - Added support for NC 29, removed support for NC 26 62 | 63 | ### Fixed 64 | - Fixed potential memory leaks 65 | - Bumped js libs 66 | - Updated translations from Transifex 67 | 68 | ## [3.1.0] - 2023-10-27 69 | 70 | ### Changes 71 | - enh: Add support nc 28 72 | 73 | ### Fixed 74 | - Fix(l10n): Update translations from Transifex 75 | 76 | ## [3.0.0] - 2023-06-30 77 | 78 | ### Breaking changes 79 | 80 | - Drop Support for php 7.4 81 | - Drop Support for Nextcloud 24 82 | - Drop Support for Nextcloud 25 83 | 84 | ### Fixed 85 | 86 | - More translations from transifex :blue_heart: 87 | 88 | ## [2.0.3] - 2023-05-05 89 | 90 | ### Fixed 91 | - Fix build process 92 | 93 | ## [2.0.2] - 2023-05-05 94 | 95 | ### Fixed 96 | - Fix build process 97 | 98 | ## [2.0.1] - 2023-05-05 99 | 100 | ### Fixed 101 | - Fix build process 102 | 103 | ## [2.0.0] - 2023-05-05 104 | 105 | ### Breaking changes 106 | - Drop Support for Nextcloud 22 107 | - Drop Support for Nextcloud 23 108 | 109 | ### New 110 | - improve contact import, update if recent changes, more feedback to the user etc... 111 | - import contact notes 112 | 113 | ### Fixed 114 | - set last modified date for folders as well 115 | - update npm pkgs 116 | - add a 1h timeout after which a job is not considered running anymore so another import can start 117 | 118 | ## 1.1.4 – 2022-09-28 119 | ### Fixed 120 | - use rawurlencode to encode path in download request 121 | [#29](https://github.com/nextcloud/integration_onedrive/pull/29) @n-stein 122 | 123 | ## 1.1.3 – 2022-08-24 124 | ### Added 125 | - import contact photos 126 | 127 | ### Changed 128 | - bump js libs, bring back eslint/stylelint on compilation, adjust to new eslint config 129 | - use @nextcloud/vue in settings 130 | - implement proper token refresh based on expiration date 131 | - optionally use a popup to authenticate 132 | 133 | ### Fixed 134 | - npm scripts 135 | - method checking if contact already exists 136 | 137 | ## 1.1.2 – 2021-11-12 138 | ### Fixed 139 | - handle all crashes in import job 140 | - fix file import with SSE enabled, get temp link and use it on the fly 141 | 142 | ## 1.1.0 – 2021-06-29 143 | ### Fixed 144 | - do not exclude "src" but "./src", ortic PHP lib was excluded 145 | 146 | ## 1.0.2 – 2021-06-28 147 | ### Changed 148 | - bump js libs 149 | - get rid of all deprecated stuff 150 | - bump min NC version to 22 151 | - cleanup backend code 152 | 153 | ## 1.0.1 – 2021-04-19 154 | ### Changed 155 | - bump js libs 156 | 157 | ### Fixed 158 | - potential mess with concurrent import jobs 159 | 160 | ## 1.0.0 – 2021-03-19 161 | ### Changed 162 | - bump js libs 163 | 164 | ## 0.0.12 – 2021-02-23 165 | ### Fixed 166 | - avoid crash when stat() returns float file size 167 | 168 | ## 0.0.11 – 2021-02-23 169 | ### Fixed 170 | - one log message importance 171 | - catch ForbiddenException 172 | 173 | ## 0.0.10 – 2021-02-15 174 | ### Added 175 | - import event colors (based on first event category) 176 | 177 | ### Changed 178 | - optimize import process, resume where last job stopped 179 | - let user know if a background job is running 180 | 181 | ## 0.0.9 – 2021-02-12 182 | ### Fixed 183 | - remove extra slash in drive request URL 184 | - reduce number of requests when getting contacts number and importing contacts 185 | 186 | ## 0.0.8 – 2021-02-12 187 | ### Changed 188 | - bump js libs 189 | - bump max NC version 190 | 191 | ### Fixed 192 | - import nc dialogs style 193 | 194 | ## 0.0.7 – 2021-01-27 195 | ### Added 196 | - option to choose output directory 197 | 198 | ### Changed 199 | - bump js libs 200 | 201 | ## 0.0.5 – 2020-11-21 202 | ### Added 203 | - contact import 204 | - calendar import 205 | 206 | ### Changed 207 | - bump js libs 208 | 209 | ### Fixed 210 | - issue with unlimited user quota 211 | 212 | ## 0.0.4 – 2020-11-17 213 | ### Fixed 214 | - handle paginated results 215 | [#3](https://github.com/nextcloud/integration_onedrive/issues/3) @shr3k 216 | 217 | ## 0.0.3 – 2020-11-11 218 | ### Fixed 219 | - don't close already closed resource when downloading 220 | 221 | ## 0.0.2 – 2020-11-08 222 | ### Changed 223 | - no more temp files, directly download to target file (in a stream) 224 | 225 | ## 0.0.1 – 2020-11-02 226 | ### Added 227 | * the app 228 | --------------------------------------------------------------------------------