Skip to content

Commit 95c5e90

Browse files
committed
Remove the aethr.no service
1 parent a8c3e4f commit 95c5e90

9 files changed

Lines changed: 4 additions & 981 deletions

File tree

docs/cli.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ aether --generate ~/wallpaper.jpg --no-apply --output ~/my-themes/generated
9898
Import a theme from URL or local file:
9999

100100
```bash
101-
aether --import-blueprint "https://aethr.no/api/blueprint/abc123"
101+
aether --import-blueprint "https://example.com/blueprint.json"
102102
aether -i "/path/to/theme.json"
103103
```
104104

@@ -112,7 +112,7 @@ aether -i "/path/to/theme.json"
112112

113113
```bash
114114
# Import and apply in one command
115-
aether --import-blueprint "https://aethr.no/api/blueprint/abc123" --auto-apply
115+
aether --import-blueprint "https://example.com/blueprint.json" --auto-apply
116116
```
117117

118118
### Import Base16 Scheme
@@ -250,16 +250,6 @@ bind = $mainMod SHIFT, T, exec, aether --widget-blueprint
250250
bind = $mainMod ALT, T, exec, aether --generate $(hyprctl hyprpaper listactive | head -1 | cut -d' ' -f2)
251251
```
252252

253-
## Protocol Handler
254-
255-
Aether registers the `aether://` protocol for one-click theme imports:
256-
257-
```
258-
aether://import?url=https://aethr.no/api/blueprint/abc123
259-
```
260-
261-
This is used by the [Aether Community](https://aethr.no) for sharing themes.
262-
263253
## Exit Codes
264254

265255
| Code | Meaning |

docs/sharing.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

install.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,6 @@ print_post_install() {
157157
echo -e "${BOLD}Documentation:${NC}"
158158
echo -e " ${CYAN}https://github.com/bjarneo/aether${NC}"
159159
echo ""
160-
echo -e "${BOLD}Community:${NC}"
161-
echo -e " ${CYAN}https://aethr.no${NC}"
162-
echo ""
163160
}
164161

165162
main() {

src/AetherApplication.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* - Command-line argument processing
77
* - CLI commands (list-blueprints, apply-blueprint, generate, import)
88
* - Theme manager initialization
9-
* - Protocol handler registration
109
*
1110
* @module AetherApplication
1211
*/
@@ -31,7 +30,6 @@ import {themeState} from './state/ThemeState.js';
3130
import {blueprintService} from './services/BlueprintService.js';
3231
import {BlueprintWidget} from './components/BlueprintWidget.js';
3332
import {runMigrations} from './utils/migrations.js';
34-
import {ProtocolHandlerInstaller} from './utils/protocol-handler-installer.js';
3533
import {AboutDialog} from './components/AboutDialog.js';
3634

3735
// Theme manager singleton (initialized only when GUI is needed)
@@ -281,13 +279,6 @@ export const AetherApplication = GObject.registerClass(
281279

282280
let source = this._getStringOption(options, 'import-blueprint');
283281

284-
// Parse aether:// protocol URLs
285-
if (source.startsWith('aether://import?url=')) {
286-
const urlParam = source.substring('aether://import?url='.length);
287-
source = decodeURIComponent(urlParam);
288-
print(`Parsed protocol URL: ${source}`);
289-
}
290-
291282
const autoApply = options.contains('auto-apply');
292283

293284
this._runAsyncCommand(
@@ -598,9 +589,6 @@ export const AetherApplication = GObject.registerClass(
598589
}
599590
this.themeManager = themeManager;
600591

601-
// Install protocol handler on first run
602-
ProtocolHandlerInstaller.ensureInstalled();
603-
604592
let window = this.active_window;
605593
if (!window) {
606594
window = new AetherWindow(this);

src/components/BlueprintManagerWindow.js

Lines changed: 0 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
} from '../utils/file-utils.js';
1515
import {DialogManager} from '../utils/DialogManager.js';
1616
import {thumbnailService} from '../services/thumbnail-service.js';
17-
import {aetherApiService} from '../services/aether-api-service.js';
1817
import {SPACING, GRID} from '../constants/ui-constants.js';
1918

2019
/**
@@ -81,13 +80,6 @@ export const BlueprintManagerWindow = GObject.registerClass(
8180
importButton.connect('clicked', () => this._importBlueprint());
8281
headerBar.pack_end(importButton);
8382

84-
const apiKeyButton = new Gtk.Button({
85-
icon_name: 'network-server-symbolic',
86-
tooltip_text: 'Community API Settings',
87-
});
88-
apiKeyButton.connect('clicked', () => this._showApiKeyDialog());
89-
headerBar.pack_end(apiKeyButton);
90-
9183
const refreshButton = new Gtk.Button({
9284
icon_name: 'view-refresh-symbolic',
9385
tooltip_text: 'Refresh',
@@ -422,9 +414,6 @@ export const BlueprintManagerWindow = GObject.registerClass(
422414

423415
const menu = Gio.Menu.new();
424416
menu.append('Export', 'blueprint.export');
425-
if (aetherApiService.hasApiKey()) {
426-
menu.append('Post to Community', 'blueprint.post');
427-
}
428417
menu.append('Delete', 'blueprint.delete');
429418
menuButton.set_menu_model(menu);
430419

@@ -436,12 +425,6 @@ export const BlueprintManagerWindow = GObject.registerClass(
436425
);
437426
actionGroup.add_action(exportAction);
438427

439-
const postAction = Gio.SimpleAction.new('post', null);
440-
postAction.connect('activate', () =>
441-
this._postToCommunity(blueprint)
442-
);
443-
actionGroup.add_action(postAction);
444-
445428
const deleteAction = Gio.SimpleAction.new('delete', null);
446429
deleteAction.connect('activate', () =>
447430
this._deleteBlueprint(blueprint)
@@ -553,151 +536,6 @@ export const BlueprintManagerWindow = GObject.registerClass(
553536
}
554537
}
555538

556-
/**
557-
* Show dialog to configure Aether Community API key
558-
* @private
559-
*/
560-
_showApiKeyDialog() {
561-
const currentKey = aetherApiService.getApiKey();
562-
const dialog = new Adw.MessageDialog({
563-
heading: 'Aether Community API Key',
564-
body: 'Enter your API key to post blueprints to https://aethr.no/\n\nYou can get an API key from your account settings on the website.',
565-
transient_for: this.get_root(),
566-
});
567-
568-
dialog.add_response('cancel', 'Cancel');
569-
dialog.add_response('save', 'Save');
570-
dialog.set_response_appearance(
571-
'save',
572-
Adw.ResponseAppearance.SUGGESTED
573-
);
574-
575-
const entry = new Gtk.Entry({
576-
placeholder_text: 'sk_live_...',
577-
text: currentKey,
578-
margin_start: 12,
579-
margin_end: 12,
580-
margin_top: 6,
581-
margin_bottom: 6,
582-
});
583-
584-
dialog.set_extra_child(entry);
585-
586-
dialog.connect('response', (_, response) => {
587-
if (response === 'save') {
588-
const apiKey = entry.get_text().trim();
589-
aetherApiService.setApiKey(apiKey);
590-
591-
// Refresh UI to show/hide "Post to Community" options
592-
this._updateUI();
593-
594-
const dm = new DialogManager(this.get_root());
595-
if (apiKey) {
596-
dm.showMessage({
597-
heading: 'API Key Saved',
598-
body: 'Your API key has been saved. You can now post blueprints to the community.',
599-
});
600-
} else {
601-
dm.showMessage({
602-
heading: 'API Key Removed',
603-
body: 'Your API key has been removed.',
604-
});
605-
}
606-
}
607-
});
608-
609-
dialog.present();
610-
}
611-
612-
/**
613-
* Post a blueprint to the Aether community as a draft
614-
* @param {Object} blueprint - The blueprint to post
615-
* @private
616-
*/
617-
async _postToCommunity(blueprint) {
618-
if (!aetherApiService.hasApiKey()) {
619-
const dm = new DialogManager(this.get_root());
620-
dm.showMessage({
621-
heading: 'API Key Required',
622-
body: 'Please configure your API key first using the server icon in the header.',
623-
});
624-
return;
625-
}
626-
627-
// Show confirmation dialog
628-
const dialogManager = new DialogManager(this.get_root());
629-
dialogManager.showConfirmation({
630-
heading: 'Post to Community',
631-
body: `Post "${blueprint.name}" to the Aether community as a draft?\n\nYou can publish it from the website when ready.`,
632-
confirmText: 'Post',
633-
cancelText: 'Cancel',
634-
onConfirm: async () => {
635-
// Create and show spinner dialog
636-
const spinnerDialog = new Adw.MessageDialog({
637-
heading: 'Uploading...',
638-
body: `Posting "${blueprint.name}" to the community`,
639-
transient_for: this.get_root(),
640-
close_response: '',
641-
});
642-
643-
const spinnerBox = new Gtk.Box({
644-
orientation: Gtk.Orientation.VERTICAL,
645-
spacing: SPACING.MD,
646-
margin_start: 24,
647-
margin_end: 24,
648-
margin_top: SPACING.MD,
649-
margin_bottom: SPACING.MD,
650-
halign: Gtk.Align.CENTER,
651-
});
652-
653-
const spinner = new Gtk.Spinner({
654-
spinning: true,
655-
width_request: 32,
656-
height_request: 32,
657-
});
658-
spinnerBox.append(spinner);
659-
660-
spinnerDialog.set_extra_child(spinnerBox);
661-
spinnerDialog.present();
662-
663-
try {
664-
const result =
665-
await aetherApiService.postBlueprint(blueprint);
666-
667-
// Close spinner dialog
668-
spinnerDialog.close();
669-
670-
const dm = new DialogManager(this.get_root());
671-
672-
if (result.success) {
673-
dm.showMessage({
674-
heading: 'Blueprint Posted',
675-
body: `"${blueprint.name}" has been posted as a draft.\n\nVisit https://aethr.no/ to publish it.`,
676-
});
677-
} else {
678-
dm.showMessage({
679-
heading: 'Post Failed',
680-
body:
681-
result.message ||
682-
'Failed to post blueprint',
683-
});
684-
}
685-
} catch (e) {
686-
// Close spinner dialog
687-
spinnerDialog.close();
688-
689-
console.error('Error posting blueprint:', e.message);
690-
const dm = new DialogManager(this.get_root());
691-
dm.showMessage({
692-
heading: 'Post Failed',
693-
body:
694-
e.message || 'An error occurred while posting',
695-
});
696-
}
697-
},
698-
});
699-
}
700-
701539
get widget() {
702540
return this;
703541
}

0 commit comments

Comments
 (0)