Skip to content

Commit 1f3d63f

Browse files
committed
Use remnote-api as submodule
1 parent 019ec81 commit 1f3d63f

File tree

5 files changed

+15
-100
lines changed

5 files changed

+15
-100
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "remnote-api"]
2+
path = remnote-api
3+
url = [email protected]:hannesfrank/remnote-api.git

remnote-api

Submodule remnote-api added at 6a49d99

src/lib/remnote-schedule.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import * as RemNoteUtil from './remnote-util';
2-
import RemNoteAPI from 'remnote-api';
1+
import * as RemNoteUtil from 'remnote-api/util';
32
import * as d3 from 'd3';
43

54
const SVG_WIDTH = 400;
@@ -12,6 +11,9 @@ const MARGIN_TOP = FONT_SIZE + 2 * TIME_MARGIN;
1211
const MARGIN_BLOCK_LEFT = 40;
1312
const MARGIN_BLOCK_RIGHT = TIME_MARGIN;
1413

14+
export const DEFAULT_START_TIME = 600;
15+
export const DEFAULT_END_TIME = 2200;
16+
1517
// Generated with https://mokole.com/palette.html
1618
// const COLOR_MAP = [
1719
// '#2f4f4f',

src/lib/remnote-util.js

-96
This file was deleted.

src/main.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as RemNoteUtil from './lib/remnote-util';
1+
import RemNoteAPI from 'remnote-api';
2+
import * as RemNoteUtil from 'remnote-api/util';
23
import {
34
loadSchedule,
45
resolveTimeFormatting,
@@ -8,6 +9,9 @@ import {
89

910
import feather from 'feather-icons';
1011

12+
window.rapi = RemNoteAPI.v0;
13+
window.rutil = RemNoteUtil;
14+
1115
// Custom config handling.
1216
const defaultSettings = {
1317
scheduleName: 'Schedule',
@@ -16,7 +20,8 @@ const defaultSettings = {
1620
autoReload: 5000,
1721
};
1822

19-
const settings = Object.assign(defaultSettings, RemNoteUtil.getSettings());
23+
// const settings = Object.assign(defaultSettings, RemNoteUtil.getSettings());
24+
const settings = defaultSettings;
2025

2126
const autoReloadEnabled = settings.reloadInterval > 0;
2227
const reloadButton = document.getElementById('reload');

0 commit comments

Comments
 (0)