Skip to content

Commit ad54ede

Browse files
committed
色々修正
1 parent bfa13d0 commit ad54ede

23 files changed

+5074
-96
lines changed

.claude/settings.local.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@
2222
"Bash(taskkill:*)",
2323
"Bash(netstat:*)",
2424
"Bash(ls:*)",
25-
"Bash(dir /s /b \"C:\\\\01_work\\\\00_Git\\\\manga-editor-desu\\\\js\\\\*generator*\")"
25+
"Bash(dir /s /b \"C:\\\\01_work\\\\00_Git\\\\manga-editor-desu\\\\js\\\\*generator*\")",
26+
"Bash(node format-translations.js:*)",
27+
"Bash(move:*)",
28+
"Bash(node format-translations.cjs:*)",
29+
"Bash(ren:*)",
30+
"Bash(node -c:*)",
31+
"Bash(node -e:*)",
32+
"Bash(dd:*)",
33+
"Bash(node debug-json.cjs:*)"
2634
]
2735
},
2836
"hooks": {

css/ui/bottom-bar.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ display:flex;
3636
justify-content:center;
3737
align-items:center;
3838
font-size:14px;
39-
text-transform:uppercase;
4039
letter-spacing:2px;
41-
/* transition:background-color 0.3s ease; */
4240
}
4341

4442
.btm-drawer-handle:hover {

index.html

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@
275275
</a>
276276
</li>
277277
<li>
278-
<a class="dropdown-item" href="#" id="settingsLoad">
279-
<i class="material-icons">settings</i> <span data-i18n="settingsLoad">Settings
280-
Load</span>
278+
<a class="dropdown-item" href="#" onclick="inputImageFile()">
279+
<span class="material-symbols-outlined">image</span>
280+
<span data-i18n="imageImport">画像インポート</span>
281281
</a>
282282
</li>
283283
<li>
@@ -339,7 +339,7 @@
339339
<div class="A1111_api_content">
340340
<li>
341341
<label>
342-
<h5 data-i18n="">WebUI(A1111/Forge)</h5>
342+
<h5>WebUI(A1111/Forge)</h5>
343343
</label>
344344
<label for="sdWebUIPageUrl">
345345
<span data-i18n="apiUrl">URL</span>
@@ -844,7 +844,7 @@ <h5 data-i18n="comfyUI">ComfyUI</h5>
844844
<button id="add" onclick="panelAllChange()"><i class="material-icons">border_all</i> <span
845845
data-i18n="all_change">All Change</span></button>
846846
<button id="edit" onclick="Edit()"><i class="material-icons">edit_square</i> <span
847-
data-i18n="editingMode">Editing Mode</span></button>
847+
data-i18n="editModeOn">Panel Edit Mode ON</span></button>
848848

849849
<hr>
850850
<div class="input-group">
@@ -1727,26 +1727,7 @@ <h5 data-i18n="comfyUI">ComfyUI</h5>
17271727
<div class="area-header">
17281728

17291729

1730-
<button id="inputImageFile" onclick="inputImageFile()">
1731-
<span class="material-symbols-outlined">image</span>
1732-
<input type="file" id="imageInput" multiple style="display: none;" accept="image/*">
1733-
<label data-i18n="importButton" style="margin: 0px; ">
1734-
Import
1735-
</label>
1736-
</button>
1737-
1738-
<button id="cropMode">
1739-
<i class="material-icons">crop_free</i>
1740-
<label data-i18n="cropButton" style="margin: 0px; ">
1741-
切り抜き
1742-
</label>
1743-
</button>
1744-
<button id="crop" anim="glow" class="toggled">
1745-
<i class="material-icons">crop</i>
1746-
<label data-i18n="cropButton" style="margin: 0px; ">
1747-
切り抜き
1748-
</label>
1749-
</button>
1730+
<input type="file" id="imageInput" multiple style="display: none;" accept="image/*">
17501731

17511732
<button id="clearMode" onclick="operationModeClear()">
17521733
<span class="material-symbols-outlined">cancel_presentation</span>
@@ -1859,7 +1840,7 @@ <h5 data-i18n="comfyUI">ComfyUI</h5>
18591840

18601841
<div id="comfyUIWorkflowId" class="controls-mini">
18611842
<div class="input-group" data-group="comfyUIWorkflowGroup">
1862-
<button id="openWorkflowButton">ComfyUI Workflow's Settings</button>
1843+
<button id="openWorkflowButton" data-i18n="comfyuiWorkflowSettings">ComfyUI Workflows設定</button>
18631844
</div>
18641845
</div>
18651846

@@ -2017,7 +1998,7 @@ <h5 data-i18n="comfyUI">ComfyUI</h5>
20171998

20181999
<div id="btm-drawer" class="btm-drawer btm-closed" style="display: none;">
20192000
<div id="btm-drawer-handle" class="btm-drawer-handle neon-text">
2020-
OPEN
2001+
OPEN (Ctrl+B)
20212002
</div>
20222003
<div class="btm-drawer-content">
20232004
<div id="btm-image-container" class="btm-image-container"></div>

js/fabric/fabric-management.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,13 @@ eventLogger.trace('11: selection:cleared');
106106
if (cropFrame) {
107107
canvas.remove(cropFrame);
108108
cropFrame=null;
109-
$('crop').style.display='none';
110109
}
111110
});
112111
canvas.on('selection:updated',function() {
113112
eventLogger.trace('12: selection:updated');
114113
if (cropFrame&&canvas.getActiveObject()!==cropFrame) {
115114
canvas.remove(cropFrame);
116115
cropFrame=null;
117-
$('crop').style.display='none';
118116
}
119117
});
120118
//Crop Mode from finish

js/project-management.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ var apiMode=apis.A1111;
1717

1818
document.addEventListener("DOMContentLoaded",function () {
1919
var settingsSave=$("settingsSave");
20-
var settingsLoad=$("settingsLoad");
2120
settingsSave.addEventListener("click",function () {saveSettingsLocalStrage();});
22-
settingsLoad.addEventListener("click",function () {loadSettingsLocalStrage();});
2321

2422
var saveButton=$("projectSave");
2523
var loadButton=$("projectLoad");

js/shortcut.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ moveDownFast: 'shift+down',
2727
projectSave:!isMacOs ? 'ctrl+s' : 'command+s',
2828
projectLoad:!isMacOs ? 'ctrl+o' : 'command+o',
2929
toggleBottomBar:!isMacOs ? 'ctrl+b' : 'command+b',
30+
imageDownload:!isMacOs ? 'ctrl+d' : 'command+d',
31+
settingsSave:!isMacOs ? 'ctrl+shift+s' : 'command+shift+s',
3032
}
3133

3234
var isLongPressDirection=false;
@@ -188,6 +190,30 @@ btmToggleDrawer();
188190
e.preventDefault();
189191
});
190192

193+
// bind image download shortcut
194+
hotkeys(hotkeysMap.imageDownload,'all',function (e) {
195+
if (!isEditableTagsActive()) {
196+
cropAndDownload();
197+
e.preventDefault();
198+
}
199+
});
200+
201+
// bind settings save shortcut
202+
hotkeys(hotkeysMap.settingsSave,'all',function (e) {
203+
if (!isEditableTagsActive()) {
204+
$('settingsSave').click();
205+
e.preventDefault();
206+
}
207+
});
208+
209+
// bind enter key for crop completion
210+
hotkeys('enter','all',function (e) {
211+
if (!isEditableTagsActive()&&cropFrame) {
212+
completeCrop();
213+
e.preventDefault();
214+
}
215+
});
216+
191217
// bind fast move shortcuts (10px)
192218
hotkeys(hotkeysMap.moveLeftFast,'all',function (e) {
193219
moveActiveObjectFast('left',e);

js/sidebar/panel/panel-manager.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,23 @@ return scale;
441441

442442
function Edit() {
443443
var poly=canvas.getActiveObject();
444-
if (!poly) return;
445-
444+
var editButton=$("edit");
445+
if (!poly) {
446+
createToast(getText("editModeNotPanel"),"");
447+
return;
448+
}
449+
if (!isPanel(poly)) {
450+
createToast(getText("editModeNotPanel"),"");
451+
return;
452+
}
453+
if (!(poly instanceof fabric.Polygon)) {
454+
createToast(getText("editModeNotPolygon"),"");
455+
return;
456+
}
457+
if (!poly.points||poly.points.length<3) {
458+
createToast(getText("editModeNoPoints"),"");
459+
return;
460+
}
446461
poly.edit=!poly.edit;
447462
if (poly.edit) {
448463
var lastControl=poly.points.length-1;
@@ -460,9 +475,15 @@ pointIndex: index,
460475
});
461476
return acc;
462477
},{});
478+
activeClearButton();
479+
editButton.classList.add("selected");
480+
editButton.querySelector("span").textContent=getText("editModeOff");
463481
} else {
464482
poly.cornerStyle="rect";
465483
poly.controls=fabric.Object.prototype.controls;
484+
nonActiveClearButton();
485+
editButton.classList.remove("selected");
486+
editButton.querySelector("span").textContent=getText("editModeOn");
466487
}
467488
poly.hasBorders=!poly.edit;
468489
canvas.requestRenderAll();

js/ui/bottom-bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ btmUpdateHandleText();
2323
}
2424

2525
function btmUpdateHandleText() {
26-
btmDrawerHandle.textContent=btmDrawer.classList.contains("btm-closed") ? "OPEN" : "CLOSE";
26+
btmDrawerHandle.textContent=btmDrawer.classList.contains("btm-closed") ? "OPEN (Ctrl+B)" : "CLOSE (Ctrl+B)";
2727
}
2828

2929

js/ui/canvas-object-menu.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ var clearLeftClipPath=createObjectMenuButton('clearLeftClipPath');
109109

110110
var flipHorizontal=createObjectMenuButton('flipHorizontal');
111111
var flipVertical=createObjectMenuButton('flipVertical');
112+
var cropImage=createObjectMenuButton('cropImage');
112113

113114
var font=createObjectMenuDiv('fontSelectorMenu');
114115

@@ -169,7 +170,7 @@ menuItems.push(canvasFit);
169170

170171
menuItems.push(flipHorizontal);
171172
menuItems.push(flipVertical);
172-
173+
menuItems.push(cropImage);
173174
}
174175
}else if (isSpeechBubbleSVG(activeObject)||isSpeechBubbleText(activeObject)) {
175176
menuItems=[visible];
@@ -439,6 +440,11 @@ case 'clearRightClipPath':
439440
case 'clearLeftClipPath':
440441
removeClipPath(activeObject,action);
441442
break;
443+
case 'cropImage':
444+
if(isImage(activeObject)){
445+
startCropMode(activeObject);
446+
}
447+
break;
442448
}
443449
canvas.requestRenderAll();
444450
closeMenu();

js/ui/third/base-translation/base-de.js

Lines changed: 487 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)