diff --git a/html-templates/index.ejs b/html-templates/index.ejs
deleted file mode 100644
index 85f4fd368..000000000
--- a/html-templates/index.ejs
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
- <%= htmlWebpackPlugin.options.title %>
-
-
-
-
-
-
-
-
-
-
-
-
-
- All Boards
-
-
-
-
-
\ No newline at end of file
diff --git a/src/client/boardsPage.ts b/src/client/boardsPage.ts
deleted file mode 100644
index b37603446..000000000
--- a/src/client/boardsPage.ts
+++ /dev/null
@@ -1,112 +0,0 @@
-import { Archiver } from "./archiver"
-import { Board } from "./board"
-import { Mutator } from "./mutator"
-import { OctoClient } from "./octoClient"
-import { UndoManager } from "./undomanager"
-import { Utils } from "./utils"
-
-class BoardsPage {
- boardsPanel: HTMLElement
-
- boardId: string
- boards: Board[]
-
- octo = new OctoClient()
-
- constructor() {
- // This is a placeholder page
-
- const root = Utils.getElementById("octo-tasks-app")
- root.innerText = ""
-
- // Header
- root.appendChild(Utils.htmlToElement(` { this.addClicked() }
- }
-
- document.body.appendChild(document.createElement("br"))
-
- {
- const importButton = document.body.appendChild(document.createElement("div"))
- importButton.className = "octo-button"
- importButton.innerText = "Import archive"
- importButton.onclick = async () => {
- const octo = new OctoClient()
- const mutator = new Mutator(octo, UndoManager.shared)
- Archiver.importFullArchive(mutator, () => {
- this.updateView()
- })
- }
- }
-
- {
- const exportButton = document.body.appendChild(document.createElement("div"))
- exportButton.className = "octo-button"
- exportButton.innerText = "Export archive"
- exportButton.onclick = () => {
- const octo = new OctoClient()
- const mutator = new Mutator(octo, UndoManager.shared)
- Archiver.exportFullArchive(mutator)
- }
- }
-
- this.updateView()
- }
-
- async getBoardData() {
- const boards = this.octo.getBlocks(null, "board")
- }
-
- async updateView() {
- const { boardsPanel } = this
-
- boardsPanel.innerText = ""
-
- const boards = await this.octo.getBlocks(null, "board")
- for (const board of boards) {
- const p = boardsPanel.appendChild(document.createElement("p"))
- const a = p.appendChild(document.createElement("a"))
- a.style.padding = "5px 10px"
- a.style.fontSize = "20px"
- a.href = `./board?id=${encodeURIComponent(board.id)}`
-
- if (board.icon) {
- const icon = a.appendChild(document.createElement("span"))
- icon.className = "octo-icon"
- icon.style.marginRight = "10px"
- icon.innerText = board.icon
- }
-
- const title = a.appendChild(document.createElement("b"))
- const updatedDate = new Date(board.updateAt)
- title.innerText = board.title
- const details = a.appendChild(document.createElement("span"))
- details.style.fontSize = "15px"
- details.style.color = "#909090"
- details.style.marginLeft = "10px"
- details.innerText = ` ${Utils.displayDate(updatedDate)}`
- }
-
- console.log(`updateView: ${boards.length} board(s).`)
- }
-
- async addClicked() {
- const board = new Board()
- await this.octo.insertBlock(board)
- await this.updateView()
- }
-}
-
-export = BoardsPage
-
-const _ = new BoardsPage()
-console.log("boardsView")
diff --git a/webpack.common.js b/webpack.common.js
index a309b070a..ccf4d613f 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -1,9 +1,9 @@
-const webpack = require("webpack");
-const path = require("path");
-const CopyPlugin = require("copy-webpack-plugin");
-var HtmlWebpackPlugin = require('html-webpack-plugin');
+const webpack = require("webpack")
+const path = require("path")
+const CopyPlugin = require("copy-webpack-plugin")
+var HtmlWebpackPlugin = require('html-webpack-plugin')
-const outpath = path.resolve(__dirname, "pack");
+const outpath = path.resolve(__dirname, "pack")
function makeCommonConfig() {
const commonConfig = {
@@ -47,20 +47,6 @@ function makeCommonConfig() {
{ from: path.resolve(__dirname, "node_modules/easymde/dist/easymde.min.css"), to: "static" },
],
}),
- new HtmlWebpackPlugin({
- inject: true,
- title: "OCTO",
- chunks: [],
- template: "html-templates/index.ejs",
- filename: 'index.html'
- }),
- new HtmlWebpackPlugin({
- inject: true,
- title: "OCTO - Boards",
- chunks: ["boardsPage"],
- template: "html-templates/page.ejs",
- filename: 'boards.html'
- }),
new HtmlWebpackPlugin({
inject: true,
title: "OCTO",
@@ -70,16 +56,15 @@ function makeCommonConfig() {
}),
],
entry: {
- boardsPage: "./src/client/boardsPage.ts",
boardPage: "./src/client/boardPage.tsx"
},
output: {
filename: "[name].js",
path: outpath
}
- };
+ }
- return commonConfig;
+ return commonConfig
}
-module.exports = makeCommonConfig;
+module.exports = makeCommonConfig