Add project info editor (#3754)

* Add button to add model info

* Initial impl of project info editor

* Add sidebar item to edit project info

* Add license selector

* Fix use of deprecated apis

* Fix license combox dark mode

* Add back button on project info editor screen

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox 2024-01-21 22:13:37 +08:00 committed by GitHub
parent ead78a98f9
commit 122c5cedd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 292 additions and 189 deletions

View file

@ -65,4 +65,9 @@ a
.FileItem
{
background-color:#36363C;
}
}
#AddModelInfoBtn:hover
{
color: #000;
}

View file

@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="-3 -3 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.0769 6.84171C12.0769 6.58678 12.2835 6.38017 12.5385 6.38017C12.7934 6.38017 13 6.58678 13 6.84171V10.6923C13 11.9668 11.9668 13 10.6923 13H3.30769C2.03323 13 1 11.9668 1 10.6923V3.30769C1 2.03323 2.03323 1 3.30769 1H7.7006C7.95553 1 8.16214 1.20661 8.16214 1.46154C8.16214 1.71647 7.95553 1.92308 7.7006 1.92308H3.30769C2.54309 1.92308 1.92308 2.54309 1.92308 3.30769V10.6923C1.92308 11.4569 2.54309 12.0769 3.30769 12.0769H10.6923C11.4569 12.0769 12.0769 11.4571 12.0769 10.6923V6.84171ZM11.8775 1.74946C12.0528 1.57007 12.3392 1.5634 12.5226 1.73431C12.706 1.90541 12.7191 2.19171 12.5523 2.37885L7.51689 7.77975C7.34309 7.96617 7.05102 7.97644 6.86442 7.80264C6.67801 7.62885 6.66773 7.33678 6.84153 7.15018L11.8775 1.74946Z" fill="#6B6B6B"/>
</svg>

After

Width:  |  Height:  |  Size: 865 B

View file

@ -26,6 +26,7 @@
<div id="EmptyArea">
<div><img src="img/null.png"></div>
<div>no model information</div>
<div id="AddModelInfoBtn" class="trans TextS1" tid='orca1' onClick="OnClickEditProjectInfo()">Edit Project Info</div>
</div>
<div id="WholeArea">
@ -42,6 +43,9 @@
<div id="Profile_ProcessBar" class="LeftProcessBar" onclick="OnMenuClick('Model_Profile');">
<img class="LeftTipIcon ProfileIcon" src="img/profile_h.svg" /><span class="trans" tid='t97'>Profile Information</span>
</div>
<div id="Edit_ProcessBar" class="LeftProcessBar" onclick="OnClickEditProjectInfo();">
<img class="LeftTipIcon" src="img/edit.svg" /><span class="trans" tid='orca1'>Edit Project Info</span>
</div>
</div>
<div id="LeftEmptyBlock" style="height: 100%;width:280px;">&nbsp;</div>

View file

@ -153,7 +153,7 @@ body
position:fixed;
top: 24px;
width: 264px;
height: 120px;
height: 160px;
flex-shrink: 0;
}
@ -376,3 +376,19 @@ body
background-color: rgba(255,0,0,.5)!important;
}
#AddModelInfoBtn
{
border-width: 1px;
border-style: solid;
padding: 0px 10px;
border-radius: 6px;
line-height: 26px;
height: 26px;
margin-top: 20px;
cursor: pointer;
}
#AddModelInfoBtn:hover
{
background-color:#CDCECE;
}

View file

@ -580,7 +580,14 @@ function OnClickOpenImage( F_ID )
$("img#"+F_ID).click();
}
function OnClickEditProjectInfo()
{
var tSend={};
tSend['sequence_id']=Math.round(new Date() / 1000);
tSend['command']="edit_project_info";
SendWXMessage( JSON.stringify(tSend) );
}