修改设置的删除功能

This commit is contained in:
sylor_huang@126.com 2020-03-26 14:13:52 +08:00
parent ff7d20a684
commit 22fbdcf57a
3 changed files with 86 additions and 17 deletions

View File

@ -3,8 +3,8 @@
<component name="ChangeListManager">
<list default="true" id="9830c5da-176a-4c72-a301-9f6ce98c82fe" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Main/Detail.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Main/Detail.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/forge/Settings/Setting.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/forge/Settings/Setting.js" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -14,11 +14,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="71">
<caret line="291" selection-start-line="291" selection-end-line="291" />
<state relative-caret-position="326">
<caret line="305" column="20" lean-forward="true" selection-start-line="305" selection-start-column="20" selection-end-line="305" selection-end-column="20" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
@ -26,10 +26,46 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Setting.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="112">
<caret line="99" lean-forward="true" selection-start-line="99" selection-end-line="99" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/Index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="263">
<caret line="54" column="12" lean-forward="true" selection-start-line="54" selection-start-column="12" selection-end-line="54" selection-end-column="12" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="23" column="18" lean-forward="true" selection-start-line="23" selection-start-column="18" selection-end-line="23" selection-end-column="18" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/forge/Main/Detail.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179">
<state relative-caret-position="4777">
<caret line="303" column="11" selection-start-line="303" selection-start-column="11" selection-end-line="303" selection-end-column="11" />
<folding>
<element signature="e#0#42#0" expanded="true" />
@ -91,6 +127,8 @@
<option value="$PROJECT_DIR$/src/forge/Merge/MergeSubmit.js" />
<option value="$PROJECT_DIR$/src/forge/Main/Detail.js" />
<option value="$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js" />
<option value="$PROJECT_DIR$/src/forge/Settings/Setting.js" />
<option value="$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js" />
</list>
</option>
</component>
@ -131,7 +169,7 @@
<item name="forgeplus-react" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="forge" type="462c0819:PsiDirectoryNode" />
<item name="Main" type="462c0819:PsiDirectoryNode" />
<item name="Newfile" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
@ -173,18 +211,19 @@
<option name="presentableId" value="Default" />
<updated>1584692398144</updated>
<workItem from="1584692401543" duration="6228000" />
<workItem from="1585015135223" duration="20692000" />
<workItem from="1585015135223" duration="21118000" />
<workItem from="1585194891947" duration="1224000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="26920000" />
<option name="totallyTimeSpent" value="28570000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" weight="0.2532189" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
@ -197,7 +236,7 @@
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" order="8" />
<window_info anchor="bottom" id="Version Control" order="9" weight="0.47228914" />
<window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.54337347" />
<window_info anchor="bottom" id="Terminal" order="10" visible="true" weight="0.27710843" />
<window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@ -504,9 +543,19 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="326">
<caret line="305" column="20" lean-forward="true" selection-start-line="305" selection-start-column="20" selection-end-line="305" selection-end-column="20" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Main/Detail.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179">
<state relative-caret-position="4777">
<caret line="303" column="11" selection-start-line="303" selection-start-column="11" selection-end-line="303" selection-end-column="11" />
<folding>
<element signature="e#0#42#0" expanded="true" />
@ -514,15 +563,35 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Main/CoderRootDirectory.js">
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/Index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="71">
<caret line="291" selection-start-line="291" selection-end-line="291" />
<state relative-caret-position="263">
<caret line="54" column="12" lean-forward="true" selection-start-line="54" selection-start-column="12" selection-end-line="54" selection-end-column="12" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Settings/Setting.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="112">
<caret line="99" lean-forward="true" selection-start-line="99" selection-end-line="99" />
<folding>
<element signature="e#0#42#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/forge/Newfile/UserSubmitComponent.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="23" column="18" lean-forward="true" selection-start-line="23" selection-start-column="18" selection-end-line="23" selection-end-column="18" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

View File

@ -31,7 +31,7 @@ class UserSubmitComponent extends Component{
const url = `/${current_user && current_user.login}/${projectsId}/contents.json`;
axios.post(url,{
filepath:path,
branch:submitType==="0" ? branch : undefined,
branch:branch,
new_branch:submitType==="1" ? values.branchname:undefined,
content,
message:values.desc

View File

@ -200,7 +200,7 @@ class Setting extends Component{
<div className="flex-a-center padding15-10">
<div>
<p className="font-bd font-16">删除本仓库</p>
<p className="mt10">删除仓库是永久性的, 无法撤消</p>
<p className="mt10">删除仓库是永久性的, 无法撤消且删除后与仓库关联的项目/工单/合并请求/版本发布等均会被删除</p>
</div>
<a onClick={this.deleteProject} className="red_deleteBtn">删除本仓库</a>
</div>