Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue settings modal #1265

Open
Pytal opened this issue Jul 18, 2023 · 4 comments
Open

Vue settings modal #1265

Pytal opened this issue Jul 18, 2023 · 4 comments

Comments

@Pytal
Copy link
Member

Pytal commented Jul 18, 2023

Settings are currently in an accordion and should be moved into a modal using https://github.com/nextcloud/nextcloud-vue components
image

@sofiaronnkvist
Copy link

Hi! I was asked to work on this issue, but am struggling to understand which Vue components are being mounted on the relevant PHP in the templates and how to work with the files in the js-folder. I'd appreciate it greatly if I could get some help with understanding the setup of the codebase better so I can work on this. @Pytal

@Pytal
Copy link
Member Author

Pytal commented Jul 26, 2023

The current settings are in

<div id="app-settings">
<div id="app-settings-header">
<button class="settings-button" aria-expanded="false" aria-controls="app-settings-content" aria-label="Activity settings" data-apps-slide-toggle="#app-settings-content">
<?php p($l->t('Activity settings'));?>
</button>
</div>
<div id="app-settings-content">
<input type="checkbox"<?php if ($_['rssLink']): ?> checked="checked"<?php endif; ?> id="enable_rss" class="checkbox" />
<label for="enable_rss"><?php p($l->t('Enable RSS feed'));?></label>
<span id="rssurl"<?php if (!$_['rssLink']): ?> class="hidden"<?php endif; ?>>
<label for="feed-link" class="hidden-visually"><?php p($l->t('RSS feed'));?></label>
<input id="feed-link" class="feed-link" type="text" readonly="readonly" value="<?php p($_['rssLink']); ?>" />
<button aria-label="<?php p($l->t('Copy RSS feed link')); ?>" class="icon-clippy" data-clipboard-target="#rssurl input"></button>
</span>
<div id="activity-personal-settings-link">
<a href="<?php p($_['personalSettingsLink']); ?>">
<span class="no-icon"><?php p($l->t('Personal notification settings')); ?></span>
</a>
</div>
</div>
</div>
, none in Vue yet

The markup above will have to be replaced with a mount point for the Vue component

You can mount your component by creating a new js file like https://github.com/nextcloud/activity/blob/e25813860dcb8f04f5d029d24cdf45bb10973aa9/src/settings-personal.js and adding an entry for it in https://github.com/nextcloud/activity/blob/e25813860dcb8f04f5d029d24cdf45bb10973aa9/webpack.js

Then you can install the dependencies compile the code with npm ci && npm run watch @sofiaronnkvist :)

@susnux
Copy link
Contributor

susnux commented Nov 9, 2023

@Pytal are you sure we need a modal for exactly one setting? The settings accordion button only contains the RSS link + a link to the settings app.

@Pytal
Copy link
Member Author

Pytal commented Nov 9, 2023

Was the standard for app settings but feel free to move it elsewhere @susnux :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants