mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-07 19:47:36 +00:00
Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f937503840 | ||
|
|
9f41632b0f | ||
|
|
fb2ba1e6e5 | ||
|
|
3930ec6d9c | ||
|
|
ca61d2c055 | ||
|
|
451e8532d1 | ||
|
|
8314f850f6 | ||
|
|
78ad88206c | ||
|
|
5dcb27a2e9 | ||
|
|
f833465dc8 | ||
|
|
4ac03fd4f3 | ||
|
|
17b2392fea | ||
|
|
68f2ba3b59 | ||
|
|
91bbca54ff | ||
|
|
19dfa070fd | ||
|
|
b7f55ef0db | ||
|
|
1c91b52431 | ||
|
|
1b85845499 | ||
|
|
523008ff3f |
No files matched your search
@@ -7,6 +7,44 @@ WIP
|
||||
## メモ
|
||||
- アイコン: Google Material Icons https://fonts.google.com/icons (Weight:300, Grade:0, Optical size: 24px)
|
||||
|
||||
## モジュール構成
|
||||
### モジュール一覧
|
||||
- `component` : コンポーネント
|
||||
- `common` : 共通コンポーネント
|
||||
- UIの中で共通で使う要素(メニューアイテムとか)
|
||||
- `scanner` : スキャナー
|
||||
- スキャナーの実装
|
||||
- `viewer` : ビューワー
|
||||
- ドキュメントビューワーの実装
|
||||
- `data` : データ
|
||||
- UIからデータを取得/保存するためのラッパーモジュール
|
||||
- `Document` : ドキュメント関係
|
||||
- WIP(JavaDocを参照してください, 余裕があったら追記します)
|
||||
- `feature` : 機能モジュール(ナビゲーションからみた機能で分割)
|
||||
- `common`: 共通機能
|
||||
- 設定画面とか、どこからでも呼ばれうる画面
|
||||
- `debug`: デバッグメニュー
|
||||
- `home`: ホーム画面
|
||||
- `library`: ライブラリ画面
|
||||
- `scan`: スキャン画面
|
||||
- `search`: 検索画面
|
||||
- `model` : モデル
|
||||
- データモデルをまとめたモジュール (WIP)
|
||||
- `document` : ドキュメント
|
||||
- `meta` : メタデータ
|
||||
- `processor` : プロセッサ
|
||||
- いくつかの処理をまとめたモジュール
|
||||
- `DocumentProcessor` : ドキュメント処理(ドキュメントにページを追加したり更新したり)
|
||||
- `shared` :
|
||||
- 共有リソース
|
||||
- `source` : ソース
|
||||
- (バックエンドが使うのでとりあえず後回し、フロントから直接操作することは絶対にありません)
|
||||
- `utils` : ユーティリティ
|
||||
- ちょっとしたユーティリティをまとめたモジュール
|
||||
- `LacertaLogger` : ロガー
|
||||
- `XmlMetaParser` : XMLメタデータパーサー(フロントから直接操作することは絶対にありません)
|
||||
|
||||
|
||||
## コーディング規則/推奨(WIP)
|
||||
### 規則
|
||||
- `// TODO`コメントには任意のsuffixを付ける
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package one.nem.lacerta.data;
|
||||
|
||||
import one.nem.lacerta.model.ListItemType;
|
||||
|
||||
import one.nem.lacerta.model.LibraryItemPage;
|
||||
import one.nem.lacerta.model.document.DocumentDetail;
|
||||
|
||||
public interface LacertaLibrary {
|
||||
|
||||
// Get History
|
||||
LibraryItemPage getRecentDocument(int limit);
|
||||
LibraryItemPage getRecentDocument(int limit, int offset);
|
||||
|
||||
// Get Library page
|
||||
LibraryItemPage getLibraryPage(int limit);
|
||||
LibraryItemPage getLibraryPage(int limit, int offset);
|
||||
LibraryItemPage getLibraryPage(String pageId, int limit);
|
||||
LibraryItemPage getLibraryPage(String pageId, int limit, int offset);
|
||||
|
||||
// GetDocument
|
||||
DocumentDetail getDocumentDetailById(String id);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package one.nem.lacerta.data.impl;
|
||||
|
||||
public class LacertaLibraryImpl {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package one.nem.lacerta.data.module;
|
||||
|
||||
public class LacertaLibraryModule {
|
||||
}
|
||||
@@ -36,4 +36,6 @@ dependencies {
|
||||
// JGit
|
||||
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r'
|
||||
|
||||
implementation project(":shared:ui")
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package one.nem.lacerta.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class LibraryItemPage {
|
||||
|
||||
String pageTitle;
|
||||
String pageId;
|
||||
ArrayList<ListItem> listItems;
|
||||
|
||||
public LibraryItemPage(String pageTitle, String pageId, ArrayList<ListItem> listItems) {
|
||||
this.pageTitle = pageTitle;
|
||||
this.pageId = pageId;
|
||||
this.listItems = listItems;
|
||||
}
|
||||
|
||||
public String getPageTitle() {
|
||||
return pageTitle;
|
||||
}
|
||||
|
||||
public String getPageId() {
|
||||
return pageId;
|
||||
}
|
||||
|
||||
public ArrayList<ListItem> getListItems() {
|
||||
return listItems;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package one.nem.lacerta.model;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
public class ListItem {
|
||||
|
||||
// Properties
|
||||
|
||||
String title;
|
||||
String description;
|
||||
ListItemType itemType;
|
||||
String itemId;
|
||||
|
||||
// Constructor
|
||||
|
||||
public ListItem(String title, String description, ListItemType itemType, String itemId) {
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.itemType = itemType;
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
// Getter
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public ListItemType getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package one.nem.lacerta.model;
|
||||
|
||||
public enum ListItemType {
|
||||
|
||||
ITEM_TYPE_FOLDER(one.nem.lacerta.shared.ui.R.drawable.folder_24px),
|
||||
ITEM_TYPE_DOCUMENT(one.nem.lacerta.shared.ui.R.drawable.description_24px);
|
||||
|
||||
private int iconId;
|
||||
|
||||
ListItemType(int iconId) {
|
||||
this.iconId = iconId;
|
||||
}
|
||||
|
||||
public int getIconId() {
|
||||
return iconId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M330,710L630,710L630,650L330,650L330,710ZM330,550L630,550L630,490L330,490L330,550ZM252.31,860Q222,860 201,839Q180,818 180,787.69L180,172.31Q180,142 201,121Q222,100 252.31,100L570,100L780,310L780,787.69Q780,818 759,839Q738,860 707.69,860L252.31,860ZM540,340L540,160L252.31,160Q247.69,160 243.85,163.85Q240,167.69 240,172.31L240,787.69Q240,792.31 243.85,796.15Q247.69,800 252.31,800L707.69,800Q712.31,800 716.15,796.15Q720,792.31 720,787.69L720,340L540,340ZM240,160L240,160L240,340L240,340L240,160L240,340L240,340L240,787.69Q240,792.31 240,796.15Q240,800 240,800L240,800Q240,800 240,796.15Q240,792.31 240,787.69L240,172.31Q240,167.69 240,163.85Q240,160 240,160Z"/>
|
||||
</vector>
|
||||
Reference in new issue
Block a user