Skip to content

Commit

Permalink
Change template
Browse files Browse the repository at this point in the history
  • Loading branch information
arianneorpilla committed May 8, 2021
1 parent d6268a7 commit 73e300b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/usr/bin/python3"
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ private void addCreatorNote(String deck, String image, String audio, String sent
"\n" +
"#sentence {\n" +
" font-size: 30px\n" +
"}\n" +
"\n" +
"#image {\n" +
" position: static;\n" +
" height: auto;\n" +
" width: auto;\n" +
" max-height: 300px;\n" +
"}",
null,
null
Expand Down
4 changes: 2 additions & 2 deletions lib/anki.dart
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void exportAnkiCard(String deck, String sentence, String answer, String reading,

if (imageFile.existsSync()) {
imageFile.copySync(newImagePath);
addImage = "<img src=\"$newFileName.jpg\">";
addImage = "<img id=\"image\" src=\"$newFileName.jpg\">";
}
if (audioFile.existsSync()) {
audioFile.copySync(newAudioPath);
Expand All @@ -690,7 +690,7 @@ void exportCreatorAnkiCard(String deck, String sentence, String answer,

if (imageFile != null && imageFile.existsSync()) {
imageFile.copySync(newImagePath);
addImage = "<img src=\"$newFileName.jpg\">";
addImage = "<img id=\"image\" src=\"$newFileName.jpg\">";
}

requestAnkiDroidPermissions();
Expand Down
4 changes: 2 additions & 2 deletions lib/dictionary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,9 @@ Future<DictionaryHistoryEntry> getMonolingualWordDetails(

var client = http.Client();
http.Response response = await client
.get(Uri.parse('https://dictionary.goo.ne.jp/srch/jn/$searchTerm/m0u/'));
.get(Uri.parse('https://dictionary.goo.ne.jp/srch/jn/$searchTerm/m1u/'));
var document = parser.parse(response.body);
bool multiDefinition = document.body.innerHtml.contains("で始まる言葉");
bool multiDefinition = document.body.innerHtml.contains("で一致する言葉");
bool empty = document.body.innerHtml.contains("一致する情報は見つかりませんでした");

if (empty) {
Expand Down
10 changes: 5 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class _HomeState extends State<Home> {
return buildChannels();
case "History":
return History();
case "Clipboard":
case "Dictionary":
return ClipboardMenu(setCreatorView);
default:
return Container();
Expand Down Expand Up @@ -331,8 +331,8 @@ class _HomeState extends State<Home> {
label: 'History',
),
BottomNavigationBarItem(
icon: Icon(Icons.paste_sharp),
label: 'Clipboard',
icon: Icon(Icons.auto_stories),
label: 'Dictionary',
),
BottomNavigationBarItem(
icon: Icon(Icons.folder_sharp),
Expand Down Expand Up @@ -2351,8 +2351,8 @@ class _ClipboardState extends State<ClipboardMenu> {
}

Widget emptyMessage = centerMessage(
"No entries in clipboard history",
Icons.paste_sharp,
"No entries in dictionary history",
Icons.auto_stories,
);

Widget cardCreatorButton() {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: jidoujisho
description: A mobile video player tailored for Japanese language learners.
publish_to: none

version: 0.15.7+23
version: 0.15.8+24

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit 73e300b

Please sign in to comment.