Skip to content
Merged

V2 #216

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0e9c6c7
Add support for 'extras' disk and bundling application resources
gwleuverink Jul 9, 2025
9dfca4e
Change path to extras
simonhamp Jul 11, 2025
3a8e8ac
add webPreferences to docs
gwleuverink Sep 10, 2025
add5d97
update packages
gwleuverink Sep 30, 2025
b36059e
update filament resources
gwleuverink Sep 30, 2025
26e539e
duplicate v1 docs
gwleuverink Sep 30, 2025
53762f6
update namespaces to `Native\Desktop`
gwleuverink Sep 30, 2025
dfbb61e
update installation instructions
gwleuverink Sep 30, 2025
6fc11c9
Merge branch 'v2' into add-webPreferences-docs
gwleuverink Sep 30, 2025
6622b33
target v2 branch
gwleuverink Sep 30, 2025
4400b73
Merge branch 'v2' into add-extra-files
gwleuverink Sep 30, 2025
980a33f
target v2 branch
gwleuverink Sep 30, 2025
b5d6464
fix namespace
gwleuverink Sep 30, 2025
0afd89b
Merge pull request #209 from NativePHP/add-webPreferences-docs
gwleuverink Sep 30, 2025
1ee78d6
Merge pull request #181 from NativePHP/add-extra-files
gwleuverink Sep 30, 2025
eb71a9a
add `native:init` to the broadcasting docs
gwleuverink Sep 30, 2025
33c47eb
basic version switcher
gwleuverink Sep 30, 2025
11a9682
page-switcher fallback
gwleuverink Sep 30, 2025
0bd40e5
add context
gwleuverink Sep 30, 2025
5a53891
version switcher styling
gwleuverink Sep 30, 2025
25c04c2
update vertical margins
gwleuverink Sep 30, 2025
724e376
version switcher - final touches
gwleuverink Sep 30, 2025
fc2ed7c
add fill currentColor
gwleuverink Sep 30, 2025
e06a7bc
add desktop repo to release notes
gwleuverink Sep 30, 2025
29b2e51
added v2 upgrade guide
gwleuverink Oct 1, 2025
8cdc6da
spelling & sentence flow
gwleuverink Oct 1, 2025
eb67a4a
wip - wording
gwleuverink Oct 1, 2025
5a1a1c0
Merge branch 'main' of github.com:NativePHP/nativephp.com into v2
gwleuverink Oct 1, 2025
d751a09
update links
gwleuverink Oct 1, 2025
b4d6a4f
rename `native:serve` to `native:run`
gwleuverink Oct 1, 2025
9a1f03e
wip - missed a `native:serve` reference
gwleuverink Oct 1, 2025
720afad
remove references to Tauri
gwleuverink Oct 1, 2025
1c3b893
improve wording & open outbound links in new tab
gwleuverink Oct 1, 2025
9bc9072
add `ChildProcess::node()` to docs
gwleuverink Oct 2, 2025
cf48607
updated node example
gwleuverink Oct 2, 2025
c08b667
update upgdrade guide
gwleuverink Oct 9, 2025
a84edf3
update upgrade guide
gwleuverink Oct 9, 2025
a5f1c7b
Merge remote-tracking branch 'origin/main' into v2
gwleuverink Oct 9, 2025
b493303
add `assertNode` to childprocess fake
gwleuverink Oct 9, 2025
5d0881d
add `Shell` fake
gwleuverink Oct 9, 2025
c30454d
improve assertion naming
gwleuverink Oct 9, 2025
d230b8c
Fix link
simonhamp Oct 14, 2025
90cf75f
Update links
simonhamp Oct 14, 2025
c5893f0
More links
simonhamp Oct 14, 2025
b4cab79
Update support policy
simonhamp Oct 14, 2025
c510026
Remove Tauri
simonhamp Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Also, be sure to read our [contributing guidelines](CONTRIBUTING.md) for help ge

## Issues

Please raise any issues on the [NativePHP/laravel](https://github.com/NativePHP/laravel/issues) repo.
Please raise any issues on the [NativePHP/desktop](https://github.com/nativephp/desktop/issues) repo.
53 changes: 53 additions & 0 deletions app/Livewire/VersionSwitcher.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php

namespace App\Livewire;

use Illuminate\View\ViewException;
use Livewire\Component;

class VersionSwitcher extends Component
{
public string $platform;

public array $versions;

public int $version;

public string $page;

public function mount(array $versions)
{
// Since the props are always bound to the uri we fetch them
// from the route instead of prop drilling or adding
// single-use view data to the controller

throw_unless(
request()->route()->named('docs.show'),
ViewException::class,
"The version switcher can only be used on the 'docs.show' route."
);

$this->platform = request()->route()->parameter('platform');
$this->version = request()->route()->parameter('version');
$this->page = request()->route()->parameter('page');
$this->versions = $versions;
}

public function updatedVersion()
{
if (! $this->pageExists($this->platform, $this->version, $this->page)) {
$this->page = 'introduction';
}

return redirect()->route('docs.show', [
'platform' => $this->platform,
'version' => $this->version,
'page' => $this->page,
]);
}

protected function pageExists(string $platform, int $version, string $page): bool
{
return file_exists(resource_path("views/docs/{$platform}/{$version}/{$page}.md"));
}
}
4 changes: 2 additions & 2 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ private function registerSharedViewVariables(): void
? GitHub::electron()->latestVersion()
: 'dev'
);
View::share('discordLink', 'https://discord.gg/X62tWNStZK');
View::share('discordLink', 'https://discord.gg/nativephp');
View::share('bskyLink', 'https://bsky.app/profile/nativephp.bsky.social');
View::share('openCollectiveLink', 'https://opencollective.com/nativephp');
View::share('githubLink', 'https://github.com/NativePHP');
View::share('githubLink', 'https://github.com/nativephp');
}

private function sendFailingJobsToSentry(): void
Expand Down
9 changes: 9 additions & 0 deletions app/Support/GitHub.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,26 @@ class GitHub

public const PACKAGE_LARAVEL = 'nativephp/laravel';

public const PACKAGE_DESKTOP = 'nativephp/desktop';

public const PACKAGE_PHP_BIN = 'nativephp/php-bin';

public function __construct(
private string $package
) {}

public static function desktop(): static
{
return new static(static::PACKAGE_DESKTOP);
}

// V1
public static function electron(): static
{
return new static(static::PACKAGE_ELECTRON);
}

// V1
public static function laravel(): static
{
return new static(static::PACKAGE_LARAVEL);
Expand Down
Loading