Skip to content

Commit aeaf05a

Browse files
author
Julia Bakerink
committed
cleaned up commented out code and console.logs, fixed some styling in nav
1 parent 094e894 commit aeaf05a

File tree

21 files changed

+28
-116
lines changed

21 files changed

+28
-116
lines changed

src-electron/electron-main.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,14 @@ function sendTokenRequest() {
111111

112112
// Listens for response from token request
113113
request.on("response", (response) => {
114-
// logEverywhere("request.on response received");
115114
response.on("end", () => {
116-
// logEverywhere("Response ended ");
117115
});
118116
response.on("data", (data) => {
119117
const decoded = JSON.parse(data.toString());
120118
if (decoded.error) {
121119
return slackErrorHandler(decoded.error);
122120
}
123-
// console.log('Is there an error? ', !!decoded.error, 'if true, this shouldnt be logging')
124121
mainWindow.webContents.send("tokenReceived", decoded);
125-
// getSlackUser(decoded.access_token, decoded.authed_user.id)
126122
});
127123
});
128124
request.end();
@@ -143,27 +139,22 @@ function getSlackUser(token, userId) {
143139
});
144140
request.on("response", (response) => {
145141
response.on("end", () => {
146-
// logEverywhere('User data recieved')
147142
});
148143
response.on("data", (data) => {
149144
const decoded = JSON.parse(data.toString());
150145
if (decoded.error) {
151146
return slackErrorHandler(decoded.error);
152147
}
153-
// logEverywhere('slackUser decoded data in getSlackUser' + decoded)
154148
mainWindow.webContents.send("slackUser", decoded);
155149
});
156150
});
157151
request.end();
158152
}
159153

160154
function setOauthListener() {
161-
// logEverywhere(`process.env.SLACK_CLIENT_ID in electron-main: ${process.env.SLACK_CLIENT_ID}`);
162-
// logEverywhere(`process.env.SLACK_CLIENT_SECRET in electron-main: ${process.env.SLACK_CLIENT_SECRET}`);
163155

164156
if (process.env.PROD) {
165157
return deeplink.on("received", (link) => {
166-
// logEverywhere(`auth worked here link: ${link}`);
167158
// Extracts Slack authorization code from deep link
168159
authCode = link.split("=")[1];
169160
sendTokenRequest();

src/components/dashboard_items/CodeSnippet.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ export default {
7777
},
7878
// Creates beginner boilerplate
7979
createTemplate(componentName) {
80-
// not sure why output was set up like this, was imputted into return statement
81-
// using string literal
82-
// let output = ``
83-
// output += ` <div>\n`
8480
let templateTagStr = this.writeTemplateTag(componentName);
8581
return `<template>\n <div>\n${templateTagStr} </div>\n</template>`;
8682
},
@@ -138,7 +134,6 @@ export default {
138134
// eslint-disable-next-line no-unused-vars
139135
for (let el of htmlArr) {
140136
if (!el.text) {
141-
// console.log(htmlArr)
142137
outputStr += ` <${el}/>\n`;
143138
} else {
144139
outputStr += ` `;

src/components/dashboard_items/HTMLQueue.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Description:
88
<section class="html-queue">
99
<span class='list-title' v-if='this.activeLayer.id !== ""'>
1010
<i class="fas fa fa-chevron-up fa-md" @click="setParentLayer"></i>
11-
<!-- <button v-if='this.activeLayer.id' @click="upOneLayer">Up</button> -->
1211
&nbsp; &nbsp; Viewing Elements in {{this.activeComponent}} '{{ depth }}'
1312
<hr>
1413
</span>

src/components/file_system_interface/ExportProject.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Description:
1515
<div class="settings-dropdown column items-center">
1616
<p class="center">Export:</p>
1717
<q-btn class="menu-btn" no-caps color="secondary" label="Project" @click="exportProject"/>
18-
<q-btn class="menu-btn" no-caps color="secondary" label="Active Component" @click="useExportComponentBound" :disabled="!activeComponent.trim()"/>
18+
<q-btn class="active-comp-btn" no-caps color="secondary" label="Active Component" @click="useExportComponentBound" :disabled="!activeComponent.trim()"/>
1919
</div>
2020
</q-menu>
2121

@@ -489,7 +489,6 @@ export default {
489489
if (data === undefined) return;
490490
if (!fs.existsSync(data)) {
491491
fs.mkdirSync(data);
492-
// console.log(`data: ${data}`); // displays the directory path
493492
fs.mkdirSync(path.join(data, "public"));
494493
fs.mkdirSync(path.join(data, "src"));
495494
fs.mkdirSync(path.join(data, "src", "assets"));
@@ -565,5 +564,10 @@ export default {
565564
box-sizing: border-box;
566565
}
567566
567+
.active-comp-btn{
568+
width: 80%;
569+
margin: 5px 0px 15px;
570+
}
571+
568572
569573
</style>

src/components/file_system_interface/OpenProjectComponent.vue

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Description:
1010
<div class="settings-dropdown column items-center">
1111
<p class="center">Import:</p>
1212
<q-btn class="menu-btn" no-caps color="secondary" label="Project JSON" @click="openProjectJSON"/>
13-
<ImportComponent class="import-comp" no-caps title="Component"/>
14-
<!-- <q-btn class="menu-btn" no-caps color="secondary" label="Component" @click="exportProject"/> -->
13+
<ImportComponent id="import-btn" no-caps title="Component"/>
1514
</div>
1615
</q-menu>
1716

@@ -74,8 +73,18 @@ export default {
7473
margin: 5px 0px;
7574
}
7675
77-
.import-comp{
78-
width: 80% !important;
79-
margin: 10px 0px;
76+
#import-btn{
77+
width: 80%;
78+
margin: 10px 0px 15px;
79+
}
80+
81+
.center{
82+
display:inline-block;
83+
text-align: center;
84+
margin-top: 10px;
85+
margin-bottom: 5px;
86+
font-weight: bold;
87+
color: white;
88+
box-sizing: border-box;
8089
}
8190
</style>

src/components/file_system_interface/SaveProjectComponent.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export default {
5656
parseAndDelete(htmlList) {
5757
htmlList.forEach((element) => {
5858
if (!Array.isArray(element.children))
59-
console.log("This should be an array", element.children);
6059
if (element.children.length > 0) {
6160
this.parseAndDelete(element.children);
6261
}
@@ -122,7 +121,6 @@ export default {
122121
);
123122
localforage.getItem("slackWebhookURL", (err, value) => {
124123
// TODO: handle error
125-
console.log("error: ", err);
126124
if (value) this.notifySlack(fileName, value);
127125
});
128126
}

src/components/home_sidebar_items/ComponentTab/ComponentActions.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export default {
9191
// Prevent Delete on changes to searchable multiselect
9292
stopDelete(e) {
9393
if (e.code === "Backspace") e.stopPropogation();
94-
// console.log(e);
9594
},
9695
// adds an action to the currently selected component
9796
addActionToComp() {

src/components/home_sidebar_items/ComponentTab/CreateComponentHTMLQueue.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ Description:
66

77
<template>
88
<section class="html-queue">
9-
<!-- <i v-if='!this.activeLayer.id' class="fas fa fa-chevron-up fa-md" @click="setParentLayer"></i> -->
10-
<!-- <span class='list-title' v-if='this.activeLayer.id !== ""'> Viewing Elements in '{{ depth }}' </span>
11-
<span class='list-title' v-else-if='!this.activeComponent'></span> -->
12-
<!-- <hr> -->
139
<div
1410
group="people"
1511
class="list-group"
1612
>
17-
<!-- <p v-if='!this.componentMap[this.activeComponent]?.htmlList.length'>No HTML elements in component</p> -->
1813
<div
1914
:class="activeHTML === element[2] ? 'list-group-item-selected' : 'list-group-item'"
2015
@dblclick.self="setActiveElement(element)"

src/components/home_sidebar_items/ComponentTab/ImportComponent.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
methods: {
3333
//emitter to send the importedObj to CreateComponent when fully parsed.
3434
createImport(importObj){
35-
useCreateComponent.bind(this)(importObj) //this is where we will want to invoke the composabreplacele
35+
useCreateComponent.bind(this)(importObj) //this is where we will want to invoke the composable
3636
},
3737
...mapActions([
3838
"registerComponent",
@@ -278,11 +278,11 @@ export default {
278278
279279
</script>
280280

281-
<style scoped>
282-
#import-component-btn{
283-
width: 100%;
284-
margin: 10px 0px 20px;
285-
}
281+
<style>
282+
#import-component-btn{
283+
width: 100%;
284+
margin: 10px 0px 15px;
285+
}
286286
</style>
287287

288288

src/components/home_sidebar_items/StoreTab/StoreTab.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ export default {
166166
},
167167
// Delete a selected state in the store
168168
deleteState(state) {
169-
// console.log('state: ', state);
170169
this.deleteUserState(state);
171170
},
172171
},

0 commit comments

Comments
 (0)