Add return to list button to script editor
<vue-headful :title="i18n('script.editor.title')"/>
<div class="file-desc-container flex-grow-0">
<div class="form-horizontal">
+ <button class="btn-return-to-list btn-primary border-0 position-absolute" @click="returnToList" v-text="i18n('common.list')"></button>
<div class="caret-box pointer-cursor" @click="toggleHideDescription">
<i class="fa" :class="{ 'fa-caret-up' : !hideDescription, 'fa-caret-down' : hideDescription }"></i>
</div>
this.$localStorage.set(this.SCRIPT_DESCRIPTION_HIDE_KEY, this.hideDescription);
}
+ returnToList() {
+ this.$router.referer ? this.$router.back() : this.$router.push('/script/');
+ }
+
get basePath() {
return this.remainedPath.substring(0, this.remainedPath.lastIndexOf('/'));
}
div.caret-box {
position: absolute;
- left: 25px;
+ left: 53px;
padding: 5px;
color: #495057
}
}
}
+ .btn-return-to-list {
+ left: -1px;
+ height: 30px;
+ width: 50px;
+ border-radius: 0 3px 3px 0;
+ }
+
.description-container {
height: 90px;
}
