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

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
},

src/components/slack_login/SlackLoginWindow.vue

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<!--<template v-if="show">-->
21
<template>
32
<q-btn class="menu-btn" color= "purple" no-caps @click="openLogin">
43
<!-- Slack logo -->
@@ -11,19 +10,6 @@
1110
Slack Login
1211
</q-btn>
1312
<div>
14-
<!-- <div>
15-
<q-btn class="glossy bg-black openModalBtn" size="5px" @click="openLogin">
16-
</q-btn>
17-
</div> -->
18-
19-
<!--
20-
Slack Login Button:
21-
-->
22-
23-
<!--
24-
Skip button:
25-
-->
26-
2713

2814
<q-dialog
2915
v-model="showLogin"
@@ -105,22 +91,10 @@ export default {
10591
10692
this.isAuthenticating = true;
10793
108-
// Tests
109-
// console.log(`${slackBaseUrl}?scope=${scope}&redirect_uri=${redirectUri}&client_id=${clientId}`)
110-
// console.log(redirectUri.slice(1, redirectUri.length - 1))
11194
const trimmedUri = redirectUri.slice(1, redirectUri.length - 1);
11295
const trimmedClientId = clientId.slice(1, clientId.length - 1);
11396
114-
// console.log("clicked");
115-
// **************** ok
116-
// shell.openExternal(
117-
// // `${slackBaseUrl}?response_type=${responseType}&scope=${scope}&client_id=${clientId}&redirect_uri=${redirectUri}`,
118-
// `${slackBaseUrl}?scope=${scope}&redirect_uri=${redirectUri}&client_id=${clientId}`,
119-
// { activate: true }
120-
// );
121-
// ****************** test
12297
shell.openExternal(
123-
// `${slackBaseUrl}?response_type=${responseType}&scope=${scope}&client_id=${clientId}&redirect_uri=${redirectUri}`,
12498
`${slackBaseUrl}?scope=${scope}&redirect_uri=${trimmedUri}&client_id=${trimmedClientId}`,
12599
{ activate: true }
126100
);
@@ -140,7 +114,6 @@ export default {
140114
this.errorMessage = "";
141115
},
142116
openLogin: function () {
143-
console.log('trying to open!')
144117
this.showLogin = true;
145118
},
146119
},

src/index.template.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<title><%= productName %></title>
55

66
<meta charset="utf-8">
7-
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self' https://kit.fontawesome.com/; script-src https://kit.fontawesome.com/ 'self' ws:; connect-src https://*.fontawesome.com/ ws:; style-src 'sha256-bepHRYpM181zEsx4ClPGLgyLPMyNCxPBrA6m49/Ozqg='"> -->
87
<meta name="description" content="<%= productDescription %>">
98
<meta name="format-detection" content="telephone=no">
109
<meta name="msapplication-tap-highlight" content="no">
@@ -23,12 +22,6 @@
2322
<link rel="preconnect" href="https://fonts.googleapis.com">
2423
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
2524
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Mukta:wght@200;300;400;500;600;700;800&family=Nunito+Sans:wght@200;300;400;600;700;800;900&display=swap" rel="stylesheet">
26-
<!-- <link
27-
rel="stylesheet"
28-
href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
29-
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU"
30-
crossorigin="anonymous"
31-
/> -->
3225

3326
</head>
3427
<body>

src/layouts/MyLayout.vue

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ Description:
1313
<!-- the top header of OverVue -->
1414
<q-header elevated class="gradient text-white">
1515
<q-toolbar>
16-
<!-- <q-btn dense flat color="subaccent" round @click="left = !left">
17-
<i
18-
:class="[left ? 'fas fa-chevron-left' : 'fas fa-list-ul']"
19-
id="btn"
20-
></i>
21-
</q-btn> -->
2216
<q-toolbar-title><img alt="OverVue" src="../assets/OverVue_navLogo.png" id="nav-logo"><div id="undo-redo">
2317
<q-btn>
2418
<i
@@ -50,7 +44,7 @@ Description:
5044
<OpenProjectComponent />
5145
<ExportProjectComponent />
5246

53-
<q-btn class="nav-btn" icon="fas fa-cog" size="sm">
47+
<q-btn class="nav-btn" icon="fas fa-cog" unelevated size="sm">
5448
<!-- < fas => fontawesome, refers to icon style -->
5549
<q-menu :offset="[0, 15]" class="dropdown">
5650

@@ -80,8 +74,6 @@ Description:
8074
</q-menu >
8175
</q-btn>
8276

83-
84-
<!-- </div> -->
8577
<!-- this button will open the right drawer -->
8678
</q-toolbar>
8779
</q-header>
@@ -231,16 +223,7 @@ export default {
231223
}, 750);
232224
}
233225
},
234-
235-
// undo() {
236-
// this.$emit("undo");
237-
// },
238-
// redo() {
239-
// this.$emit("redo");
240-
// },
241226
syncTypescriptFlag(e) {
242-
console.log("Test")
243-
console.log(e.target.value)
244227
let checkboxValue;
245228
if (e.target.value === "off") {
246229
checkboxValue = "on";
@@ -371,7 +354,7 @@ q-btn > i {
371354

372355
.nav-btn {
373356
margin-left: 0.5rem;
374-
// height: 25px
357+
box-shadow: none !important;
375358
}
376359

377360
.q-toolbar {

src/router/routes.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11

22
const routes = [
3-
// {
4-
// path: '/',
5-
// component: () => import('layouts/MainLayout.vue'),
6-
// children: [
7-
// { path: '', component: () => import('pages/Index.vue') }
8-
// ]
9-
// },
10-
113
// Experimental OverVue Route
124
{
135
path: '/',

src/store/actions.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,6 @@ const actions = {
309309
commit(types.SET_ACTIVE_COMPONENT, '')
310310
},
311311

312-
[types.importComponent]: ({ commit }, payload) => {
313-
//import component
314-
console.log(payload)
315-
},
316-
317312
// Add project
318313
[types.addProject]: ({ commit }, payload) => {
319314
commit(types.ADD_PROJECT, payload);

src/store/mutations.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ const mutations = {
640640
//commented stuff below does not seem necessary for the functionality of this if block.
641641
//children will be current children EXCLUDING payload
642642
// const child = temp.filter((el) => payload.includes(el));
643-
console.log('delete block')
644643
let childCount = 0;
645644
const components = Object.values(state.componentMap);
646645
for (const comp of components) {

src/utils/clearImage.util.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const clearImageDialog = async () => {
1212
// return dialog.showMessageBox(options)
1313
const helper = await ipcRenderer.invoke('clearImage', options)
1414
.then(res => {
15-
console.log('Res from clear image util: ')
16-
console.log(res)
1715
return res;
1816
})
1917
.catch(err => console.log(err))

0 commit comments

Comments
 (0)