-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump to GNOME 46 * MainWindow: Update About dialog to use latest GNOME style * MainWindow: Update Domain dialog to new GNOME style * MainWindow: Update Log Out dialog to new GNOME style * WebView: Fix cookies, fix add-site page * Lint: excess newlines * MetaInfo: Added brand colors, update release info * Remove 'Plausible' from .desktop name * Workflows: update to latest GitHub actions * Workflows: Update lint action
- Loading branch information
1 parent
b744412
commit f354694
Showing
10 changed files
with
97 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,25 @@ | ||
name: Flatpak | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
flatpak: | ||
name: Flathub | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: bilelmoussaoui/flatpak-github-actions:gnome-42 | ||
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-46 | ||
options: --privileged | ||
|
||
strategy: | ||
matrix: | ||
arch: [x86_64, aarch64] | ||
# Don't fail the whole workflow if one architecture fails | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install deps | ||
run: | | ||
dnf -y install docker | ||
if: ${{ matrix.arch == 'aarch64' }} | ||
|
||
- name: Set up QEMU | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64 | ||
if: ${{ matrix.arch == 'aarch64' }} | ||
|
||
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: flathub-infra/flatpak-github-actions/flatpak-builder@master | ||
with: | ||
bundle: plausible-${{ matrix.arch }}.flatpak | ||
bundle: tally.flatpak | ||
manifest-path: com.cassidyjames.plausible.json | ||
cache-key: "flatpak-builder-${{ github.sha }}" | ||
arch: ${{ matrix.arch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
name: Lint | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Vala Lint | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: valalang/lint | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Lint | ||
run: io.elementary.vala-lint -d . | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Lint | ||
run: io.elementary.vala-lint -d . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Copyright 2021–2023 Cassidy James Blaede <[email protected]> --> | ||
<!-- Copyright 2021–2024 Cassidy James Blaede <[email protected]> --> | ||
<component type="desktop"> | ||
<id>com.cassidyjames.plausible</id> | ||
<name>Tally for Plausible</name> | ||
<summary>Simple and privacy-friendly alternative to Google Analytics</summary> | ||
<name>Tally</name> | ||
<summary>Dashboard for Plausible Analytics</summary> | ||
<metadata_license>CC-BY-SA-4.0</metadata_license> | ||
<project_license>GPL-3.0-or-later</project_license> | ||
<description> | ||
|
@@ -40,6 +40,15 @@ | |
<control>touch</control> | ||
</supports> | ||
<releases> | ||
<release version="3.1.0" date="2024-04-22"> | ||
<description> | ||
<p>Updated for GNOME 46</p> | ||
<ul> | ||
<li>Fixed “Add Website” page</li> | ||
<li>Dialogs follow the new GNOME style</li> | ||
</ul> | ||
</description> | ||
</release> | ||
<release version="3.0.1" date="2023-01-19"> | ||
<description> | ||
<p>New icon thanks to Micah Ilbery! Rather than use the Plausible icon, Tally now has its own identity.</p> | ||
|
@@ -115,22 +124,22 @@ | |
</releases> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/dashboard-dark.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/dashboard-dark.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/dashboard-light.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/dashboard-light.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/sites-dark.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/sites-dark.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/sites-light.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/sites-light.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/login-dark.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/login-dark.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/main/data/screenshots/login-light.png</image> | ||
<image>https://raw.githubusercontent.com/cassidyjames/tally/3.0.1/data/screenshots/login-light.png</image> | ||
</screenshot> | ||
</screenshots> | ||
<content_rating type="oars-1.1"> | ||
|
@@ -143,10 +152,7 @@ | |
<url type="help">https://cassidyjames.com/support</url> | ||
<!--url type="contact">https://cassidyjames.com/support</url--> | ||
<branding> | ||
<color type="primary">#5850EC</color> | ||
<color type="primary" scheme_preference="light">#b5b3fe</color> | ||
<color type="primary" scheme_preference="dark">#393499</color> | ||
</branding> | ||
<custom> | ||
<value key="x-appcenter-color-primary">#5850EC</value> | ||
<value key="x-appcenter-color-primary-text">#fff</value> | ||
</custom> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
* SPDX-FileCopyrightText: 2020–2023 Cassidy James Blaede <[email protected]> | ||
* SPDX-FileCopyrightText: 2020–2024 Cassidy James Blaede <[email protected]> | ||
*/ | ||
|
||
public class Plausible.App : Adw.Application { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-or-later | ||
* SPDX-FileCopyrightText: 2020–2023 Cassidy James Blaede <[email protected]> | ||
* SPDX-FileCopyrightText: 2020–2024 Cassidy James Blaede <[email protected]> | ||
*/ | ||
|
||
public class Plausible.MainWindow : Adw.ApplicationWindow { | ||
|
@@ -17,6 +17,7 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
public MainWindow (Gtk.Application application) { | ||
Object ( | ||
application: application, | ||
height_request: 180, | ||
icon_name: APP_ID, | ||
resizable: true, | ||
title: App.NAME, | ||
|
@@ -29,7 +30,7 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
var sites_button = new Gtk.Button.with_label ("Sites") { | ||
valign = Gtk.Align.CENTER | ||
}; | ||
sites_button.get_style_context ().add_class ("back-button"); | ||
sites_button.add_css_class ("back-button"); | ||
|
||
sites_revealer = new Gtk.Revealer () { | ||
transition_duration = 200, | ||
|
@@ -38,12 +39,12 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
sites_revealer.child = sites_button; | ||
|
||
var site_menu = new Menu (); | ||
site_menu.append (_("Account Settings"), "win.account_settings"); | ||
site_menu.append (_("Log Out…"), "win.log_out"); | ||
site_menu.append (_("Account _Settings"), "win.account_settings"); | ||
site_menu.append (_("_Log Out…"), "win.log_out"); | ||
|
||
var app_menu = new Menu (); | ||
app_menu.append (_("Custom Domain…"), "win.custom_domain"); | ||
app_menu.append (_("About %s").printf (App.NAME), "win.about"); | ||
app_menu.append (_("_Custom Domain…"), "win.custom_domain"); | ||
app_menu.append (_("_About %s").printf (App.NAME), "win.about"); | ||
|
||
var menu = new Menu (); | ||
menu.append_section (null, site_menu); | ||
|
@@ -52,13 +53,12 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
var menu_button = new Gtk.MenuButton () { | ||
icon_name = "open-menu-symbolic", | ||
menu_model = menu, | ||
tooltip_text = _("Menu"), | ||
tooltip_text = _("Main Menu"), | ||
}; | ||
|
||
var header = new Adw.HeaderBar (); | ||
header.pack_start (sites_revealer); | ||
header.pack_end (menu_button); | ||
// header.pack_end (account_revealer); | ||
|
||
web_view = new Plausible.WebView (); | ||
|
||
|
@@ -82,7 +82,7 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
transition_duration = 400, | ||
transition_type = Gtk.StackTransitionType.UNDER_UP | ||
}; | ||
stack.get_style_context ().add_class ("loading"); | ||
stack.add_css_class ("loading"); | ||
stack.add_named (status_page, "loading"); | ||
stack.add_named (web_view, "web"); | ||
|
||
|
@@ -153,21 +153,6 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
web_view.uri != "https://" + domain + "/sites" | ||
); | ||
|
||
// TODO: Figure out how to disable the relevant actions when on | ||
// these URIs. | ||
// | ||
// account_revealer.reveal_child = ( | ||
// web_view.uri != "https://" + domain + "/login" && | ||
// web_view.uri != "https://" + domain + "/register" && | ||
// web_view.uri != "https://" + domain + "/password/request-reset" | ||
// ); | ||
// | ||
// if (web_view.uri == "https://" + domain + "/settings") { | ||
// account_stack.visible_child_name = "logout"; | ||
// } else { | ||
// account_stack.visible_child_name = "account"; | ||
// } | ||
|
||
App.settings.set_string ("current-url", web_view.uri); | ||
} | ||
} | ||
|
@@ -226,20 +211,19 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
domain_grid.attach (domain_label, 0, 0); | ||
domain_grid.attach (domain_entry, 1, 0); | ||
|
||
var domain_dialog = new Adw.MessageDialog ( | ||
this, | ||
var domain_dialog = new Adw.AlertDialog ( | ||
"Set a Custom Domain", | ||
"If you’re self-hosting Plausible or using an instance other than <b>%s</b>, set the domain name here.".printf (domain) | ||
"If you’re self-hosting Plausible or using an instance other than <b>%s</b>, set the domain name.".printf (domain) | ||
) { | ||
body_use_markup = true, | ||
default_response = "save", | ||
extra_child = domain_grid, | ||
}; | ||
domain_dialog.add_response ("close", "Cancel"); | ||
domain_dialog.add_response ("save", _("Set Domain")); | ||
domain_dialog.add_response ("close", "_Cancel"); | ||
domain_dialog.add_response ("save", _("_Set Domain")); | ||
domain_dialog.set_response_appearance ("save", Adw.ResponseAppearance.SUGGESTED); | ||
|
||
domain_dialog.present (); | ||
domain_dialog.present (this); | ||
|
||
domain_dialog.response.connect ((response_id) => { | ||
if (response_id == "save") { | ||
|
@@ -262,19 +246,18 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
private void on_log_out_activate () { | ||
string domain = App.settings.get_string ("domain"); | ||
|
||
var log_out_dialog = new Adw.MessageDialog ( | ||
this, | ||
var log_out_dialog = new Adw.AlertDialog ( | ||
"Log out of Plausible?", | ||
"You will need to re-enter your email and password for <b>%s</b> to log back in.".printf (domain) | ||
) { | ||
body_use_markup = true, | ||
default_response = "log_out" | ||
}; | ||
log_out_dialog.add_response ("close", "Stay Logged In"); | ||
log_out_dialog.add_response ("log_out", _("Log Out")); | ||
log_out_dialog.add_response ("close", "_Stay Logged In"); | ||
log_out_dialog.add_response ("log_out", _("_Log Out")); | ||
log_out_dialog.set_response_appearance ("log_out", Adw.ResponseAppearance.DESTRUCTIVE); | ||
|
||
log_out_dialog.present (); | ||
log_out_dialog.present (this); | ||
|
||
log_out_dialog.response.connect ((response_id) => { | ||
if (response_id == "log_out") { | ||
|
@@ -284,7 +267,7 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
// Instead, we clear cookies then load /sites, which will prompt for | ||
// login before showing the dashboard once again. | ||
|
||
web_view.get_website_data_manager ().clear.begin ( | ||
web_view.network_session.get_website_data_manager ().clear.begin ( | ||
WebKit.WebsiteDataTypes.COOKIES, 0, null, () => { | ||
debug ("Cleared cookies; going home."); | ||
web_view.load_uri ("https://" + domain + "/sites"); | ||
|
@@ -295,8 +278,8 @@ public class Plausible.MainWindow : Adw.ApplicationWindow { | |
} | ||
|
||
private void on_about_activate () { | ||
var about_window = new Adw.AboutWindow () { | ||
transient_for = this, | ||
var about_window = new Adw.AboutDialog () { | ||
// transient_for = this, | ||
|
||
application_icon = APP_ID, | ||
application_name = _("%s for Plausible").printf (App.NAME), | ||
|
@@ -333,6 +316,6 @@ Email: [email protected] | |
""" | ||
); | ||
|
||
about_window.present (); | ||
about_window.present (this); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.