Skip to content

Commit

Permalink
Refine ui
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Wang <[email protected]>
  • Loading branch information
ruibaby committed Jan 19, 2024
1 parent faee013 commit 220811f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
19 changes: 9 additions & 10 deletions console/src/components/editor/extensions/image/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
VDropdown,
} from "@halo-dev/components";
import { getAttachmentUrl } from "../../utils/attachment";
import MdiReplay from "~icons/mdi/replay";
import { i18n } from "@/locales";
const props = defineProps<{
Expand Down Expand Up @@ -267,18 +266,18 @@ onUnmounted(() => {
class="h-full w-full"
@load="onImageLoaded"
/>

<div
v-if="src"
class="absolute top-0 hidden h-full w-full group-hover:block group-hover:bg-black group-hover:bg-opacity-20"
class="absolute left-0 top-0 hidden h-1/4 w-full cursor-pointer justify-end bg-gradient-to-b from-gray-300 to-transparent p-2 ease-in-out group-hover:flex"
>
<div
class="absolute top-1/2 flex w-full -translate-y-1/2 justify-center space-y-2 text-white"
>
<MdiReplay
class="h-10 w-10 cursor-pointer text-primary"
@click="handleResetInit"
/>
</div>
<VButton size="sm" type="secondary" @click="handleResetInit">
{{
$t(
"core.components.default_editor.extensions.image.operations.replace.button"
)
}}
</VButton>
</div>

<div
Expand Down
3 changes: 3 additions & 0 deletions console/src/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,9 @@ core:
permalink:
title: Input Link
placeholder: Input link and press Enter to confirm
operations:
replace:
button: Replace
toolbox:
attachment: Attachment
show_hide_sidebar: Show/Hide Sidebar
Expand Down
3 changes: 3 additions & 0 deletions console/src/locales/zh-CN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,9 @@ core:
permalink:
title: 输入链接
placeholder: 输入链接,按回车确定
operations:
replace:
button: 替换
toolbox:
attachment: 选择附件
show_hide_sidebar: 显示 / 隐藏侧边栏
Expand Down
3 changes: 3 additions & 0 deletions console/src/locales/zh-TW.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,9 @@ core:
permalink:
title: 輸入連結
placeholder: 輸入連結,按回車確定
operations:
replace:
button: 替换
toolbox:
attachment: 選擇附件
show_hide_sidebar: 顯示 / 隱藏側邊欄
Expand Down

0 comments on commit 220811f

Please sign in to comment.