Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/firstrunwizard.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-05-08 14:16:22 +0300
committerJulius Härtl <jus@bitgrid.net>2018-05-08 16:05:22 +0300
commit6db6161e6c33096d79765adf1b6e264612acf953 (patch)
tree22cac27f7cdc5ee9cb9b2e3de84a1098fa1d20e2
parent79c6ae2b50c4b31b7cc55cf84df14cb936cda554 (diff)
Move navigation registration to appinfo.xml
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--appinfo/app.php1
-rw-r--r--appinfo/info.xml10
-rw-r--r--img/info.svg1
-rw-r--r--js/firstrunwizard.js2
-rw-r--r--lib/AppInfo/Application.php14
5 files changed, 12 insertions, 16 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 66f4f967..a2d1f7eb 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -23,4 +23,3 @@
$app = new \OCA\FirstRunWizard\AppInfo\Application();
$app->register();
-$app->registerNavigation();
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 2ab92a97..90be4718 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -20,6 +20,16 @@ The First run wizard can be customized to meet specific design goals, or to chan
<dependencies>
<nextcloud min-version="14" max-version="14" />
</dependencies>
+ <navigations>
+ <navigation>
+ <id>firstrunwizard-about</id>
+ <name>About</name>
+ <route>#about</route>
+ <order>5</order>
+ <icon>info.svg</icon>
+ <type>settings</type>
+ </navigation>
+ </navigations>
<settings>
<personal>OCA\FirstRunWizard\Settings\Personal</personal>
</settings>
diff --git a/img/info.svg b/img/info.svg
new file mode 100644
index 00000000..02d44921
--- /dev/null
+++ b/img/info.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 16 16" width="16" height="16"><path d="M5 7.474c.155.382.325.69.644.246.407-.268 1.76-1.427 1.662-.342-.368 2.017-.834 4.017-1.17 6.04-.393 1.114.634 2.067 1.637 1.31 1.078-.502 1.99-1.287 2.927-2.01-.144-.323-.25-.79-.596-.347-.468.24-1.47 1.318-1.696.472.315-2.18.975-4.295 1.365-6.462.397-1.005-.364-2.223-1.4-1.363C7.117 5.634 6.083 6.6 5 7.474zM9.46.005C8.15-.017 7.553 2.147 8.815 2.68c1.023.378 2.077-.714 1.79-1.75-.098-.542-.598-.97-1.147-.93z"/></svg>
diff --git a/js/firstrunwizard.js b/js/firstrunwizard.js
index 39d4fa44..8acb6e1a 100644
--- a/js/firstrunwizard.js
+++ b/js/firstrunwizard.js
@@ -148,7 +148,7 @@ $(document).ready(function() {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
});
- $('#expanddiv a[href="#about"]').on('click', function () {
+ $('#expanddiv li[data-id="firstrunwizard-about"] a').on('click', function () {
OCA.FirstRunWizard.Wizard.showFirstRunWizard();
$(this).find('div').remove();
$(this).find('img').show();
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index de4931a8..2e1a6db9 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -93,18 +93,4 @@ class Application extends App {
];
});
}
-
- public function registerNavigation() {
- $urlGenerator = $this->getContainer()->getServer()->getURLGenerator();
- $l = $this->getContainer()->getServer()->getL10N('firstrunwizard');
-
- $this->getContainer()->getServer()->getNavigationManager()->add([
- 'type' => 'settings',
- 'id' => 'about',
- 'order' => 5,
- 'href' => '#about',
- 'name' => $l->t('About'),
- 'icon' => $urlGenerator->imagePath('core', 'actions/info.svg'),
- ]);
- }
}