Skip to content

Commit

Permalink
Merge branch 'wenzewoo:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
boatrainlsz authored Mar 31, 2022
2 parents cd94cc3 + 627ad07 commit a4fb881
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plugins {
}

group = "com.github.wenzewoo.jetbrains.plugin"
version = "1.4-SNAPSHOT"
version = "1.4.1-SNAPSHOT"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
</grid>
</children>
</grid>
<grid id="eaf14" layout-manager="GridLayoutManager" row-count="14" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="eaf14" layout-manager="GridLayoutManager" row-count="13" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<tabbedpane title="Aliyun OSS"/>
Expand Down Expand Up @@ -461,7 +461,7 @@
</component>
<component id="571c4" class="javax.swing.JLabel">
<constraints>
<grid row="11" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="10" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Style suffix"/>
Expand Down Expand Up @@ -515,7 +515,7 @@
</component>
<component id="63ba9" class="javax.swing.JTextField" binding="textAliyunStyleSuffix">
<constraints>
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
Expand All @@ -525,15 +525,15 @@
</component>
<component id="a86fc" class="javax.swing.JLabel">
<constraints>
<grid row="8" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="New fileame"/>
</properties>
</component>
<component id="1932" class="javax.swing.JComboBox" binding="comboAliyunNewFilenameTemplate">
<constraints>
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
<grid row="7" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<model>
Expand All @@ -549,23 +549,23 @@
</component>
<component id="27dfb" class="javax.swing.JTextField" binding="textAliyunNewFilenameCustomText">
<constraints>
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<grid row="8" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="5c110" class="javax.swing.JLabel">
<constraints>
<grid row="10" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="9" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="&lt;html&gt;&#10;&lt;b&gt;Variable&lt;/b&gt;&lt;br/&gt; &#10;- &lt;code&gt;${MDFile}&lt;/code&gt;: Current markdown file name, such as &quot;example&quot; &lt;br/&gt;&#10;- &lt;code&gt;${Suffix}&lt;/code&gt;: Current image file suffix, such as &quot;png&quot; &lt;br/&gt;&#10;- &lt;code&gt;${yyyyMMdd}&lt;/code&gt;: Current date, such as &quot;20200401&quot; &lt;br/&gt;&#10;- &lt;code&gt;${Timestamp}&lt;/code&gt;: Current time stamp, such as &quot;1585819668627&quot; &lt;br/&gt;&#10;- &lt;code&gt;${UUID}&lt;/code&gt;: Random 32-bit string, such as &quot;67b52ab3e50643e08b8cb980c2ecdaed&quot; &lt;br/&gt;&#10;&lt;/html&gt;" noi18n="true"/>
</properties>
</component>
<component id="aeca0" class="javax.swing.JLabel">
<constraints>
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="11" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="&lt;html&gt;&#10;If you need to, you can create a picture style or transcode style, and fill it in here. &lt;br/&gt;&#10;&lt;b&gt;Reference website:&lt;/b&gt;&#10;&lt;a href=&quot;https://help.aliyun.com/document_detail/44686.html?spm=5176.8466032.help.dexternal.1649145023i8ze&quot;&gt;https://help.aliyun.com/document_detail/44686.html&lt;a/&gt;&#10;&lt;html&gt;"/>
Expand All @@ -591,7 +591,7 @@
<grid id="77be" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="13" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<grid row="12" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
Expand All @@ -611,14 +611,6 @@
</hspacer>
</children>
</grid>
<component id="aaedd" class="javax.swing.JLabel">
<constraints>
<grid row="7" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Endpoint"/>
</properties>
</component>
<component id="f1124" class="javax.swing.JTextField" binding="aliyunCustomDomain">
<constraints>
<grid row="6" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,5 +542,4 @@ class MISConfigView : MISConfigurationInterfaceForm(), SearchableConfigurable, C
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,11 @@ class MISAliyunOSSFileStore : MISAbstractOSSFileStore() {
}

override fun previewUrl(fileKey: String, styleSuffix: Boolean): String {
MISConfigService.getInstance().state!!.aliyunCustomDomain
return if (MISConfigService.getInstance().state!!.aliyunCustomDomain.isEmpty()) {
val state = MISConfigService.getInstance().state!!
return if (state.aliyunCustomDomain.isEmpty()) {
"https://${state.aliyunBucket}.${state.aliyunEndpoint}/${fileKey}${if (styleSuffix) state.aliyunStyleSuffix else ""}"
} else {
"https://${state.aliyunCustomDomain}/${fileKey}${if (styleSuffix)
state.aliyunStyleSuffix else ""}"
"https://${state.aliyunCustomDomain}/${fileKey}${if (styleSuffix) state.aliyunStyleSuffix else ""}"
}
}

Expand Down
12 changes: 10 additions & 2 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Markdown editor one click upload image support is applicable to common products of JetBrains series.
<p>Features:</p>
<ul>
<li>Multiple storage support, such as local / qiniu / aliyun OSS / tencent OSS, etc.</li>
<li>Multiple storage support, such as local / qiniu / aliyun OSS / MinIO.</li>
<li>Customize the file name naming policy and provide a variety of preset schemes.</li>
<li>Provide picture compression function, compress pictures according to the set compression rate.</li>
<li>Directly from the paste image to the editor, automatically upload the image and convert it to the markdown tag.</li>
Expand All @@ -51,7 +51,7 @@
Markdown编辑器一键上传图片支持,适用于Jetbrains系列的常见产品。
<p>特性:</p>
<ul>
<li>多种存储支持,如本地/七牛/阿里云OSS/腾讯OSS等。</li>
<li>多种存储支持,如本地/七牛/阿里云OSS/MinIO等。</li>
<li>自定义文件名命名策略,并提供多种预设方案。</li>
<li>提供图片压缩功能,按照设置的压缩率压缩图片。</li>
<li>直接从粘贴图片到编辑器,自动上传图片并转换为Markdown标签。</li>
Expand All @@ -67,6 +67,14 @@

<change-notes><![CDATA[
<p>1.4.1-SNAPSHOT:2022/03/31</p>
<ul>
<li>阿里云OSS支持自定义域名</li>
<li>修复了若干BUG</li>
<li>By <a href="https://github.com/boatrainlsz">@boatrainlsz</a></li>
</ul>
<hr/>
<p>1.4-SNAPSHOT:2022/02/11</p>
<ul>
<li>Add MinIO support</li>
Expand Down

0 comments on commit a4fb881

Please sign in to comment.