mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Remove the fields_web experiment
This commit is contained in:
parent
daa61d47d5
commit
64e40033e0
4 changed files with 0 additions and 75 deletions
|
@ -3,14 +3,12 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import aqt
|
||||
import aqt.forms
|
||||
import aqt.operations
|
||||
from anki.collection import OpChanges
|
||||
from anki.consts import *
|
||||
from anki.lang import without_unicode_isolation
|
||||
from anki.models import NotetypeDict
|
||||
from aqt import AnkiQt, gui_hooks
|
||||
|
@ -27,7 +25,6 @@ from aqt.utils import (
|
|||
tooltip,
|
||||
tr,
|
||||
)
|
||||
from aqt.webview import AnkiWebViewKind
|
||||
|
||||
|
||||
class FieldDialog(QDialog):
|
||||
|
@ -51,19 +48,6 @@ class FieldDialog(QDialog):
|
|||
without_unicode_isolation(tr.fields_fields_for(val=self.model["name"]))
|
||||
)
|
||||
|
||||
if os.getenv("ANKI_EXPERIMENTAL_FIELDS_WEB"):
|
||||
form = aqt.forms.fields_web.Ui_Dialog()
|
||||
form.setupUi(self)
|
||||
|
||||
self.webview = form.webview
|
||||
self.webview.set_kind(AnkiWebViewKind.FIELDS)
|
||||
|
||||
self.show()
|
||||
self.refresh()
|
||||
self.webview.set_bridge_command(self._on_bridge_cmd, self)
|
||||
self.activateWindow()
|
||||
return
|
||||
|
||||
self.form = aqt.forms.fields.Ui_Dialog()
|
||||
self.form.setupUi(self)
|
||||
self.webview = None
|
||||
|
@ -86,9 +70,6 @@ class FieldDialog(QDialog):
|
|||
self.form.fieldList.setCurrentRow(open_at)
|
||||
self.exec()
|
||||
|
||||
def refresh(self) -> None:
|
||||
self.webview.load_ts_page("fields")
|
||||
|
||||
def _on_bridge_cmd(self, cmd: str) -> bool:
|
||||
return False
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ from . import (
|
|||
emptycards,
|
||||
exporting,
|
||||
fields,
|
||||
fields_web,
|
||||
filtered_deck,
|
||||
finddupes,
|
||||
findreplace,
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
from aqt.qt import qtmajor
|
||||
|
||||
if qtmajor > 5:
|
||||
from _aqt.forms.fields_web_qt6 import *
|
||||
else:
|
||||
from _aqt.forms.fields_web_qt5 import * # type: ignore
|
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Dialog</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="icons.qrc">
|
||||
<normaloff>:/icons/anki.png</normaloff>:/icons/anki.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="AnkiWebView" name="webview" native="true">
|
||||
<property name="url" stdset="0">
|
||||
<url>
|
||||
<string notr="true">about:blank</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AnkiWebView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">aqt/webview</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="icons.qrc"/>
|
||||
</resources>
|
||||
</ui>
|
Loading…
Reference in a new issue