Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.

Commit 8125b14

Browse files
committed
deprecate http and show code time cta message
1 parent 559c7eb commit 8125b14

15 files changed

+67
-333
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
> :warning: **This plugin has been deprecated.** If you're interesting in building or maintaining this plugin, please [contact us](mailto:[email protected]).
2-
3-
<br />
1+
> :warning: **This plugin is no longer being maintained.** You can continue to track your progress towards completing the challenge using <a href="https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode">Code Time</a>.
42
53
<div>
64
<h1 align="center">

assets/templates/dashboard.template.html

+20-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<html>
22
<style>
3-
3+
44
body {
55
font-family: sans-serif;
66
width: 800px;
@@ -32,7 +32,12 @@
3232
display: inline;
3333
color: ${this.cardTextColor};
3434
}
35-
35+
.warningNotice {
36+
color: #ebb135;
37+
font-size: 14px;
38+
font-weight: 600;
39+
max-width: 555px;
40+
}
3641
#topMetrics {
3742
display: flex;
3843
justify-content: space-between;
@@ -392,6 +397,10 @@ <h1>100 Days of Code Dashboard</h1>
392397
<button id="certificate">Get your Certificate</button>
393398
</div>
394399
</div>
400+
<div class="warningNotice">
401+
<p>The 100 Days of Code extension is no longer being maintained.</p>
402+
<p>You can continue to track your progress towards completing the challenge using <a href="https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode">Code Time</a></p>
403+
</div>
395404
<div class="logInMessageStyle" id="logInMessage">You must log in with Code Time to start tracking your 100 Days of Code</div>
396405
<div id="topMetrics">
397406
<div class="metricsCard">
@@ -526,12 +535,14 @@ <h1>100 Days of Code Dashboard</h1>
526535
});
527536
}
528537

529-
refreshButton.addEventListener("click", function () {
530-
refreshButton.disabled = true;
531-
vscode.postMessage({ command: "refreshView", value: "dashboard" });
532-
setTimeout(() => {
533-
refreshButton.disabled = false;
534-
}, 2000);
535-
});
538+
if (refreshButton) {
539+
refreshButton.addEventListener("click", function () {
540+
refreshButton.disabled = true;
541+
vscode.postMessage({ command: "refreshView", value: "dashboard" });
542+
setTimeout(() => {
543+
refreshButton.disabled = false;
544+
}, 2000);
545+
});
546+
}
536547
</script>
537548
</html>

assets/templates/logs.template.html

+13-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@
3333
};
3434
display: ${this.logInMessageDisplay};
3535
}
36-
36+
.warningNotice {
37+
color: #ebb135;
38+
font-size: 14px;
39+
font-weight: 600;
40+
max-width: 555px;
41+
}
3742
.logHeader {
3843
display: flex;
3944
position: absolute;
@@ -410,7 +415,7 @@
410415
visibility: visible;
411416
}
412417

413-
418+
414419

415420
/* Headings */
416421
#head1 {
@@ -549,6 +554,11 @@ <h1>Logs</h1>
549554
</div>
550555
</div>
551556

557+
<div class="warningNotice">
558+
<p>The 100 Days of Code extension is no longer being maintained.</p>
559+
<p>You can continue to track your progress towards completing the challenge using <a href="https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode">Code Time</a></p>
560+
</div>
561+
552562
<div class="logInMessageStyle" id="logInMessage">You must log in with Code Time to start tracking your 100 Days of Code</div>
553563

554564
<div id="logList">
@@ -874,4 +884,4 @@ <h1>Logs</h1>
874884
}
875885
</script>
876886

877-
</html>
887+
</html>

assets/templates/milestones.template.html

+11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
width: 100%;
2929
align-items: center;
3030
}
31+
.warningNotice {
32+
color: #ebb135;
33+
font-size: 14px;
34+
font-weight: 600;
35+
max-width: 555px;
36+
}
3137
#logIn {
3238
visibility: ${
3339
this.logInVisibility
@@ -185,6 +191,11 @@ <h1>Milestones</h1>
185191
</div>
186192
</div>
187193

194+
<div class="warningNotice">
195+
<p>The 100 Days of Code extension is no longer being maintained.</p>
196+
<p>You can continue to track your progress towards completing the challenge using <a href="https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode">Code Time</a></p>
197+
</div>
198+
188199
<div class="logInMessageStyle" id="logInMessage">You must log in with Code Time to start tracking your 100 Days of Code</div>
189200

190201
<div>${this.recents} ${this.allMilestones}</div>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "swdc-100-days-of-code",
33
"displayName": "100 Days of Code",
44
"description": "100 Days of Code helps you reach your goals and complete the #100DaysOfCode Challenge.",
5-
"version": "1.1.0",
5+
"version": "1.2.0",
66
"publisher": "softwaredotcom",
77
"icon": "resources/100-days-of-code-icon.png",
88
"scripts": {

src/extension.ts

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { displayReadmeIfNotExists, isLoggedIn, getMillisSinceLastUpdate } from "
88
import { getPluginName, getVersion } from "./utils/PluginUtil";
99
import { TrackerManager } from "./managers/TrackerManager";
1010
import { MilestoneEventManager } from "./managers/MilestoneEventManager";
11-
import { fetchSummary } from "./utils/SummaryDbUtil";
1211
import { getSummaryJsonFilePath } from "./managers/FileManager";
1312

1413
const tracker: TrackerManager = TrackerManager.getInstance();
@@ -45,7 +44,6 @@ export async function initializePlugin() {
4544
const millisSinceUpdate = getMillisSinceLastUpdate(getSummaryJsonFilePath());
4645
if (isThresholdMet(millisSinceUpdate)) {
4746
// initialize the user summary info (challenge_round and metrics data)
48-
await fetchSummary();
4947
await syncLogs();
5048
await milestoneMgr.fetchAllMilestones();
5149
}

src/managers/FileManager.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { getSoftwareDir, isWindows } from "../utils/Util";
22
import fs = require("fs");
33
import { Summary } from "../models/Summary";
44

5-
65
export function getFile(name: string) {
76
let file_path = getSoftwareDir();
87
if (isWindows()) {
@@ -43,4 +42,4 @@ export function fetchSummaryJsonFileData(): Summary {
4342
console.log("File not found: " + filepath);
4443
}
4544
return emptySummary;
46-
}
45+
}

src/managers/HttpManager.ts

-156
This file was deleted.

0 commit comments

Comments
 (0)