From b6275c807084e2c9a531738aff3d757381ca20e2 Mon Sep 17 00:00:00 2001 From: deblan Date: Tue, 9 Jul 2024 16:43:04 +0200 Subject: [PATCH 1/6] fix link to the documentation in forgejo issue template Signed-off-by: deblan --- .gitea/issue_template/ISSUE_TEMPLATE.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/issue_template/ISSUE_TEMPLATE.yml b/.gitea/issue_template/ISSUE_TEMPLATE.yml index 96e6c28..8486a5f 100644 --- a/.gitea/issue_template/ISSUE_TEMPLATE.yml +++ b/.gitea/issue_template/ISSUE_TEMPLATE.yml @@ -26,7 +26,7 @@ body: id: configuration attributes: label: Configuration - description: Export the configuration using the admin page and copy/paste here ([documentation](https://deblan.gitnet.page/side_menu_doc/tips/#export-the-configuration)). + description: Export the configuration using the admin page and copy/paste here ([documentation](https://deblan.gitnet.page/side_menu_doc/docs/FAQ/export-config/)). value: | ``` { From 73b21039b953c45b43f9b8c857ee0280fd0fa918 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 10 Jul 2024 19:29:51 +0200 Subject: [PATCH 2/6] rewrite of the script to import config allow mysql and sqlite --- bin/import_config.php | 80 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 13 deletions(-) diff --git a/bin/import_config.php b/bin/import_config.php index f2fbd14..db5857d 100644 --- a/bin/import_config.php +++ b/bin/import_config.php @@ -1,21 +1,75 @@ prepare('UPDATE oc_appconfig SET configvalue=:value WHERE configkey=:key and appid=:appId'); + exit($code); +} -foreach ($config as $key => $value) { +function value(string $shortName, string $longName, array $options, bool $required = true): ?string +{ + $value = $options[$shortName] ?? $options[$longName] ?? null; + + if (is_array($value)) { + echo "To much --{$longName}\n"; + showUsageAndExit(1); + } + + if (empty($value) && $required) { + echo "--{$longName} is missing\n"; + showUsageAndExit(1); + } + + return $value; +} + +$options = getopt('t:f:c:h', [ + 'type:', + 'file:', + 'config:', + 'help', +]); + +$help = value('h', 'help', $options, false); +$config = value('c', 'config', $options); +$file = value('f', 'file', $options); + +if (!is_readable($config) && !is_file($config)) { + echo "No such file: {$config}\n"; + + exit(1); +} + +if (!is_readable($file) && !is_file($file)) { + echo "No such file: {$file}\n"; + + exit(1); +} + +$appConfig = json_decode(file_get_contents($file), true); + +require $config; + +if ('mysql' === $CONFIG['dbtype']) { + $pdo = new \PDO( + 'mysql:host='.$CONFIG['dbhost'].';dbname='.$CONFIG['dbname'], + $CONFIG['dbuser'], + $CONFIG['dbpassword'] + ); +} elseif ($CONFIG['dbtype']) { + $pdo = new \PDO(sprintf('sqlite:%s', $CONFIG['datadirectory'].'/owncloud.db')); +} else { + echo "dbtype is not valid\n"; + + exit(1); +} + +$stmt = $pdo->prepare('UPDATE '.$CONFIG['dbtableprefix'].'appconfig SET configvalue=:value WHERE configkey=:key and appid=:appId'); + +foreach ($appConfig as $key => $value) { $stmt->execute([ 'appId' => 'side_menu', 'key' => $key, From 827bbd7c70bdebbf17e0e6c27d17be3b31b62c34 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 10 Jul 2024 19:39:52 +0200 Subject: [PATCH 3/6] fix #354: remove the opener when the menu is always displayed --- src/SideMenu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SideMenu.vue b/src/SideMenu.vue index 95731b3..20c7163 100644 --- a/src/SideMenu.vue +++ b/src/SideMenu.vue @@ -23,7 +23,7 @@ along with this program. If not, see . v-bind:label="settings.name" v-bind:avatar="settings.avatar" /> - + Date: Wed, 10 Jul 2024 19:47:09 +0200 Subject: [PATCH 4/6] fix extra margin between the logo and the opener --- css/sideMenu.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/sideMenu.css b/css/sideMenu.css index 6b30509..6971df0 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -89,6 +89,10 @@ .side-menu-opener span { position: relative; left: 50px; + display: block; + width: 1px; + height: 1px; + overflow: hidden; } .side-menu-opener:active, .side-menu-opener:focus { From 83cc15b1bbee0267517e91e8b2860ad33147869e Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 10 Jul 2024 19:51:00 +0200 Subject: [PATCH 5/6] update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 300015d..b2de6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## [Unreleased] +## 3.13.1 +### Fixed +* fix #354: remove the opener when the menu is always displayed +* fix extra margin between the logo and the opener + ## 3.13.0 ### Added * show apps generated with Tables (fix #349) From 0df8b97686ba34ade3cf893335a076686b12af42 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 10 Jul 2024 19:51:51 +0200 Subject: [PATCH 6/6] update PHP requirement update app version --- appinfo/info.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index af86e38..79123d0 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -32,7 +32,7 @@ Notice Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). ]]> - 3.13.0 + 3.13.1 agpl Simon Vieille SideMenu @@ -55,7 +55,7 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png - + OCA\SideMenu\Settings\Admin