style: Update style

dev
journey-ad 2023-03-30 01:20:22 +08:00
parent 09ec438738
commit ba2cd3f50b
4 changed files with 13 additions and 14 deletions

View File

@ -5,7 +5,7 @@
# sd-webui-bilingual-localization
[Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) bilingual localization extensions.
![Snipaste_2023-02-28_00-23-45](https://user-images.githubusercontent.com/16256221/221622328-a4e46b1c-f202-4a41-9a56-3df96c823f42.png)
![Snipaste_2023-03-30_01-05-45](https://user-images.githubusercontent.com/16256221/228617304-3107244b-ce13-4b96-b665-1d13090d24a7.png)
## Features
- Bilingual translation, no need to worry about how to find the original button.

View File

@ -5,7 +5,7 @@
# sd-webui-bilingual-localization
[Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui)のバイリンガル対応拡張機能
![Snipaste_2023-02-28_00-23-45](https://user-images.githubusercontent.com/16256221/221622328-a4e46b1c-f202-4a41-9a56-3df96c823f42.png)
![Snipaste_2023-03-30_01-05-45](https://user-images.githubusercontent.com/16256221/228617304-3107244b-ce13-4b96-b665-1d13090d24a7.png)
## 特徴
- バイリンガル対応により、元のボタンを探す必要がありません。

View File

@ -5,7 +5,7 @@
# sd-webui-bilingual-localization
[Stable Diffusion web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) 双语对照翻译插件
![Snipaste_2023-02-28_00-23-45](https://user-images.githubusercontent.com/16256221/221622328-a4e46b1c-f202-4a41-9a56-3df96c823f42.png)
![Snipaste_2023-03-30_01-05-45](https://user-images.githubusercontent.com/16256221/228617304-3107244b-ce13-4b96-b665-1d13090d24a7.png)
## 功能
- 全新实现的双语对照翻译功能,不必再担心切换翻译后找不到原始功能

View File

@ -26,6 +26,7 @@
#settings .bilingual__trans_wrapper:not(#settings .tabitem .bilingual__trans_wrapper),
label>span>.bilingual__trans_wrapper,
fieldset>span>.bilingual__trans_wrapper,
.label-wrap>span>.bilingual__trans_wrapper,
.w-full>span>.bilingual__trans_wrapper,
.context-menu-items .bilingual__trans_wrapper,
@ -50,15 +51,6 @@
.label-wrap>span:first-of-type {
font-size: 13px;
line-height: 1;
padding: 4px 6px;
}
.label-wrap + div {
padding: var(--block-padding, 10px 12px);
}
label>.wrap>ul.options {
min-width: var(--size-full);
width: max-content;
}
#txt2img_script_container > div {
@ -88,6 +80,10 @@
height: 1em;
transform-origin: center center;
}
.gradio-dropdown ul.options li.item {
padding: 0.3em 0.4em !important;
}
/* Posex extension */
.posex_bg {
@ -286,9 +282,9 @@
const elems = document.getElementsByTagName('gradio-app')
const elem = elems.length == 0 ? document : elems[0]
if (elem !== document) elem.getElementById = function(id){ return document.getElementById(id) }
if (elem !== document) elem.getElementById = function (id) { return document.getElementById(id) }
return elem.shadowRoot ? elem.shadowRoot : elem
}
}
function querySelector(...args) {
return gradioApp()?.querySelector(...args)
@ -474,6 +470,9 @@
// process gradio dropdown menu
delegateEvent(gradioApp(), 'mousedown', 'ul.options .item', function (event) {
if (Object.keys(localization).length) return; // disabled if original translation enabled
if (Object.keys(opts).length === 0) return; // does nothing if opts is not loaded
const { target } = event
if (!target.classList.contains('item')) {