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

add support for bidi text #5258

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/Controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<div class="controls">
<div v-if="overviewName" class="board-title">
<div class="board-bullet icon-calendar-dark" />
<h2>{{ overviewName }}</h2>
<h2 dir="auto">
{{ overviewName }}
</h2>
<NcActions>
<NcActionButton icon="icon-add" @click="clickShowAddCardModel">
{{ t('deck', 'Add card') }}
Expand All @@ -36,7 +38,9 @@
</div>
<div v-else-if="board" class="board-title">
<div :style="{backgroundColor: '#' + board.color}" class="board-bullet" />
<h2>{{ board.title }}</h2>
<h2 dir="auto">
{{ board.title }}
</h2>
<p v-if="showArchived">
({{ t('deck', 'Archived cards') }})
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/board/DeletedTabSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul>
<li v-for="deletedStack in deletedStacks" :key="deletedStack.id">
<span class="icon icon-deck" />
<div class="title">
<div class="title" dir="auto">
<span>{{ deletedStack.title }}</span>
<span class="timestamp">{{ relativeDate(deletedStack.deletedAt*1000) }}</span>
</div>
Expand All @@ -18,7 +18,7 @@
<ul>
<li v-for="deletedCard in deletedCards" :key="deletedCard.id">
<div class="icon icon-deck" />
<div class="title">
<div class="title" dir="auto">
<span>{{ deletedCard.title }}</span>
<span class="timestamp">{{ relativeDate(deletedCard.deletedAt*1000) }}</span>
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/board/Stack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
</h3>
<h3 v-else-if="!editing"
v-tooltip="stack.title"
dir="auto"
tabindex="0"
:aria-label="stack.title"
class="stack__title"
Expand All @@ -48,6 +49,7 @@
@keyup.esc="cancelEdit">
<input v-model="copiedStack.title"
v-focus
dir="auto"
type="text"
required="required">
<input v-tooltip="t('deck', 'Edit list title')"
Expand Down
1 change: 1 addition & 0 deletions src/components/card/CommentForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</span>
</template>
<div ref="contentEditable"
dir="auto"
class="comment-form__contenteditable"
contenteditable
@keydown.enter="handleKeydown"
Expand Down
7 changes: 6 additions & 1 deletion src/components/card/CommentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</NcActions>
</div>
<NcRichText class="comment--content"
dir="auto"
:text="richText(comment)"
:arguments="richArgs(comment)"
:autolink="true" />
Expand Down Expand Up @@ -57,11 +58,15 @@
<CommentItem v-if="comment.replyTo" :reply="true" :comment="comment.replyTo" />
<div v-show="!edit" ref="richTextElement">
<NcRichText class="comment--content"
dir="auto"
:text="richText(comment)"
:arguments="richArgs(comment)"
:autolink="true" />
</div>
<CommentForm v-if="edit" v-model="commentMsg" @submit="updateComment" />
<CommentForm v-if="edit"
v-model="commentMsg"
dir="auto"
@submit="updateComment" />
</li>
</template>

Expand Down
1 change: 1 addition & 0 deletions src/components/card/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
<template v-else>
<div v-if="!descriptionEditing && hasDescription"
id="description-preview"
dir="auto"
@click="clickedPreview"
v-html="renderedDescription" />

Check warning on line 60 in src/components/card/Description.vue

View workflow job for this annotation

GitHub Actions / eslint

'v-html' directive can lead to XSS attack
<p v-else-if="!descriptionEditing" class="placeholder" @click="showEditor()">
{{ t('deck', 'Write a description …') }}
</p>
Expand Down
6 changes: 4 additions & 2 deletions src/components/cards/CardItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,16 @@
class="card"
@click="openCard">
<div v-if="standalone" class="card-related">
<div :style="{backgroundColor: '#' + board.color}" class="board-bullet" />
<div :style="{backgroundColor: '#' + board.color}" class="board-bullet" dir="auto" />
{{ board.title }} » {{ stack.title }}
</div>
<CardCover v-if="showCardCover" :card-id="card.id" />
<div class="card-upper">
<h3 v-if="inlineEditingBlocked">
<h3 v-if="inlineEditingBlocked" dir="auto">
{{ card.title }}
</h3>
<h3 v-else-if="!editing"
dir="auto"
tabindex="0"
class="editable"
:aria-label="t('deck', 'Edit card title')"
Expand All @@ -55,6 +56,7 @@
@submit.prevent="finishedEdit(card)">
<input v-model="copiedCard.title"
v-focus
dir="auto"
type="text"
autocomplete="off"
required
Expand Down
4 changes: 2 additions & 2 deletions src/components/dashboard/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
class="card">
<div class="card--header">
<DueDate class="right" :card="card" />
<span class="title">{{ card.title }}</span>
<span class="title" dir="auto">{{ card.title }}</span>
</div>
<ul v-if="card.labels && card.labels.length"
class="labels">
<li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)">
<span>{{ label.title }}</span>
<span dir="auto">{{ label.title }}</span>
</li>
</ul>
</a>
Expand Down
1 change: 1 addition & 0 deletions src/components/navigation/AppNavigationBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
<form @submit.prevent.stop="applyEdit">
<input v-model="editTitle"
v-focus
dir="auto"
type="text"
required>
<input type="submit" value="" class="icon-confirm">
Expand Down
Loading