Opener icon not visible with multiple apps_paths #9

Closed
opened 2020-04-20 17:50:23 +02:00 by Anturix · 1 comment

Opener Icon isn't shown with

  • side_menu 1.2.4, 1.3.0m, 1.3.1 (working with 1.2.1)
  • Nextcloud 18.0.4 and 19.0.0beta4
  • Firefox 75.0 and Chromium 81.0.4044.92

Reason:
The url to the opener icon refers to: /apps/side_menu/img/side-menu-opener.svg

With Docker there are 2 different locations needed for the apps_paths.
Any additional app is stored in the second directory, which points to a persistent storage outside the container.

$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/nextcloud/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
...

With the above config, the URL should resolve to: /custom_apps/side_menu/img/side-menu-opener.svg

Might be a side effect of the fix for the Safari Browser: Opener icon not visible in Safari


The following fix (line #4) generates a complete path to the image and should also work for Safari.

side_menu/templates/css/stylesheet.php

:root {
    <?php foreach ($_['vars'] as $key => $value): ?>
        <?php if ($key === 'opener'): ?>
            --side-menu-<?php echo $key ?>: url('<?php print_unescaped(image_path('side_menu', $value.'.svg')); ?>');
            --side-menu-<?php echo $key ?>: <?php echo $value ?>;
        <?php endif; ?>
    <?php endforeach; ?>
}
...

Tested with

  • Nextcloud 18.0.4 and 19.0.0beta4
  • Firefox 75.0 and Chromium 81.0.4044.92
  • Nextcloud installed in root or subdir and Docker Instance
Opener Icon isn't shown with * side_menu 1.2.4, 1.3.0m, 1.3.1 (working with 1.2.1) * Nextcloud 18.0.4 and 19.0.0beta4 * Firefox 75.0 and Chromium 81.0.4044.92 Reason: The url to the opener icon refers to: /apps/side_menu/img/side-menu-opener.svg With Docker there are 2 different locations needed for the apps_paths. Any additional app is stored in the second directory, which points to a persistent storage outside the container. ``` $CONFIG = array ( 'apps_paths' => array ( 0 => array ( 'path' => '/nextcloud/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => '/nextcloud/custom_apps', 'url' => '/custom_apps', 'writable' => true, ), ), ... ``` With the above config, the URL should resolve to: /custom_apps/side_menu/img/side-menu-opener.svg Might be a side effect of the fix for the Safari Browser: [Opener icon not visible in Safari](https://gitnet.fr/deblan/side_menu/issues/7) ----- The following fix (line #4) generates a complete path to the image and should also work for Safari. side_menu/templates/css/stylesheet.php ``` :root { <?php foreach ($_['vars'] as $key => $value): ?> <?php if ($key === 'opener'): ?> --side-menu-<?php echo $key ?>: url('<?php print_unescaped(image_path('side_menu', $value.'.svg')); ?>'); --side-menu-<?php echo $key ?>: <?php echo $value ?>; <?php endif; ?> <?php endforeach; ?> } ... ``` Tested with * Nextcloud 18.0.4 and 19.0.0beta4 * Firefox 75.0 and Chromium 81.0.4044.92 * Nextcloud installed in root or subdir and Docker Instance
Owner

The version v1.3.2 contains this path. Thank you for your contribution! :)

The version v1.3.2 contains this path. Thank you for your contribution! :)
deblan added the
bug
label 2020-04-20 19:55:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: deblan/side_menu#9
No description provided.