mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
remove old incompatible code
This commit is contained in:
parent
1b4a28c049
commit
c9c2e543b6
@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "clock",
|
||||
"version": "1.0.6",
|
||||
"description": "Display the current time",
|
||||
"main": "./src/extension.js"
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
import React from "react"
|
||||
|
||||
import "./index.less"
|
||||
|
||||
const Clock = () => {
|
||||
const [time, setTime] = React.useState(new Date())
|
||||
|
||||
React.useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
setTime(new Date())
|
||||
}, 1000)
|
||||
|
||||
return () => clearInterval(interval)
|
||||
}, [])
|
||||
|
||||
return <div className="clock">
|
||||
{time.toLocaleTimeString()}
|
||||
</div>
|
||||
}
|
||||
|
||||
export default Clock
|
@ -1,45 +0,0 @@
|
||||
export default class Clock {
|
||||
registerWidgets = [
|
||||
{
|
||||
name: "Clock",
|
||||
description: "Display the current time",
|
||||
component: () => import("./clock.jsx"),
|
||||
}
|
||||
]
|
||||
|
||||
registerPages = [
|
||||
{
|
||||
path: "/clock",
|
||||
component: () => import("./clock.jsx"),
|
||||
}
|
||||
]
|
||||
|
||||
public = {
|
||||
echo: (...str) => {
|
||||
this.console.log(...str)
|
||||
},
|
||||
fib: (n) => {
|
||||
let a = 0, b = 1
|
||||
for (let i = 0; i < n; i++) {
|
||||
let c = a + b
|
||||
a = b
|
||||
b = c
|
||||
}
|
||||
return a
|
||||
}
|
||||
}
|
||||
|
||||
events = {
|
||||
"test": (data) => {
|
||||
this.console.log("test")
|
||||
|
||||
if (data) {
|
||||
this.console.log(data)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async onInitialize() {
|
||||
this.console.log("Hi from the extension worker!")
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
.clock {
|
||||
font-size: 2rem;
|
||||
color: blue;
|
||||
|
||||
font-family: "DM Mono", monospace;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user