mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
reviewer-bottom entrypoint
This commit is contained in:
parent
3d0a408a2b
commit
6869e9fd36
7 changed files with 22 additions and 10 deletions
|
@ -170,7 +170,7 @@ fn build_imgs(build: &mut Build) -> Result<()> {
|
|||
}
|
||||
|
||||
fn build_js(build: &mut Build) -> Result<()> {
|
||||
for ts_file in &["deckbrowser", "webview", "toolbar", "reviewer-bottom"] {
|
||||
for ts_file in &["deckbrowser", "webview", "toolbar"] {
|
||||
build.add_action(
|
||||
"qt:aqt:data:web:js",
|
||||
EsbuildScript {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright: Ankitects Pty Ltd and contributors
|
||||
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
|
||||
use anyhow::Ok;
|
||||
use anyhow::Result;
|
||||
use ninja_gen::action::BuildAction;
|
||||
use ninja_gen::copy::CopyFiles;
|
||||
|
@ -228,6 +229,17 @@ fn build_and_check_pages(build: &mut Build) -> Result<()> {
|
|||
":sveltekit"
|
||||
],
|
||||
)?;
|
||||
build_page(
|
||||
"reviewer-bottom",
|
||||
true,
|
||||
inputs![
|
||||
//
|
||||
":ts:lib",
|
||||
":ts:components",
|
||||
":sass",
|
||||
":sveltekit"
|
||||
],
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -355,12 +355,7 @@ class Reviewer:
|
|||
self.web.allow_drops = True
|
||||
self.web.eval("_blockDefaultDragDropBehavior();")
|
||||
# show answer / ease buttons
|
||||
self.bottom.web.stdHtml(
|
||||
self._bottomHTML(),
|
||||
css=["css/toolbar-bottom.css", "css/reviewer-bottom.css"],
|
||||
js=["js/vendor/jquery.min.js", "js/reviewer-bottom.js"],
|
||||
context=ReviewerBottomBar(self),
|
||||
)
|
||||
self.bottom.web.load_ts_page("reviewer-bottom")
|
||||
|
||||
# Showing the question
|
||||
##########################################################################
|
||||
|
|
0
ts/routes/reviewer-bottom/AnswerButton.svelte
Normal file
0
ts/routes/reviewer-bottom/AnswerButton.svelte
Normal file
|
@ -1,9 +1,9 @@
|
|||
/* Copyright: Ankitects Pty Ltd and contributors
|
||||
* License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html */
|
||||
|
||||
@use "../../../../../ts/lib/sass/root-vars";
|
||||
@use "../../../../../ts/lib/sass/vars" as *;
|
||||
@use "../../../../../ts/lib/sass/card-counts";
|
||||
@use "../../lib/sass/root-vars";
|
||||
@use "../../lib/sass/vars" as *;
|
||||
@use "../../lib/sass/card-counts";
|
||||
|
||||
:root {
|
||||
--focus-color: #{palette-of(border-focus)};
|
0
ts/routes/reviewer-bottom/index.svelte
Normal file
0
ts/routes/reviewer-bottom/index.svelte
Normal file
|
@ -5,6 +5,10 @@
|
|||
@typescript-eslint/no-unused-vars: "off",
|
||||
*/
|
||||
|
||||
import "./index.scss"
|
||||
|
||||
console.log("Hello world")
|
||||
|
||||
let time: number; // set in python code
|
||||
let timerStopped = false;
|
||||
|
||||
|
@ -61,3 +65,4 @@ function selectedAnswerButton(): string {
|
|||
}
|
||||
return node.dataset.ease;
|
||||
}
|
||||
|
Loading…
Reference in a new issue