Skip to content

Commit

Permalink
feat: tkn + exped
Browse files Browse the repository at this point in the history
  • Loading branch information
popoway committed Feb 28, 2024
1 parent 24668ae commit e4b95e1
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 2 deletions.
14 changes: 14 additions & 0 deletions assets/flutter_i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ home:
calendar: "Calendar"
directory: "Directory"
shuttle: "Shuttle"
news: "News"
sports: "Athletics"

shuttle:
Expand Down Expand Up @@ -96,6 +97,8 @@ careers:
cdc: "Student Association Career Development Committee"
cdc-message: "The Student Association Career Development Committee (CDC) is a student-run organization that serves to help all students improve resume writing, interview skills, and create a bullet proof plan for the future.\nLocation: Student Union 319"
join-mailing-list: "Join Mailing List"
ee: "Experiential Education"
ee-message: "The Experiential Education Office supports the college mission of service by connecting students to experiential learning opportunities to help cultivate their long-term success inside and outside the classroom.\nLocation: Frese Hall 102\nEmail: [email protected]\nPhone: 718-997-0565"

advising:
aac: "Academic Advising Center"
Expand All @@ -121,6 +124,17 @@ student-life:
meet-our-staff: "Meet Our Staff"
student-affairs: "Student Affairs"

news:
ocm: "Office of Communications and Marketing"
ocm-message: "The Office of Communications and Marketing consists of News Services, Editorial Services, Creative Services, Photo Services, Marketing and Video Production.\n\"The QView\" and \"Frankly Speaking\" are the college newsletters.\nLocation: Kiely Hall 803"
qview: "The QView"
frankly-speaking: "Frankly Speaking"
archive: "Press Release Archive"
tkn: "The Knight News"
tkn-message: "The Knight News is the student-run newspaper of Queens College. This monthly publication covers campus news, student activities, and local events.\nLocation: Student Union LL35\nEmail: [email protected]"
campus-news: "Campus News"
op-eds: "Op-Eds"

chat:
title: "Welcome to ChatKnights"
subtitle: "I am an AI chatbot at CUNY Queens College that answers questions about academic resources, student life, and more."
Expand Down
14 changes: 14 additions & 0 deletions assets/flutter_i18n/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ home:
calendar: "Calendario"
directory: "Directorio"
shuttle: "Lanzadera"
news: "Noticias"
sports: "Deportes"

shuttle:
Expand Down Expand Up @@ -96,6 +97,8 @@ careers:
cdc: "Comité de Desarrollo Profesional"
cdc-message: "El Comité de Desarrollo Profesional (CDC) de la Asociación de Estudiantes es una organización dirigida por estudiantes que sirve para ayudar a todos los estudiantes a mejorar la redacción de currículums, sus habilidades para entrevistas y crear un plan invulnerable para el futuro.\nUbicación: Student Union 319"
join-mailing-list: "Unirse a la lista de correos"
ee: "Educación Experiencial"
ee-message: "La Oficina de Educación Experiencial apoya la misión de servicio de la universidad conectando a los estudiantes con oportunidades de aprendizaje experiencial para ayudarlos a cultivar su éxito a largo plazo dentro y fuera del aula.\nUbicación: Frese Hall 102\nCorreo electrónico: [email protected]\nTeléfono: 718-997-0565"

advising:
aac: "Centro de Asesoramiento Académico"
Expand All @@ -121,6 +124,17 @@ student-life:
meet-our-staff: "Conozca a Nuestro Personal"
student-affairs: "Asuntos Estudiantiles"

news:
ocm: "Oficina de Comunicaciones y Marketing"
ocm-message: "La Oficina de Comunicaciones y Marketing consta de servicios de noticias, servicios editoriales, servicios creativos, servicios fotográficos, marketing y producción de vídeos."
qview: "The QView"
frankly-speaking: "Frankly Speaking"
archive: "Archivo de Comunicados de Prensa"
tkn: "The Knight News"
tkn-message: "The Knight News es el periódico dirigido por estudiantes de Queens College. Esta publicación mensual cubre noticias del campus, actividades estudiantiles y eventos locales.\nUbicación: Student Union LL35\nCorreo electrónico: [email protected]"
campus-news: "Noticias del Campus"
op-eds: "Artículos de Opinión"

chat:
title: "Bienvenido a ChatKnights"
subtitle: "Soy un chatbot de inteligencia artificial en CUNY Queens College que responde preguntas sobre recursos académicos, vida estudiantil y más."
Expand Down
14 changes: 14 additions & 0 deletions assets/flutter_i18n/he.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ home:
calendar: "לוח שנה"
directory: "מדריך"
shuttle: "שאטל"
news: "חדשות"
sports: "ספורטים"

shuttle:
Expand Down Expand Up @@ -96,6 +97,8 @@ careers:
cdc: "ועדה לפיתוח קריירה"
cdc-message: "הוועדה לפיתוח קריירה של אגודת הסטודנטים (CDC) היא ארגון המנוהל על ידי סטודנטים, המסייע לכל התלמידים לשפר את כתיבת קורות החיים, מיומנויות ראיונות וליצור תוכנית בלתי פגיעה לעתיד.\nמיקום: Student Union 319"
join-mailing-list: "הצטרף לרשימת תפוצה"
ee: "חינוך חוויתי"
ee-message: "המשרד לחינוך חוויתי תומך במשימת השירות של המכללה על ידי חיבור סטודנטים להזדמנויות למידה חווייתיות כדי לעזור לטפח את הצלחתם לטווח ארוך בתוך הכיתה ומחוצה לה.\nמיקום: Frese Hall 102\nאימייל: [email protected]\nטלפון: 718-997-0565"

advising:
aac: "מרכז הייעוץ האקדמי"
Expand All @@ -121,6 +124,17 @@ student-life:
meet-our-staff: "הכירו את הצוות שלנו"
student-affairs: "ענייני סטודנטים"

news:
ocm: "משרד לתקשורת ושיווק"
ocm-message: "משרד התקשורת והשיווק מורכב משירותי חדשות, שירותי עריכה, שירותי קריאייטיב, שירותי צילום, שיווק והפקת וידאו."
qview: "The QView"
frankly-speaking: "Frankly Speaking"
archive: "ארכיון הודעות לעיתונות"
tkn: "The Knight News"
tkn-message: "The Knight News הוא העיתון המנוהל על ידי סטודנטים של קווינס קולג'. פרסום חודשי זה מכסה חדשות בקמפוס, פעילויות סטודנטים ואירועים מקומיים.\nמיקום: אגודת הסטודנטים LL35\nאימייל: [email protected]"
campus-news: "חדשות הקמפוס"
op-eds: "עורכי דין"

chat:
title: "ברוכים הבאים ל-ChatKnights"
subtitle: "אני בוט שיחה מלאכותי במכללת CUNY Queens שעונה על שאלות לגבי משאבים אקדמיים, חיי סטודנטים ועוד."
Expand Down
14 changes: 14 additions & 0 deletions assets/flutter_i18n/hi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ home:
calendar: "कैलेंडर"
directory: "निर्देशिका"
shuttle: "शटल"
news: "समाचार"
sports: "खेल"

shuttle:
Expand Down Expand Up @@ -96,6 +97,8 @@ careers:
cdc: "कैरियर विकास समिति"
cdc-message: "स्टूडेंट एसोसिएशन कैरियर डेवलपमेंट कमेटी (सीडीसी) एक छात्र-संचालित संगठन है जो सभी छात्रों को बायोडाटा लेखन, साक्षात्कार कौशल में सुधार करने और भविष्य के लिए एक अचूक योजना बनाने में मदद करता है।\nस्थान: Student Union 319"
join-mailing-list: "मेलिंग सूची में शामिल हों"
ee: "अनुभवात्मक शिक्षा"
ee-message: "प्रायोगिक शिक्षा कार्यालय छात्रों को कक्षा के अंदर और बाहर उनकी दीर्घकालिक सफलता हासिल करने में मदद करने के लिए अनुभवात्मक सीखने के अवसरों से जोड़कर सेवा के कॉलेज मिशन का समर्थन करता है।\nस्थान: Frese Hall 102\nईमेल: [email protected]\nफ़ोन: 718-997-0565"

advising:
aac: "अकादमिक सलाहकार केंद्र"
Expand All @@ -121,6 +124,17 @@ student-life:
meet-our-staff: "हमारे स्टाफ से मिलें"
student-affairs: "छात्र मामले"

news:
ocm: "संचार और विपणन कार्यालय"
ocm-message: "संचार और विपणन कार्यालय में समाचार सेवाएँ, संपादकीय सेवाएँ, रचनात्मक सेवाएँ, फोटो सेवाएँ, विपणन और वीडियो उत्पादन शामिल हैं।"
qview: "The QView"
frankly-speaking: "Frankly Speaking"
archive: "प्रेस विज्ञप्ति पुरालेख"
tkn: "The Knight News"
tkn-message: "द नाइट न्यूज़ क्वींस कॉलेज का छात्रों द्वारा संचालित समाचार पत्र है। यह मासिक प्रकाशन कैंपस समाचार, छात्र गतिविधियों और स्थानीय घटनाओं को कवर करता है।\nस्थान: छात्र संघ LL35\nईमेल: [email protected]"
campus-news: "कैम्पस समाचार"
op-eds: "सेशन-एड्स"

chat:
title: "ChatKnights में आपका स्वागत है"
subtitle: "मैं CUNY Queens College में एक AI चैटबॉट हूँ जो अकादमिक संसाधनों, छात्र जीवन और अधिक के बारे में प्रश्नों के उत्तर देता हूँ।"
Expand Down
14 changes: 14 additions & 0 deletions assets/flutter_i18n/zh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ home:
calendar: "日历"
directory: "目录"
shuttle: "班车"
news: "新闻"
sports: "运动"

shuttle:
Expand Down Expand Up @@ -96,6 +97,8 @@ careers:
cdc: "学生会职业发展委员会"
cdc-message: "学生会职业发展委员会 (CDC) 是一个由学生管理的组织,旨在帮助所有学生提高简历写作、面试技巧,并为未来制定无懈可击的计划。\n地点:Student Union 319"
join-mailing-list: "加入邮件列表"
ee: "体验式教育"
ee-message: "体验式教育办公室通过为学生提供体验式学习机会来支持大学的服务使命,帮助他们在课堂内外培养长期成功。\n地点:Frese Hall 102\n电子邮件:[email protected]\n电话:718-997-0565"

advising:
aac: "学术指导中心"
Expand All @@ -121,6 +124,17 @@ student-life:
meet-our-staff: "认识我们的员工"
student-affairs: "学生事务"

news:
ocm: "传播与营销办公室"
ocm-message: "传播和营销办公室由新闻服务、编辑服务、创意服务、摄影服务、营销和视频制作组成。"
qview: "The QView"
frankly-speaking: "Frankly Speaking"
archive: "新闻稿档案"
tkn: "The Knight News"
tkn-message: "《骑士新闻》是 Queens College 学生办的报纸。 该月刊涵盖校园新闻、学生活动和当地活动。\n地点:Student Union LL35\n电子邮件:[email protected]"
campus-news: "校园新闻"
op-eds: "专栏"

chat:
title: "欢迎来到 ChatKnights"
subtitle: "我是 CUNY Queens College 的人工智能聊天机器人,可以回答有关学术资源、学生生活等问题。"
Expand Down
19 changes: 18 additions & 1 deletion lib/dept/careers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _MyCareersPageState extends State<MyCareersPage> {
// Drag the scrollable area to collapse the CupertinoSliverNavigationBar.
SliverToBoxAdapter(
child: SizedBox(
height: 950,
height: 1250,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expand Down Expand Up @@ -106,6 +106,23 @@ class _MyCareersPageState extends State<MyCareersPage> {
),
],
),
CupertinoListSection.insetGrouped(
header: Text(FlutterI18n.translate(context, "careers.ee"),
style: optionTextStyle),
footer: Text(
FlutterI18n.translate(context, "careers.ee-message"),
style: optionTextStyle),
children: <CupertinoListTile>[
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "button.learn-more"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () =>
_launchURL('https://www.qc.cuny.edu/academics/ee/'),
),
],
),
],
),
),
Expand Down
122 changes: 122 additions & 0 deletions lib/dept/news.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_i18n/flutter_i18n.dart';
import 'package:url_launcher/url_launcher.dart';

class MyNewsPage extends StatefulWidget {
const MyNewsPage({super.key, required this.title});

final String title;

@override
State<MyNewsPage> createState() => _MyNewsPageState();
}

class _MyNewsPageState extends State<MyNewsPage> {
@override
Widget build(BuildContext context) {
// list tile text style that match light dark mode of system
final TextStyle optionTextStyle = TextStyle(
color: const CupertinoDynamicColor.withBrightness(
color: CupertinoColors.black,
darkColor: CupertinoColors.white,
).resolveFrom(context));
return CupertinoPageScaffold(
backgroundColor: CupertinoColors.systemGroupedBackground,
child: CustomScrollView(
// A list of sliver widgets.
slivers: <Widget>[
CupertinoSliverNavigationBar(
largeTitle: Text(FlutterI18n.translate(context, "home.news")),
),
// This widget fills the remaining space in the viewport.
// Drag the scrollable area to collapse the CupertinoSliverNavigationBar.
SliverToBoxAdapter(
child: SizedBox(
height: 800,
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
CupertinoListSection.insetGrouped(
header: Text(FlutterI18n.translate(context, "news.ocm"),
style: optionTextStyle),
footer: Text(
FlutterI18n.translate(context, "news.ocm-message"),
style: optionTextStyle),
children: <CupertinoListTile>[
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "news.qview"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () => _launchURL(
'https://www.qc.cuny.edu/communications/the-qview/'),
),
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(
context, "news.frankly-speaking"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () => _launchURL(
'https://www.qc.cuny.edu/po/frankly-speaking/'),
),
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "news.archive"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () => _launchURL(
'https://www.qc.cuny.edu/communications/press-release-archive/'),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(FlutterI18n.translate(context, "news.tkn"),
style: optionTextStyle),
footer: Text(
FlutterI18n.translate(context, "news.tkn-message"),
style: optionTextStyle),
children: <CupertinoListTile>[
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "news.campus-news"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () => _launchURL(
'https://www.theknightnews.com/category/local-news/qc-news/'),
),
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "news.op-eds"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () => _launchURL(
'https://www.theknightnews.com/category/op-eds/'),
),
CupertinoListTile.notched(
title: Text(
FlutterI18n.translate(context, "button.learn-more"),
style: optionTextStyle),
trailing: const CupertinoListTileChevron(),
onTap: () =>
_launchURL('https://www.theknightnews.com/'),
),
],
),
],
),
),
),
],
),
);
}
}

_launchURL(String url) async {
final Uri uri = Uri.parse(url);
// launch in web browser, new window
if (!await launchUrl(uri)) {
throw Exception('Could not launch $url');
}
}
18 changes: 18 additions & 0 deletions lib/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import 'dept/library.dart';
import 'dept/careers.dart';
import 'dept/advising.dart';
import 'dept/shuttle_map.dart';
import 'dept/news.dart';

class _TabInfo {
const _TabInfo(this.title, this.icon);
Expand Down Expand Up @@ -424,6 +425,12 @@ class _MyHomePageState extends State<MyHomePage> {
'https://queenscollegeshuttles.com/map?showHeader=0&route=3235&silent_disable_timeout=1',
'role': ['current', 'prospective', 'faculty'],
},
{
'icon': CupertinoIcons.news_solid,
'name': 'news',
'url': 'https://www.theknightnews.com/',
'role': ['current', 'prospective', 'faculty'],
},
{
'icon': CupertinoIcons.sportscourt,
'name': 'sports',
Expand Down Expand Up @@ -622,6 +629,17 @@ class _MyHomePageState extends State<MyHomePage> {
title: FlutterI18n.translate(
context, "home.student-life")),
);
} else if (iconListCurrent[index]['name'] ==
'news') {
Navigator.push(
context,
CupertinoPageRoute(
builder: (context) => MyNewsPage(
title: FlutterI18n.translate(
context, "home.news")),
title: FlutterI18n.translate(
context, "home.news")),
);
} else if (iconListCurrent[index]['name'] ==
'timesheet') {
_showTimesheetActionSheet(context);
Expand Down
Loading

0 comments on commit e4b95e1

Please sign in to comment.