├── .gitignore ├── .scrutinizer.yml ├── .tx └── config ├── CHANGELOG.md ├── COPYING ├── Makefile ├── README.md ├── appinfo ├── app.php ├── autoload.php ├── database.xml ├── info.xml └── routes.php ├── composer.json ├── composer.lock ├── css ├── dashboard.scss └── widgets │ ├── clock.css │ ├── diskspace.css │ ├── fortunes.css │ └── test1.css ├── documentation └── TheNextDashboard.pdf ├── fortunes ├── img ├── dashboard-dark.svg ├── dashboard.svg ├── widget.svg └── widgets │ ├── clock-white.svg │ ├── clock.svg │ ├── diskspace-white.svg │ ├── diskspace.svg │ ├── fortunes-white.svg │ ├── fortunes.svg │ ├── lorem-white.svg │ └── lorem.svg ├── js ├── dashboard.api.js ├── dashboard.grid.js ├── dashboard.js ├── dashboard.navigation.js ├── dashboard.net.js ├── dashboard.settings.js └── widgets │ ├── clock.js │ ├── diskspace.js │ └── fortunes.js ├── l10n ├── .gitkeep ├── ar.js ├── ar.json ├── bg.js ├── bg.json ├── ca.js ├── ca.json ├── cs.js ├── cs.json ├── da.js ├── da.json ├── de.js ├── de.json ├── de_DE.js ├── de_DE.json ├── el.js ├── el.json ├── en_GB.js ├── en_GB.json ├── eo.js ├── eo.json ├── es.js ├── es.json ├── es_419.js ├── es_419.json ├── es_CL.js ├── es_CL.json ├── es_CO.js ├── es_CO.json ├── es_CR.js ├── es_CR.json ├── es_DO.js ├── es_DO.json ├── es_EC.js ├── es_EC.json ├── es_GT.js ├── es_GT.json ├── es_HN.js ├── es_HN.json ├── es_MX.js ├── es_MX.json ├── es_NI.js ├── es_NI.json ├── es_PA.js ├── es_PA.json ├── es_PE.js ├── es_PE.json ├── es_PR.js ├── es_PR.json ├── es_PY.js ├── es_PY.json ├── es_SV.js ├── es_SV.json ├── es_UY.js ├── es_UY.json ├── et_EE.js ├── et_EE.json ├── eu.js ├── eu.json ├── fa.js ├── fa.json ├── fi.js ├── fi.json ├── fr.js ├── fr.json ├── gl.js ├── gl.json ├── he.js ├── he.json ├── hr.js ├── hr.json ├── hu.js ├── hu.json ├── id.js ├── id.json ├── is.js ├── is.json ├── it.js ├── it.json ├── ja.js ├── ja.json ├── ka_GE.js ├── ka_GE.json ├── kab.js ├── kab.json ├── ko.js ├── ko.json ├── lt_LT.js ├── lt_LT.json ├── lv.js ├── lv.json ├── nb.js ├── nb.json ├── nl.js ├── nl.json ├── pl.js ├── pl.json ├── pt_BR.js ├── pt_BR.json ├── pt_PT.js ├── pt_PT.json ├── ru.js ├── ru.json ├── sk.js ├── sk.json ├── sl.js ├── sl.json ├── sq.js ├── sq.json ├── sr.js ├── sr.json ├── sv.js ├── sv.json ├── tr.js ├── tr.json ├── uk.js ├── uk.json ├── vi.js ├── vi.json ├── zh_CN.js ├── zh_CN.json ├── zh_TW.js └── zh_TW.json ├── lib ├── AppInfo │ └── Application.php ├── Command │ └── Push.php ├── Controller │ ├── NavigationController.php │ └── WidgetController.php ├── Db │ ├── CoreRequestBuilder.php │ ├── EventsRequest.php │ ├── EventsRequestBuilder.php │ ├── SettingsRequest.php │ └── SettingsRequestBuilder.php ├── Exceptions │ ├── UserCannotBeEmptyException.php │ ├── WidgetDoesNotExistException.php │ ├── WidgetIsNotCompatibleException.php │ └── WidgetIsNotUniqueException.php ├── Model │ ├── WidgetConfig.php │ ├── WidgetEvent.php │ ├── WidgetFrame.php │ └── WidgetRequest.php ├── Service │ ├── ConfigService.php │ ├── EventsService.php │ ├── MiscService.php │ ├── Widgets │ │ ├── DiskSpace │ │ │ └── DiskSpaceService.php │ │ └── Fortunes │ │ │ └── FortunesService.php │ └── WidgetsService.php └── Widgets │ ├── ClockWidget.php │ ├── DiskSpaceWidget.php │ ├── FortunesWidget.php │ └── Test1Widget.php ├── package.json ├── screenshots └── dashboard-grid.png └── templates ├── navigate.php └── widgets ├── Test1.php ├── clock.php ├── diskspace.php └── fortunes.php /.gitignore: -------------------------------------------------------------------------------- 1 | nbproject/private/ 2 | build/ 3 | nbbuild/ 4 | nbdist/ 5 | nbactions.xml 6 | nb-configuration.xml 7 | .nb-gradle/ 8 | .idea 9 | vendor/ 10 | components/ 11 | node_modules/ 12 | js/gridstack.all.js 13 | js/jquery.flip.js 14 | css/gridstack.css -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | imports: 2 | - php 3 | - javascript 4 | 5 | filter: 6 | excluded_paths: 7 | - 'appinfo/info.xml' 8 | - 'l10n/*' 9 | - 'vendor/*' 10 | - 'js/vendor/*' 11 | - 'templates/*' 12 | - 'css/*' 13 | - 'img/*' 14 | - 'tests/*' 15 | - 'build/*' 16 | - 'documentation/*' 17 | 18 | tools: 19 | sensiolabs_security_checker: true 20 | php_sim: true 21 | php_pdepend: true 22 | php_analyzer: true 23 | 24 | checks: 25 | php: 26 | line_length: 27 | max_length: '100' 28 | verify_access_scope_valid: true 29 | require_scope_for_methods: true 30 | no_underscore_prefix_in_methods: true 31 | missing_arguments: true 32 | method_calls_on_non_object: true 33 | deprecated_code_usage: true 34 | no_eval: true 35 | parameter_doc_comments: true 36 | return_doc_comments: true 37 | fix_doc_comments: true 38 | return_doc_comments: true 39 | parameter_doc_comments: true 40 | more_specific_types_in_doc_comments: true 41 | code_rating: true 42 | duplication: true 43 | variable_existence: true 44 | useless_calls: true 45 | use_statement_alias_conflict: true 46 | unused_variables: true 47 | unused_properties: true 48 | unused_parameters: true 49 | unused_methods: true 50 | unreachable_code: true 51 | sql_injection_vulnerabilities: true 52 | security_vulnerabilities: true 53 | precedence_mistakes: true 54 | precedence_in_conditions: true 55 | parameter_non_unique: true 56 | no_property_on_interface: true 57 | no_non_implemented_abstract_methods: true 58 | deprecated_code_usage: true 59 | closure_use_not_conflicting: true 60 | closure_use_modifiable: true 61 | avoid_useless_overridden_methods: true 62 | avoid_conflicting_incrementers: true 63 | assignment_of_null_return: true 64 | php5_style_constructor: true 65 | one_class_per_file: true 66 | require_php_tag_first: true 67 | uppercase_constants: true 68 | require_braces_around_control_structures: true 69 | psr2_switch_declaration: true 70 | psr2_control_structure_declaration: true 71 | properties_in_camelcaps: true 72 | parameters_in_camelcaps: true 73 | optional_parameters_at_the_end: true 74 | no_underscore_prefix_in_properties: true 75 | no_space_inside_cast_operator: true 76 | no_space_before_semicolon: true 77 | no_short_open_tag: true 78 | no_goto: true 79 | lowercase_php_keywords: true 80 | lowercase_basic_constants: true 81 | function_in_camel_caps: true 82 | classes_in_camel_caps: true 83 | avoid_space_indentation: true 84 | overriding_private_members: true 85 | no_unnecessary_function_call_in_for_loop: true 86 | simplify_boolean_return: true 87 | javascript: 88 | wrap_iife: true 89 | no_process_exit: true 90 | no_process_env: true 91 | no_extra_semi: true 92 | no_extra_bind: true 93 | no_eval: true 94 | no_else_return: true 95 | dot_notation: true 96 | camelcase: true 97 | wrap_regex: true 98 | valid_typeof: true 99 | no_wrap_func: true 100 | no_use_before_define: true 101 | no_unreachable: true 102 | no_undefined: true 103 | no_trailing_spaces: true 104 | no_reserved_keys: true 105 | no_redeclare: true 106 | no_obj_calls: true 107 | no_loop_func: true 108 | no_lonely_if: true 109 | no_lone_blocks: true 110 | no_inner_declarations: true 111 | no_floating_decimal: true 112 | no_extra_boolean_cast: true 113 | no_empty: true 114 | no_dupe_keys: true 115 | 116 | coding_style: 117 | php: 118 | indentation: 119 | general: 120 | use_tabs: true 121 | size: 4 122 | spaces: 123 | other: 124 | after_type_cast: false 125 | braces: 126 | classes_functions: 127 | class: end-of-line 128 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | lang_map = bg_BG: bg, cs_CZ: cs, fi_FI: fi, hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja 4 | 5 | [nextcloud.dashboard-app] 6 | file_filter = translationfiles//dashboard.po 7 | source_file = translationfiles/templates/dashboard.pot 8 | source_lang = en 9 | type = PO 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | 4 | ## 6.0.0 5 | 6 | - Initial release 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | app_name=dashboard 2 | 3 | project_dir=$(CURDIR) 4 | build_dir=$(CURDIR)/build/artifacts 5 | appstore_dir=$(build_dir)/appstore 6 | source_dir=$(build_dir)/source 7 | sign_dir=$(build_dir)/sign 8 | package_name=$(app_name) 9 | cert_dir=$(HOME)/.nextcloud/certificates 10 | github_account=nextcloud 11 | branch=master 12 | version+=6.0.0 13 | 14 | 15 | all: composer npm appstore 16 | 17 | release: appstore github-release github-upload 18 | 19 | github-release: 20 | github-release release \ 21 | --user $(github_account) \ 22 | --repo $(app_name) \ 23 | --target $(branch) \ 24 | --tag v$(version) \ 25 | --name "$(app_name) v$(version)" 26 | 27 | github-upload: 28 | github-release upload \ 29 | --user $(github_account) \ 30 | --repo $(app_name) \ 31 | --tag v$(version) \ 32 | --name "$(app_name)-$(version).tar.gz" \ 33 | --file $(build_dir)/$(app_name)-$(version).tar.gz 34 | 35 | clean: 36 | rm -rf $(build_dir) 37 | rm -rf node_modules components vendor 38 | 39 | npm: 40 | npm install gridstack 41 | cp node_modules/gridstack/dist/gridstack.all.js ./js/ 42 | cp node_modules/gridstack/dist/gridstack.css ./css/ 43 | npm install nnattawat/flip 44 | cp node_modules/flip/dist/jquery.flip.js ./js/ 45 | 46 | # composer packages 47 | composer: 48 | composer install --prefer-dist 49 | 50 | appstore: composer npm clean 51 | mkdir -p $(sign_dir) 52 | rsync -a \ 53 | --exclude=/build \ 54 | --exclude=/docs \ 55 | --exclude=/l10n/templates \ 56 | --exclude=/l10n/.tx \ 57 | --exclude=/tests \ 58 | --exclude=/.git \ 59 | --exclude=/.github \ 60 | --exclude=/composer.json \ 61 | --exclude=/composer.lock \ 62 | --exclude=/node_modules \ 63 | --exclude=/l10n/l10n.pl \ 64 | --exclude=/CONTRIBUTING.md \ 65 | --exclude=/issue_template.md \ 66 | --exclude=/README.md \ 67 | --exclude=/.gitattributes \ 68 | --exclude=/.gitignore \ 69 | --exclude=/.scrutinizer.yml \ 70 | --exclude=/.travis.yml \ 71 | --exclude=/Makefile \ 72 | $(project_dir)/ $(sign_dir)/$(app_name) 73 | tar -czf $(build_dir)/$(app_name)-$(version).tar.gz \ 74 | -C $(sign_dir) $(app_name) 75 | @if [ -f $(cert_dir)/$(app_name).key ]; then \ 76 | echo "Signing package…"; \ 77 | openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(version).tar.gz | openssl base64; \ 78 | fi 79 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Archived repository 2 | 3 | The dashboard app was rewritten as part of Nextcloud 20 and is now part of the [server repository](https://github.com/nextcloud/server/). Please head there for issue reporting and the app code. 4 | 5 | ![](https://raw.githubusercontent.com/nextcloud/dashboard/master/screenshots/dashboard-grid.png) 6 | ### Quick guide on how to build the app from git: 7 | 8 | ``` 9 | $ git clone -b gridstack https://github.com/nextcloud/dashboard.git 10 | $ cd dashboard 11 | $ make npm 12 | ``` 13 | 14 | 15 | ### How to create a Widget: 16 | 17 | - Generate an app (see [app development documentation](https://docs.nextcloud.com/server/16/developer_manual/app/index.html) or use the [app genreator from the app store.)](https://apps.nextcloud.com/developer/apps/generate) 18 | - Create a PHP class that implement IDashboardWidget: 19 | 1. [getId()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L48-L50) returns a unique ID of the widget 20 | 2. [getName()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L56-L58) returns the name of the widget 21 | 3. [getDescription()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L64-L66) returns a description of the widget 22 | 4. [getTemplate()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/DiskSpaceWidget.php#L73-L82) returns information about the template to load and css/js: 23 | 5. [widgetSetup()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L87-L107) returns optional information like size of the widget, additional menu entries and background jobs: 24 | 6. [loadWidget($config)](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L113-L122) is called on external request (cf. requestWidget()). `$config` is an array that contains the current setup of the widget 25 | 7. [requestWidget(WidgetRequest $request)](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L128-L132) is called after the loadWidget() after a [new.requestWidget(object, callback)](https://github.com/nextcloud/dashboard/blob/08c0850b5f586110264ac6f90e7f7e94ec070e4e/js/widgets/fortunes.js#L43-L50) from JavaScript 26 | 27 | - Add to appinfo/info.xml: 28 | 29 | ``` 30 | 31 | OCA\YourApp\Widgets\MyFirstWidget 32 | OCA\YourApp\Widgets\AnOtherWidget 33 | 34 | ``` 35 | 36 | ### Event & Push 37 | 38 | You can (almost) instantly push payload from Nextcloud to your widget: 39 | 40 | - define the method to be called in the `widgetSetup()` array: 41 | 42 | ``` 43 | 'push' => 'your-javascript-function-to-call-on-event 44 | ``` 45 | 46 | - call the API from your PHP: 47 | 48 | ``` 49 | OCA\Dashboard\Api\v1\Dashboard::createEvent('your_widget_id', 'user_id', payload_in_JSON); 50 | ``` 51 | 52 | - the method set in `widgetSetup()['push']` will receive the payload. 53 | 54 | _Note: you can manually generate events using the command line:_ 55 | 56 | 57 | > ./occ dashboard:push widgetid userid payload 58 | 59 | _You can, this way, modify the displayed fortune for any user:_ 60 | 61 | > ./occ dashboard:push fortunes cult "{\"fortune\": \"foobar\"}" 62 | 63 | See the wiki, [in particular this page about how the fortune widget works,](https://github.com/nextcloud/dashboard/wiki/How-the-Fortunes-widget-works) for more background. 64 | -------------------------------------------------------------------------------- /appinfo/app.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\AppInfo; 30 | 31 | 32 | use OCP\AppFramework\QueryException; 33 | 34 | require_once __DIR__ . '/autoload.php'; 35 | 36 | 37 | $app = new Application(); 38 | try { 39 | $app->registerServices(); 40 | } catch (QueryException $e) { 41 | } 42 | $app->registerNavigation(); 43 | 44 | -------------------------------------------------------------------------------- /appinfo/autoload.php: -------------------------------------------------------------------------------- 1 | . 27 | * 28 | */ 29 | 30 | namespace OCA\Dashboard\AppInfo; 31 | 32 | 33 | $composerDir = __DIR__ . '/../vendor/'; 34 | 35 | if (is_dir($composerDir) && file_exists($composerDir . 'autoload.php')) { 36 | require_once $composerDir . 'autoload.php'; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /appinfo/database.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | *dbname* 4 | true 5 | false 6 | 7 | 8 | *dbprefix*dashboard_settings 9 | 10 | 11 | widget_id 12 | text 13 | true 14 | 31 15 | 16 | 17 | user_id 18 | text 19 | true 20 | 63 21 | 22 | 23 | position 24 | text 25 | true 26 | 255 27 | 28 | 29 | settings 30 | text 31 | true 32 | 3000 33 | 34 | 35 | enabled 36 | boolean 37 | true 38 | 39 | 40 | unique_setting 41 | true 42 | true 43 | 44 | widget_id 45 | 46 | 47 | user_id 48 | 49 | 50 | 51 |
52 | 53 | 54 | *dbprefix*dashboard_events 55 | 56 | 57 | id 58 | integer 59 | 7 60 | true 61 | true 62 | true 63 | true 64 | 65 | 66 | widget_id 67 | text 68 | true 69 | 31 70 | 71 | 72 | broadcast 73 | text 74 | true 75 | 15 76 | 77 | 78 | recipient 79 | text 80 | true 81 | 63 82 | 83 | 84 | payload 85 | text 86 | true 87 | 3000 88 | 89 | 90 | unique_id 91 | text 92 | true 93 | 24 94 | 95 | 96 | creation 97 | integer 98 | 5 99 | true 100 | 101 | 102 |
103 | 104 |
-------------------------------------------------------------------------------- /appinfo/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | dashboard 5 | Dashboard 6 | Dashboard app for Nextcloud 7 | 8 | 11 | 12 | 6.0.0 13 | agpl 14 | Maxence Lange 15 | Dashboard 16 | tools 17 | https://github.com/nextcloud/dashboard 18 | https://github.com/nextcloud/dashboard/issues 19 | https://github.com/nextcloud/dashboard.git 20 | https://raw.githubusercontent.com/nextcloud/dashboard/master/screenshots/v4.0.5.png 21 | 22 | 23 | 24 | 25 | 26 | 27 | OCA\Dashboard\Command\Push 28 | 29 | 30 | 31 | OCA\Dashboard\Widgets\ClockWidget 32 | OCA\Dashboard\Widgets\DiskSpaceWidget 33 | OCA\Dashboard\Widgets\FortunesWidget 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /appinfo/routes.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | 30 | return [ 31 | 'routes' => [ 32 | ['name' => 'Navigation#navigate', 'url' => '/', 'verb' => 'GET'], 33 | ['name' => 'Navigation#getWidgets', 'url' => '/widgets', 'verb' => 'GET'], 34 | ['name' => 'Navigation#deleteWidget', 'url' => '/widget', 'verb' => 'DELETE'], 35 | ['name' => 'Navigation#saveGrid', 'url' => '/widgets/grid', 'verb' => 'POST'], 36 | ['name' => 'Widget#requestWidget', 'url' => '/widget/request', 'verb' => 'GET'], 37 | ['name' => 'Widget#pushWidget', 'url' => '/widget/push', 'verb' => 'POST'] 38 | ] 39 | ]; -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nextcloud/dashboard", 3 | "description": "Dashboard App", 4 | "minimum-stability": "stable", 5 | "license": "AGPL-3.0-or-later", 6 | "authors": [ 7 | { 8 | "name": "Maxence Lange", 9 | "email": "maxence@artificial-owl.com" 10 | } 11 | ], 12 | "require": { 13 | "daita/my-small-php-tools": "dev-master" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "04008972406db863555930394ffd9ddb", 8 | "packages": [ 9 | { 10 | "name": "daita/my-small-php-tools", 11 | "version": "dev-master", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/daita/my-small-php-tools.git", 15 | "reference": "405a5e6afadfd7c0630cf33b9e48a39f6938f605" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/405a5e6afadfd7c0630cf33b9e48a39f6938f605", 20 | "reference": "405a5e6afadfd7c0630cf33b9e48a39f6938f605", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^7.0" 25 | }, 26 | "type": "library", 27 | "autoload": { 28 | "psr-4": { 29 | "daita\\MySmallPhpTools\\": "lib/" 30 | } 31 | }, 32 | "notification-url": "https://packagist.org/downloads/", 33 | "license": [ 34 | "AGPL-3.0-or-later" 35 | ], 36 | "authors": [ 37 | { 38 | "name": "Maxence Lange", 39 | "email": "maxence@artificial-owl.com" 40 | } 41 | ], 42 | "description": "My small PHP Tools", 43 | "time": "2018-12-08T15:17:26+00:00" 44 | } 45 | ], 46 | "packages-dev": [], 47 | "aliases": [], 48 | "minimum-stability": "stable", 49 | "stability-flags": { 50 | "daita/my-small-php-tools": 20 51 | }, 52 | "prefer-stable": false, 53 | "prefer-lowest": false, 54 | "platform": [], 55 | "platform-dev": [] 56 | } 57 | -------------------------------------------------------------------------------- /css/dashboard.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | #dashboard-nowidget { 28 | display: none; 29 | } 30 | 31 | .dashboard-newwidget { 32 | border: 1px dashed #000; 33 | border-radius: 3px; 34 | position: fixed; 35 | right: 27px; 36 | bottom: 17px; 37 | color: #000; 38 | font-weight: bold; 39 | text-align: center; 40 | padding: 40px 60px 40px 60px; 41 | opacity: 0; 42 | z-index: 0; 43 | cursor: pointer; 44 | } 45 | 46 | .icon-dashboard { 47 | background-image: url('../img/dashboard-dark.svg'); 48 | } 49 | 50 | .icon-widget { 51 | background-image: url('../img/widget.svg'); 52 | } 53 | 54 | /* WIDGET HEADER */ 55 | .widget-header { 56 | background-color: var(--color-main-background); 57 | color: var(--color-main-text); 58 | height: 44px; 59 | display: flex; 60 | position: relative; 61 | align-items: center; 62 | border-top-right-radius: var(--border-radius); 63 | border-top-left-radius: var(--border-radius); 64 | border-bottom: 1px solid var(--color-border); 65 | h2 { 66 | margin-bottom: 0; 67 | } 68 | .widget-header-icon { 69 | width: 44px; 70 | height: 44px; 71 | background-size: 22px; 72 | opacity: 0.65; 73 | } 74 | .widget-right-icon { 75 | margin-left: auto; 76 | width: 44px; 77 | height: 44px; 78 | cursor: pointer; 79 | opacity: 0; 80 | } 81 | .popovermenu { 82 | top: 44px; 83 | } 84 | } 85 | 86 | .popovermenu { 87 | z-index: 999; 88 | } 89 | 90 | /* WIDGET LISTS */ 91 | .widget-list-row { 92 | height: 50px; 93 | margin-top: 15px; 94 | } 95 | 96 | .widget-list-icon { 97 | width: 32px; 98 | height: 32px; 99 | position: absolute; 100 | margin: 10px; 101 | } 102 | 103 | .widget-list-text { 104 | position: absolute; 105 | left: 80px; 106 | } 107 | 108 | .widget-list-name { 109 | font-size: 14px; 110 | color: var(--color-text-light); 111 | } 112 | 113 | .widget-list-desc { 114 | font-size: 12px; 115 | color: var(--color-text-lighter); 116 | margin-right: 10px; 117 | } 118 | 119 | /* GRID */ 120 | .grid-stack { 121 | margin-top: 10px 122 | } 123 | 124 | .grid-stack-item-content { 125 | color: #2c3e50; 126 | text-align: center; 127 | filter: drop-shadow(0 1px 3px var(--color-box-shadow)); 128 | border-radius: var(--border-radius); 129 | z-index: 1 !important; 130 | } 131 | 132 | .ui-state-disabled { 133 | opacity: 1 !important; 134 | filter: Alpha(Opacity=100) !important; 135 | -webkit-transition: background-color 200ms linear; 136 | -ms-transition: background-color 200ms linear; 137 | transition: background-color 200ms linear; 138 | } 139 | 140 | /* GRID STACK PLACEHOLDER */ 141 | .grid-stack .grid-stack-placeholder > .placeholder-content { 142 | border-color: var(--color-background-darker); 143 | } 144 | 145 | /* WIDGET BACK */ 146 | .back { 147 | background: var(--color-background-darker); 148 | } 149 | 150 | /* WIDGET CONTENT */ 151 | .widget-content { 152 | height: calc(100% - 44px); 153 | overflow: hidden !important; 154 | } 155 | 156 | .grid-stack > .grid-stack-item > .grid-stack-item-content { 157 | margin: 0 10px; 158 | position: unset; 159 | top: unset; 160 | left: unset; 161 | right: unset; 162 | bottom: unset; 163 | width: unset; 164 | z-index: 1 !important; 165 | overflow-x: unset; 166 | overflow-y: unset; 167 | height: inherit; 168 | background-color: var(--color-main-background); 169 | color: var(--color-main-text); 170 | } 171 | 172 | .ui-resizable-handle-hidden { 173 | z-index: 0 !important; 174 | } -------------------------------------------------------------------------------- /css/widgets/clock.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | .icon-clock { 28 | background-image: url('../../img/widgets/clock.svg'); 29 | } 30 | 31 | .icon-clock-white { 32 | background-image: url('../../img/widgets/clock-white.svg'); 33 | } 34 | 35 | .widget-clock { 36 | font-size: 40px; 37 | padding: 37px 10px 10px; 38 | letter-spacing: 2px; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /css/widgets/diskspace.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @author regio iT gesellschaft für informationstechnologie mbh 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | 28 | .icon-disk-space { 29 | background-image: url('../../img/widgets/diskspace.svg'); 30 | } 31 | 32 | .icon-disk-space-white { 33 | background-image: url('../../img/widgets/diskspace-white.svg'); 34 | } 35 | 36 | #diskspace-progress { 37 | position: relative; 38 | } 39 | 40 | #diskspace-progress div { 41 | height: 1.8em; 42 | } 43 | 44 | #diskspace-progress-used { 45 | float: left; 46 | background-color: #727272; 47 | } 48 | 49 | .diskspace-progress-limit { 50 | background-color: #b1b1b1; 51 | } 52 | 53 | .diskspace-text { 54 | position: absolute; 55 | top: 0.1em; 56 | text-align: center; 57 | width: 100%; 58 | color: white; 59 | } 60 | 61 | .widget-diskspace { 62 | padding: 10px; 63 | } 64 | 65 | -------------------------------------------------------------------------------- /css/widgets/fortunes.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | .icon-fortunes { 28 | background-image: url('../../img/widgets/fortunes.svg'); 29 | } 30 | 31 | .icon-fortunes-white { 32 | background-image: url('../../img/widgets/fortunes-white.svg'); 33 | } 34 | 35 | .widget-fortunes { 36 | padding: 10px; 37 | white-space: pre; 38 | white-space: pre-line; 39 | text-align: left; 40 | font-style: italic; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /css/widgets/test1.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | .icon-lorem { 28 | background-image: url('/apps/dashboard/img/widgets/lorem.svg'); 29 | } 30 | 31 | .icon-lorem-white { 32 | background-image: url('/apps/dashboard/img/widgets/lorem-white.svg'); 33 | } 34 | 35 | .widget-test1 { 36 | padding: 10px; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /documentation/TheNextDashboard.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/dashboard/0d3a4f4874f575b018437ea55f2699bd3b4e083c/documentation/TheNextDashboard.pdf -------------------------------------------------------------------------------- /img/dashboard-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /img/dashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | image/svg+xml 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /img/widget.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 13 | 14 | -------------------------------------------------------------------------------- /img/widgets/clock-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /img/widgets/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 15 | 16 | -------------------------------------------------------------------------------- /img/widgets/diskspace-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /img/widgets/diskspace.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /img/widgets/fortunes-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /img/widgets/fortunes.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /img/widgets/lorem-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /img/widgets/lorem.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /js/dashboard.api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | /** global: grid */ 28 | 29 | var dashboard = { 30 | 31 | setTitle: function (widgetId, title) { 32 | var widget = grid.getWidgetFromId(widgetId); 33 | if (widget === null) { 34 | return; 35 | } 36 | 37 | widget.find('.widget-header-name').stop().fadeOut(150, function () { 38 | $(this).text(title).fadeIn(150); 39 | }); 40 | } 41 | 42 | }; 43 | 44 | 45 | -------------------------------------------------------------------------------- /js/dashboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | /** global: OCA */ 28 | /** global: settings */ 29 | /** global: nav */ 30 | /** global: net */ 31 | /** global: grid */ 32 | /** global: dashboard */ 33 | 34 | 35 | (function () { 36 | 37 | /** 38 | * @constructs DashBoard 39 | */ 40 | var DashBoard = function () { 41 | $.extend(DashBoard.prototype, settings); 42 | $.extend(DashBoard.prototype, grid); 43 | $.extend(DashBoard.prototype, nav); 44 | $.extend(DashBoard.prototype, net); 45 | $.extend(DashBoard.prototype, dashboard); 46 | 47 | net.init(); 48 | nav.init(); 49 | grid.init(); 50 | }; 51 | 52 | OCA.DashBoard = DashBoard; 53 | OCA.DashBoard.dashBoard = new DashBoard(); 54 | 55 | })(); 56 | 57 | 58 | -------------------------------------------------------------------------------- /js/dashboard.navigation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | /** global: OC */ 28 | /** global: net */ 29 | /** global: grid */ 30 | /** global: settings */ 31 | /** global: curr */ 32 | 33 | 34 | var nav = { 35 | 36 | elements: { 37 | divNoWidget: null, 38 | divNewWidget: null, 39 | buttonNewWidget: null, 40 | elWidgetList: null, 41 | divGridStack: null, 42 | gridStack: null 43 | }, 44 | 45 | 46 | init: function () { 47 | nav.initElements(); 48 | net.getWidgets(nav.onGetWidgets); 49 | }, 50 | 51 | 52 | initElements: function () { 53 | nav.elements.divNoWidget = $('#dashboard-nowidget'); 54 | nav.elements.divNewWidget = $('.dashboard-newwidget'); 55 | nav.elements.buttonNewWidget = $('#dashboard-newwidget'); 56 | nav.elements.divGridStack = $('.grid-stack'); 57 | 58 | nav.elements.buttonNewWidget.on('click', nav.showWidgetsList); 59 | 60 | nav.elements.divNewWidget.fadeOut(0).delay(3000).fadeTo(150, 0.35); 61 | nav.elements.divNewWidget.on('mouseover', function () { 62 | $(this).stop().fadeTo(150, 0.7); 63 | }).on('mouseout', function () { 64 | $(this).stop().fadeTo(150, 0.35); 65 | }).on('click', function () { 66 | nav.showWidgetsList(); 67 | }); 68 | 69 | $(window).click(function () { 70 | settings.hideWidgetMenu(); 71 | }); 72 | 73 | }, 74 | 75 | showWidgetsList: function () { 76 | nav.generateWidgetsList(); 77 | 78 | $('.app-dashboard').append(nav.elements.elWidgetList); 79 | nav.elements.elWidgetList.ocdialog({ 80 | closeOnEscape: true, 81 | modal: true, 82 | width: 600, 83 | height: 500, 84 | title: 'Add a new widget', 85 | buttons: {} 86 | }); 87 | }, 88 | 89 | 90 | onGetWidgets: function (result) { 91 | curr.widgets = result; 92 | 93 | settings.firstInstall(); 94 | grid.fillGrid(); 95 | }, 96 | 97 | 98 | generateWidgetsList: function () { 99 | 100 | nav.elements.elWidgetList = $('
'); 101 | 102 | var count = 0; 103 | for (var i = 0; i < curr.widgets.length; i++) { 104 | var item = curr.widgets[i]; 105 | if (item.config.enabled) { 106 | continue; 107 | } 108 | 109 | var div = $('
', { 110 | class: 'widget-list-row', 111 | 'data-widget-id': item.widget.id 112 | }).append($('
', { 113 | href: '#', 114 | class: 'widget-list-icon ' + ((item.template.icon) ? item.template.icon : 'icon-widget') 115 | })).append($('
', {class: 'widget-list-text'}) 116 | .append($('
', {class: 'widget-list-name'}).text(item.widget.name)) 117 | .append($('
', {class: 'widget-list-desc'}).text(item.widget.description)) 118 | ); 119 | 120 | div.fadeTo(0, 0.65); 121 | div.on('mouseover', function () { 122 | $(this).stop().fadeTo(150, 1); 123 | }).on('mouseout', function () { 124 | $(this).stop().fadeTo(150, 0.65); 125 | }); 126 | 127 | div.on('click', function () { 128 | var item = settings.getWidget($(this).attr('data-widget-id')); 129 | if (item === null || item.config.enabled) { 130 | return; 131 | } 132 | 133 | grid.addWidget(item); 134 | nav.elements.elWidgetList.ocdialog('close'); 135 | }); 136 | 137 | nav.elements.elWidgetList.append(div); 138 | count++; 139 | } 140 | }, 141 | 142 | 143 | executeFunction: function (functionName, context) { 144 | var args = Array.prototype.slice.call(arguments, 2); 145 | var namespaces = functionName.split("."); 146 | var func = namespaces.pop(); 147 | for (var i = 0; i < namespaces.length; i++) { 148 | if (context[namespaces[i]] === undefined) { 149 | console.log('Unknown function \'' + functionName + '\''); 150 | return undefined; 151 | } 152 | context = context[namespaces[i]]; 153 | } 154 | return context[func].apply(context, args); 155 | } 156 | 157 | 158 | }; 159 | 160 | -------------------------------------------------------------------------------- /js/dashboard.net.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | /** global: OC */ 27 | /** global: settings */ 28 | 29 | 30 | var net = { 31 | 32 | 33 | init: function () { 34 | net.pushWidget(-1); 35 | }, 36 | 37 | 38 | getWidgets: function (callback) { 39 | var res = {status: -1}; 40 | 41 | $.ajax({ 42 | method: 'GET', 43 | url: OC.generateUrl('/apps/dashboard/widgets') 44 | }).done(function (res) { 45 | net.onCallback(callback, res); 46 | }).fail(function () { 47 | // net.failedToAjax(); 48 | net.onCallback(callback, res); 49 | }); 50 | }, 51 | 52 | 53 | saveGrid: function (data, callback) { 54 | var res = {status: -1}; 55 | 56 | $.ajax({ 57 | method: 'POST', 58 | url: OC.generateUrl('/apps/dashboard/widgets/grid'), 59 | data: { 60 | grid: JSON.stringify(data) 61 | } 62 | }).done(function (res) { 63 | net.onCallback(callback, res); 64 | }).fail(function () { 65 | // net.failedToAjax(); 66 | net.onCallback(callback, res); 67 | }); 68 | 69 | }, 70 | 71 | 72 | deleteWidget: function (widgetId) { 73 | $.ajax({ 74 | method: 'DELETE', 75 | url: OC.generateUrl('/apps/dashboard/widget'), 76 | data: { 77 | widgetId: widgetId 78 | } 79 | }).done(function () { 80 | }).fail(function () { 81 | // net.failedToAjax(); 82 | }); 83 | }, 84 | 85 | 86 | requestWidget: function (request, callback) { 87 | 88 | var res = {status: -1}; 89 | $.ajax({ 90 | method: 'GET', 91 | url: OC.generateUrl('/apps/dashboard/widget/request'), 92 | data: { 93 | json: JSON.stringify(request) 94 | } 95 | }).done(function (res) { 96 | if (res.result === 'done') { 97 | net.onCallback(callback, res); 98 | } 99 | }).fail(function () { 100 | // net.failedToAjax(); 101 | //net.onCallback(callback, res); 102 | }); 103 | }, 104 | 105 | 106 | pushWidget: function (lastEventId) { 107 | 108 | $.ajax({ 109 | method: 'POST', 110 | url: OC.generateUrl('/apps/dashboard/widget/push'), 111 | data: { 112 | json: JSON.stringify({eventId: lastEventId}) 113 | } 114 | }).done(function (res) { 115 | if (typeof res === 'string') { 116 | var json = $.trim(res); 117 | res = JSON.parse(json); 118 | } 119 | 120 | if (res.result === 'done') { 121 | settings.broadcastPushWidget(res); 122 | lastEventId = res.lastEventId; 123 | net.pushWidget(lastEventId); 124 | } else { 125 | net.failedPush(); 126 | } 127 | }).fail(function () { 128 | net.failedPush(); 129 | }); 130 | }, 131 | 132 | 133 | failedPush: function () { 134 | //console.log('FAIL !'); 135 | }, 136 | 137 | onCallback: function (callback, result) { 138 | if (callback && (typeof callback === 'function')) { 139 | if (typeof result === 'object') { 140 | callback(result); 141 | } else { 142 | callback({status: -1}); 143 | } 144 | 145 | return true; 146 | } 147 | 148 | return false; 149 | } 150 | }; 151 | 152 | 153 | -------------------------------------------------------------------------------- /js/widgets/clock.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | /** global: OCA */ 27 | /** global: net */ 28 | 29 | 30 | (function () { 31 | 32 | /** 33 | * @constructs Clock 34 | */ 35 | var Clock = function () { 36 | 37 | var clock = { 38 | 39 | divClock: null, 40 | 41 | init: function () { 42 | clock.divClock = $('#widget-clock'); 43 | clock.displayTime(); 44 | 45 | 46 | }, 47 | 48 | displayTime: function () { 49 | 50 | var t = new Date(); 51 | 52 | var time = ('0' + t.getHours()).slice(-2) + 53 | ':' + ('0' + t.getMinutes()).slice(-2) + 54 | ':' + ('0' + t.getSeconds()).slice(-2); 55 | clock.divClock.text(time); 56 | } 57 | 58 | }; 59 | 60 | $.extend(Clock.prototype, clock); 61 | }; 62 | 63 | OCA.DashBoard.Clock = Clock; 64 | OCA.DashBoard.clock = new Clock(); 65 | 66 | })(); 67 | 68 | 69 | -------------------------------------------------------------------------------- /js/widgets/diskspace.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | /** global: OCA */ 27 | /** global: OC */ 28 | /** global: net */ 29 | 30 | 31 | (function () { 32 | 33 | /** 34 | * @constructs DiskSpace 35 | */ 36 | var DiskSpace = function () { 37 | 38 | var diskspace = { 39 | 40 | init: function () { 41 | $('#diskspace-progress').fadeOut(0); 42 | 43 | diskspace.getDiskSpace(); 44 | }, 45 | 46 | 47 | getDiskSpace: function () { 48 | var request = { 49 | widget: 'diskspace', 50 | request: 'getDiskSpace' 51 | }; 52 | 53 | net.requestWidget(request, diskspace.displayDiskSpace); 54 | }, 55 | 56 | 57 | displayDiskSpace: function (result) { 58 | if (result.result === 'fail') { 59 | return; 60 | } 61 | 62 | var used = OC.Util.humanFileSize(parseInt(result.value.diskSpace.used, 10), true); 63 | var total = OC.Util.humanFileSize(parseInt(result.value.diskSpace.total, 10), true); 64 | var percent = Math.round(100 * used / total); 65 | 66 | $('#diskspace-progress').stop().fadeIn(150); 67 | $('#diskspace-used').text(used); 68 | $('#diskspace-total').text(total); 69 | $('#diskspace-progress-used').css('width', percent + '%'); 70 | } 71 | 72 | }; 73 | 74 | $.extend(DiskSpace.prototype, diskspace); 75 | }; 76 | 77 | OCA.DashBoard.DiskSpace = DiskSpace; 78 | OCA.DashBoard.diskspace = new DiskSpace(); 79 | 80 | })(); 81 | 82 | 83 | -------------------------------------------------------------------------------- /js/widgets/fortunes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Nextcloud - Dashboard app 3 | * 4 | * This file is licensed under the Affero General Public License version 3 or 5 | * later. See the COPYING file. 6 | * 7 | * @author Maxence Lange 8 | * @copyright 2018, Maxence Lange 9 | * @license GNU AGPL version 3 or any later version 10 | * 11 | * This program is free software: you can redistribute it and/or modify 12 | * it under the terms of the GNU Affero General Public License as 13 | * published by the Free Software Foundation, either version 3 of the 14 | * License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU Affero General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Affero General Public License 22 | * along with this program. If not, see . 23 | * 24 | */ 25 | 26 | 27 | /** global: OCA */ 28 | /** global: net */ 29 | 30 | 31 | (function () { 32 | 33 | /** 34 | * @constructs Fortunes 35 | */ 36 | var Fortunes = function () { 37 | 38 | var fortunes = { 39 | 40 | divFortune: null, 41 | 42 | init: function () { 43 | fortunes.divFortune = $('#widget-fortunes'); 44 | fortunes.getFortune(); 45 | }, 46 | 47 | 48 | getFortune: function () { 49 | var request = { 50 | widget: 'fortunes', 51 | request: 'getFortune' 52 | }; 53 | 54 | net.requestWidget(request, fortunes.displayFortune); 55 | }, 56 | 57 | 58 | displayFortune: function (result) { 59 | if (result.result === 'fail') { 60 | return; 61 | } 62 | 63 | var fortune = result.value.fortune; 64 | fortunes.divFortune.fadeOut(150, function () { 65 | $(this).text(fortune).fadeIn(150); 66 | }); 67 | }, 68 | 69 | 70 | push: function (payload) { 71 | if (payload.fortune === undefined) { 72 | return; 73 | } 74 | 75 | fortunes.divFortune.fadeOut(150, function () { 76 | $(this).text(payload.fortune).fadeIn(150); 77 | }); 78 | } 79 | 80 | }; 81 | 82 | $.extend(Fortunes.prototype, fortunes); 83 | }; 84 | 85 | OCA.DashBoard.Fortunes = Fortunes; 86 | OCA.DashBoard.fortunes = new Fortunes(); 87 | 88 | })(); 89 | 90 | 91 | -------------------------------------------------------------------------------- /l10n/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/dashboard/0d3a4f4874f575b018437ea55f2699bd3b4e083c/l10n/.gitkeep -------------------------------------------------------------------------------- /l10n/ar.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "لوحة التحكم", 5 | "Clock" : "الساعة", 6 | "Disk space" : "مساحة التخزين" 7 | }, 8 | "nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"); 9 | -------------------------------------------------------------------------------- /l10n/ar.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "لوحة التحكم", 3 | "Clock" : "الساعة", 4 | "Disk space" : "مساحة التخزين" 5 | },"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;" 6 | } -------------------------------------------------------------------------------- /l10n/bg.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Табло" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/bg.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Табло" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/ca.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Afegeix un giny", 5 | "Remove this widget" : "Suprimeix aquest giny", 6 | "Dashboard" : "Panell de control", 7 | "Clock" : "Rellotge", 8 | "The time is now." : "Ara és el moment.", 9 | "Disk space" : "Espai de disc", 10 | "Display the current use of your available disk space" : "Mostra l'ús actual del vostre espai de disc disponible", 11 | "Fortune Quotes" : "Frases fetes", 12 | "Get a random fortune quote" : "Mostra una frase feta a l'atzar", 13 | "Dashboard app for Nextcloud" : "App de panell de control per a Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'app de panell de control permet als usuaris monitoritzar les seves dades mitjançant sub-elements anomenats Ginys.\n\t\tEls ginys s’importen d'altres apps i poden ser afegits, trets, moguts i redimensionats" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/ca.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Afegeix un giny", 3 | "Remove this widget" : "Suprimeix aquest giny", 4 | "Dashboard" : "Panell de control", 5 | "Clock" : "Rellotge", 6 | "The time is now." : "Ara és el moment.", 7 | "Disk space" : "Espai de disc", 8 | "Display the current use of your available disk space" : "Mostra l'ús actual del vostre espai de disc disponible", 9 | "Fortune Quotes" : "Frases fetes", 10 | "Get a random fortune quote" : "Mostra una frase feta a l'atzar", 11 | "Dashboard app for Nextcloud" : "App de panell de control per a Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'app de panell de control permet als usuaris monitoritzar les seves dades mitjançant sub-elements anomenats Ginys.\n\t\tEls ginys s’importen d'altres apps i poden ser afegits, trets, moguts i redimensionats" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/cs.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Přidat ovládací prvek", 5 | "Remove this widget" : "Odebrat tento ovládací prvek", 6 | "Dashboard" : "Nástěnka", 7 | "Clock" : "Hodiny", 8 | "The time is now." : "Čas je nyní.", 9 | "Disk space" : "Prostor na disku", 10 | "Display the current use of your available disk space" : "Zobrazit stávající využití vám dostupného prostoru na úložišti", 11 | "Fortune Quotes" : "Citáty", 12 | "Get a random fortune quote" : "Obdržet náhodný citát", 13 | "Dashboard app for Nextcloud" : "Aplikace nástěnka pro Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikace Nástěnka umožňuje uživatelům monitorovat svá data prostřednictvím dílčích prvků, zvané Widgets.\n\t\tWidgety jsou importovány z ostatních aplikací a je možné je přidávat, odebírat, přesouvat a měnit jejich velikost" 15 | }, 16 | "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"); 17 | -------------------------------------------------------------------------------- /l10n/cs.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Přidat ovládací prvek", 3 | "Remove this widget" : "Odebrat tento ovládací prvek", 4 | "Dashboard" : "Nástěnka", 5 | "Clock" : "Hodiny", 6 | "The time is now." : "Čas je nyní.", 7 | "Disk space" : "Prostor na disku", 8 | "Display the current use of your available disk space" : "Zobrazit stávající využití vám dostupného prostoru na úložišti", 9 | "Fortune Quotes" : "Citáty", 10 | "Get a random fortune quote" : "Obdržet náhodný citát", 11 | "Dashboard app for Nextcloud" : "Aplikace nástěnka pro Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikace Nástěnka umožňuje uživatelům monitorovat svá data prostřednictvím dílčích prvků, zvané Widgets.\n\t\tWidgety jsou importovány z ostatních aplikací a je možné je přidávat, odebírat, přesouvat a měnit jejich velikost" 13 | },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;" 14 | } -------------------------------------------------------------------------------- /l10n/da.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Tilføj et widget", 5 | "Remove this widget" : "Fjern dette widget", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Ur", 8 | "The time is now." : "Klokken er nu.", 9 | "Disk space" : "Lageringsplads", 10 | "Display the current use of your available disk space" : "Vis aktuelt forbrug af harddisk plads", 11 | "Fortune Quotes" : "Lykke citater", 12 | "Get a random fortune quote" : "Dagens lykke citat", 13 | "Dashboard app for Nextcloud" : "Kontrolpanel-app til Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Instrumentpanel App lader brugere overvåge deres data gennem brug af under-moduler kaldet widgets.\n\t\tWidgets importeres fra andre apps og kan tilføjes, fjernes, flyttes, og tilpasses i størrelse" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/da.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Tilføj et widget", 3 | "Remove this widget" : "Fjern dette widget", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Ur", 6 | "The time is now." : "Klokken er nu.", 7 | "Disk space" : "Lageringsplads", 8 | "Display the current use of your available disk space" : "Vis aktuelt forbrug af harddisk plads", 9 | "Fortune Quotes" : "Lykke citater", 10 | "Get a random fortune quote" : "Dagens lykke citat", 11 | "Dashboard app for Nextcloud" : "Kontrolpanel-app til Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Instrumentpanel App lader brugere overvåge deres data gennem brug af under-moduler kaldet widgets.\n\t\tWidgets importeres fra andre apps og kan tilføjes, fjernes, flyttes, og tilpasses i størrelse" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/de.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Ein Widget hinzufügen", 5 | "Remove this widget" : "Dieses Widget entfernen", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Uhr", 8 | "The time is now." : "Die aktuelle Uhrzeit ist.", 9 | "Disk space" : "Speicherplatz", 10 | "Display the current use of your available disk space" : "Anzeige des aktuell benutzten Speicherplatzes", 11 | "Fortune Quotes" : "Glückssprüche", 12 | "Get a random fortune quote" : "Erhalte einen zufälligen Glücksspruch", 13 | "Dashboard app for Nextcloud" : "Dashboard-App für Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Die Dashboard-App ermöglicht den Nutzern ihre Daten über Widgets genannte Unterelemente anzuzeigen.\n\t\tWidgets werden von anderen Apps importiert und können hinzugefügt, entfernt, verschoben und in der Größe geändert werden" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/de.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Ein Widget hinzufügen", 3 | "Remove this widget" : "Dieses Widget entfernen", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Uhr", 6 | "The time is now." : "Die aktuelle Uhrzeit ist.", 7 | "Disk space" : "Speicherplatz", 8 | "Display the current use of your available disk space" : "Anzeige des aktuell benutzten Speicherplatzes", 9 | "Fortune Quotes" : "Glückssprüche", 10 | "Get a random fortune quote" : "Erhalte einen zufälligen Glücksspruch", 11 | "Dashboard app for Nextcloud" : "Dashboard-App für Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Die Dashboard-App ermöglicht den Nutzern ihre Daten über Widgets genannte Unterelemente anzuzeigen.\n\t\tWidgets werden von anderen Apps importiert und können hinzugefügt, entfernt, verschoben und in der Größe geändert werden" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/de_DE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Ein Widget hinzufügen", 5 | "Remove this widget" : "Dieses Widget entfernen", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Uhr", 8 | "The time is now." : "Die aktuelle Zeit.", 9 | "Disk space" : "Speicherplatz", 10 | "Display the current use of your available disk space" : "Anzeige des aktuell benutzten Speicherplatzes", 11 | "Fortune Quotes" : "Glückssprüche", 12 | "Get a random fortune quote" : "Erhalte einen zufälligen Glücksspruch", 13 | "Dashboard app for Nextcloud" : "Dashboard-App für Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Die Dashboard-App ermöglicht den Nutzern ihre Daten über Widgets genannte Unterelemente anzuzeigen.\n\t\tWidgets werden von anderen Apps importiert und können hinzugefügt, entfernt, verschoben und in der Größe geändert werden" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/de_DE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Ein Widget hinzufügen", 3 | "Remove this widget" : "Dieses Widget entfernen", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Uhr", 6 | "The time is now." : "Die aktuelle Zeit.", 7 | "Disk space" : "Speicherplatz", 8 | "Display the current use of your available disk space" : "Anzeige des aktuell benutzten Speicherplatzes", 9 | "Fortune Quotes" : "Glückssprüche", 10 | "Get a random fortune quote" : "Erhalte einen zufälligen Glücksspruch", 11 | "Dashboard app for Nextcloud" : "Dashboard-App für Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Die Dashboard-App ermöglicht den Nutzern ihre Daten über Widgets genannte Unterelemente anzuzeigen.\n\t\tWidgets werden von anderen Apps importiert und können hinzugefügt, entfernt, verschoben und in der Größe geändert werden" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/el.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Προσθήκη γραφικού στοιχείου", 5 | "Remove this widget" : "Αφαίρεση γραφικού στοιχείου", 6 | "Dashboard" : "Πίνακας ελέγχου", 7 | "Clock" : "Ρολόι", 8 | "The time is now." : "Η ώρα είναι τώρα.", 9 | "Disk space" : "Χώρος στο δίσκο", 10 | "Display the current use of your available disk space" : "Εμφάνιση της τρέχουσας χρήσης του διαθέσιμου χώρου στο δίσκο σας", 11 | "Fortune Quotes" : "Γαμάτες εκφράσεις", 12 | "Get a random fortune quote" : "Λάβετε μια τυχαία γαμάτη έκφραση", 13 | "Dashboard app for Nextcloud" : "Εφαρμογή πίνακα ελέγχου για το Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Η εφαρμογή Πίνακας ελέγχου επιτρέπει στους χρήστες να παρακολουθούν τα δεδομένα τους μέσω επιμέρους στοιχείων που ονομάζονται γραφικά στοιχεία.\n\t\tΤα γραφικά στοιχεία εισάγονται από άλλες εφαρμογές και μπορούν να προστεθούν, να αφαιρεθούν, να μετακινηθούν και να αυξομειωθούν" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/el.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Προσθήκη γραφικού στοιχείου", 3 | "Remove this widget" : "Αφαίρεση γραφικού στοιχείου", 4 | "Dashboard" : "Πίνακας ελέγχου", 5 | "Clock" : "Ρολόι", 6 | "The time is now." : "Η ώρα είναι τώρα.", 7 | "Disk space" : "Χώρος στο δίσκο", 8 | "Display the current use of your available disk space" : "Εμφάνιση της τρέχουσας χρήσης του διαθέσιμου χώρου στο δίσκο σας", 9 | "Fortune Quotes" : "Γαμάτες εκφράσεις", 10 | "Get a random fortune quote" : "Λάβετε μια τυχαία γαμάτη έκφραση", 11 | "Dashboard app for Nextcloud" : "Εφαρμογή πίνακα ελέγχου για το Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Η εφαρμογή Πίνακας ελέγχου επιτρέπει στους χρήστες να παρακολουθούν τα δεδομένα τους μέσω επιμέρους στοιχείων που ονομάζονται γραφικά στοιχεία.\n\t\tΤα γραφικά στοιχεία εισάγονται από άλλες εφαρμογές και μπορούν να προστεθούν, να αφαιρεθούν, να μετακινηθούν και να αυξομειωθούν" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/en_GB.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Dashboard", 5 | "Dashboard app for Nextcloud" : "Dashboard app for Nextcloud" 6 | }, 7 | "nplurals=2; plural=(n != 1);"); 8 | -------------------------------------------------------------------------------- /l10n/en_GB.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Dashboard", 3 | "Dashboard app for Nextcloud" : "Dashboard app for Nextcloud" 4 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 5 | } -------------------------------------------------------------------------------- /l10n/eo.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Aldoni kromprogrameton", 5 | "Remove this widget" : "Forigi tiun kromprogrameton", 6 | "Dashboard" : "Regpanelo", 7 | "Clock" : "Horloĝo", 8 | "The time is now." : "La tempo estas nun.", 9 | "Disk space" : "Diskospaco", 10 | "Display the current use of your available disk space" : "Montras la nunan uzon de via diskospaco", 11 | "Fortune Quotes" : "Citaĵaro", 12 | "Get a random fortune quote" : "Ricevi hazardan citaĵon", 13 | "Dashboard app for Nextcloud" : "Aplikaĵo „Regpanelo“ por Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "La aplikaĵo „Regpanelo“ ebligas al uzantoj observi iliajn datumojn per tiel nomitaj „Kromprogrametoj“.\nKromprogrametoj devenas de aliaj aplikaĵoj kaj povas esti aldonitaj, forigitaj, movitaj kaj regrandigitaj." 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/eo.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Aldoni kromprogrameton", 3 | "Remove this widget" : "Forigi tiun kromprogrameton", 4 | "Dashboard" : "Regpanelo", 5 | "Clock" : "Horloĝo", 6 | "The time is now." : "La tempo estas nun.", 7 | "Disk space" : "Diskospaco", 8 | "Display the current use of your available disk space" : "Montras la nunan uzon de via diskospaco", 9 | "Fortune Quotes" : "Citaĵaro", 10 | "Get a random fortune quote" : "Ricevi hazardan citaĵon", 11 | "Dashboard app for Nextcloud" : "Aplikaĵo „Regpanelo“ por Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "La aplikaĵo „Regpanelo“ ebligas al uzantoj observi iliajn datumojn per tiel nomitaj „Kromprogrametoj“.\nKromprogrametoj devenas de aliaj aplikaĵoj kaj povas esti aldonitaj, forigitaj, movitaj kaj regrandigitaj." 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/es.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Añadir un widget", 5 | "Remove this widget" : "Eliminar este widget", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Reloj", 8 | "The time is now." : "El momento es ahora.", 9 | "Disk space" : "Espacio en disco", 10 | "Display the current use of your available disk space" : "Mostrar el uso actual del espacio de disco disponible", 11 | "Fortune Quotes" : "Frases de la suerte", 12 | "Get a random fortune quote" : "Obtén una frase de la suerte aleatoria", 13 | "Dashboard app for Nextcloud" : "Aplicación Dashboard para Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "La aplicación Dashboard permite a los usuarios monitorizar sus datos a través de elementos llamados widgets.\n\t\tLos widgets se importan desde otras apps y se pueden añadir, eliminar, mover y cambiar de tamaño." 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/es.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Añadir un widget", 3 | "Remove this widget" : "Eliminar este widget", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Reloj", 6 | "The time is now." : "El momento es ahora.", 7 | "Disk space" : "Espacio en disco", 8 | "Display the current use of your available disk space" : "Mostrar el uso actual del espacio de disco disponible", 9 | "Fortune Quotes" : "Frases de la suerte", 10 | "Get a random fortune quote" : "Obtén una frase de la suerte aleatoria", 11 | "Dashboard app for Nextcloud" : "Aplicación Dashboard para Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "La aplicación Dashboard permite a los usuarios monitorizar sus datos a través de elementos llamados widgets.\n\t\tLos widgets se importan desde otras apps y se pueden añadir, eliminar, mover y cambiar de tamaño." 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/es_419.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_419.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_CL.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_CL.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_CO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_CO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_CR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_CR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_DO.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_DO.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_EC.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_EC.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_GT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_GT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_HN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_HN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_MX.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Agregar un widget", 5 | "Remove this widget" : "Quitar este widget", 6 | "Dashboard" : "Tablero de control", 7 | "Clock" : "Reloj", 8 | "Dashboard app for Nextcloud" : "Aplicación de tablero de control para Nextcloud" 9 | }, 10 | "nplurals=2; plural=(n != 1);"); 11 | -------------------------------------------------------------------------------- /l10n/es_MX.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Agregar un widget", 3 | "Remove this widget" : "Quitar este widget", 4 | "Dashboard" : "Tablero de control", 5 | "Clock" : "Reloj", 6 | "Dashboard app for Nextcloud" : "Aplicación de tablero de control para Nextcloud" 7 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 8 | } -------------------------------------------------------------------------------- /l10n/es_NI.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_NI.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_PA.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_PA.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_PE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_PE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_PR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_PR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_PY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_PY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_SV.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_SV.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/es_UY.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tablero de control" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/es_UY.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tablero de control" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/et_EE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Töölaud" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/et_EE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Töölaud" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/eu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Gehitu widget-a", 5 | "Remove this widget" : "Kendu widget hau", 6 | "Dashboard" : "Mahaia", 7 | "Clock" : "Erlojua", 8 | "The time is now." : "Ordua orain da", 9 | "Disk space" : "Diskoaren edukiera", 10 | "Display the current use of your available disk space" : "Bistaratu zure uneko erabilgarri dagoen diskoaren edukieraren erabilera", 11 | "Fortune Quotes" : "Zitak", 12 | "Get a random fortune quote" : "Ausazko zita bat eman", 13 | "Dashboard app for Nextcloud" : "Arbel aplikazioa Nextcloud-entzat", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Panelaren aplikazioak erabiltzaileei beren datuak monitoriza ditzake widget izeneko azpimultzoen bidez.\n\t\tWidgetak beste aplikaziotik inportatzen dira eta gehitu, kendu, mugitu eta tamaina aldatu egin daitezke" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/eu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Gehitu widget-a", 3 | "Remove this widget" : "Kendu widget hau", 4 | "Dashboard" : "Mahaia", 5 | "Clock" : "Erlojua", 6 | "The time is now." : "Ordua orain da", 7 | "Disk space" : "Diskoaren edukiera", 8 | "Display the current use of your available disk space" : "Bistaratu zure uneko erabilgarri dagoen diskoaren edukieraren erabilera", 9 | "Fortune Quotes" : "Zitak", 10 | "Get a random fortune quote" : "Ausazko zita bat eman", 11 | "Dashboard app for Nextcloud" : "Arbel aplikazioa Nextcloud-entzat", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Panelaren aplikazioak erabiltzaileei beren datuak monitoriza ditzake widget izeneko azpimultzoen bidez.\n\t\tWidgetak beste aplikaziotik inportatzen dira eta gehitu, kendu, mugitu eta tamaina aldatu egin daitezke" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/fa.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "افزودن ویجت", 5 | "Remove this widget" : "حذف این ویجت", 6 | "Dashboard" : "داشبورد", 7 | "Clock" : "ساعت", 8 | "The time is now." : "هم اکنون", 9 | "Disk space" : "فضای دیسک", 10 | "Display the current use of your available disk space" : "نمایش فضای استفاده شده فعلی از دیسک در دسترس" 11 | }, 12 | "nplurals=2; plural=(n > 1);"); 13 | -------------------------------------------------------------------------------- /l10n/fa.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "افزودن ویجت", 3 | "Remove this widget" : "حذف این ویجت", 4 | "Dashboard" : "داشبورد", 5 | "Clock" : "ساعت", 6 | "The time is now." : "هم اکنون", 7 | "Disk space" : "فضای دیسک", 8 | "Display the current use of your available disk space" : "نمایش فضای استفاده شده فعلی از دیسک در دسترس" 9 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 10 | } -------------------------------------------------------------------------------- /l10n/fi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Lisää widgetti", 5 | "Remove this widget" : "Poista widgetti", 6 | "Dashboard" : "Kojetaulu", 7 | "Clock" : "Kello", 8 | "Disk space" : "Levytila", 9 | "Dashboard app for Nextcloud" : "Kojelautasovellus Nextcloudille" 10 | }, 11 | "nplurals=2; plural=(n != 1);"); 12 | -------------------------------------------------------------------------------- /l10n/fi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Lisää widgetti", 3 | "Remove this widget" : "Poista widgetti", 4 | "Dashboard" : "Kojetaulu", 5 | "Clock" : "Kello", 6 | "Disk space" : "Levytila", 7 | "Dashboard app for Nextcloud" : "Kojelautasovellus Nextcloudille" 8 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 9 | } -------------------------------------------------------------------------------- /l10n/fr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Ajouter un widget", 5 | "Remove this widget" : "Supprimer ce widget", 6 | "Dashboard" : "Tableau de bord", 7 | "Clock" : "Horloge", 8 | "The time is now." : "C'est le moment.", 9 | "Disk space" : "Espace disque", 10 | "Display the current use of your available disk space" : "Affiche l'utilisation actuelle de votre espace disque disponible", 11 | "Fortune Quotes" : "Citation", 12 | "Get a random fortune quote" : "Afficher une citation", 13 | "Dashboard app for Nextcloud" : "Application fournissant un tableau de bord pour Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'application tableau de bord permet aux utilisateurs d'analyser leurs données à travers des sous-éléments appelés Widgets.\n\t\tLes Widgets sont importés depuis des applications tierces et peuvent être ajoutés, supprimés, déplacés ou redimensionnés" 15 | }, 16 | "nplurals=2; plural=(n > 1);"); 17 | -------------------------------------------------------------------------------- /l10n/fr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Ajouter un widget", 3 | "Remove this widget" : "Supprimer ce widget", 4 | "Dashboard" : "Tableau de bord", 5 | "Clock" : "Horloge", 6 | "The time is now." : "C'est le moment.", 7 | "Disk space" : "Espace disque", 8 | "Display the current use of your available disk space" : "Affiche l'utilisation actuelle de votre espace disque disponible", 9 | "Fortune Quotes" : "Citation", 10 | "Get a random fortune quote" : "Afficher une citation", 11 | "Dashboard app for Nextcloud" : "Application fournissant un tableau de bord pour Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'application tableau de bord permet aux utilisateurs d'analyser leurs données à travers des sous-éléments appelés Widgets.\n\t\tLes Widgets sont importés depuis des applications tierces et peuvent être ajoutés, supprimés, déplacés ou redimensionnés" 13 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 14 | } -------------------------------------------------------------------------------- /l10n/gl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Engadir un trebello", 5 | "Remove this widget" : "Retirar este trebello", 6 | "Dashboard" : "Taboleiro", 7 | "Clock" : "Reloxo", 8 | "The time is now." : "Este é o momento", 9 | "Disk space" : "Espazo no disco", 10 | "Display the current use of your available disk space" : "Amosa o uso actual do espazo no disco dispoñíbel", 11 | "Fortune Quotes" : "Frases da fortuna", 12 | "Get a random fortune quote" : "Obter ao chou unha «frase da fortuna»", 13 | "Dashboard app for Nextcloud" : "Unha aplicación de taboleiro para o Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "A aplicación Taboleiro permítelle aos usuarios monitorizar os seus datos a través de subelementos chamados Trebellos.\n\t\tOs trebellos son importados dende outras aplicacións e poden ser engadidos, eliminados, movidos e redimensionados" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/gl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Engadir un trebello", 3 | "Remove this widget" : "Retirar este trebello", 4 | "Dashboard" : "Taboleiro", 5 | "Clock" : "Reloxo", 6 | "The time is now." : "Este é o momento", 7 | "Disk space" : "Espazo no disco", 8 | "Display the current use of your available disk space" : "Amosa o uso actual do espazo no disco dispoñíbel", 9 | "Fortune Quotes" : "Frases da fortuna", 10 | "Get a random fortune quote" : "Obter ao chou unha «frase da fortuna»", 11 | "Dashboard app for Nextcloud" : "Unha aplicación de taboleiro para o Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "A aplicación Taboleiro permítelle aos usuarios monitorizar os seus datos a través de subelementos chamados Trebellos.\n\t\tOs trebellos son importados dende outras aplicacións e poden ser engadidos, eliminados, movidos e redimensionados" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/he.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "הוספת וידג׳ט", 5 | "Remove this widget" : "הסרת הווידג׳ט הזה", 6 | "Dashboard" : "לוח בקרה", 7 | "Clock" : "שעון", 8 | "The time is now." : "השעה כרגע.", 9 | "Disk space" : "נפח בכונן", 10 | "Display the current use of your available disk space" : "הצגת המקום הפנוי בכונן שלך", 11 | "Fortune Quotes" : "ציטוטי מזל", 12 | "Get a random fortune quote" : "הצגת ציטוט מזל אקראי", 13 | "Dashboard app for Nextcloud" : "יישומון לוח בקרה ל־Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "יישומון לוח המחוונים מאפשר למשתמשים לעקוב אחרי הנתונים שלהם דרך תת־רכיבים בשם וידג׳טים.\n\t\tוידג׳טים מיובאים מיישומונים אחרים וניתן להוסיף, להסיר ולהזיז אותם ואף לשנות את גודלם." 15 | }, 16 | "nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;"); 17 | -------------------------------------------------------------------------------- /l10n/he.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "הוספת וידג׳ט", 3 | "Remove this widget" : "הסרת הווידג׳ט הזה", 4 | "Dashboard" : "לוח בקרה", 5 | "Clock" : "שעון", 6 | "The time is now." : "השעה כרגע.", 7 | "Disk space" : "נפח בכונן", 8 | "Display the current use of your available disk space" : "הצגת המקום הפנוי בכונן שלך", 9 | "Fortune Quotes" : "ציטוטי מזל", 10 | "Get a random fortune quote" : "הצגת ציטוט מזל אקראי", 11 | "Dashboard app for Nextcloud" : "יישומון לוח בקרה ל־Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "יישומון לוח המחוונים מאפשר למשתמשים לעקוב אחרי הנתונים שלהם דרך תת־רכיבים בשם וידג׳טים.\n\t\tוידג׳טים מיובאים מיישומונים אחרים וניתן להוסיף, להסיר ולהזיז אותם ואף לשנות את גודלם." 13 | },"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;" 14 | } -------------------------------------------------------------------------------- /l10n/hr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Dodaj widget", 5 | "Remove this widget" : "Ukloni ovaj widget", 6 | "Dashboard" : "Nadzorna ploča", 7 | "Clock" : "Sat", 8 | "The time is now." : "Sad je vrijeme.", 9 | "Disk space" : "Prostor na disku", 10 | "Display the current use of your available disk space" : "Prikaži trenutno korištenje dostupnog prostora na disku", 11 | "Fortune Quotes" : "Predviđanje budućnosti", 12 | "Get a random fortune quote" : "Otvorite nasumični citat koji predviđa budućnost", 13 | "Dashboard app for Nextcloud" : "Aplikacija nadzorne ploče za Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikacija Nadzorna ploča korisnicima omogućuje praćenje podataka putem podelemenata pod nazivom widgeti.\n\t\tWidgeti se uvoze iz drugih aplikacija i mogu se dodavati, uklanjati, premještati i može im se mijenjati veličina" 15 | }, 16 | "nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;"); 17 | -------------------------------------------------------------------------------- /l10n/hr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Dodaj widget", 3 | "Remove this widget" : "Ukloni ovaj widget", 4 | "Dashboard" : "Nadzorna ploča", 5 | "Clock" : "Sat", 6 | "The time is now." : "Sad je vrijeme.", 7 | "Disk space" : "Prostor na disku", 8 | "Display the current use of your available disk space" : "Prikaži trenutno korištenje dostupnog prostora na disku", 9 | "Fortune Quotes" : "Predviđanje budućnosti", 10 | "Get a random fortune quote" : "Otvorite nasumični citat koji predviđa budućnost", 11 | "Dashboard app for Nextcloud" : "Aplikacija nadzorne ploče za Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikacija Nadzorna ploča korisnicima omogućuje praćenje podataka putem podelemenata pod nazivom widgeti.\n\t\tWidgeti se uvoze iz drugih aplikacija i mogu se dodavati, uklanjati, premještati i može im se mijenjati veličina" 13 | },"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;" 14 | } -------------------------------------------------------------------------------- /l10n/hu.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Felületi elem hozzáadása", 5 | "Remove this widget" : "Felületi elem eltávolítása", 6 | "Dashboard" : "Irányítópult", 7 | "Clock" : "Óra", 8 | "The time is now." : "Pontos idő.", 9 | "Disk space" : "Lemezterület", 10 | "Display the current use of your available disk space" : "Az elérhető lemezterületből jelenleg használt terület megjelenítése", 11 | "Fortune Quotes" : "Szerencsés idézetek", 12 | "Get a random fortune quote" : "Véletlenszerű szerencsés idézet", 13 | "Dashboard app for Nextcloud" : "Irányítópult alkalmazás a Nextcloudhoz", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Az Irányítópult alkalmazással a felhasználók nyomon követhetik az adataikat a felületi elemek segítségével.\n\t\tA felületi elemek más alkalmazásból kerülnek importálásra, és hozzáadhatóak, eltávolíthatóak, áthelyezhetőek és átméretezhetőek" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/hu.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Felületi elem hozzáadása", 3 | "Remove this widget" : "Felületi elem eltávolítása", 4 | "Dashboard" : "Irányítópult", 5 | "Clock" : "Óra", 6 | "The time is now." : "Pontos idő.", 7 | "Disk space" : "Lemezterület", 8 | "Display the current use of your available disk space" : "Az elérhető lemezterületből jelenleg használt terület megjelenítése", 9 | "Fortune Quotes" : "Szerencsés idézetek", 10 | "Get a random fortune quote" : "Véletlenszerű szerencsés idézet", 11 | "Dashboard app for Nextcloud" : "Irányítópult alkalmazás a Nextcloudhoz", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Az Irányítópult alkalmazással a felhasználók nyomon követhetik az adataikat a felületi elemek segítségével.\n\t\tA felületi elemek más alkalmazásból kerülnek importálásra, és hozzáadhatóak, eltávolíthatóak, áthelyezhetőek és átméretezhetőek" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/id.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Dasbor" 5 | }, 6 | "nplurals=1; plural=0;"); 7 | -------------------------------------------------------------------------------- /l10n/id.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Dasbor" 3 | },"pluralForm" :"nplurals=1; plural=0;" 4 | } -------------------------------------------------------------------------------- /l10n/is.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Bæta við viðmótshluta", 5 | "Remove this widget" : "Fjarlægja þennan viðmótshluta", 6 | "Dashboard" : "Stjórnborð", 7 | "Clock" : "Klukka", 8 | "The time is now." : "Hvað klukkan er núna.", 9 | "Disk space" : "Diskpláss", 10 | "Display the current use of your available disk space" : "Birtir notkun á tiltæku diskplássi", 11 | "Fortune Quotes" : "Spádómsmálshættir", 12 | "Get a random fortune quote" : "Fáðu málshátt af handahófi sem spáir fyrir um framtíðina", 13 | "Dashboard app for Nextcloud" : "Stjórnborðsforrit fyrir Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Stjórnborðsforritið (Dashboard) gerir notendum kleift að hafa auga með gögnunum sínum í gegnum svokallaða viðmótshluta (widgets)\n\t\tViðmótshlutar eru fluttir inn frá öðrum forritum og er hægt að bæta þeim við, fjarlægja, færa til og breyta stærð þeirra" 15 | }, 16 | "nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);"); 17 | -------------------------------------------------------------------------------- /l10n/is.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Bæta við viðmótshluta", 3 | "Remove this widget" : "Fjarlægja þennan viðmótshluta", 4 | "Dashboard" : "Stjórnborð", 5 | "Clock" : "Klukka", 6 | "The time is now." : "Hvað klukkan er núna.", 7 | "Disk space" : "Diskpláss", 8 | "Display the current use of your available disk space" : "Birtir notkun á tiltæku diskplássi", 9 | "Fortune Quotes" : "Spádómsmálshættir", 10 | "Get a random fortune quote" : "Fáðu málshátt af handahófi sem spáir fyrir um framtíðina", 11 | "Dashboard app for Nextcloud" : "Stjórnborðsforrit fyrir Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Stjórnborðsforritið (Dashboard) gerir notendum kleift að hafa auga með gögnunum sínum í gegnum svokallaða viðmótshluta (widgets)\n\t\tViðmótshlutar eru fluttir inn frá öðrum forritum og er hægt að bæta þeim við, fjarlægja, færa til og breyta stærð þeirra" 13 | },"pluralForm" :"nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);" 14 | } -------------------------------------------------------------------------------- /l10n/it.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Aggiungi un widget", 5 | "Remove this widget" : "Rimuovi questo widget", 6 | "Dashboard" : "Cruscotto", 7 | "Clock" : "Orologio", 8 | "The time is now." : "Adesso è il momento.", 9 | "Disk space" : "Spazio disco", 10 | "Display the current use of your available disk space" : "Visualizza l'utilizzo attuale dello spazio disco disponibile", 11 | "Fortune Quotes" : "Citazioni", 12 | "Get a random fortune quote" : "Ottieni una citazione casuale", 13 | "Dashboard app for Nextcloud" : "Applicazione Cruscotto di Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'applicazione Cruscotto consente agli utenti di controllare i propri dati tramite sotto-elementi chiamati Widget.\n\t\tI widget sono importati da altre applicazioni e possono essere aggiunti, rimossi, spostati e ridimensionati" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/it.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Aggiungi un widget", 3 | "Remove this widget" : "Rimuovi questo widget", 4 | "Dashboard" : "Cruscotto", 5 | "Clock" : "Orologio", 6 | "The time is now." : "Adesso è il momento.", 7 | "Disk space" : "Spazio disco", 8 | "Display the current use of your available disk space" : "Visualizza l'utilizzo attuale dello spazio disco disponibile", 9 | "Fortune Quotes" : "Citazioni", 10 | "Get a random fortune quote" : "Ottieni una citazione casuale", 11 | "Dashboard app for Nextcloud" : "Applicazione Cruscotto di Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "L'applicazione Cruscotto consente agli utenti di controllare i propri dati tramite sotto-elementi chiamati Widget.\n\t\tI widget sono importati da altre applicazioni e possono essere aggiunti, rimossi, spostati e ridimensionati" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/ja.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "ウィジェットを追加", 5 | "Remove this widget" : "このウィジェットを削除", 6 | "Dashboard" : "ダッシュボード", 7 | "Clock" : "時計", 8 | "The time is now." : "The time is now.", 9 | "Disk space" : "ディスク領域", 10 | "Display the current use of your available disk space" : "使用可能なディスクスペースの現在の使用状況を表示する", 11 | "Fortune Quotes" : "財産の引用符", 12 | "Get a random fortune quote" : "ランダムな財産の引用を取得します。", 13 | "Dashboard app for Nextcloud" : "NextCloudのダッシュボードアプリ", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Dashboardアプリでは、ウィジェットと呼ばれる要素を介してユーザーがデータを監視できます。\n\t\tウィジェットは他のアプリからインポートされ、追加、削除、移動、サイズ変更ができます" 15 | }, 16 | "nplurals=1; plural=0;"); 17 | -------------------------------------------------------------------------------- /l10n/ja.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "ウィジェットを追加", 3 | "Remove this widget" : "このウィジェットを削除", 4 | "Dashboard" : "ダッシュボード", 5 | "Clock" : "時計", 6 | "The time is now." : "The time is now.", 7 | "Disk space" : "ディスク領域", 8 | "Display the current use of your available disk space" : "使用可能なディスクスペースの現在の使用状況を表示する", 9 | "Fortune Quotes" : "財産の引用符", 10 | "Get a random fortune quote" : "ランダムな財産の引用を取得します。", 11 | "Dashboard app for Nextcloud" : "NextCloudのダッシュボードアプリ", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Dashboardアプリでは、ウィジェットと呼ばれる要素を介してユーザーがデータを監視できます。\n\t\tウィジェットは他のアプリからインポートされ、追加、削除、移動、サイズ変更ができます" 13 | },"pluralForm" :"nplurals=1; plural=0;" 14 | } -------------------------------------------------------------------------------- /l10n/ka_GE.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "მთავარი დაფა" 5 | }, 6 | "nplurals=2; plural=(n!=1);"); 7 | -------------------------------------------------------------------------------- /l10n/ka_GE.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "მთავარი დაფა" 3 | },"pluralForm" :"nplurals=2; plural=(n!=1);" 4 | } -------------------------------------------------------------------------------- /l10n/kab.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tafelwit n usenqed" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/kab.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tafelwit n usenqed" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/ko.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "위젯 추가", 5 | "Remove this widget" : "이 위젯 삭제", 6 | "Dashboard" : "대시보드", 7 | "Clock" : "시계", 8 | "The time is now." : "현재 시각:", 9 | "Disk space" : "디스크 공간", 10 | "Display the current use of your available disk space" : "현재 사용 가능한 디스크 공간 표시", 11 | "Fortune Quotes" : "포춘 쿠키", 12 | "Get a random fortune quote" : "포춘 쿠키 메시지 보기", 13 | "Dashboard app for Nextcloud" : "Nextcloud 대시보드 앱", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "대시보드 앱의 하위 구성 요소인 위젯을 사용하여 데이터를 모니터링할 수 있습니다.\n\t\t위젯은 다른 앱에서 가져오며 추가, 삭제, 이동, 크기 조정할 수 있습니다" 15 | }, 16 | "nplurals=1; plural=0;"); 17 | -------------------------------------------------------------------------------- /l10n/ko.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "위젯 추가", 3 | "Remove this widget" : "이 위젯 삭제", 4 | "Dashboard" : "대시보드", 5 | "Clock" : "시계", 6 | "The time is now." : "현재 시각:", 7 | "Disk space" : "디스크 공간", 8 | "Display the current use of your available disk space" : "현재 사용 가능한 디스크 공간 표시", 9 | "Fortune Quotes" : "포춘 쿠키", 10 | "Get a random fortune quote" : "포춘 쿠키 메시지 보기", 11 | "Dashboard app for Nextcloud" : "Nextcloud 대시보드 앱", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "대시보드 앱의 하위 구성 요소인 위젯을 사용하여 데이터를 모니터링할 수 있습니다.\n\t\t위젯은 다른 앱에서 가져오며 추가, 삭제, 이동, 크기 조정할 수 있습니다" 13 | },"pluralForm" :"nplurals=1; plural=0;" 14 | } -------------------------------------------------------------------------------- /l10n/lt_LT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Pridėti valdiklį", 5 | "Remove this widget" : "Šalinti šį valdiklį", 6 | "Dashboard" : "Skydelis", 7 | "Clock" : "Laikrodis", 8 | "Dashboard app for Nextcloud" : "Nextcloud skydelio programėlė" 9 | }, 10 | "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);"); 11 | -------------------------------------------------------------------------------- /l10n/lt_LT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Pridėti valdiklį", 3 | "Remove this widget" : "Šalinti šį valdiklį", 4 | "Dashboard" : "Skydelis", 5 | "Clock" : "Laikrodis", 6 | "Dashboard app for Nextcloud" : "Nextcloud skydelio programėlė" 7 | },"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);" 8 | } -------------------------------------------------------------------------------- /l10n/lv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Informācijas Panelis" 5 | }, 6 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);"); 7 | -------------------------------------------------------------------------------- /l10n/lv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Informācijas Panelis" 3 | },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" 4 | } -------------------------------------------------------------------------------- /l10n/nb.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Instrumentpanel" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/nb.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Instrumentpanel" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/nl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Toevoegen widget", 5 | "Remove this widget" : "Verwijder dit widget", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Klok", 8 | "The time is now." : "Dit is het moment.", 9 | "Disk space" : "Opslagruimte", 10 | "Display the current use of your available disk space" : "Toon het actuele gebruik van beschikbare schijfruimte", 11 | "Fortune Quotes" : "Fortune Quotes", 12 | "Get a random fortune quote" : "Krijg een willekeurige fortune quote", 13 | "Dashboard app for Nextcloud" : "Dashboard app voor Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "De Dashboard app laat gebruikers hun gegevens monitoren door sub-elementen die Widgets heten.\n\t\tWidgets worden geïmporteerd uit andere apps en kunnen worden toegevoegd, verwijderd, verplaatst en geschaald" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/nl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Toevoegen widget", 3 | "Remove this widget" : "Verwijder dit widget", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Klok", 6 | "The time is now." : "Dit is het moment.", 7 | "Disk space" : "Opslagruimte", 8 | "Display the current use of your available disk space" : "Toon het actuele gebruik van beschikbare schijfruimte", 9 | "Fortune Quotes" : "Fortune Quotes", 10 | "Get a random fortune quote" : "Krijg een willekeurige fortune quote", 11 | "Dashboard app for Nextcloud" : "Dashboard app voor Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "De Dashboard app laat gebruikers hun gegevens monitoren door sub-elementen die Widgets heten.\n\t\tWidgets worden geïmporteerd uit andere apps en kunnen worden toegevoegd, verwijderd, verplaatst en geschaald" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/pl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Dodaj widżet", 5 | "Remove this widget" : "Usuń ten widżet", 6 | "Dashboard" : "Pulpit", 7 | "Clock" : "Zegar", 8 | "The time is now." : "Nadszedł czas.", 9 | "Disk space" : "Pojemność dysku", 10 | "Display the current use of your available disk space" : "Pokaż aktualne zużycie dostępnej przestrzeni dyskowej", 11 | "Fortune Quotes" : "Losowe cytaty", 12 | "Get a random fortune quote" : "Wylosuj inny cytat", 13 | "Dashboard app for Nextcloud" : "Aplikacja Pulpit dla Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikacja Pulpit pozwala użytkownikom monitorować swoje dane za pomocą widżetów.\n\t\tWidżety są importowane z innych aplikacji, które mogą być dodawane, usuwane, przenoszone i zmieniane." 15 | }, 16 | "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);"); 17 | -------------------------------------------------------------------------------- /l10n/pl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Dodaj widżet", 3 | "Remove this widget" : "Usuń ten widżet", 4 | "Dashboard" : "Pulpit", 5 | "Clock" : "Zegar", 6 | "The time is now." : "Nadszedł czas.", 7 | "Disk space" : "Pojemność dysku", 8 | "Display the current use of your available disk space" : "Pokaż aktualne zużycie dostępnej przestrzeni dyskowej", 9 | "Fortune Quotes" : "Losowe cytaty", 10 | "Get a random fortune quote" : "Wylosuj inny cytat", 11 | "Dashboard app for Nextcloud" : "Aplikacja Pulpit dla Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikacja Pulpit pozwala użytkownikom monitorować swoje dane za pomocą widżetów.\n\t\tWidżety są importowane z innych aplikacji, które mogą być dodawane, usuwane, przenoszone i zmieniane." 13 | },"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);" 14 | } -------------------------------------------------------------------------------- /l10n/pt_BR.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Adicionar um widget", 5 | "Remove this widget" : "Remover este widget", 6 | "Dashboard" : "Painel", 7 | "Clock" : "Relógio", 8 | "The time is now." : "A hora é agora.", 9 | "Disk space" : "Uso do disco", 10 | "Display the current use of your available disk space" : "Mostra o espaço em disco disponível", 11 | "Fortune Quotes" : "Citação da sorte", 12 | "Get a random fortune quote" : "Pegue uma citação da sorte aleatória", 13 | "Dashboard app for Nextcloud" : "Aplicativo de painel para o Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "O aplicativo Dashboard permite que os usuários monitorem dados por meio de Widgets.\n\t\tWidgets são importados e podem ser adicionados, removidos, movidos e redimensionados" 15 | }, 16 | "nplurals=2; plural=(n > 1);"); 17 | -------------------------------------------------------------------------------- /l10n/pt_BR.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Adicionar um widget", 3 | "Remove this widget" : "Remover este widget", 4 | "Dashboard" : "Painel", 5 | "Clock" : "Relógio", 6 | "The time is now." : "A hora é agora.", 7 | "Disk space" : "Uso do disco", 8 | "Display the current use of your available disk space" : "Mostra o espaço em disco disponível", 9 | "Fortune Quotes" : "Citação da sorte", 10 | "Get a random fortune quote" : "Pegue uma citação da sorte aleatória", 11 | "Dashboard app for Nextcloud" : "Aplicativo de painel para o Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "O aplicativo Dashboard permite que os usuários monitorem dados por meio de Widgets.\n\t\tWidgets são importados e podem ser adicionados, removidos, movidos e redimensionados" 13 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 14 | } -------------------------------------------------------------------------------- /l10n/pt_PT.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Painel de controlo" 5 | }, 6 | "nplurals=2; plural=(n != 1);"); 7 | -------------------------------------------------------------------------------- /l10n/pt_PT.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Painel de controlo" 3 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 4 | } -------------------------------------------------------------------------------- /l10n/ru.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Добавить виджет", 5 | "Remove this widget" : "Удалить виджет", 6 | "Dashboard" : "Панель управления", 7 | "Clock" : "Часы", 8 | "The time is now." : "Время настало.", 9 | "Disk space" : "Дисковое пространство", 10 | "Display the current use of your available disk space" : "Выводить информацию об использовании дискового пространства", 11 | "Fortune Quotes" : "Случайные цитаты", 12 | "Get a random fortune quote" : "Получить случайную цитату", 13 | "Dashboard app for Nextcloud" : "Панель управления Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Приложение «Панель управления» служит для визуализации данных при помощи виджетов.\n\t\tПанели управления позволяет добавлять, убирать и перемещать и изменять размер виджетов, импортируемых их других приложений." 15 | }, 16 | "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);"); 17 | -------------------------------------------------------------------------------- /l10n/ru.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Добавить виджет", 3 | "Remove this widget" : "Удалить виджет", 4 | "Dashboard" : "Панель управления", 5 | "Clock" : "Часы", 6 | "The time is now." : "Время настало.", 7 | "Disk space" : "Дисковое пространство", 8 | "Display the current use of your available disk space" : "Выводить информацию об использовании дискового пространства", 9 | "Fortune Quotes" : "Случайные цитаты", 10 | "Get a random fortune quote" : "Получить случайную цитату", 11 | "Dashboard app for Nextcloud" : "Панель управления Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Приложение «Панель управления» служит для визуализации данных при помощи виджетов.\n\t\tПанели управления позволяет добавлять, убирать и перемещать и изменять размер виджетов, импортируемых их других приложений." 13 | },"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);" 14 | } -------------------------------------------------------------------------------- /l10n/sk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Pridať ovládací prvok", 5 | "Remove this widget" : "Odstrániť tento ovládací prvok", 6 | "Dashboard" : "Informačný panel", 7 | "Clock" : "Hodiny", 8 | "The time is now." : "Aktuálny čas.", 9 | "Disk space" : "Miesto na disku", 10 | "Display the current use of your available disk space" : "Zobraziť aktuálne využitie dostupného miesta na disku", 11 | "Fortune Quotes" : "Citáty", 12 | "Get a random fortune quote" : "Získať náhodný citát", 13 | "Dashboard app for Nextcloud" : "Aplikácia Nástenka pre Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikácia Nástenka umožňuje užívateľom monitorovať vaše údaje prostredníctvom ovládacích prvkov - Widgetov.\n\t\tWidgety sú importované z iných aplipácií a môžu byť pridané, odstránené, presunuté a môže byť zmenená ich veľkosť." 15 | }, 16 | "nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);"); 17 | -------------------------------------------------------------------------------- /l10n/sk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Pridať ovládací prvok", 3 | "Remove this widget" : "Odstrániť tento ovládací prvok", 4 | "Dashboard" : "Informačný panel", 5 | "Clock" : "Hodiny", 6 | "The time is now." : "Aktuálny čas.", 7 | "Disk space" : "Miesto na disku", 8 | "Display the current use of your available disk space" : "Zobraziť aktuálne využitie dostupného miesta na disku", 9 | "Fortune Quotes" : "Citáty", 10 | "Get a random fortune quote" : "Získať náhodný citát", 11 | "Dashboard app for Nextcloud" : "Aplikácia Nástenka pre Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Aplikácia Nástenka umožňuje užívateľom monitorovať vaše údaje prostredníctvom ovládacích prvkov - Widgetov.\n\t\tWidgety sú importované z iných aplipácií a môžu byť pridané, odstránené, presunuté a môže byť zmenená ich veľkosť." 13 | },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n == 1 ? 0 : n % 1 == 0 && n >= 2 && n <= 4 ? 1 : n % 1 != 0 ? 2: 3);" 14 | } -------------------------------------------------------------------------------- /l10n/sl.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Dodaj gradnik", 5 | "Remove this widget" : "Odstrani gradnik", 6 | "Dashboard" : "Nadzorna plošča", 7 | "Clock" : "Ura", 8 | "The time is now." : "Ura teče, nič ne reče.", 9 | "Disk space" : "Prostor v oblaku", 10 | "Display the current use of your available disk space" : "Prikaz trenutno razpoložljivega prostora", 11 | "Fortune Quotes" : "Misli sreče", 12 | "Get a random fortune quote" : "Naključna misel za iskanje sreče", 13 | "Dashboard app for Nextcloud" : "Program Nadzorne plošče na Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Program Nadzorna plošča ali Dashboard omogoča uporabnikom nadzor dogajanja v oblaku prek posebnih gradnikov.\n\t\tGradniki so uvoženi iz drugih programov in jih ne mogoče poljubno dodajati, odstraniti, premakniti in prilagoditi po velikosti." 15 | }, 16 | "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);"); 17 | -------------------------------------------------------------------------------- /l10n/sl.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Dodaj gradnik", 3 | "Remove this widget" : "Odstrani gradnik", 4 | "Dashboard" : "Nadzorna plošča", 5 | "Clock" : "Ura", 6 | "The time is now." : "Ura teče, nič ne reče.", 7 | "Disk space" : "Prostor v oblaku", 8 | "Display the current use of your available disk space" : "Prikaz trenutno razpoložljivega prostora", 9 | "Fortune Quotes" : "Misli sreče", 10 | "Get a random fortune quote" : "Naključna misel za iskanje sreče", 11 | "Dashboard app for Nextcloud" : "Program Nadzorne plošče na Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Program Nadzorna plošča ali Dashboard omogoča uporabnikom nadzor dogajanja v oblaku prek posebnih gradnikov.\n\t\tGradniki so uvoženi iz drugih programov in jih ne mogoče poljubno dodajati, odstraniti, premakniti in prilagoditi po velikosti." 13 | },"pluralForm" :"nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" 14 | } -------------------------------------------------------------------------------- /l10n/sq.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Dashboard" : "Tabelë", 5 | "Clock" : "Ora", 6 | "The time is now." : "Koha është tani.", 7 | "Disk space" : "Hapësira e diskut" 8 | }, 9 | "nplurals=2; plural=(n != 1);"); 10 | -------------------------------------------------------------------------------- /l10n/sq.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Dashboard" : "Tabelë", 3 | "Clock" : "Ora", 4 | "The time is now." : "Koha është tani.", 5 | "Disk space" : "Hapësira e diskut" 6 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 7 | } -------------------------------------------------------------------------------- /l10n/sr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Додај справицу", 5 | "Remove this widget" : "Уклони справицу", 6 | "Dashboard" : "Контролна табла", 7 | "Clock" : "Сат", 8 | "The time is now." : "Време је сад.", 9 | "Disk space" : "Простор на диску", 10 | "Display the current use of your available disk space" : "Приказује тренутну искоришћеност слободног места на диску", 11 | "Fortune Quotes" : "Цитати из Fortunes програма", 12 | "Get a random fortune quote" : "Насумично узима цитат из fortunes програма", 13 | "Dashboard app for Nextcloud" : "Апликација Контролне табле за Некстклауд", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Апликација контролне табле омогућава корисницима да надгледају своје податке кроз поделементе зване Справице.\n\t\tСправице се увозе из других апликација и могу се додавати, уклоњати, померати и мењати им се величина." 15 | }, 16 | "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); 17 | -------------------------------------------------------------------------------- /l10n/sr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Додај справицу", 3 | "Remove this widget" : "Уклони справицу", 4 | "Dashboard" : "Контролна табла", 5 | "Clock" : "Сат", 6 | "The time is now." : "Време је сад.", 7 | "Disk space" : "Простор на диску", 8 | "Display the current use of your available disk space" : "Приказује тренутну искоришћеност слободног места на диску", 9 | "Fortune Quotes" : "Цитати из Fortunes програма", 10 | "Get a random fortune quote" : "Насумично узима цитат из fortunes програма", 11 | "Dashboard app for Nextcloud" : "Апликација Контролне табле за Некстклауд", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Апликација контролне табле омогућава корисницима да надгледају своје податке кроз поделементе зване Справице.\n\t\tСправице се увозе из других апликација и могу се додавати, уклоњати, померати и мењати им се величина." 13 | },"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);" 14 | } -------------------------------------------------------------------------------- /l10n/sv.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Lägg till en widget", 5 | "Remove this widget" : "Ta bort denna widget", 6 | "Dashboard" : "Dashboard", 7 | "Clock" : "Klocka", 8 | "The time is now." : "Tiden är nu.", 9 | "Disk space" : "Diskutrymme", 10 | "Display the current use of your available disk space" : "Visa aktuell användning av ditt tillgängliga diskutrymme", 11 | "Fortune Quotes" : "Kända citat", 12 | "Get a random fortune quote" : "Få ett slumpmässigt känt citat", 13 | "Dashboard app for Nextcloud" : "Dashboard app för Nextcloud", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Dashboard-appen tillåter användare att övervaka sina delkomponenter som kallas Widgets.\n\t\tWidgets importeras från andra appar och kan läggas till, tas bort, flyttas och ändras i storlek" 15 | }, 16 | "nplurals=2; plural=(n != 1);"); 17 | -------------------------------------------------------------------------------- /l10n/sv.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Lägg till en widget", 3 | "Remove this widget" : "Ta bort denna widget", 4 | "Dashboard" : "Dashboard", 5 | "Clock" : "Klocka", 6 | "The time is now." : "Tiden är nu.", 7 | "Disk space" : "Diskutrymme", 8 | "Display the current use of your available disk space" : "Visa aktuell användning av ditt tillgängliga diskutrymme", 9 | "Fortune Quotes" : "Kända citat", 10 | "Get a random fortune quote" : "Få ett slumpmässigt känt citat", 11 | "Dashboard app for Nextcloud" : "Dashboard app för Nextcloud", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Dashboard-appen tillåter användare att övervaka sina delkomponenter som kallas Widgets.\n\t\tWidgets importeras från andra appar och kan läggas till, tas bort, flyttas och ändras i storlek" 13 | },"pluralForm" :"nplurals=2; plural=(n != 1);" 14 | } -------------------------------------------------------------------------------- /l10n/tr.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Bir pano bileşeni ekle", 5 | "Remove this widget" : "Bu pano bileşenini kaldır", 6 | "Dashboard" : "Pano", 7 | "Clock" : "Saat", 8 | "The time is now." : "Güncel zamanı görüntüler.", 9 | "Disk space" : "Disk alanı", 10 | "Display the current use of your available disk space" : "Disk alanının kullanım durumunu görüntüler.", 11 | "Fortune Quotes" : "Gelecek Haberleri", 12 | "Get a random fortune quote" : "Rastgele bir gelecek haberi al", 13 | "Dashboard app for Nextcloud" : "Nextcloud Pano uygulaması", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Pano uygulaması, pano bileşeni olarak adlandırılan alt bileşenleri kullanarak kullanıcıların kendi verilerini izlemesini sağlar.\n\t\tPano bileşenleri diğer uygulamalardan içe aktarılır ve eklenebilir, silinebilir, taşınabilir ve yeniden boyutlandırılabilir" 15 | }, 16 | "nplurals=2; plural=(n > 1);"); 17 | -------------------------------------------------------------------------------- /l10n/tr.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Bir pano bileşeni ekle", 3 | "Remove this widget" : "Bu pano bileşenini kaldır", 4 | "Dashboard" : "Pano", 5 | "Clock" : "Saat", 6 | "The time is now." : "Güncel zamanı görüntüler.", 7 | "Disk space" : "Disk alanı", 8 | "Display the current use of your available disk space" : "Disk alanının kullanım durumunu görüntüler.", 9 | "Fortune Quotes" : "Gelecek Haberleri", 10 | "Get a random fortune quote" : "Rastgele bir gelecek haberi al", 11 | "Dashboard app for Nextcloud" : "Nextcloud Pano uygulaması", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "Pano uygulaması, pano bileşeni olarak adlandırılan alt bileşenleri kullanarak kullanıcıların kendi verilerini izlemesini sağlar.\n\t\tPano bileşenleri diğer uygulamalardan içe aktarılır ve eklenebilir, silinebilir, taşınabilir ve yeniden boyutlandırılabilir" 13 | },"pluralForm" :"nplurals=2; plural=(n > 1);" 14 | } -------------------------------------------------------------------------------- /l10n/uk.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Додати віджет", 5 | "Remove this widget" : "Вилучити віджет", 6 | "Dashboard" : "Майстерня", 7 | "Clock" : "Годинник", 8 | "The time is now." : "Поточний час", 9 | "Disk space" : "Розмір диску" 10 | }, 11 | "nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);"); 12 | -------------------------------------------------------------------------------- /l10n/uk.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Додати віджет", 3 | "Remove this widget" : "Вилучити віджет", 4 | "Dashboard" : "Майстерня", 5 | "Clock" : "Годинник", 6 | "The time is now." : "Поточний час", 7 | "Disk space" : "Розмір диску" 8 | },"pluralForm" :"nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != 11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || (n % 100 >=11 && n % 100 <=14 )) ? 2: 3);" 9 | } -------------------------------------------------------------------------------- /l10n/vi.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "Thêm tiện ích", 5 | "Remove this widget" : "Xóa tiện ích", 6 | "Dashboard" : "Bảng thông tin", 7 | "Clock" : "Đồng hồ", 8 | "The time is now." : "Thời gian hiện tại", 9 | "Disk space" : "Dung lượng trống", 10 | "Display the current use of your available disk space" : "Hiển thị dung lượng đã dùng trên ổ chứa", 11 | "Dashboard app for Nextcloud" : "Bảng thông tin ứng dụng của Cloud" 12 | }, 13 | "nplurals=1; plural=0;"); 14 | -------------------------------------------------------------------------------- /l10n/vi.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "Thêm tiện ích", 3 | "Remove this widget" : "Xóa tiện ích", 4 | "Dashboard" : "Bảng thông tin", 5 | "Clock" : "Đồng hồ", 6 | "The time is now." : "Thời gian hiện tại", 7 | "Disk space" : "Dung lượng trống", 8 | "Display the current use of your available disk space" : "Hiển thị dung lượng đã dùng trên ổ chứa", 9 | "Dashboard app for Nextcloud" : "Bảng thông tin ứng dụng của Cloud" 10 | },"pluralForm" :"nplurals=1; plural=0;" 11 | } -------------------------------------------------------------------------------- /l10n/zh_CN.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "添加小部件", 5 | "Remove this widget" : "移除此小部件", 6 | "Dashboard" : "控制台", 7 | "Clock" : "时钟", 8 | "The time is now." : "现在", 9 | "Disk space" : "磁盘空间", 10 | "Display the current use of your available disk space" : "显示当前可用磁盘空间", 11 | "Fortune Quotes" : "财富箴言", 12 | "Get a random fortune quote" : "获取一条随机的财富箴言", 13 | "Dashboard app for Nextcloud" : "用于 Nextcloud 的控制台应用", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "\t控制台应用允许用户监控子元素的数\n\t\t窗口小部件从其他应用程序导入,可以添加,删除,移动和调整大小" 15 | }, 16 | "nplurals=1; plural=0;"); 17 | -------------------------------------------------------------------------------- /l10n/zh_CN.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "添加小部件", 3 | "Remove this widget" : "移除此小部件", 4 | "Dashboard" : "控制台", 5 | "Clock" : "时钟", 6 | "The time is now." : "现在", 7 | "Disk space" : "磁盘空间", 8 | "Display the current use of your available disk space" : "显示当前可用磁盘空间", 9 | "Fortune Quotes" : "财富箴言", 10 | "Get a random fortune quote" : "获取一条随机的财富箴言", 11 | "Dashboard app for Nextcloud" : "用于 Nextcloud 的控制台应用", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "\t控制台应用允许用户监控子元素的数\n\t\t窗口小部件从其他应用程序导入,可以添加,删除,移动和调整大小" 13 | },"pluralForm" :"nplurals=1; plural=0;" 14 | } -------------------------------------------------------------------------------- /l10n/zh_TW.js: -------------------------------------------------------------------------------- 1 | OC.L10N.register( 2 | "dashboard", 3 | { 4 | "Add a widget" : "新增小工具", 5 | "Remove this widget" : "移除小工具", 6 | "Dashboard" : "儀表板", 7 | "Clock" : "時鐘", 8 | "The time is now." : "現在時間", 9 | "Disk space" : "磁碟空間", 10 | "Display the current use of your available disk space" : "顯示目前磁碟空間用量", 11 | "Fortune Quotes" : "吉祥話", 12 | "Get a random fortune quote" : "取得隨機吉祥話", 13 | "Dashboard app for Nextcloud" : "Nextcloud 儀表板應用程式", 14 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "儀表板可以讓使用者可以透過「小工具」的子元素來監控他們的資料。\n小工具由其他應用程式提供,可以隨意加入、移除、移動、調整大小" 15 | }, 16 | "nplurals=1; plural=0;"); 17 | -------------------------------------------------------------------------------- /l10n/zh_TW.json: -------------------------------------------------------------------------------- 1 | { "translations": { 2 | "Add a widget" : "新增小工具", 3 | "Remove this widget" : "移除小工具", 4 | "Dashboard" : "儀表板", 5 | "Clock" : "時鐘", 6 | "The time is now." : "現在時間", 7 | "Disk space" : "磁碟空間", 8 | "Display the current use of your available disk space" : "顯示目前磁碟空間用量", 9 | "Fortune Quotes" : "吉祥話", 10 | "Get a random fortune quote" : "取得隨機吉祥話", 11 | "Dashboard app for Nextcloud" : "Nextcloud 儀表板應用程式", 12 | "The Dashboard app allows users to monitor their data through sub-elements called Widgets.\n\t\tWidgets are imported from other apps and can be added, removed, moved and resized" : "儀表板可以讓使用者可以透過「小工具」的子元素來監控他們的資料。\n小工具由其他應用程式提供,可以隨意加入、移除、移動、調整大小" 13 | },"pluralForm" :"nplurals=1; plural=0;" 14 | } -------------------------------------------------------------------------------- /lib/AppInfo/Application.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\AppInfo; 30 | 31 | use OCA\Dashboard\Service\EventsService; 32 | use OCA\Dashboard\Service\WidgetsService; 33 | use OCP\AppFramework\App; 34 | use OCP\AppFramework\IAppContainer; 35 | use OCP\AppFramework\QueryException; 36 | use OCP\Dashboard\IDashboardManager; 37 | use OCP\Dashboard\Service\IEventsService; 38 | use OCP\Dashboard\Service\IWidgetsService; 39 | 40 | class Application extends App { 41 | 42 | const APP_NAME = 'dashboard'; 43 | 44 | /** @var IAppContainer */ 45 | private $container; 46 | 47 | 48 | public function __construct(array $urlParams = array()) { 49 | parent::__construct(self::APP_NAME, $urlParams); 50 | $this->container = $this->getContainer(); 51 | } 52 | 53 | 54 | /** 55 | * Register Navigation Tab 56 | * 57 | * @throws QueryException 58 | */ 59 | public function registerServices() { 60 | /** @var IDashboardManager $dashboardManager */ 61 | $dashboardManager = $this->container->query(IDashboardManager::class); 62 | 63 | /** @var IWidgetsService $widgetsService */ 64 | $widgetsService = $this->container->query(WidgetsService::class); 65 | /** @var IEventsService $eventsService */ 66 | $eventsService = $this->container->query(EventsService::class); 67 | 68 | $dashboardManager->registerWidgetsService($widgetsService); 69 | $dashboardManager->registerEventsService($eventsService); 70 | } 71 | 72 | 73 | /** 74 | * Register Navigation Tab 75 | */ 76 | public function registerNavigation() { 77 | $this->container->getServer() 78 | ->getNavigationManager() 79 | ->add($this->dashboardNavigation()); 80 | } 81 | 82 | 83 | /** 84 | * @return array 85 | */ 86 | private function dashboardNavigation(): array { 87 | $urlGen = \OC::$server->getURLGenerator(); 88 | $navName = \OC::$server->getL10N(self::APP_NAME) 89 | ->t('Dashboard'); 90 | 91 | return [ 92 | 'id' => self::APP_NAME, 93 | 'order' => -1, 94 | 'href' => $urlGen->linkToRoute('dashboard.Navigation.navigate'), 95 | 'icon' => $urlGen->imagePath(self::APP_NAME, 'dashboard.svg'), 96 | 'name' => $navName 97 | ]; 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /lib/Command/Push.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Command; 30 | 31 | use Exception; 32 | use OC\Core\Command\Base; 33 | use OCA\Dashboard\Service\MiscService; 34 | use OCP\Dashboard\IDashboardManager; 35 | use Symfony\Component\Console\Input\InputArgument; 36 | use Symfony\Component\Console\Input\InputInterface; 37 | use Symfony\Component\Console\Output\OutputInterface; 38 | 39 | 40 | class Push extends Base { 41 | 42 | /** @var IDashboardManager */ 43 | private $dashboardManager; 44 | 45 | /** @var MiscService */ 46 | private $miscService; 47 | 48 | 49 | /** 50 | * Index constructor. 51 | * 52 | * @param IDashboardManager $dashboardManager 53 | * @param MiscService $miscService 54 | */ 55 | public function __construct(IDashboardManager $dashboardManager, MiscService $miscService) { 56 | parent::__construct(); 57 | 58 | $this->dashboardManager = $dashboardManager; 59 | $this->miscService = $miscService; 60 | } 61 | 62 | 63 | /** 64 | * 65 | */ 66 | protected function configure() { 67 | parent::configure(); 68 | $this->setName('dashboard:push') 69 | ->setDescription('Push an event manually') 70 | ->addArgument('widget', InputArgument::REQUIRED, 'widgetId') 71 | ->addArgument('user', InputArgument::REQUIRED, 'userId') 72 | ->addArgument('json', InputArgument::REQUIRED, 'payload'); 73 | } 74 | 75 | 76 | /** 77 | * @param InputInterface $input 78 | * @param OutputInterface $output 79 | * 80 | * @throws Exception 81 | */ 82 | protected function execute(InputInterface $input, OutputInterface $output) { 83 | 84 | $widget = $input->getArgument('widget'); 85 | $user = $input->getArgument('user'); 86 | $payload = json_decode($input->getArgument('json'), true); 87 | 88 | if (!is_array($payload)) { 89 | throw new Exception('payload must be a valid JSON'); 90 | } 91 | 92 | // $config = $this->dashboardManager->getWidgetConfig('fortunes', 'cult'); 93 | // 94 | // echo json_encode($config); 95 | if ($user === 'global') { 96 | $this->dashboardManager->createGlobalEvent($widget, $payload); 97 | } else { 98 | $this->dashboardManager->createUsersEvent($widget, [$user], $payload); 99 | } 100 | $output->writeln('event created'); 101 | } 102 | 103 | 104 | } 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /lib/Db/CoreRequestBuilder.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | 30 | namespace OCA\Dashboard\Db; 31 | 32 | 33 | use Doctrine\DBAL\Query\QueryBuilder; 34 | use OCA\Dashboard\Service\ConfigService; 35 | use OCA\Dashboard\Service\MiscService; 36 | use OCP\DB\QueryBuilder\IQueryBuilder; 37 | use OCP\IDBConnection; 38 | 39 | class CoreRequestBuilder { 40 | 41 | const TABLE_SETTINGS = 'dashboard_settings'; 42 | const TABLE_EVENTS = 'dashboard_events'; 43 | 44 | /** @var IDBConnection */ 45 | protected $dbConnection; 46 | 47 | /** @var ConfigService */ 48 | protected $configService; 49 | 50 | /** @var MiscService */ 51 | protected $miscService; 52 | 53 | /** @var string */ 54 | protected $defaultSelectAlias; 55 | 56 | 57 | /** 58 | * CoreRequestBuilder constructor. 59 | * 60 | * @param IDBConnection $connection 61 | * @param ConfigService $configService 62 | * @param MiscService $miscService 63 | */ 64 | public function __construct( 65 | IDBConnection $connection, ConfigService $configService, MiscService $miscService 66 | ) { 67 | $this->dbConnection = $connection; 68 | $this->configService = $configService; 69 | $this->miscService = $miscService; 70 | } 71 | 72 | 73 | /** 74 | * Limit the request to the Id 75 | * 76 | * @param IQueryBuilder $qb 77 | * @param int $id 78 | */ 79 | protected function limitToId(IQueryBuilder &$qb, $id) { 80 | $this->limitToDBField($qb, 'id', $id); 81 | } 82 | 83 | 84 | /** 85 | * Limit the request to the WidgetId 86 | * 87 | * @param IQueryBuilder $qb 88 | * @param string $widgetId 89 | */ 90 | protected function limitToWidgetId(IQueryBuilder &$qb, $widgetId) { 91 | $this->limitToDBField($qb, 'widget_id', $widgetId); 92 | } 93 | 94 | 95 | /** 96 | * Limit to the UserId 97 | * 98 | * @param IQueryBuilder $qb 99 | * @param string $userId 100 | */ 101 | protected function limitToUserId(IQueryBuilder &$qb, $userId) { 102 | $this->limitToDBField($qb, 'user_id', $userId); 103 | } 104 | 105 | 106 | /** 107 | * Limit to the broadcast 108 | * 109 | * @param IQueryBuilder $qb 110 | * @param string $broadcast 111 | */ 112 | protected function limitToBroadcast(IQueryBuilder &$qb, $broadcast) { 113 | $this->limitToDBField($qb, 'broadcast', $broadcast); 114 | } 115 | 116 | 117 | /** 118 | * Limit to the recipient 119 | * 120 | * @param IQueryBuilder $qb 121 | * @param string|array $recipient 122 | */ 123 | protected function limitToRecipient(IQueryBuilder &$qb, $recipient) { 124 | $this->limitToDBField($qb, 'recipient', $recipient); 125 | } 126 | 127 | 128 | /** 129 | * start from Id 130 | * 131 | * @param IQueryBuilder $qb 132 | * @param int $id 133 | */ 134 | protected function startFromId(IQueryBuilder &$qb, $id) { 135 | $expr = $qb->expr(); 136 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; 137 | $field = $pf . 'id'; 138 | 139 | $qb->andWhere($expr->gt($field, $qb->createNamedParameter($id))); 140 | } 141 | 142 | 143 | /** 144 | * @param IQueryBuilder $qb 145 | * @param string $field 146 | * @param string|array $values 147 | */ 148 | private function limitToDBField(IQueryBuilder &$qb, string $field, $values) { 149 | $expr = $qb->expr(); 150 | $pf = ($qb->getType() === QueryBuilder::SELECT) ? $this->defaultSelectAlias . '.' : ''; 151 | $field = $pf . $field; 152 | 153 | if (!is_array($values)) { 154 | $values = [$values]; 155 | } 156 | 157 | $orX = $expr->orX(); 158 | foreach ($values as $value) { 159 | $orX->add($expr->eq($field, $qb->createNamedParameter($value))); 160 | } 161 | 162 | $qb->andWhere($orX); 163 | } 164 | 165 | } 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /lib/Db/EventsRequest.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Db; 30 | 31 | 32 | use OCA\Dashboard\Model\WidgetEvent; 33 | 34 | class EventsRequest extends EventsRequestBuilder { 35 | 36 | 37 | /** 38 | * @param WidgetEvent $event 39 | * 40 | * @return int 41 | * @throws \Exception 42 | */ 43 | public function create(WidgetEvent $event): int { 44 | 45 | try { 46 | $qb = $this->getEventsInsertSql(); 47 | $qb->setValue('broadcast', $qb->createNamedParameter($event->getBroadcast())) 48 | ->setValue('recipient', $qb->createNamedParameter($event->getRecipient())) 49 | ->setValue('widget_id', $qb->createNamedParameter($event->getWidgetId())) 50 | ->setValue('unique_id', $qb->createNamedParameter($event->getUniqueId())) 51 | ->setValue('payload', $qb->createNamedParameter(json_encode($event->getPayload()))); 52 | 53 | $qb->execute(); 54 | 55 | return $qb->getLastInsertId(); 56 | } catch (\Exception $e) { 57 | throw $e; 58 | } 59 | } 60 | 61 | 62 | /** 63 | * @param string $userId 64 | */ 65 | public function reset(string $userId) { 66 | $qb = $this->getEventsDeleteSql(); 67 | $this->limitToUserId($qb, $userId); 68 | 69 | $qb->execute(); 70 | } 71 | 72 | 73 | /** 74 | * @param string $userId 75 | * @param int $lastEventId 76 | * 77 | * @return WidgetEvent[] 78 | */ 79 | public function getUserEvents(string $userId, int $lastEventId): array { 80 | $qb = $this->getEventsSelectSql(); 81 | $this->limitToBroadcast($qb, WidgetEvent::BROADCAST_USER); 82 | $this->limitToRecipient($qb, $userId); 83 | $this->startFromId($qb, $lastEventId); 84 | 85 | $events = []; 86 | $cursor = $qb->execute(); 87 | while ($data = $cursor->fetch()) { 88 | $events[] = $this->parseEventsSelectSql($data); 89 | } 90 | $cursor->closeCursor(); 91 | 92 | return $events; 93 | } 94 | 95 | 96 | /** 97 | * @param array $groups 98 | * @param int $lastEventId 99 | * 100 | * @return WidgetEvent [] 101 | */ 102 | public function getGroupEvents(array $groups, int $lastEventId): array { 103 | $qb = $this->getEventsSelectSql(); 104 | $this->limitToBroadcast($qb, WidgetEvent::BROADCAST_GROUP); 105 | $this->limitToRecipient($qb, $groups); 106 | $this->startFromId($qb, $lastEventId); 107 | 108 | $events = []; 109 | $cursor = $qb->execute(); 110 | while ($data = $cursor->fetch()) { 111 | $events[] = $this->parseEventsSelectSql($data); 112 | } 113 | $cursor->closeCursor(); 114 | 115 | return $events; 116 | } 117 | 118 | 119 | /** 120 | * @param int $lastEventId 121 | * 122 | * @return WidgetEvent [] 123 | */ 124 | public function getGlobalEvents(int $lastEventId): array { 125 | $qb = $this->getEventsSelectSql(); 126 | $this->limitToBroadcast($qb, WidgetEvent::BROADCAST_GLOBAL); 127 | $this->startFromId($qb, $lastEventId); 128 | 129 | $events = []; 130 | $cursor = $qb->execute(); 131 | while ($data = $cursor->fetch()) { 132 | $events[] = $this->parseEventsSelectSql($data); 133 | } 134 | $cursor->closeCursor(); 135 | 136 | return $events; 137 | } 138 | 139 | 140 | /** 141 | * return int 142 | */ 143 | public function getLastEventId(): int { 144 | $qb = $this->getEventsSelectSql(); 145 | $qb->orderBy('id', 'desc'); 146 | $qb->setMaxResults(1); 147 | 148 | $cursor = $qb->execute(); 149 | $data = $cursor->fetch(); 150 | 151 | if ($data === false) { 152 | return 0; 153 | } 154 | 155 | $lastInsertedId = intval($data['id']); 156 | $cursor->closeCursor(); 157 | 158 | return $lastInsertedId; 159 | } 160 | 161 | } 162 | -------------------------------------------------------------------------------- /lib/Db/EventsRequestBuilder.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Db; 30 | 31 | 32 | use OCA\Dashboard\Model\WidgetEvent; 33 | use OCP\DB\QueryBuilder\IQueryBuilder; 34 | 35 | class EventsRequestBuilder extends CoreRequestBuilder { 36 | 37 | 38 | /** 39 | * Base of the Sql Insert request 40 | * 41 | * @return IQueryBuilder 42 | */ 43 | protected function getEventsInsertSql(): IQueryBuilder { 44 | $qb = $this->dbConnection->getQueryBuilder(); 45 | $qb->insert(self::TABLE_EVENTS); 46 | $qb->setValue('creation', $qb->createNamedParameter(time())); 47 | 48 | return $qb; 49 | } 50 | 51 | 52 | /** 53 | * Base of the Sql Update request 54 | * 55 | * @return IQueryBuilder 56 | */ 57 | protected function getEventsUpdateSql(): IQueryBuilder { 58 | $qb = $this->dbConnection->getQueryBuilder(); 59 | $qb->update(self::TABLE_EVENTS); 60 | 61 | return $qb; 62 | } 63 | 64 | 65 | /** 66 | * Base of the Sql Select request for Shares 67 | * 68 | * @return IQueryBuilder 69 | */ 70 | protected function getEventsSelectSql(): IQueryBuilder { 71 | $qb = $this->dbConnection->getQueryBuilder(); 72 | 73 | /** @noinspection PhpMethodParametersCountMismatchInspection */ 74 | $qb->select( 75 | 'e.id', 'e.widget_id', 'e.broadcast', 'e.recipient', 'e.payload', 'e.unique_id', 76 | 'e.creation' 77 | ) 78 | ->from(self::TABLE_EVENTS, 'e'); 79 | 80 | $this->defaultSelectAlias = 'e'; 81 | 82 | return $qb; 83 | } 84 | 85 | 86 | /** 87 | * Base of the Sql Delete request 88 | * 89 | * @return IQueryBuilder 90 | */ 91 | protected function getEventsDeleteSql(): IQueryBuilder { 92 | $qb = $this->dbConnection->getQueryBuilder(); 93 | $qb->delete(self::TABLE_EVENTS); 94 | 95 | return $qb; 96 | } 97 | 98 | 99 | /** 100 | * @param array $data 101 | * 102 | * @return WidgetEvent 103 | */ 104 | protected function parseEventsSelectSql($data): WidgetEvent { 105 | $event = new WidgetEvent($data['widget_id']); 106 | $event->setId(intval($data['id'])) 107 | ->setRecipient($data['broadcast'], $data['recipient']) 108 | ->setPayload(json_decode($data['payload'], true)) 109 | ->setUniqueId($data['unique_id']) 110 | ->setCreation(intval($data['creation'])); 111 | 112 | return $event; 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /lib/Db/SettingsRequest.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Db; 30 | 31 | 32 | use OCA\Dashboard\Model\WidgetConfig; 33 | use OCP\Dashboard\Model\IWidgetConfig; 34 | 35 | class SettingsRequest extends SettingsRequestBuilder { 36 | 37 | 38 | /** 39 | * @param IWidgetConfig $settings 40 | */ 41 | public function create(IWidgetConfig $settings) { 42 | $qb = $this->getSettingsInsertSql(); 43 | $qb->setValue('user_id', $qb->createNamedParameter($settings->getUserId())) 44 | ->setValue('widget_id', $qb->createNamedParameter($settings->getWidgetId())) 45 | ->setValue('position', $qb->createNamedParameter(json_encode($settings->getPosition()))) 46 | ->setValue('settings', $qb->createNamedParameter(json_encode($settings->getSettings()))) 47 | ->setValue('enabled', $qb->createNamedParameter($settings->isEnabled())); 48 | 49 | $qb->execute(); 50 | } 51 | 52 | 53 | /** 54 | * @param $widgetId 55 | * @param $userId 56 | * 57 | * @return WidgetConfig 58 | */ 59 | public function get(string $widgetId, string $userId) { 60 | 61 | $qb = $this->getSettingsSelectSql(); 62 | $this->limitToWidgetId($qb, $widgetId); 63 | $this->limitToUserId($qb, $userId); 64 | 65 | $cursor = $qb->execute(); 66 | $data = $cursor->fetch(); 67 | if ($data === false) { 68 | return new WidgetConfig($widgetId, $userId); 69 | } 70 | 71 | $cursor->closeCursor(); 72 | 73 | return $this->parseSettingsSelectSql($data); 74 | } 75 | 76 | 77 | /** 78 | * @param IWidgetConfig $settings 79 | */ 80 | public function savePosition(IWidgetConfig $settings) { 81 | $qb = $this->getSettingsUpdateSql(); 82 | $qb->set('position', $qb->createNamedParameter(json_encode($settings->getPosition()))) 83 | ->set('enabled', $qb->createNamedParameter($settings->isEnabled())); 84 | 85 | $this->limitToWidgetId($qb, $settings->getWidgetId()); 86 | $this->limitToUserId($qb, $settings->getUserId()); 87 | 88 | $cursor = $qb->execute(); 89 | if ($cursor === 0) { 90 | $this->create($settings); 91 | } 92 | } 93 | 94 | 95 | /** 96 | * @param string $widgetId 97 | * @param string $userId 98 | */ 99 | public function disableWidget(string $widgetId, string $userId) { 100 | $qb = $this->getSettingsUpdateSql(); 101 | $qb->set('enabled', $qb->createNamedParameter(false)); 102 | 103 | $this->limitToWidgetId($qb, $widgetId); 104 | $this->limitToUserId($qb, $userId); 105 | 106 | $qb->execute(); 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /lib/Db/SettingsRequestBuilder.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | 30 | namespace OCA\Dashboard\Db; 31 | 32 | 33 | use OCA\Dashboard\Model\WidgetConfig; 34 | use OCP\DB\QueryBuilder\IQueryBuilder; 35 | 36 | class SettingsRequestBuilder extends CoreRequestBuilder { 37 | 38 | 39 | /** 40 | * Base of the Sql Insert request 41 | * 42 | * @return IQueryBuilder 43 | */ 44 | protected function getSettingsInsertSql(): IQueryBuilder { 45 | $qb = $this->dbConnection->getQueryBuilder(); 46 | $qb->insert(self::TABLE_SETTINGS); 47 | 48 | return $qb; 49 | } 50 | 51 | 52 | /** 53 | * Base of the Sql Update request 54 | * 55 | * @return IQueryBuilder 56 | */ 57 | protected function getSettingsUpdateSql(): IQueryBuilder { 58 | $qb = $this->dbConnection->getQueryBuilder(); 59 | $qb->update(self::TABLE_SETTINGS); 60 | 61 | return $qb; 62 | } 63 | 64 | 65 | /** 66 | * Base of the Sql Select request for Shares 67 | * 68 | * @return IQueryBuilder 69 | */ 70 | protected function getSettingsSelectSql(): IQueryBuilder { 71 | $qb = $this->dbConnection->getQueryBuilder(); 72 | 73 | /** @noinspection PhpMethodParametersCountMismatchInspection */ 74 | $qb->select('s.widget_id', 's.user_id', 's.position', 's.settings', 's.enabled') 75 | ->from(self::TABLE_SETTINGS, 's'); 76 | 77 | $this->defaultSelectAlias = 's'; 78 | 79 | return $qb; 80 | } 81 | 82 | 83 | /** 84 | * Base of the Sql Delete request 85 | * 86 | * @return IQueryBuilder 87 | */ 88 | protected function getSettingsDeleteSql(): IQueryBuilder { 89 | $qb = $this->dbConnection->getQueryBuilder(); 90 | $qb->delete(self::TABLE_SETTINGS); 91 | 92 | return $qb; 93 | } 94 | 95 | 96 | /** 97 | * @param array $data 98 | * 99 | * @return WidgetConfig 100 | */ 101 | protected function parseSettingsSelectSql($data): WidgetConfig { 102 | $settings = new WidgetConfig($data['widget_id'], $data['user_id']); 103 | $settings->setPosition(json_decode($data['position'], true)) 104 | ->setSettings(json_decode($data['settings'], true)) 105 | ->setEnabled(($data['enabled'] === '1') ? true : false); 106 | 107 | return $settings; 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /lib/Exceptions/UserCannotBeEmptyException.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | 30 | namespace OCA\Dashboard\Exceptions; 31 | 32 | class UserCannotBeEmptyException extends \Exception { 33 | 34 | } 35 | 36 | -------------------------------------------------------------------------------- /lib/Exceptions/WidgetDoesNotExistException.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Exceptions; 30 | 31 | class WidgetDoesNotExistException extends \Exception { 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /lib/Exceptions/WidgetIsNotCompatibleException.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Exceptions; 30 | 31 | class WidgetIsNotCompatibleException extends \Exception { 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /lib/Exceptions/WidgetIsNotUniqueException.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Exceptions; 30 | 31 | class WidgetIsNotUniqueException extends \Exception { 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /lib/Model/WidgetConfig.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright 2018, Maxence Lange 13 | * @license GNU AGPL version 3 or any later version 14 | * 15 | * This program is free software: you can redistribute it and/or modify 16 | * it under the terms of the GNU Affero General Public License as 17 | * published by the Free Software Foundation, either version 3 of the 18 | * License, or (at your option) any later version. 19 | * 20 | * This program is distributed in the hope that it will be useful, 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | * GNU Affero General Public License for more details. 24 | * 25 | * You should have received a copy of the GNU Affero General Public License 26 | * along with this program. If not, see . 27 | * 28 | */ 29 | 30 | namespace OCA\Dashboard\Model; 31 | 32 | 33 | use OCA\Dashboard\Service\MiscService; 34 | use OCP\Dashboard\Model\IWidgetConfig; 35 | 36 | class WidgetConfig implements IWidgetConfig, \JsonSerializable { 37 | 38 | 39 | /** @var string */ 40 | private $userId; 41 | 42 | /** @var string */ 43 | private $widgetId; 44 | 45 | /** @var array */ 46 | private $position = []; 47 | 48 | /** @var array */ 49 | private $settings = []; 50 | 51 | /** @var bool */ 52 | private $enabled = false; 53 | 54 | 55 | /** 56 | * WidgetConfig constructor. 57 | * 58 | * @param string $widgetId 59 | * @param string $userId 60 | */ 61 | public function __construct(string $widgetId, string $userId) { 62 | $this->widgetId = $widgetId; 63 | $this->userId = $userId; 64 | } 65 | 66 | 67 | /** 68 | * @return string 69 | */ 70 | public function getUserId(): string { 71 | return $this->userId; 72 | } 73 | 74 | /** 75 | * @param string $userId 76 | * 77 | * @return $this 78 | */ 79 | public function setUserId(string $userId): IWidgetConfig { 80 | $this->userId = $userId; 81 | 82 | return $this; 83 | } 84 | 85 | 86 | /** 87 | * @return string 88 | */ 89 | public function getWidgetId(): string { 90 | return $this->widgetId; 91 | } 92 | 93 | /** 94 | * @param string $widgetId 95 | * 96 | * @return $this 97 | */ 98 | public function setWidgetId(string $widgetId): IWidgetConfig { 99 | $this->widgetId = $widgetId; 100 | 101 | return $this; 102 | } 103 | 104 | 105 | /** 106 | * @return array 107 | */ 108 | public function getPosition(): array { 109 | return $this->position; 110 | } 111 | 112 | /** 113 | * @param array $position 114 | * 115 | * @return $this 116 | */ 117 | public function setPosition(array $position): IWidgetConfig { 118 | $this->position = $position; 119 | 120 | return $this; 121 | } 122 | 123 | 124 | /** 125 | * @return array 126 | */ 127 | public function getSettings(): array { 128 | return $this->settings; 129 | } 130 | 131 | /** 132 | * @param array $settings 133 | * 134 | * @return $this 135 | */ 136 | public function setSettings(array $settings): IWidgetConfig { 137 | $this->settings = $settings; 138 | 139 | return $this; 140 | } 141 | 142 | 143 | /** 144 | * @param array $default 145 | */ 146 | public function setDefaultSettings(array $default) { 147 | $curr = $this->getSettings(); 148 | foreach ($default as $item) { 149 | if (!array_key_exists($item['name'], $curr)) { 150 | $curr[$item['name']] = MiscService::get($item, 'default', ''); 151 | } 152 | } 153 | 154 | $this->setSettings($curr); 155 | } 156 | 157 | 158 | /** 159 | * @return bool 160 | */ 161 | public function isEnabled(): bool { 162 | return $this->enabled; 163 | } 164 | 165 | /** 166 | * @param bool $enabled 167 | * 168 | * @return $this 169 | */ 170 | public function setEnabled(bool $enabled): IWidgetConfig { 171 | $this->enabled = $enabled; 172 | 173 | return $this; 174 | } 175 | 176 | 177 | /** 178 | * @return array 179 | */ 180 | public function jsonSerialize(): array { 181 | return [ 182 | 'widgetId' => $this->getWidgetId(), 183 | 'userId' => $this->getUserId(), 184 | 'position' => $this->getPosition(), 185 | 'settings' => $this->getSettings(), 186 | 'enabled' => $this->isEnabled() 187 | ]; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/Model/WidgetFrame.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Model; 30 | 31 | 32 | use OCP\Dashboard\Model\WidgetSetup; 33 | use OCP\Dashboard\Model\WidgetTemplate; 34 | use OCP\AppFramework\Http\TemplateResponse; 35 | use OCP\Dashboard\IDashboardWidget; 36 | use OCP\Dashboard\Model\IWidgetConfig; 37 | 38 | class WidgetFrame implements \JsonSerializable { 39 | 40 | /** @var string */ 41 | private $appId; 42 | 43 | /** @var IDashboardWidget */ 44 | private $widget; 45 | 46 | /** @var WidgetSetup */ 47 | private $setup; 48 | 49 | /** @var WidgetTemplate */ 50 | private $template; 51 | 52 | /** @var WidgetConfig */ 53 | private $config; 54 | 55 | 56 | /** 57 | * WidgetFrame constructor. 58 | * 59 | * @param string $appId 60 | * @param IDashboardWidget $widget 61 | */ 62 | public function __construct(string $appId, IDashboardWidget $widget) { 63 | $this->appId = $appId; 64 | $this->widget = $widget; 65 | } 66 | 67 | 68 | /** 69 | * @return string 70 | */ 71 | public function getAppId(): string { 72 | return $this->appId; 73 | } 74 | 75 | /** 76 | * @param string $appId 77 | * 78 | * @return WidgetFrame 79 | */ 80 | public function setAppId(string $appId): WidgetFrame { 81 | $this->appId = $appId; 82 | 83 | return $this; 84 | } 85 | 86 | 87 | /** 88 | * @return IDashboardWidget 89 | */ 90 | public function getWidget(): IDashboardWidget { 91 | return $this->widget; 92 | } 93 | 94 | /** 95 | * @param IDashboardWidget $widget 96 | * 97 | * @return $this 98 | */ 99 | public function setWidget(IDashboardWidget $widget): WidgetFrame { 100 | $this->widget = $widget; 101 | 102 | return $this; 103 | } 104 | 105 | 106 | /** 107 | * @return WidgetSetup 108 | */ 109 | public function getSetup(): WidgetSetup { 110 | return $this->setup; 111 | } 112 | 113 | /** 114 | * @param WidgetSetup $setup 115 | * 116 | * @return WidgetFrame 117 | */ 118 | public function setSetup(WidgetSetup $setup): WidgetFrame { 119 | $this->setup = $setup; 120 | 121 | return $this; 122 | } 123 | 124 | 125 | /** 126 | * @return WidgetTemplate 127 | */ 128 | public function getTemplate(): WidgetTemplate { 129 | return $this->template; 130 | } 131 | 132 | /** 133 | * @param WidgetTemplate $template 134 | * 135 | * @return WidgetFrame 136 | */ 137 | public function setTemplate(WidgetTemplate $template): WidgetFrame { 138 | $this->template = $template; 139 | 140 | return $this; 141 | } 142 | 143 | 144 | /** 145 | * @return IWidgetConfig 146 | */ 147 | public function getConfig(): IWidgetConfig { 148 | return $this->config; 149 | } 150 | 151 | /** 152 | * @param IWidgetConfig $config 153 | * 154 | * @return $this 155 | */ 156 | public function setConfig(IWidgetConfig $config): WidgetFrame { 157 | $this->config = $config; 158 | 159 | return $this; 160 | } 161 | 162 | 163 | /** 164 | * @return array 165 | */ 166 | public function jsonSerialize(): array { 167 | $widget = $this->getWidget(); 168 | 169 | $template = $this->getTemplate(); 170 | $html = new TemplateResponse($this->getAppId(), $template->getContent(), [], 'blank'); 171 | 172 | return [ 173 | 'widget' => [ 174 | 'id' => $widget->getId(), 175 | 'name' => $widget->getName(), 176 | 'description' => $widget->getDescription() 177 | ], 178 | 'template' => $template, 179 | 'setup' => $this->getSetup(), 180 | 'html' => $html->render(), 181 | 'config' => $this->getConfig() 182 | ]; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /lib/Service/MiscService.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Service; 30 | 31 | use OCA\Dashboard\AppInfo\Application; 32 | use OCP\ILogger; 33 | 34 | class MiscService { 35 | 36 | /** @var ILogger */ 37 | private $logger; 38 | 39 | public function __construct(ILogger $logger) { 40 | $this->logger = $logger; 41 | } 42 | 43 | 44 | /** 45 | * @param string $message 46 | * @param int $level 47 | */ 48 | public function log(string $message, $level = 2) { 49 | $data = [ 50 | 'app' => Application::APP_NAME, 51 | 'level' => $level 52 | ]; 53 | 54 | $this->logger->log($level, $message, $data); 55 | } 56 | 57 | 58 | /** 59 | * @param array $arr 60 | * @param string $k 61 | * 62 | * @param string|array|integer $default 63 | * 64 | * @return array|string|integer 65 | */ 66 | public static function get(array $arr, string $k, $default) { 67 | 68 | if (!key_exists($k, $arr)) { 69 | return $default; 70 | } 71 | 72 | return $arr[$k]; 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /lib/Service/Widgets/DiskSpace/DiskSpaceService.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | 28 | namespace OCA\Dashboard\Service\Widgets\DiskSpace; 29 | 30 | use OC_Helper; 31 | use OCA\Dashboard\Service\ConfigService; 32 | use OCA\Dashboard\Service\MiscService; 33 | use OCP\Files\NotFoundException; 34 | 35 | class DiskSpaceService { 36 | 37 | /** @var ConfigService */ 38 | private $configService; 39 | 40 | /** @var MiscService */ 41 | private $miscService; 42 | 43 | 44 | /** 45 | * ProviderService constructor. 46 | * 47 | * @param ConfigService $configService 48 | * @param MiscService $miscService 49 | * 50 | */ 51 | public function __construct(ConfigService $configService, MiscService $miscService) { 52 | $this->configService = $configService; 53 | $this->miscService = $miscService; 54 | } 55 | 56 | 57 | /** 58 | * @throws NotFoundException 59 | * 60 | * @return array 61 | */ 62 | public function getDiskSpace(): array { 63 | $storageInfo = OC_Helper::getStorageInfo('/'); 64 | 65 | $diskSpace = [ 66 | 'used' => $storageInfo['used'], 67 | 'total' => $storageInfo['total'] 68 | ]; 69 | 70 | return $diskSpace; 71 | } 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /lib/Service/Widgets/Fortunes/FortunesService.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | 28 | namespace OCA\Dashboard\Service\Widgets\Fortunes; 29 | 30 | use OCA\Dashboard\Service\ConfigService; 31 | use OCA\Dashboard\Service\MiscService; 32 | 33 | class FortunesService { 34 | 35 | const FORTUNES_FILE = __DIR__ . '/../../../../fortunes'; 36 | 37 | 38 | /** @var ConfigService */ 39 | private $configService; 40 | 41 | /** @var MiscService */ 42 | private $miscService; 43 | 44 | 45 | /** 46 | * ProviderService constructor. 47 | * 48 | * @param ConfigService $configService 49 | * @param MiscService $miscService 50 | * 51 | */ 52 | public function __construct(ConfigService $configService, MiscService $miscService) { 53 | $this->configService = $configService; 54 | $this->miscService = $miscService; 55 | } 56 | 57 | 58 | public function getRandomFortune() { 59 | $fortunes = $this->getFortunes(); 60 | 61 | return trim($fortunes[array_rand($fortunes)]); 62 | } 63 | 64 | 65 | /** 66 | * @return array 67 | */ 68 | public function getFortunes() { 69 | $content = file_get_contents(self::FORTUNES_FILE); 70 | $fortunes = explode('%', $content); 71 | 72 | return $fortunes; 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /lib/Widgets/ClockWidget.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright 2018, Maxence Lange 13 | * @license GNU AGPL version 3 or any later version 14 | * 15 | * This program is free software: you can redistribute it and/or modify 16 | * it under the terms of the GNU Affero General Public License as 17 | * published by the Free Software Foundation, either version 3 of the 18 | * License, or (at your option) any later version. 19 | * 20 | * This program is distributed in the hope that it will be useful, 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | * GNU Affero General Public License for more details. 24 | * 25 | * You should have received a copy of the GNU Affero General Public License 26 | * along with this program. If not, see . 27 | * 28 | */ 29 | 30 | namespace OCA\Dashboard\Widgets; 31 | 32 | 33 | use OCP\Dashboard\Model\WidgetSetup; 34 | use OCP\Dashboard\Model\WidgetTemplate; 35 | use OCP\Dashboard\IDashboardWidget; 36 | use OCP\Dashboard\Model\IWidgetRequest; 37 | use OCP\Dashboard\Model\IWidgetConfig; 38 | use OCP\IL10N; 39 | 40 | class ClockWidget implements IDashboardWidget { 41 | 42 | const WIDGET_ID = 'clock'; 43 | 44 | 45 | /** @var IL10N */ 46 | private $l10n; 47 | 48 | 49 | public function __construct(IL10N $l10n) { 50 | $this->l10n = $l10n; 51 | } 52 | 53 | 54 | /** 55 | * @return string 56 | */ 57 | public function getId(): string { 58 | return self::WIDGET_ID; 59 | } 60 | 61 | 62 | /** 63 | * @return string 64 | */ 65 | public function getName(): string { 66 | return $this->l10n->t('Clock'); 67 | } 68 | 69 | 70 | /** 71 | * @return string 72 | */ 73 | public function getDescription(): string { 74 | return $this->l10n->t('The time is now.'); 75 | } 76 | 77 | 78 | /** 79 | * @return WidgetTemplate 80 | */ 81 | public function getWidgetTemplate(): WidgetTemplate { 82 | $template = new WidgetTemplate(); 83 | $template->addCss('widgets/clock') 84 | ->addJs('widgets/clock') 85 | ->setIcon('icon-clock') 86 | ->setContent('widgets/clock') 87 | ->setInitFunction('OCA.DashBoard.clock.init'); 88 | 89 | return $template; 90 | } 91 | 92 | 93 | /** 94 | * @return WidgetSetup 95 | */ 96 | public function getWidgetSetup(): WidgetSetup { 97 | $setup = new WidgetSetup(); 98 | $setup->addSize(WidgetSetup::SIZE_TYPE_MIN, 2, 1) 99 | ->addSize(WidgetSetup::SIZE_TYPE_MAX, 2, 1) 100 | ->addSize(WidgetSetup::SIZE_TYPE_DEFAULT, 2, 1); 101 | 102 | $setup->addDelayedJob('OCA.DashBoard.clock.displayTime', 1); 103 | 104 | return $setup; 105 | } 106 | 107 | 108 | /** 109 | * @param IWidgetConfig $settings 110 | */ 111 | public function loadWidget(IWidgetConfig $settings) { 112 | } 113 | 114 | 115 | /** 116 | * @param IWidgetRequest $request 117 | */ 118 | public function requestWidget(IWidgetRequest $request) { 119 | } 120 | 121 | 122 | } 123 | -------------------------------------------------------------------------------- /lib/Widgets/DiskSpaceWidget.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Widgets; 30 | 31 | 32 | use OCP\Dashboard\Model\WidgetSetup; 33 | use OCP\Dashboard\Model\WidgetTemplate; 34 | use OCA\Dashboard\Service\Widgets\DiskSpace\DiskSpaceService; 35 | use OCP\Dashboard\IDashboardWidget; 36 | use OCP\Dashboard\Model\IWidgetRequest; 37 | use OCP\Dashboard\Model\IWidgetConfig; 38 | use OCP\Files\NotFoundException; 39 | use OCP\IL10N; 40 | 41 | class DiskSpaceWidget implements IDashboardWidget { 42 | 43 | const WIDGET_ID = 'diskspace'; 44 | 45 | 46 | /** @var IL10N */ 47 | private $l10n; 48 | 49 | 50 | /** @var DiskSpaceService */ 51 | private $diskSpaceService; 52 | 53 | 54 | public function __construct(IL10N $l10n, DiskSpaceService $diskSpaceService) { 55 | $this->l10n = $l10n; 56 | $this->diskSpaceService = $diskSpaceService; 57 | } 58 | 59 | 60 | /** 61 | * @return string 62 | */ 63 | public function getId(): string { 64 | return self::WIDGET_ID; 65 | } 66 | 67 | 68 | /** 69 | * @return string 70 | */ 71 | public function getName(): string { 72 | return $this->l10n->t('Disk space'); 73 | } 74 | 75 | 76 | /** 77 | * @return string 78 | */ 79 | public function getDescription(): string { 80 | return $this->l10n->t('Display the current use of your available disk space'); 81 | } 82 | 83 | 84 | /** 85 | * @return WidgetTemplate 86 | */ 87 | public function getWidgetTemplate(): WidgetTemplate { 88 | $template = new WidgetTemplate(); 89 | $template->addCss('widgets/diskspace') 90 | ->addJs('widgets/diskspace') 91 | ->setIcon('icon-disk-space') 92 | ->setContent('widgets/diskspace') 93 | ->setInitFunction('OCA.DashBoard.diskspace.init'); 94 | 95 | return $template; 96 | } 97 | 98 | 99 | /** 100 | * @return WidgetSetup 101 | */ 102 | public function getWidgetSetup(): WidgetSetup { 103 | $setup = new WidgetSetup(); 104 | $setup->addSize(WidgetSetup::SIZE_TYPE_MIN, 2, 1) 105 | ->addSize(WidgetSetup::SIZE_TYPE_MAX, 3, 1) 106 | ->addSize(WidgetSetup::SIZE_TYPE_DEFAULT, 2, 1); 107 | 108 | $setup->addDelayedJob('OCA.DashBoard.diskspace.getDiskSpace', 600); 109 | 110 | return $setup; 111 | } 112 | 113 | 114 | /** 115 | * @param IWidgetConfig $settings 116 | */ 117 | public function loadWidget(IWidgetConfig $settings) { 118 | // $app = new Application(); 119 | 120 | // $container = $app->getContainer(); 121 | // try { 122 | // $this->diskSpaceService = $container->query(DiskSpaceService::class); 123 | // } catch (QueryException $e) { 124 | // return; 125 | // } 126 | } 127 | 128 | 129 | /** 130 | * @param IWidgetRequest $request 131 | * 132 | * @throws NotFoundException 133 | */ 134 | public function requestWidget(IWidgetRequest $request) { 135 | if ($request->getRequest() === 'getDiskSpace') { 136 | $request->addResultArray('diskSpace', $this->diskSpaceService->getDiskSpace()); 137 | } 138 | } 139 | 140 | 141 | } 142 | -------------------------------------------------------------------------------- /lib/Widgets/FortunesWidget.php: -------------------------------------------------------------------------------- 1 | 11 | * @copyright 2018, Maxence Lange 12 | * @license GNU AGPL version 3 or any later version 13 | * 14 | * This program is free software: you can redistribute it and/or modify 15 | * it under the terms of the GNU Affero General Public License as 16 | * published by the Free Software Foundation, either version 3 of the 17 | * License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU Affero General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU Affero General Public License 25 | * along with this program. If not, see . 26 | * 27 | */ 28 | 29 | namespace OCA\Dashboard\Widgets; 30 | 31 | 32 | use OCP\Dashboard\Model\WidgetSetup; 33 | use OCP\Dashboard\Model\WidgetTemplate; 34 | use OCA\Dashboard\AppInfo\Application; 35 | use OCA\Dashboard\Service\Widgets\Fortunes\FortunesService; 36 | use OCP\AppFramework\QueryException; 37 | use OCP\Dashboard\IDashboardWidget; 38 | use OCP\Dashboard\Model\IWidgetRequest; 39 | use OCP\Dashboard\Model\IWidgetConfig; 40 | use OCP\IL10N; 41 | 42 | 43 | class FortunesWidget implements IDashboardWidget { 44 | 45 | const WIDGET_ID = 'fortunes'; 46 | 47 | 48 | /** @var IL10N */ 49 | private $l10n; 50 | 51 | 52 | /** @var FortunesService */ 53 | private $fortunesService; 54 | 55 | 56 | /** 57 | * FortunesWidget constructor. 58 | * 59 | * @param IL10N $l10n 60 | * @param FortunesService $fortunesService 61 | */ 62 | public function __construct(IL10N $l10n, FortunesService $fortunesService) { 63 | $this->l10n = $l10n; 64 | $this->fortunesService = $fortunesService; 65 | } 66 | 67 | 68 | /** 69 | * @return string 70 | */ 71 | public function getId(): string { 72 | return self::WIDGET_ID; 73 | } 74 | 75 | 76 | /** 77 | * @return string 78 | */ 79 | public function getName(): string { 80 | return $this->l10n->t('Fortune Quotes'); 81 | } 82 | 83 | 84 | /** 85 | * @return string 86 | */ 87 | public function getDescription(): string { 88 | return $this->l10n->t('Get a random fortune quote'); 89 | } 90 | 91 | 92 | /** 93 | * @return WidgetTemplate 94 | */ 95 | public function getWidgetTemplate(): WidgetTemplate { 96 | $template = new WidgetTemplate(); 97 | $template->addCss('widgets/fortunes') 98 | ->addJs('widgets/fortunes') 99 | ->setIcon('icon-fortunes') 100 | ->setContent('widgets/fortunes') 101 | ->setInitFunction('OCA.DashBoard.fortunes.init'); 102 | 103 | return $template; 104 | } 105 | 106 | 107 | /** 108 | * @return WidgetSetup 109 | */ 110 | public function getWidgetSetup(): WidgetSetup { 111 | $setup = new WidgetSetup(); 112 | $setup->addSize(WidgetSetup::SIZE_TYPE_MIN, 2, 1) 113 | ->addSize(WidgetSetup::SIZE_TYPE_MAX, 4, 4) 114 | ->addSize(WidgetSetup::SIZE_TYPE_DEFAULT, 3, 2); 115 | 116 | $setup->addMenuEntry('OCA.DashBoard.fortunes.getFortune', 'icon-fortunes', 'New Fortune'); 117 | $setup->addDelayedJob('OCA.DashBoard.fortunes.getFortune', 300); 118 | $setup->setPush('OCA.DashBoard.fortunes.push'); 119 | 120 | return $setup; 121 | } 122 | 123 | 124 | /** 125 | * @param IWidgetConfig $settings 126 | */ 127 | public function loadWidget(IWidgetConfig $settings) { 128 | } 129 | 130 | 131 | /** 132 | * @param IWidgetRequest $request 133 | */ 134 | public function requestWidget(IWidgetRequest $request) { 135 | if ($request->getRequest() === 'getFortune') { 136 | $request->addResult('fortune', $this->fortunesService->getRandomFortune()); 137 | } 138 | } 139 | 140 | 141 | } 142 | -------------------------------------------------------------------------------- /lib/Widgets/Test1Widget.php: -------------------------------------------------------------------------------- 1 | 12 | * @copyright 2018, Maxence Lange 13 | * @license GNU AGPL version 3 or any later version 14 | * 15 | * This program is free software: you can redistribute it and/or modify 16 | * it under the terms of the GNU Affero General Public License as 17 | * published by the Free Software Foundation, either version 3 of the 18 | * License, or (at your option) any later version. 19 | * 20 | * This program is distributed in the hope that it will be useful, 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | * GNU Affero General Public License for more details. 24 | * 25 | * You should have received a copy of the GNU Affero General Public License 26 | * along with this program. If not, see . 27 | * 28 | */ 29 | 30 | namespace OCA\Dashboard\Widgets; 31 | 32 | 33 | use OCP\Dashboard\Model\WidgetSetting; 34 | use OCP\Dashboard\Model\WidgetSetup; 35 | use OCP\Dashboard\Model\WidgetTemplate; 36 | use OCP\Dashboard\IDashboardWidget; 37 | use OCP\Dashboard\Model\IWidgetConfig; 38 | use OCP\Dashboard\Model\IWidgetRequest; 39 | 40 | class Test1Widget implements IDashboardWidget { 41 | 42 | const WIDGET_ID = 'test1'; 43 | 44 | 45 | /** 46 | * @return string 47 | */ 48 | public function getId(): string { 49 | return self::WIDGET_ID; 50 | } 51 | 52 | 53 | /** 54 | * @return string 55 | */ 56 | public function getName(): string { 57 | return 'Lorem Ipsum'; 58 | } 59 | 60 | 61 | /** 62 | * @return string 63 | */ 64 | public function getDescription(): string { 65 | return 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor ' 66 | . ' incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam'; 67 | } 68 | 69 | 70 | /** 71 | * @return WidgetTemplate 72 | */ 73 | public function getWidgetTemplate(): WidgetTemplate { 74 | $template = new WidgetTemplate(); 75 | $template->addCss('widgets/test1widget') 76 | ->setIcon('icon-lorem') 77 | ->setContent('widgets/Test1'); 78 | 79 | $setting = new WidgetSetting(WidgetSetting::TYPE_INPUT); 80 | $setting->setName('test_config'); 81 | $setting->setTitle('Test Config'); 82 | $setting->setPlaceholder('test'); 83 | $template->addSetting($setting); 84 | 85 | return $template; 86 | } 87 | 88 | 89 | /** 90 | * @return WidgetSetup 91 | */ 92 | public function getWidgetSetup(): WidgetSetup { 93 | $setup = new WidgetSetup(); 94 | $setup->addSize(WidgetSetup::SIZE_TYPE_MIN, 4, 3) 95 | ->addSize(WidgetSetup::SIZE_TYPE_MAX, 10, 6) 96 | ->addSize(WidgetSetup::SIZE_TYPE_DEFAULT, 6, 4); 97 | 98 | return $setup; 99 | } 100 | 101 | 102 | /** 103 | * @param IWidgetConfig $settings 104 | */ 105 | public function loadWidget(IWidgetConfig $settings) { 106 | } 107 | 108 | 109 | /** 110 | * @param IWidgetRequest $request 111 | */ 112 | public function requestWidget(IWidgetRequest $request) { 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dashboard", 3 | "version": "5.0.0", 4 | "description": "Place this app in **nextcloud/apps/**", 5 | "author": { 6 | "name": "Maxence Lange", 7 | "email": "maxence@artificial-owl.com" 8 | }, 9 | "private": true, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/nextcloud/dashboard.git" 13 | }, 14 | "license": "AGPL-3.0", 15 | "bugs": { 16 | "url": "https://github.com/nextcloud/dashboard/issues" 17 | }, 18 | "homepage": "https://github.com/nextcloud/dashboard#readme", 19 | "dependencies": { 20 | "gridstack": "^0.3.0" 21 | }, 22 | "devDependencies": {} 23 | } 24 | -------------------------------------------------------------------------------- /screenshots/dashboard-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/dashboard/0d3a4f4874f575b018437ea55f2699bd3b4e083c/screenshots/dashboard-grid.png -------------------------------------------------------------------------------- /templates/navigate.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | namespace OCA\Dashboard; 28 | 29 | 30 | ?> 31 | 32 | 33 |
34 | 35 |
36 |
37 |
38 |
39 | 40 |
41 |
42 |

No widgets yet

43 | 44 |
45 | 46 |
47 |
    48 |
    49 | 50 |
    51 | Add new widget 52 |
    53 |
    54 | -------------------------------------------------------------------------------- /templates/widgets/Test1.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | ?> 28 | 29 |
    30 | 31 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut 32 | labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco 33 | laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in 34 | voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat 35 | non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 36 |
    37 |   38 |
    39 | 40 | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque 41 | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto 42 | beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut 43 | odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. 44 | Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, 45 | sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat 46 | voluptatem. 47 | 48 |
    49 | 50 | 51 | -------------------------------------------------------------------------------- /templates/widgets/clock.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | ?> 28 | 29 |
    30 |
    31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /templates/widgets/diskspace.php: -------------------------------------------------------------------------------- 1 | 9 | * @author regio iT gesellschaft für informationstechnologie mbh 10 | * @copyright 2018, Maxence Lange 11 | * @license GNU AGPL version 3 or any later version 12 | * 13 | * This program is free software: you can redistribute it and/or modify 14 | * it under the terms of the GNU Affero General Public License as 15 | * published by the Free Software Foundation, either version 3 of the 16 | * License, or (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU Affero General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU Affero General Public License 24 | * along with this program. If not, see . 25 | * 26 | */ 27 | 28 | ?> 29 | 30 |
    31 | 32 |
    33 |
    34 |
    35 |

    /

    37 |
    38 | 39 |
    40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /templates/widgets/fortunes.php: -------------------------------------------------------------------------------- 1 | 9 | * @copyright 2018, Maxence Lange 10 | * @license GNU AGPL version 3 or any later version 11 | * 12 | * This program is free software: you can redistribute it and/or modify 13 | * it under the terms of the GNU Affero General Public License as 14 | * published by the Free Software Foundation, either version 3 of the 15 | * License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU Affero General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU Affero General Public License 23 | * along with this program. If not, see . 24 | * 25 | */ 26 | 27 | ?> 28 | 29 |
    30 |
    31 | 32 | 33 | 34 | 35 | --------------------------------------------------------------------------------