forked from firka/firka
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffe11a5a8a | |||
|
|
f7928ea92a |
@@ -122,6 +122,8 @@ steps:
|
|||||||
- BUILD_NAME="$BASE_VERSION-$SHA"
|
- BUILD_NAME="$BASE_VERSION-$SHA"
|
||||||
- VERSION_CODE=$((2000 + COMMIT_COUNT))
|
- VERSION_CODE=$((2000 + COMMIT_COUNT))
|
||||||
- flutter build appbundle --release --build-name="$BUILD_NAME" --build-number="$VERSION_CODE"
|
- 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
|
- name: build-debug
|
||||||
image: git.firka.app/firka/firka-builder:latest
|
image: git.firka.app/firka/firka-builder:latest
|
||||||
@@ -157,6 +159,23 @@ steps:
|
|||||||
file_name: app-release.aab
|
file_name: app-release.aab
|
||||||
update: 'true'
|
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
|
- name: publish-debug-arm64-v8a
|
||||||
image: woodpeckercommunity/plugin-gitea-package:latest
|
image: woodpeckercommunity/plugin-gitea-package:latest
|
||||||
pull: true
|
pull: true
|
||||||
|
|||||||
@@ -290,6 +290,12 @@ extension StringExtension on String {
|
|||||||
return regex.hasMatch(trim());
|
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]) {
|
String shortenName([int start = 0]) {
|
||||||
if (length <= 16 || start >= length) {
|
if (length <= 16 || start >= length) {
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ Future<void> showLessonBottomSheet(
|
|||||||
color: appStyle.colors.buttonSecondaryFill,
|
color: appStyle.colors.buttonSecondaryFill,
|
||||||
),
|
),
|
||||||
onTap: () {
|
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
|
final todayLesson = widget.data.client!.cache
|
||||||
.getClassLessons()
|
.getClassLessons()
|
||||||
.on(now)
|
.on(now)
|
||||||
.sortByStart()
|
|
||||||
.findAllSync();
|
.findAllSync();
|
||||||
|
|
||||||
for (final item in infoItems) {
|
for (final item in infoItems) {
|
||||||
|
|||||||
@@ -62,10 +62,6 @@ class OmissionBar extends StatelessWidget {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (segmentColors.isEmpty) {
|
|
||||||
segmentColors.add(stateColor(null));
|
|
||||||
}
|
|
||||||
|
|
||||||
final bar = ClipRRect(
|
final bar = ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
child: Row(
|
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 {
|
extension MidnightExtension on DateTime {
|
||||||
DateTime getMidnight() {
|
DateTime getMidnight() {
|
||||||
return subtract(
|
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:firka_common/data/models/subject_cache_model.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ class GradeSmallCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
subject.name.firstUpper(),
|
subject.name,
|
||||||
style: appStyle.fonts.B_16SB.apply(
|
style: appStyle.fonts.B_16SB.apply(
|
||||||
color: appStyle.colors.textPrimary,
|
color: appStyle.colors.textPrimary,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user