From 0840b99f91fe6f138dfba29321000868a1b88eca Mon Sep 17 00:00:00 2001 From: unteem Date: Mon, 10 Oct 2022 20:27:23 +0200 Subject: [PATCH 1/6] add quota in indie external site --- base/apps/indie_external/img/quota.png | Bin 0 -> 656 bytes base/apps/indie_external/lib/SitesManager.php | 10 +++++++++- base/apps/indie_external/lib/sites.json | 14 +++++++++++++- base/css/indie.scss | 15 +++++++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 base/apps/indie_external/img/quota.png diff --git a/base/apps/indie_external/img/quota.png b/base/apps/indie_external/img/quota.png new file mode 100644 index 0000000000000000000000000000000000000000..d961189f1b4bf9a121f1e276f4e87648cb05cf6a GIT binary patch literal 656 zcmV;B0&o3^P)*D6V0TLZSdP>9*u-#SNr2gz*w7RJJMgLnvmAhk+YJG5 zG)+}2M!5hH2j&6bFlr@CssKFw4FKCyVU;nd0ua$xKnS70CH0D5%or-t$w~FXTkO~m z0k7pvVbvuVD=?t`W&0n|Rp3|~j2>s|CYEAP8vq8dIzu;IpsNi4v5NSs{36<%itt{h z{!xMN72pr12~L#M&7f~~Cwx#5;t*Ega|zA0U)wSERRp+_e9o89?EJGIxKRP%8`fZN zi{o$3Yst`|wLY*>o=QFw3yho4s3}D+K4k(tOde;NjG07F)3zMjT6l{_*{i;_&-~@t zdu(m#$0V)i)eL~MNk2O0UJVz}S^C#371jL`0Oyi!C|!?A)!ryW5;Tnv!X_NSAiB|s q0x$4 Date: Tue, 11 Oct 2022 12:32:06 +0200 Subject: [PATCH 2/6] fixes --- base/apps/indie_external/lib/SitesManager.php | 5 +++-- base/apps/indie_external/lib/sites.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/base/apps/indie_external/lib/SitesManager.php b/base/apps/indie_external/lib/SitesManager.php index 5ef263c..8174df5 100644 --- a/base/apps/indie_external/lib/SitesManager.php +++ b/base/apps/indie_external/lib/SitesManager.php @@ -110,8 +110,9 @@ class SitesManager { $saml_idp_url = getenv('SAML_IDP_URL', true) ?: getenv('SAML_IDP_URL'); $saml_realm = getenv('SAML_REALM', true) ?: getenv('SAML_REALM'); $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); + $quota_url = $nextcloud_url . "settings/users"; - $site['url'] = str_replace(['{email}', '{uid}', '{displayname}', '{chat_url}', '{saml_idp_url}', '{saml_realm}', '{nextcloud_url}'], [$email, $uid, $displayName, $chat_url, $saml_idp_url, $saml_realm, $nextcloud_url], $site['url']); + $site['url'] = str_replace(['{email}', '{uid}', '{displayname}', '{chat_url}', '{saml_idp_url}', '{saml_realm}', '{quota_url}'], [$email, $uid, $displayName, $chat_url, $saml_idp_url, $saml_realm, $quota_url], $site['url']); if ($site['name'] === 'Visio') { $visio_url = getenv('VISIO_URL', true) ?: getenv('VISIO_URL'); @@ -203,7 +204,7 @@ class SitesManager { if ($site['kind'] === 'quota') { $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); if ($nextcloud_url) { - $site['url'] = $nextcloud_url; + $site['url'] = $nextcloud_url . "settings/users"; } } diff --git a/base/apps/indie_external/lib/sites.json b/base/apps/indie_external/lib/sites.json index dbe852f..f810918 100644 --- a/base/apps/indie_external/lib/sites.json +++ b/base/apps/indie_external/lib/sites.json @@ -49,7 +49,7 @@ "id": 5, "icon": "quota.png", "name": "Quota des comptes", - "url": "{nuage_url}", + "url": "{quota_url}", "type": "settings", "kind": "quota", "redirect": true, -- GitLab From 382ebfeb73565591f95b91aaa941d03d92d5089c Mon Sep 17 00:00:00 2001 From: unteem Date: Tue, 11 Oct 2022 12:45:23 +0200 Subject: [PATCH 3/6] fixes --- base/apps/indie_external/lib/SitesManager.php | 4 ++-- base/apps/indie_external/lib/sites.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/apps/indie_external/lib/SitesManager.php b/base/apps/indie_external/lib/SitesManager.php index 8174df5..70abef9 100644 --- a/base/apps/indie_external/lib/SitesManager.php +++ b/base/apps/indie_external/lib/SitesManager.php @@ -110,7 +110,7 @@ class SitesManager { $saml_idp_url = getenv('SAML_IDP_URL', true) ?: getenv('SAML_IDP_URL'); $saml_realm = getenv('SAML_REALM', true) ?: getenv('SAML_REALM'); $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); - $quota_url = $nextcloud_url . "settings/users"; + $quota_url = $nextcloud_url . "/settings/users"; $site['url'] = str_replace(['{email}', '{uid}', '{displayname}', '{chat_url}', '{saml_idp_url}', '{saml_realm}', '{quota_url}'], [$email, $uid, $displayName, $chat_url, $saml_idp_url, $saml_realm, $quota_url], $site['url']); @@ -204,7 +204,7 @@ class SitesManager { if ($site['kind'] === 'quota') { $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); if ($nextcloud_url) { - $site['url'] = $nextcloud_url . "settings/users"; + $site['url'] = $nextcloud_url . "/settings/users"; } } diff --git a/base/apps/indie_external/lib/sites.json b/base/apps/indie_external/lib/sites.json index f810918..b14f8fe 100644 --- a/base/apps/indie_external/lib/sites.json +++ b/base/apps/indie_external/lib/sites.json @@ -46,7 +46,7 @@ "redirect": true }, "6": { - "id": 5, + "id": 6, "icon": "quota.png", "name": "Quota des comptes", "url": "{quota_url}", -- GitLab From 881fc5af38d6f25dd5e97d73bcc9e06c625a1edf Mon Sep 17 00:00:00 2001 From: unteem Date: Tue, 11 Oct 2022 13:13:11 +0200 Subject: [PATCH 4/6] add quota icon --- base/apps/indie_external/lib/Migration/CopyDefaultIcons.php | 1 + 1 file changed, 1 insertion(+) diff --git a/base/apps/indie_external/lib/Migration/CopyDefaultIcons.php b/base/apps/indie_external/lib/Migration/CopyDefaultIcons.php index df0ccdb..21fb1a3 100644 --- a/base/apps/indie_external/lib/Migration/CopyDefaultIcons.php +++ b/base/apps/indie_external/lib/Migration/CopyDefaultIcons.php @@ -81,6 +81,7 @@ class CopyDefaultIcons implements IRepairStep { $this->copyDefaultIcon($output, $folder, 'lifesaver.png'); $this->copyDefaultIcon($output, $folder, 'meet.png'); $this->copyDefaultIcon($output, $folder, 'meet-dark.png'); + $this->copyDefaultIcon($output, $folder, 'quota.png'); } /** -- GitLab From 347dcdc33f329dd77d22bb6d341003e2034a08f8 Mon Sep 17 00:00:00 2001 From: unteem Date: Tue, 11 Oct 2022 13:25:45 +0200 Subject: [PATCH 5/6] bump indie_external version --- base/apps/indie_external/appinfo/info.xml | 2 +- base/apps/indie_external/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/apps/indie_external/appinfo/info.xml b/base/apps/indie_external/appinfo/info.xml index d76a48c..a1ba7c2 100644 --- a/base/apps/indie_external/appinfo/info.xml +++ b/base/apps/indie_external/appinfo/info.xml @@ -24,7 +24,7 @@ https://github.com/nextcloud/external/issues https://github.com/nextcloud/external.git - 3.9.0 + 3.9.1 IndieExternal diff --git a/base/apps/indie_external/package.json b/base/apps/indie_external/package.json index 0990597..de10c73 100644 --- a/base/apps/indie_external/package.json +++ b/base/apps/indie_external/package.json @@ -1,6 +1,6 @@ { "name": "indie_external", - "version": "3.9.0", + "version": "3.9.1", "private": true, "description": "", "author": "Joas Schilling ", -- GitLab From 35329889c191048d7dd23bb1baf72adfa2d2c2b1 Mon Sep 17 00:00:00 2001 From: unteem Date: Tue, 11 Oct 2022 14:52:05 +0200 Subject: [PATCH 6/6] use relative path for quota --- base/apps/indie_external/lib/SitesManager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/base/apps/indie_external/lib/SitesManager.php b/base/apps/indie_external/lib/SitesManager.php index 70abef9..0675f29 100644 --- a/base/apps/indie_external/lib/SitesManager.php +++ b/base/apps/indie_external/lib/SitesManager.php @@ -109,8 +109,7 @@ class SitesManager { $chat_url = getenv('CHAT_URL', true) ?: getenv('CHAT_URL'); $saml_idp_url = getenv('SAML_IDP_URL', true) ?: getenv('SAML_IDP_URL'); $saml_realm = getenv('SAML_REALM', true) ?: getenv('SAML_REALM'); - $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); - $quota_url = $nextcloud_url . "/settings/users"; + $quota_url = "/settings/users"; $site['url'] = str_replace(['{email}', '{uid}', '{displayname}', '{chat_url}', '{saml_idp_url}', '{saml_realm}', '{quota_url}'], [$email, $uid, $displayName, $chat_url, $saml_idp_url, $saml_realm, $quota_url], $site['url']); @@ -204,7 +203,7 @@ class SitesManager { if ($site['kind'] === 'quota') { $nextcloud_url = getenv('OVERWRITE_CLI_URL', true) ?: getenv('OVERWRITE_CLI_URL'); if ($nextcloud_url) { - $site['url'] = $nextcloud_url . "/settings/users"; + $site['url'] = "/settings/users"; } } -- GitLab