Skip to content

Commit c2669e6

Browse files
feat: render configuration tips with NcRichText
Use NcRichText component to properly render formatted tips in the configuration check table, replacing plain text rendering. This change: - Imports and uses NcRichText component from @nextcloud/vue - Enables Markdown rendering for tip content with autolink support - Adds CSS styling for proper text wrapping and width constraints - Ensures secure rendering through NcRichText's built-in sanitization The tips now display with proper formatting including bold text, lists, code blocks, and clickable links, improving readability and user experience. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent b1430a2 commit c2669e6

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/views/Settings/ConfigureCheck.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
</td>
2121
<td v-html="row.message" />
2222
<td>{{ row.resource }}</td>
23-
<td>{{ row.tip }}</td>
23+
<td class="tip-cell">
24+
<NcRichText :text="row.tip" :autolink="true" :use-markdown="true" />
25+
</td>
2426
</tr>
2527
</tbody>
2628
</table>
@@ -29,13 +31,15 @@
2931
<script>
3032
import { translate as t } from '@nextcloud/l10n'
3133
34+
import NcRichText from '@nextcloud/vue/dist/Components/NcRichText.js'
3235
import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
3336
3437
import { useConfigureCheckStore } from '../../store/configureCheck.js'
3538
3639
export default {
3740
name: 'ConfigureCheck',
3841
components: {
42+
NcRichText,
3943
NcSettingsSection,
4044
},
4145
setup() {
@@ -61,4 +65,9 @@ table {
6165
.info {
6266
color: orange;
6367
}
68+
.tip-cell {
69+
white-space: normal;
70+
word-wrap: break-word;
71+
max-width: 500px;
72+
}
6473
</style>

0 commit comments

Comments
 (0)