Former-commit-id: 9ed4c932f672a18633e6cbc198dd1032fb8cbe32
This commit is contained in:
Physton
2023-05-15 09:52:12 +08:00
parent b1308d236c
commit 0ee866da4f
11 changed files with 1034 additions and 698 deletions

View File

@@ -1 +1 @@
cb870b3742b3e83ac89f08b9841a9115131224b9
386883cbea4f63fb8a2985292abcaf10e9074db7

View File

@@ -1 +1 @@
7e449e96dd7b8b442459cfe2d7e3fa5b86f309e0
9afe58982ada9a5615f1d083084dbb670f5999ab

View File

@@ -457,113 +457,5 @@ export default {
</script>
<style lang="less">
@import "toastr/build/toastr.min.css";
@import "tippy.js/dist/tippy.css";
.hover-scale-120 {
animation: all 0.3s;
&:hover {
transform: scale(1.2);
}
}
.hover-scale-140 {
animation: all 0.3s;
&:hover {
transform: scale(1.4);
}
}
.physton-paste-popup {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2000;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.5);
.paste-popup-main {
width: 700px;
height: auto;
padding: 20px;
margin: 0;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
transition: height .1s ease-in-out, width .1s ease-in-out;
color: #fff;
position: relative;
.paste-popup-close {
display: block;
padding: 4px;
position: absolute;
right: -14px;
top: -14px;
background: #ffffffe6;
border-radius: 50%;
box-shadow: 0px 1px 5px 0px #d81e06;
cursor: pointer;
&:hover {
background: #d81e06;
}
}
.paste-popup-title {
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
word-break: keep-all;
white-space: nowrap;
overflow: hidden;
}
.paste-popup-body {
.paste-content {
background: rgba(30, 30, 30, .9);
border: 1px solid #3c3c3c;
padding: 4px;
width: 100%;
font-size: 14px;
color: #fff;
resize: none;
height: 400px;
box-sizing: border-box;
&:focus {
outline: none;
border-color: #4A54FF;
}
}
.paste-submit {
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
color: #1d1d1d;
border-radius: 10px;
padding: 10px;
margin-top: 10px;
text-align: center;
color: #fff;
font-size: 20px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
&:hover {
box-shadow: 0 0 14px #4a54ff;
}
}
}
}
}
@import "@/main.less";
</style>

View File

@@ -238,173 +238,4 @@ export default {
},
}
}
</script>
<style lang="less" scoped>
.physton-prompt-favorite {
position: absolute;
z-index: 999;
width: 0;
height: 0;
padding: 0;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
transition: height .1s ease-in-out, width .1s ease-in-out;
top: -9999px;
left: -9999px;
.favorite-content {
position: relative;
}
.favorite-detail {
position: absolute;
right: -404px;
top: 0;
width: 400px;
z-index: 1000;
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
padding: 10px;
color: #1d1d1d;
.favorite-item-tags {
display: flex;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: wrap;
.favorite-item-tag {
margin-right: 5px;
margin-bottom: 5px;
&:last-child {
margin-right: 0;
}
.item-tag-value {
padding: 4px 6px;
border-radius: 5px;
background: rgba(30, 30, 30, .9);
font-size: 12px;
color: #fff;
}
.item-tag-local-value {
font-size: 12px;
margin-top: 2px;
}
}
}
}
.favorite-list {
width: 100%;
height: 100%;
overflow: hidden;
overflow-y: auto;
.favorite-item {
padding: 6px 10px;
border-bottom: 1px solid #3c3c3c;
cursor: pointer;
&:hover {
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
.favorite-item-prompt {
overflow: visible;
white-space: normal;
color: #1d1d1d;
}
}
.favorite-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
.item-header-left, .item-header-right {
display: flex;
justify-content: flex-start;
align-items: center;
> div {
margin-right: 10px;
font-size: 14px;
color: #fff;
&:last-child {
margin-right: 0;
}
}
}
.item-header-left {
.item-header-index {
background: #4A54FF;
padding: 2px 0;
width: 32px;
text-align: center;
}
.item-header-time {
width: 110px;
}
.item-header-name {
.header-name-input {
background: transparent;
border: 1px solid #3c3c3c;
height: 20px;
padding: 0 4px;
width: 210px;
font-size: 12px;
color: #00F9E5;
&:focus {
outline: none;
border-color: #4A54FF;
}
}
}
}
.item-header-right {
font-size: 12px;
color: #fff;
}
}
.favorite-item-prompt {
margin-top: 5px;
font-size: 14px;
line-height: 18px;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.favorite-empty {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
span {
font-size: 14px;
color: #999;
}
}
}
</style>
</script>

View File

@@ -263,193 +263,4 @@ export default {
},
}
}
</script>
<style lang="less" scoped>
.physton-prompt-history {
position: absolute;
z-index: 999;
width: 0;
height: 0;
padding: 0;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
transition: height .1s ease-in-out, width .1s ease-in-out;
top: -9999px;
left: -9999px;
.history-content {
position: relative;
}
.history-detail {
position: absolute;
right: -404px;
top: 0;
width: 400px;
z-index: 1000;
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
padding: 10px;
color: #1d1d1d;
.history-item-tags {
display: flex;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: wrap;
.history-item-tag {
margin-right: 5px;
margin-bottom: 5px;
&:last-child {
margin-right: 0;
}
.item-tag-value {
padding: 4px 6px;
border-radius: 5px;
background: rgba(30, 30, 30, .9);
font-size: 12px;
color: #fff;
}
.item-tag-local-value {
font-size: 12px;
margin-top: 2px;
}
}
}
}
.history-list {
width: 100%;
height: 100%;
overflow: hidden;
overflow-y: auto;
position: relative;
.history-clear {
background: rgba(30, 30, 30, .9);
position: sticky;
top: 0;
padding: 10px 10px;
cursor: pointer;
border-bottom: 1px solid #4A54FF; // 6772FF
color: #ff4a4a;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
&:hover {
border-bottom: 1px solid #ff4a4a;
background: center center #4A54FF;
}
}
.history-item {
padding: 6px 10px;
border-bottom: 1px solid #3c3c3c;
cursor: pointer;
&:hover {
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
.history-item-prompt {
overflow: visible;
white-space: normal;
color: #1d1d1d;
}
}
.history-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 5px;
.item-header-left, .item-header-right {
display: flex;
justify-content: flex-start;
align-items: center;
> div {
margin-right: 10px;
font-size: 14px;
color: #fff;
&:last-child {
margin-right: 0;
}
}
}
.item-header-left {
.item-header-index {
background: #4A54FF;
padding: 2px 0;
width: 32px;
text-align: center;
}
.item-header-time {
width: 110px;
}
.item-header-name {
.header-name-input {
background: transparent;
border: 1px solid #3c3c3c;
height: 20px;
padding: 0 4px;
width: 210px;
font-size: 12px;
color: #00F9E5;
&:focus {
outline: none;
border-color: #4A54FF;
}
}
}
}
.item-header-right {
font-size: 12px;
color: #fff;
}
}
.history-item-prompt {
margin-top: 5px;
font-size: 14px;
line-height: 18px;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.history-empty {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
span {
font-size: 14px;
color: #999;
}
}
}
</style>
</script>

View File

@@ -1 +1 @@
4c5ee0546c54fd170de9a016b9cb3ec0dbb8e267
eae49aa0d0176373cadc90f1d86a19faaa9409a9

View File

@@ -59,68 +59,4 @@ export default {
}
},
}
</script>
<style lang="less">
.physton-prompt-select-language {
position: fixed;
z-index: 2000;
margin-top: 5px;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.5);
.language-main {
height: 70%;
position: relative;
.language-close {
display: block;
padding: 4px;
position: absolute;
right: -14px;
top: -14px;
background: #ffffffe6;
border-radius: 50%;
box-shadow: 0px 1px 5px 0px #d81e06;
cursor: pointer;
z-index: 1;
&:hover {
background: #d81e06;
}
}
.language-list {
height: 100%;
overflow: hidden;
overflow-y: scroll;
display: block;
position: relative;
box-shadow: 0 0 3px #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: #1e1e1ee6;
transition: height .1s ease-in-out, width .1s ease-in-out;
position: relative;
.language-item {
font-size: 14px;
color: #fff;
font-size: 14px;
padding: 10px;
cursor: pointer;
&:hover, &.selected {
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
}
}
}
}
}
</style>
</script>

View File

@@ -187,163 +187,4 @@ Github: Physton/sd-webui-prompt-all-in-one`,
}
},
}
</script>
<style lang="less">
.physton-prompt-translate-setting {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2000;
display: flex;
justify-content: center;
align-items: center;
background: rgba(0, 0, 0, 0.5);
.translate-setting-main {
width: 700px;
height: auto;
padding: 20px;
margin: 0;
box-shadow: 0 0 3px 0 #4a54ff;
border-radius: 6px 6px 4px 4px;
background-color: rgba(30, 30, 30, .9);
transition: height .1s ease-in-out, width .1s ease-in-out;
color: #fff;
.setting-line {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-bottom: 10px;
.line-title {
font-size: 16px;
font-weight: bold;
color: #fff;
width: 150px;
line-height: 24px;
}
.line-content {
flex: 1;
font-size: 14px;
color: #fff;
span {
font-size: 14px;
color: #fff;
}
.api-name {
display: inline-block;
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
color: #1d1d1d;
border-radius: 2px;
padding: 4px;
}
input, textarea, select {
background: rgba(30, 30, 30, .9);
border: 1px solid #3c3c3c;
padding: 4px;
width: 100%;
font-size: 14px;
color: #fff;
resize: none;
&:focus {
outline: none;
border-color: #4A54FF;
}
}
.test-input {
height: 150px;
}
.test-btn {
cursor: pointer;
display: inline-block;
padding: 0 40px;
height: 40px;
line-height: 40px;
color: #fff;
background: #108bb5;
border-radius: 4px;
display: inline-block;
}
.translate-error {
color: #ff4a4a;
font-size: 14px;
margin-bottom: 10px;
}
.help-list {
font-size: 14px;
line-height: 24px;
.help-item {
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
a {
color: #fff;
text-decoration: none;
font-size: 14px;
border-bottom: 1px solid #fff;
padding-bottom: 4px;
&:hover {
color: #108bb5;
border-bottom-color: #108bb5;
}
}
}
}
}
}
.setting-btns {
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 10px;
.translate-save {
cursor: pointer;
display: inline-block;
padding: 0 40px;
height: 40px;
line-height: 40px;
color: #fff;
background: center center #4A54FF;
background-image: linear-gradient(315deg, #6772FF 0, #00F9E5 100%);
background-size: 104% 104%;
border-radius: 4px;
display: inline-block;
margin-right: 10px;
}
.translate-close {
cursor: pointer;
display: inline-block;
padding: 0 40px;
height: 40px;
line-height: 40px;
color: #4A54FF;
background: transparent;
border: 1px solid #4A54FF;
border-radius: 4px;
display: inline-block;
}
}
}
}
</style>
</script>

1025
src/src/main.less Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1
style.css.REMOVED.git-id Normal file
View File

@@ -0,0 +1 @@
a28a03dc34d95698cc144bf01a78bdfa4b9abd53