diff --git a/backup_migrations/2024_08_29_190127_create_pulse_tables.php b/backup_migrations/2024_08_29_190127_create_pulse_tables.php deleted file mode 100644 index 5d194e2..0000000 --- a/backup_migrations/2024_08_29_190127_create_pulse_tables.php +++ /dev/null @@ -1,84 +0,0 @@ -shouldRun()) { - return; - } - - Schema::create('pulse_values', function (Blueprint $table) { - $table->id(); - $table->unsignedInteger('timestamp'); - $table->string('type'); - $table->mediumText('key'); - match ($this->driver()) { - 'mariadb', 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), - 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - 'sqlite' => $table->string('key_hash'), - }; - $table->mediumText('value'); - - $table->index('timestamp'); // For trimming... - $table->index('type'); // For fast lookups and purging... - $table->unique(['type', 'key_hash']); // For data integrity and upserts... - }); - - Schema::create('pulse_entries', function (Blueprint $table) { - $table->id(); - $table->unsignedInteger('timestamp'); - $table->string('type'); - $table->mediumText('key'); - match ($this->driver()) { - 'mariadb', 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), - 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - 'sqlite' => $table->string('key_hash'), - }; - $table->bigInteger('value')->nullable(); - - $table->index('timestamp'); // For trimming... - $table->index('type'); // For purging... - $table->index('key_hash'); // For mapping... - $table->index(['timestamp', 'type', 'key_hash', 'value']); // For aggregate queries... - }); - - Schema::create('pulse_aggregates', function (Blueprint $table) { - $table->id(); - $table->unsignedInteger('bucket'); - $table->unsignedMediumInteger('period'); - $table->string('type'); - $table->mediumText('key'); - match ($this->driver()) { - 'mariadb', 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), - 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - 'sqlite' => $table->string('key_hash'), - }; - $table->string('aggregate'); - $table->decimal('value', 20, 2); - $table->unsignedInteger('count')->nullable(); - - $table->unique(['bucket', 'period', 'type', 'aggregate', 'key_hash']); // Force "on duplicate update"... - $table->index(['period', 'bucket']); // For trimming... - $table->index('type'); // For purging... - $table->index(['period', 'type', 'aggregate', 'bucket']); // For aggregate queries... - }); - } - - /** - * Reverse the migrations. - */ - public function down(): void - { - Schema::dropIfExists('pulse_values'); - Schema::dropIfExists('pulse_entries'); - Schema::dropIfExists('pulse_aggregates'); - } -}; diff --git a/resources/js/nostrLogin.js b/resources/js/nostrLogin.js index c29da3b..dfdc866 100644 --- a/resources/js/nostrLogin.js +++ b/resources/js/nostrLogin.js @@ -32,8 +32,9 @@ export default () => ({ try { const data = JSON.parse(text); console.log('Profile fetched', data); - // store the profile in AlpineJS store + // store in AlpineJS store Alpine.store('nostr', {user: data}); + // dispatch Livewire event this.$dispatch('nostrLoggedIn', {pubkey: pubkey}); } catch (e) { console.error('JSON parse error:', e); diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index aba6952..84b4738 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -36,13 +36,16 @@ @if(\App\Support\NostrAuth::check()) News + :current="request()->routeIs('association.news')"> + News Mitgliederstatus + :current="request()->routeIs('association.profile')"> + Mitgliederstatus Projekt-Unterstützungen + :current="request()->routeIs('association.projectSupport')"> + Projekt-Unterstützungen @@ -64,27 +67,11 @@ Info - Issues/Feedback - - Changelog - - Github - Impressum - @if(\App\Support\NostrAuth::check()) -
- @csrf - Logout -
- @else - Mit Nostr verbinden - - @endif +
@@ -103,7 +90,11 @@ - @if(\App\Support\NostrAuth::check()) + + + + + News @@ -121,28 +112,10 @@ - Issues/Feedback - - Changelog - - Github - Impressum - @endif - - @if(\App\Support\NostrAuth::check()) - -
- @csrf - Logout -
- @else - Mit Nostr verbinden - @endif +
@@ -157,7 +130,9 @@ @fluxScripts @livewireScriptConfig