Skip to content

Commit

Permalink
Merge branch 'develop' into develop-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Npepperlinux authored Nov 19, 2023
2 parents 4ecb667 + d7d9ac2 commit 31eef34
Showing 192 changed files with 17,117 additions and 4,873 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/windows_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: デプロイ(windows zip)

on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: write

jobs:
build_for_windows:
name: Windows用ビルド
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true

- name: Flutter pub get
run: |
git config --system core.longpaths true
flutter pub get
- name: Build for Windows
run: |
flutter build windows --release
- name: Copy DLL
run: |
cp C:\Windows\System32\msvcp140.dll build\windows\x64\runner\Release\
cp C:\Windows\System32\vcruntime140.dll build\windows\x64\runner\Release\
cp C:\Windows\System32\vcruntime140_1.dll build\windows\x64\runner\Release\
- name: Zip files
run: |
ren build\windows\x64\runner\Release Miria
Compress-Archive -Path build\windows\x64\runner\Miria -DestinationPath miria_$(flutter pub run cider version)_windows-x64.zip -Force
- name: Create tag and release note
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v$(flutter pub run cider version) miria_$(flutter pub run cider version)_windows-x64.zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -46,6 +46,7 @@ app.*.map.json

# builder
**/node_modules/
**/build/

# Release
/private_keys/
51 changes: 45 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -36,6 +36,11 @@ PODS:
- DKImagePickerController/PhotoGallery
- Flutter
- Flutter (1.0.0)
- flutter_image_compress_common (1.0.0):
- Flutter
- Mantle
- SDWebImage
- SDWebImageWebPCoder
- flutter_secure_storage (6.0.0):
- Flutter
- FMDB (2.7.5):
@@ -45,6 +50,21 @@ PODS:
- Flutter
- image_gallery_saver (2.0.2):
- Flutter
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.3.2):
- libwebp/demux
- libwebp/sharpyuv (1.3.2)
- libwebp/webp (1.3.2):
- libwebp/sharpyuv
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- package_info_plus (0.4.5):
- Flutter
- path_provider_foundation (0.0.1):
@@ -57,6 +77,9 @@ PODS:
- SDWebImage (5.15.8):
- SDWebImage/Core (= 5.15.8)
- SDWebImage/Core (5.15.8)
- SDWebImageWebPCoder (0.11.0):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.15)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
@@ -68,11 +91,14 @@ PODS:
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
- Flutter

DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- image_editor_common (from `.symlinks/plugins/image_editor_common/ios`)
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
@@ -84,13 +110,17 @@ DEPENDENCIES:
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)

SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- FMDB
- libwebp
- Mantle
- SDWebImage
- SDWebImageWebPCoder
- SwiftyGif

EXTERNAL SOURCES:
@@ -100,6 +130,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
flutter_image_compress_common:
:path: ".symlinks/plugins/flutter_image_compress_common/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
image_editor_common:
@@ -122,27 +154,34 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/sqflite/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"

SPEC CHECKSUMS:
device_info_plus: 7545d84d8d1b896cb16a4ff98c19f07ec4b298ea
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_editor_common: d6f6644ae4a6de80481e89fe6d0a8c49e30b4b43
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1
SDWebImage: cb032eba469c54e0000e78bcb0a13cdde0a52798
share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a

PODFILE CHECKSUM: b99f8207a3be3d9c3b39e97e9fa6ba48fe4f13ad

63 changes: 63 additions & 0 deletions lib/const.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
const misskeyIOReactionDelay = 1500;

class Font {
final String displayName;
final String actualName;

const Font(this.displayName, this.actualName);
}

const choosableFonts = [
Font("システム標準", ""),
Font("Noto Sans Japanese", "Noto Sans JP"),
// Font("Noto Serif Japanese", "Noto Serif Japanese"),
Font("IBM Plex Sans JP", "IBM Plex Sans JP"),
Font("ZEN角ゴシック", "Zen Kaku Gothic New"),
Font("ZEN丸ゴシック", "Zen Maru Gothic"),
Font("ZEN角ゴシックアンチック", "Zen Kaku Gothic Antique"),
Font("Zenアンチック", "Zen Antique"),
Font("ZENアンチックSoft", "Zen Antique Soft"),
Font("ZENオールド明朝", "Zen Old Mincho"),
Font("BIZ UD ゴシック", "BIZ UDGothic"),
Font("BIZ UD Pゴシック", "BIZ UDPGothic"),
Font("BIZ UD 明朝", "BIZ UDMincho"),
Font("BIZ UD P明朝", "BIZ UDPMincho"),
Font("M+ 1", "M PLUS 1"),
Font("M+ 1P", "M PLUS 1p"),
Font("M+ 1C", "M PLUS 1 Code"),
Font("M+ 2", "M PLUS 2"),
Font("M+ Rounded 1C", "M PLUS Rounded 1c"),
Font("しっぽり明朝", "Shippori Mincho"),
Font("しっぽり明朝B1", "Shippori Mincho B1"),
Font("しっぽりアンチック", "Shippori Antique"),
Font("しっぽりアンチックB1", "Shippori Antique B1"),
Font("ひな明朝", "Hina Mincho"),
Font("Kosugi", "Kosugi"),
Font("Kosugi Maru", "Kosugi Maru"),
Font("Kiwi Maru", "Kiwi Maru"),
Font("牟礼町", "Murecho"),
Font("さわらびゴシック", "Sawarabi Gothic"),
Font("さわらび明朝", "Sawarabi Mincho"),
Font("クレー One", "Klee One"),
Font("ロックンロール One", "RocknRoll One"),
Font("レゲエ One", "Reggae One"),
Font("ランパート One", "Rampart One"),
Font("ステッキ", "Stick"),
Font("トレイン", "Train One"),
Font("ドットゴシック16", "DotGothic16"),
Font("デラゴシック", "Dela Gothic One"),
Font("解星 デコール", "Kaisei Decol"),
Font("解星 オプティ", "Kaisei Opti"),
Font("解星 特ミン", "Kaisei Tokumin"),
Font("解星 春の海", "Kaisei HarunoUmi"),
Font("はちまるポップ", "Hachi Maru Pop"),
Font("モッチーポップ", "Mochiy Pop P One"),
Font("ZEN紅道", "Zen Kurenaido"),
Font("佑字 舞", "Yuji Mai"),
Font("佑字 肅", "Yuji Syuku"),
Font("佑字 朴", "Yuji Boku"),
Font("Yusei Magic", "Yusei Magic"),
Font("よもぎフォント", "Yomogi"),
Font("Potta One", "Potta One"),
Font("ニューテゴミン", "New Tegomin"),
];
27 changes: 24 additions & 3 deletions lib/extensions/date_time_extension.dart
Original file line number Diff line number Diff line change
@@ -10,10 +10,29 @@ extension DateTimeExtension on DateTime {
String get format => DateFormat("yyyy 年 M 月 d 日").format(toUtc().toLocal());

String get formatUntilSeconds =>
DateFormat("yyyy 年 M 月 d 日 HH:mm").format(toUtc().toLocal());
"${year < 0 ? "-" : ""}${DateFormat("yyyy 年 M 月 d 日 HH:mm:ss").format(toUtc().toLocal())}";

String get formatUntilMilliSeconds =>
"${DateFormat("yyyy/MM/dd HH:mm:ss", "ja_jp").format(toUtc().toLocal())}.${millisecond.toString().padLeft(3, '0')}";
"${year < 0 ? "-" : ""}${DateFormat("yyyy/MM/dd HH:mm:ss", "ja_jp").format(toUtc().toLocal())}.${millisecond.toString().padLeft(3, '0')}";

String get differenceNowDetail {
final differ = this - DateTime.now();
if (differ <= const Duration(seconds: 0)) {
return differenceNow;
} else if (differ >= const Duration(days: 365)) {
return "${differ.inDays ~/ 365}年後";
} else if (differ >= const Duration(days: 1)) {
return "${differ.inDays}日後";
} else if (differ >= const Duration(hours: 1)) {
return "${differ.inHours}時間後";
} else if (differ >= const Duration(minutes: 1)) {
return "${differ.inMinutes}分後";
} else if (differ >= const Duration(seconds: 1)) {
return "${differ.inSeconds}秒後";
} else {
return "たったいま";
}
}

String get differenceNow {
final differ = DateTime.now() - this;
@@ -27,8 +46,10 @@ extension DateTimeExtension on DateTime {
return "${differ.inMinutes}分前";
} else if (differ < const Duration(days: 1)) {
return "${differ.inHours}時間前";
} else {
} else if (differ <= const Duration(days: 365)) {
return "${differ.inDays}日前";
} else {
return "${differ.inDays ~/ 365}年前";
}
}
}
10 changes: 10 additions & 0 deletions lib/extensions/note_extension.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:misskey_dart/misskey_dart.dart';

extension NoteExtension on Note {
bool get isEmptyRenote =>
renoteId != null &&
text == null &&
cw == null &&
files.isEmpty &&
poll == null;
}
83 changes: 69 additions & 14 deletions lib/extensions/text_editing_controller_extension.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,80 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:miria/model/input_completion_type.dart';

extension TextEditingControllerExtension on TextEditingController {
bool get isIncludeBeforeColon {
if (selection.base.offset == -1) return false;
return text.substring(0, selection.base.offset).contains(":");
String? get textBeforeSelection {
final baseOffset = selection.baseOffset;
if (baseOffset < 0) {
return null;
}
return text.substring(0, baseOffset);
}

bool get isEmojiScope {
final position = selection.base.offset;
final startPosition = text.substring(0, position).lastIndexOf(":") + 1;
String? get emojiQuery {
final textBeforeSelection = this.textBeforeSelection;
if (textBeforeSelection == null) {
return null;
}
final lastColonIndex = textBeforeSelection.lastIndexOf(":");
if (lastColonIndex < 0) {
return null;
}
if (RegExp(r':[a-zA-z_0-9]+?:$')
.hasMatch(text.substring(0, startPosition))) {
return true;
.hasMatch(text.substring(0, lastColonIndex + 1))) {
return null;
} else {
return textBeforeSelection.substring(lastColonIndex + 1);
}
}

String? get mfmFnQuery {
final textBeforeSelection = this.textBeforeSelection;
if (textBeforeSelection == null) {
return null;
}
final lastOpenTagIndex = textBeforeSelection.lastIndexOf(r"$[");
if (lastOpenTagIndex < 0) {
return null;
}
final query = textBeforeSelection.substring(lastOpenTagIndex + 2);
if (RegExp(r"^[a-z234]*$").hasMatch(query)) {
return query;
} else {
return null;
}
return false;
}

String get emojiSearchValue {
final position = selection.base.offset;
final startPosition = text.substring(0, position).lastIndexOf(":") + 1;
return text.substring(startPosition, position);
String? get hashtagQuery {
final textBeforeSelection = this.textBeforeSelection;
if (textBeforeSelection == null) {
return null;
}
final lastHashIndex = textBeforeSelection.lastIndexOf("#");
if (lastHashIndex < 0) {
return null;
}
final query = textBeforeSelection.substring(lastHashIndex + 1);
if (query.contains(RegExp(r"""[ \u3000\t.,!?'"#:/[\]【】()「」()<>]"""))) {
return null;
} else {
return query;
}
}

InputCompletionType get inputCompletionType {
final emojiQuery = this.emojiQuery;
if (emojiQuery != null) {
return Emoji(emojiQuery);
}
final mfmFnQuery = this.mfmFnQuery;
if (mfmFnQuery != null) {
return MfmFn(mfmFnQuery);
}
final hashtagQuery = this.hashtagQuery;
if (hashtagQuery != null) {
return Hashtag(hashtagQuery);
}
return Basic();
}

void insert(String insertText, {String? afterText}) {
Loading

0 comments on commit 31eef34

Please sign in to comment.