mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Remove jQuery from toolbar.py
This commit is contained in:
parent
64c7d405f5
commit
bdf1e6324e
1 changed files with 2 additions and 5 deletions
|
@ -149,11 +149,8 @@ class Toolbar:
|
||||||
</a>"""
|
</a>"""
|
||||||
|
|
||||||
def set_sync_active(self, active: bool) -> None:
|
def set_sync_active(self, active: bool) -> None:
|
||||||
if active:
|
method = "add" if active else "remove"
|
||||||
meth = "addClass"
|
self.web.eval(f"document.getElementById('sync-spinner').classList.{method}('spin')")
|
||||||
else:
|
|
||||||
meth = "removeClass"
|
|
||||||
self.web.eval(f"$('#sync-spinner').{meth}('spin')")
|
|
||||||
|
|
||||||
def set_sync_status(self, status: SyncStatus) -> None:
|
def set_sync_status(self, status: SyncStatus) -> None:
|
||||||
self.web.eval(f"updateSyncColor({status.required})")
|
self.web.eval(f"updateSyncColor({status.required})")
|
||||||
|
|
Loading…
Reference in a new issue