correction affichage

pull/25/head
Nicolas Sanchez 3 years ago
parent 0d2cbdac9a
commit 8f615bc219

Binary file not shown.

@ -13,6 +13,9 @@ pub struct Arguments {
/// root of the url ending and starting with / /// root of the url ending and starting with /
#[arg(short, long, default_value_t = String::from("/"))] #[arg(short, long, default_value_t = String::from("/"))]
pub root: String, pub root: String,
/// sqlite database path
#[arg(short, long, default_value_t = String::from("db/db.sqlite3"))]
pub db: String,
} }
impl Arguments { impl Arguments {

@ -15,8 +15,9 @@ async fn main() -> std::io::Result<()> {
let ip = args.ip; let ip = args.ip;
let port = args.port; let port = args.port;
let root = args.root; let root = args.root;
let db = args.db;
let manager = SqliteConnectionManager::file("db/db.sqlite3"); let manager = SqliteConnectionManager::file(db);
let pool = Pool::new(manager).unwrap(); let pool = Pool::new(manager).unwrap();
let appdata = AppData { let appdata = AppData {

@ -321,15 +321,16 @@ div#cheezenotes div.lasttablerow span.tablerow {
div#cheezenotes div.cheezenotes_line span.token { div#cheezenotes div.cheezenotes_line span.token {
font-weight: 1; font-weight: 1;
color: #1353b3; color: transparent;
overflow: hidden; overflow: hidden;
}
div#cheezenotes div.cheezenotes_line span.token {
font-size: 0; font-size: 0;
vertical-align: baseline;
transition-property: font-size, color;
transition-duration: .2s;
} }
div#cheezenotes:focus div.cheezenotes_line span.token { div#cheezenotes:focus div.cheezenotes_line span.token {
color: #1353b3;
font-size: 95%; font-size: 95%;
} }

@ -215,19 +215,6 @@ function oncopy(e) {
//alert(e.clipboardData.getData('text/plain')); //alert(e.clipboardData.getData('text/plain'));
} }
function onlockbutton(e) {
let lockButton = document.getElementById('lockButton');
let lockButtonLabel = document.getElementById('lockButtonLabel');
let cheezenotes = document.getElementById('cheezenotes');
if (lockButton.checked) {
cheezenotes.contentEditable = false;
lockButtonLabel.innerText = 'visibility';
} else {
cheezenotes.contentEditable = true;
lockButtonLabel.innerText = 'visibility_off';
}
}
function ondrag(e) { function ondrag(e) {
// alert('drag'); // alert('drag');
} }
@ -323,13 +310,21 @@ function onblur(e) {
let cheezenotes = document.getElementById('cheezenotes'); let cheezenotes = document.getElementById('cheezenotes');
redrawTables(cheezenotes); redrawTables(cheezenotes);
onsave(); onsave();
hideTokens(); // hideTokens();
disableFormatButtons(); disableFormatButtons();
} }
function onfocus() { function onfocus(e) {
let editModeButton = document.getElementById('editModeButton');
if (editModeButton.classList.contains('buttonoff')) {
e.preventDefault();
let cheezenotes = document.getElementById('cheezenotes');
cheezenotes.contentEditable = false;
cheezenotes.blur();
return false;
}
redrawTables(cheezenotes, dpwidth()); redrawTables(cheezenotes, dpwidth());
showTokens(); // showTokens();
enableFormatButtons(); enableFormatButtons();
} }

Loading…
Cancel
Save