+
+
{{template "repo/issue/view_title" .}}
diff --git a/web_src/js/components/EditTopics.vue b/web_src/js/components/EditTopics.vue
index c946dff47..5aa5e6e7a 100644
--- a/web_src/js/components/EditTopics.vue
+++ b/web_src/js/components/EditTopics.vue
@@ -61,18 +61,23 @@ export default {
if(!this.showInitTopic[item]){
-
- this.arrayTopics.push(array.topic_name)
+ if(this.arrayTopics.includes(array.topic_name)){
+ return
+ }
+ else{
+ this.arrayTopics.push(array.topic_name)
+
+ let topics = this.arrayTopics
+ let strTopics = topics.join(',')
+ let data = this.qs.stringify({
+ _csrf:csrf,
+ topics:strTopics
+ })
+ this.Post(data,topics)
+ this.$set(this.showInitTopic,item,true)
+ $('#repo-topics1').children('span').remove()
+ }
- let topics = this.arrayTopics
- let strTopics = topics.join(',')
- let data = this.qs.stringify({
- _csrf:csrf,
- topics:strTopics
- })
- this.Post(data,topics)
- this.$set(this.showInitTopic,item,true)
- $('#repo-topics1').children('span').remove()
@@ -93,7 +98,6 @@ export default {
this.Post(data,topics)
this.$set(this.showInitTopic,item,false)
if(this.arrayTopics.length===0){
- console.log("set empty")
$('#repo-topics1').append('
暂无标签')
}else{
$('#repo-topics1').children('span').remove()
@@ -197,32 +201,37 @@ export default {
})
},
postTopic(){
- const patter = /^[\u4e00-\u9fa5a-z0-9][\u4e00-\u9fa5a-zA-Z0-9-]{0,35}$/
+ const patter = /^[\u4e00-\u9fa5a-zA-Z0-9][\u4e00-\u9fa5a-zA-Z0-9-]{0,34}$/
let regexp = patter.test(this.input)
- console.log("regexp",regexp)
if(!regexp){
this.$notify({
- message: '主题必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符',
+ message: '标签名必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符',
duration: 3000,
type:'error'
});
return
}else{
let topic = this.input
- this.arrayTopics.push(topic)
+ if(this.arrayTopics.includes(topic)){
+ return
+ }
+ else{
+ this.arrayTopics.push(topic)
+
+ let topics = this.arrayTopics
+ let strTopics = topics.join(',')
+ let data = this.qs.stringify({
+ _csrf:csrf,
+ topics:strTopics
+ })
+ this.Post(data,topics)
+ $('#repo-topics1').children('span').remove()
+ this.showInputValue = false
+ this.showAddTopic = true
+ this.showAddFlage = true
+ }
- let topics = this.arrayTopics
- let strTopics = topics.join(',')
- let data = this.qs.stringify({
- _csrf:csrf,
- topics:strTopics
- })
- this.Post(data,topics)
- $('#repo-topics1').children('span').remove()
- this.showInputValue = false
- this.showAddTopic = true
- this.showAddFlage = true
}
diff --git a/web_src/less/openi.less b/web_src/less/openi.less
index 521515906..cf8ca6d27 100644
--- a/web_src/less/openi.less
+++ b/web_src/less/openi.less
@@ -224,15 +224,15 @@ footer .column{margin-bottom:0!important; padding-bottom:0!important;}
// icon cloudbrain
.i-round{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;}
.i-bg-organ{background-position: -496px -52px;}
-.i-bg-stop{background-position: -459px -52px;}
-.i-bg-running{background-position: -478px -52px;}
+.STOPPED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -459px -52px;}
+.RUNNING{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -478px -52px;}
.i-bg-orange{background-position: -495px -51px;}
-.i-bg-red{background-position: -532px -52px;}
+.FAILED{display:inline-block;width:18px;height:18px;background:url("/img/icons.svg");background-position: -496px -52px;background-position: -532px -52px;}
.i-bg-green{background-position: -441px -52px;}
.i-bg-used{background-position: -514px -52px;}
.icon-bind{background-position: -550px -52px;}
.icon-unbind{background-position: -568px -52px;}
-.showCircle{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;}
+.CREATING, .STOPPING, .DELETING, .STARTING, .WAITING{display:inline-block;background-image:url('/img/loading.gif');background-repeat:no-repeat;width:16px;height:16px;background-size:16px 16px;margin-right:5px;}
.text_over{
overflow: hidden;
text-overflow: ellipsis;