forked from firka/firka
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffe11a5a8a | |||
|
|
f7928ea92a |
@@ -122,6 +122,8 @@ steps:
|
||||
- BUILD_NAME="$BASE_VERSION-$SHA"
|
||||
- VERSION_CODE=$((2000 + COMMIT_COUNT))
|
||||
- flutter build appbundle --release --build-name="$BUILD_NAME" --build-number="$VERSION_CODE"
|
||||
# universal apk for the website's download button, the .aab is for stores
|
||||
- flutter build apk --release --build-name="$BUILD_NAME" --build-number="$VERSION_CODE"
|
||||
|
||||
- name: build-debug
|
||||
image: git.firka.app/firka/firka-builder:latest
|
||||
@@ -157,6 +159,23 @@ steps:
|
||||
file_name: app-release.aab
|
||||
update: 'true'
|
||||
|
||||
- name: publish-release-apk
|
||||
image: woodpeckercommunity/plugin-gitea-package:latest
|
||||
pull: true
|
||||
when:
|
||||
- branch: [main, staging]
|
||||
settings:
|
||||
user:
|
||||
from_secret: gitea_username
|
||||
password:
|
||||
from_secret: gitea_token
|
||||
owner: firka
|
||||
package_name: firka
|
||||
package_version: ${CI_COMMIT_SHA}
|
||||
file_source: ./firka/build/app/outputs/flutter-apk/app-release.apk
|
||||
file_name: app-release.apk
|
||||
update: 'true'
|
||||
|
||||
- name: publish-debug-arm64-v8a
|
||||
image: woodpeckercommunity/plugin-gitea-package:latest
|
||||
pull: true
|
||||
|
||||
@@ -290,6 +290,12 @@ extension StringExtension on String {
|
||||
return regex.hasMatch(trim());
|
||||
}
|
||||
|
||||
String firstUpper() {
|
||||
if (isEmpty) return this;
|
||||
if (length == 1) this[0].toUpperCase();
|
||||
return this[0].toUpperCase() + substring(1, length);
|
||||
}
|
||||
|
||||
String shortenName([int start = 0]) {
|
||||
if (length <= 16 || start >= length) {
|
||||
return this;
|
||||
|
||||
@@ -244,7 +244,7 @@ Future<void> showLessonBottomSheet(
|
||||
color: appStyle.colors.buttonSecondaryFill,
|
||||
),
|
||||
onTap: () {
|
||||
context.go('/timetable/subject', extra: lesson.subject.loadAndGet()!);
|
||||
context.go('/timetable/subject', extra: lesson.subject);
|
||||
},
|
||||
),
|
||||
]);
|
||||
|
||||
@@ -146,7 +146,6 @@ class _HomeMainScreen extends FirkaState<HomeMainScreen> {
|
||||
final todayLesson = widget.data.client!.cache
|
||||
.getClassLessons()
|
||||
.on(now)
|
||||
.sortByStart()
|
||||
.findAllSync();
|
||||
|
||||
for (final item in infoItems) {
|
||||
|
||||
@@ -62,10 +62,6 @@ class OmissionBar extends StatelessWidget {
|
||||
.toList();
|
||||
}
|
||||
|
||||
if (segmentColors.isEmpty) {
|
||||
segmentColors.add(stateColor(null));
|
||||
}
|
||||
|
||||
final bar = ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Row(
|
||||
|
||||
@@ -18,14 +18,6 @@ extension IterableExtension<T> on Iterable<T> {
|
||||
}
|
||||
}
|
||||
|
||||
extension FirstUpperExtension on String {
|
||||
String firstUpper() {
|
||||
if (isEmpty) return this;
|
||||
if (length == 1) this[0].toUpperCase();
|
||||
return this[0].toUpperCase() + substring(1, length);
|
||||
}
|
||||
}
|
||||
|
||||
extension MidnightExtension on DateTime {
|
||||
DateTime getMidnight() {
|
||||
return subtract(
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:firka_common/core/extensions.dart';
|
||||
import 'package:firka_common/data/models/subject_cache_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -35,7 +34,7 @@ class GradeSmallCard extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
subject.name.firstUpper(),
|
||||
subject.name,
|
||||
style: appStyle.fonts.B_16SB.apply(
|
||||
color: appStyle.colors.textPrimary,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user