Skip to content

Commit

Permalink
Neaten (#30)
Browse files Browse the repository at this point in the history
* added toggles

* minor bug fix involving clearing of tag_focus

* halfway through cleaning up the excessive data pulls

* caching for get_tag_resources

* halfway

* fixed broken coloring

* color bug fix

* quite smooth now

* neatened things

* small design bugs

* multiadd tags
  • Loading branch information
tch1001 authored Oct 8, 2022
1 parent 1a58e71 commit 7525c43
Show file tree
Hide file tree
Showing 5 changed files with 417 additions and 164 deletions.
6 changes: 6 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ body {
bottom: 0;
right: 0;
}
.graph-logs-panel {
background-color: yellow;
position: fixed;
bottom: 0;
left: 0;
}
.info-panel-outer {
position: relative;
Expand Down
16 changes: 9 additions & 7 deletions src/components/DataPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@
</div>
<div class="control">
<a target="_blank" :href="data_panel.link">
<button class="button is-dark">Open</button>
<button class="button is-dark info-panel-item">Open</button>
<button @click="hide_description = !hide_description"
class="button info-panel-item">{{ hide_description ? "Show" : "Hide"}} description</button>
</a>
<text class="subtitle is-4 data-panel-item">{{ retrieval_status }}</text>
</div>
<div class="control" :style="{marginTop: '10px'}">
<div class="control" :style="{marginTop: '10px'}" v-if="!hide_description">
<textarea class="textarea" rows="5" cols="50" placeholder="Description" :value="data_panel.description"
@focus="pauseKeyDown" @blur="handleBlur('description', $event)"></textarea>
</div>

<div class="info-panel-inner">
<div></div>
</div>
</div>
</template>

Expand Down Expand Up @@ -62,6 +60,7 @@ import graphData from "../graphData";
const project_id: any = ref("");
const retrieval_status = ref("")
const hide_description = ref(true);
export default defineComponent({
name: "DataPanel",
setup() { },
Expand All @@ -72,7 +71,8 @@ export default defineComponent({
},
data() {
return {
retrieval_status
retrieval_status,
hide_description
}
},
methods: {
Expand Down Expand Up @@ -119,13 +119,15 @@ export default defineComponent({
request_url_post.substring(0, requestLengthLimit) +
(request_url_post.length > requestLengthLimit ? "..." : "");
retrieval_status.value = "Saving..."
this.$emit('add_log', 'DataPanel', 'saving data panel...')
axios.post(request_url_pre + request_url_post).then((response) => {
console.log(response.data);
graphData.nodes.value[`node${response.data.uid}`] = response.data;
if (this.$props.data_panel.uid == response.data.uid) {
this.$emit("updatedDataPanel");
}
retrieval_status.value = "Saved!"
this.$emit('add_log', 'DataPanel', 'saved')
setTimeout(() => {
retrieval_status.value = ""
}, 1000)
Expand Down
Loading

0 comments on commit 7525c43

Please sign in to comment.