1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 06:41:38 +01:00

update ui, add metainfo

This commit is contained in:
2025-02-18 18:49:46 +01:00
parent 81d2e8d92e
commit f122102c3d
10 changed files with 208 additions and 69 deletions

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>li.sopht.Flashcards</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>MIT</project_license>
<name>Flashcards</name>
<summary>Learn categories with flashcards!</summary>
<developer id="li.sopht">
<name>Sophie Krause</name>
</developer>
<url type="homepage">https://gitlab.cvh-server.de/skrause/flashcards</url>
<url type="vcs-browser">https://gitlab.cvh-server.de/skrause/flashcards</url>
<url type="bugtracker">https://gitlab.cvh-server.de/skrause/flashcards/-/issues</url>
<translation type="gettext">flashcards</translation>
<launchable type="desktop-id">li.sopht.Flashcards.desktop</launchable>
<content_rating type="oars-1.1" />
<branding>
<color type="primary" scheme_preference="light">#ff00ff</color>
<color type="primary" scheme_preference="dark">#993d3d</color>
</branding>
<screenshots>
<screenshot type="default">
<image>https://example.org/example1.png</image>
<caption>A caption</caption>
</screenshot>
</screenshots>
</component>

View File

@@ -0,0 +1,3 @@
[D-BUS Service]
Name=li.sopht.Flashcards
Exec=@bindir@/flashcards --gapplication-service

View File

@@ -6,7 +6,7 @@ test('Validate schema file',
args: ['--strict', '--dry-run', meson.current_source_dir()])
install_data('li.sopht.Flashcards.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0/schemas',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)
desktop_file = i18n.merge_file(
@@ -23,4 +23,25 @@ if desktop_utils.found()
test('Validate desktop file', desktop_utils, args: [desktop_file])
endif
appstream_file = i18n.merge_file(
input: 'li.sopht.Flashcards.metainfo.xml.in',
output: 'li.sopht.Flashcards.metainfo.xml',
po_dir: '../po',
install: true,
install_dir: get_option('datadir') / 'metainfo'
)
appstreamcli = find_program('appstreamcli', required: false, disabler: true)
test('Validate appstream file', appstreamcli,
args: ['validate', '--no-net', '--explain', appstream_file])
service_conf = configuration_data()
service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
configure_file(
input: 'li.sopht.Flashcards.service.in',
output: 'li.sopht.Flashcards.service',
configuration: service_conf,
install_dir: get_option('datadir') / 'dbus-1' / 'services'
)
subdir('icons')

View File

@@ -3,5 +3,6 @@
<gresource prefix="/li/sopht/flashcards">
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">create-category.ui</file>
<file alias="appdata" compressed="true" preprocess="xml-stripblanks">../li.sopht.Flashcards.metainfo.xml</file>
</gresource>
</gresources>

View File

@@ -3,6 +3,8 @@ using Adw 1;
template $FlashcardsAppWindow : Adw.ApplicationWindow {
title: _("Flashcards");
default-width: 1200;
default-height: 600;
Adw.Breakpoint {
condition ( "max-width: 600sp" )
@@ -26,6 +28,11 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
icon-name: "list-add-symbolic";
clicked => $on_add_category();
}
[start]
Gtk.Button {
icon-name: "user-trash-symbolic";
clicked => $on_delete_category();
}
[end]
Gtk.MenuButton {
icon-name: "open-menu-symbolic";
@@ -66,27 +73,25 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
[title]
Adw.WindowTitle title {
title: _("Flashcards");
subtitle: _("Test");
subtitle: "Test";
}
}
content: Adw.Clamp {
Adw.Bin {
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
content: Adw.ViewStack main_view {
Adw.ViewStackPage {
child: Adw.StatusPage placeholder {
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
styles [
"card",
]
child: Label {
margin-top: 24;
margin-bottom: 24;
margin-start: 24;
margin-end: 24;
wrap: true;
label: "Wie viel Grad hat ein Kreis?";
title: _("Select a category");
icon-name: "edit-find-symbolic";
};
}
Adw.ViewStackPage {
child: Adw.Bin flashcard {
};
}
};