Skip to content
代码片段 群组 项目
未验证 提交 4eb3c7c3 编辑于 作者: Anna Vovchenko's avatar Anna Vovchenko 提交者: GitLab
浏览文件

Merge branch '20231207-clavimoniere-rich-text-format_toolbar-fix' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -75,137 +75,137 @@ export default { ...@@ -75,137 +75,137 @@ export default {
</script> </script>
<template> <template>
<div <div
class="gl-w-full gl-display-flex gl-align-items-center gl-flex-wrap gl-border-b gl-border-gray-100 gl-px-3 gl-rounded-top-base gl-justify-content-space-between" class="gl-w-full gl-py-3 gl-row-gap-2 gl-display-flex gl-align-items-center gl-flex-wrap gl-border-b gl-border-gray-100 gl-px-3 gl-rounded-top-base"
data-testid="formatting-toolbar" data-testid="formatting-toolbar"
> >
<div class="gl-py-3 gl-w-full gl-display-flex gl-align-items-flex-start"> <div class="gl-display-flex">
<div class="gl-display-flex"> <toolbar-text-style-dropdown
<toolbar-text-style-dropdown data-testid="text-styles"
data-testid="text-styles"
@execute="trackToolbarControlExecution"
/>
<header-divider />
</div>
<div v-if="codeSuggestionsEnabled" class="gl-display-flex">
<toolbar-button
v-if="codeSuggestionsEnabled"
data-testid="code-suggestion"
content-type="codeSuggestion"
icon-name="doc-code"
editor-command="insertCodeSuggestion"
:label="__('Insert suggestion')"
:show-active-state="false"
@execute="trackToolbarControlExecution"
/>
<header-divider />
</div>
<toolbar-button
data-testid="bold"
content-type="bold"
icon-name="bold"
editor-command="toggleBold"
:label="i18n.bold"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="italic"
content-type="italic"
icon-name="italic"
editor-command="toggleItalic"
:label="i18n.italic"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<div class="gl-display-flex"> <header-divider />
<toolbar-button </div>
data-testid="strike" <div v-if="codeSuggestionsEnabled" class="gl-display-flex">
content-type="strike"
icon-name="strikethrough"
editor-command="toggleStrike"
:label="i18n.strike"
@execute="trackToolbarControlExecution"
/>
<header-divider />
</div>
<toolbar-button <toolbar-button
data-testid="blockquote" v-if="codeSuggestionsEnabled"
content-type="blockquote" data-testid="code-suggestion"
icon-name="quote" content-type="codeSuggestion"
editor-command="toggleBlockquote" icon-name="doc-code"
:label="i18n.quote" editor-command="insertCodeSuggestion"
:label="__('Insert suggestion')"
:show-active-state="false"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<header-divider />
</div>
<toolbar-button
data-testid="bold"
content-type="bold"
icon-name="bold"
editor-command="toggleBold"
:label="i18n.bold"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="italic"
content-type="italic"
icon-name="italic"
editor-command="toggleItalic"
:label="i18n.italic"
@execute="trackToolbarControlExecution"
/>
<div class="gl-display-flex">
<toolbar-button <toolbar-button
data-testid="code" data-testid="strike"
content-type="code" content-type="strike"
icon-name="code" icon-name="strikethrough"
editor-command="toggleCode" editor-command="toggleStrike"
:label="i18n.code" :label="i18n.strike"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<header-divider />
</div>
<toolbar-button
data-testid="blockquote"
content-type="blockquote"
icon-name="quote"
editor-command="toggleBlockquote"
:label="i18n.quote"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="code"
content-type="code"
icon-name="code"
editor-command="toggleCode"
:label="i18n.code"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="link"
content-type="link"
icon-name="link"
editor-command="editLink"
:label="i18n.link"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="bullet-list"
content-type="bulletList"
icon-name="list-bulleted"
class="gl-display-none gl-sm-display-inline"
editor-command="toggleBulletList"
:label="i18n.bulletList"
@execute="trackToolbarControlExecution"
/>
<toolbar-button
data-testid="ordered-list"
content-type="orderedList"
icon-name="list-numbered"
class="gl-display-none gl-sm-display-inline"
editor-command="toggleOrderedList"
:label="i18n.numberedList"
@execute="trackToolbarControlExecution"
/>
<div class="gl-display-flex">
<toolbar-button <toolbar-button
data-testid="link" data-testid="task-list"
content-type="link" content-type="taskList"
icon-name="link" icon-name="list-task"
editor-command="editLink" class="gl-display-none gl-sm-display-inline"
:label="i18n.link" editor-command="toggleTaskList"
:label="i18n.taskList"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<toolbar-button <div class="gl-display-none gl-sm-display-flex">
data-testid="bullet-list" <header-divider />
content-type="bulletList" </div>
icon-name="list-bulleted" </div>
class="gl-display-none gl-sm-display-inline" <toolbar-table-button data-testid="table" @execute="trackToolbarControlExecution" />
editor-command="toggleBulletList" <div class="gl-display-flex">
:label="i18n.bulletList" <toolbar-attachment-button
v-if="!hideAttachmentButton"
data-testid="attachment"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<!-- TODO Add icon and trigger functionality from here -->
<toolbar-button <toolbar-button
data-testid="ordered-list" v-if="supportsQuickActions"
content-type="orderedList" data-testid="quick-actions"
icon-name="list-numbered" content-type="quickAction"
icon-name="quick-actions"
class="gl-display-none gl-sm-display-inline" class="gl-display-none gl-sm-display-inline"
editor-command="toggleOrderedList" editor-command="insertQuickAction"
:label="i18n.numberedList" :label="__('Add a quick action')"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
/> />
<div class="gl-display-flex"> <header-divider v-if="newCommentTemplatePath" />
<toolbar-button
data-testid="task-list"
content-type="taskList"
icon-name="list-task"
class="gl-display-none gl-sm-display-inline"
editor-command="toggleTaskList"
:label="i18n.taskList"
@execute="trackToolbarControlExecution"
/>
<header-divider />
</div>
<toolbar-table-button data-testid="table" @execute="trackToolbarControlExecution" />
<div class="gl-display-flex">
<toolbar-attachment-button
v-if="!hideAttachmentButton"
data-testid="attachment"
@execute="trackToolbarControlExecution"
/>
<!-- TODO Add icon and trigger functionality from here -->
<toolbar-button
v-if="supportsQuickActions"
data-testid="quick-actions"
content-type="quickAction"
icon-name="quick-actions"
class="gl-display-none gl-sm-display-inline"
editor-command="insertQuickAction"
:label="__('Add a quick action')"
@execute="trackToolbarControlExecution"
/>
<header-divider v-if="newCommentTemplatePath" />
</div>
<comment-templates-dropdown
v-if="newCommentTemplatePath"
:new-comment-template-path="newCommentTemplatePath"
@select="insertSavedReply"
/>
<toolbar-more-dropdown data-testid="more" @execute="trackToolbarControlExecution" />
</div> </div>
<comment-templates-dropdown
v-if="newCommentTemplatePath"
:new-comment-template-path="newCommentTemplatePath"
@select="insertSavedReply"
/>
<toolbar-more-dropdown data-testid="more" @execute="trackToolbarControlExecution" />
</div> </div>
</template> </template>
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册