Skip to content

Commit

Permalink
Merge pull request #54 from shopperlabs/fix-installation-errors
Browse files Browse the repository at this point in the history
Fix errors during installation on a fresh new laravel app
  • Loading branch information
mckenziearts authored Jul 22, 2021
2 parents 6a6717d + 11a1a3e commit 3e3a18e
Show file tree
Hide file tree
Showing 14 changed files with 519 additions and 1,081 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"laravel/helpers": "^1.4.1",
"laravel/ui": "^3.2",
"lavary/laravel-menu": "^1.8.3",
"livewire-ui/modal": "^0.1.5",
"livewire/livewire": "^2.4",
"livewire-ui/modal": "^1.0.0",
"livewire/livewire": "^2.5",
"maatwebsite/excel": "^3.1",
"maatwebsite/laravel-sidebar": "^2.4",
"milon/barcode": "^8.0.1",
Expand Down
927 changes: 470 additions & 457 deletions composer.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
Expand Down
2 changes: 1 addition & 1 deletion public/css/shopper.css

Large diffs are not rendered by default.

479 changes: 0 additions & 479 deletions public/js/0.js

This file was deleted.

113 changes: 0 additions & 113 deletions public/js/initialization.js

This file was deleted.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/shopper.js": "/js/shopper.js?id=f4c1c4d541c2f9a60ac5",
"/css/shopper.css": "/css/shopper.css?id=65feb8983c0c885487b8"
"/css/shopper.css": "/css/shopper.css?id=88f2ade0e8025d42bd19"
}
6 changes: 2 additions & 4 deletions resources/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

<link rel="stylesheet" type="text/css" href="{{ mix('/css/shopper.css', 'shopper') }}">

<script src="{{ mix('/js/shopper.js','shopper') }}" defer></script>

@if(! empty(config('shopper.system.resources.stylesheets')))
<!-- Additional CSS -->
@foreach(config('shopper.system.resources.stylesheets') as $css)
Expand Down Expand Up @@ -94,14 +96,10 @@

@livewire('livewire-ui-modal')

@livewireUIScripts

<livewire:scripts />

@bukScripts(true)

<script src="{{ mix('/js/shopper.js','shopper') }}"></script>

@stack('scripts')

@if(! empty(config('shopper.system.resources.scripts')))
Expand Down
10 changes: 9 additions & 1 deletion resources/views/livewire/initialization.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,15 @@
<div class="bg-white shadow-md sm:rounded-md p-4 dark:bg-gray-800">
<div class="grid gap-4 lg:grid-cols-3 lg:gap-6">
<div wire:ignore class="space-y-4 sm:col-span-2">
<x-mapbox :markers="[[ 9.70428, 4.04827]]" :options="['zoom' => 2]" class="bg-gray-100 rounded-md h-95 overflow-hidden outline-none focus:outline-none dark:bg-gray-900" />
@if(env('MAPBOX_PUBLIC_TOKEN'))
<x-mapbox :markers="[[ 9.70428, 4.04827]]" :options="['zoom' => 2]" class="bg-gray-100 rounded-md h-95 overflow-hidden outline-none focus:outline-none dark:bg-gray-900" />
@else
<div class="bg-gray-100 rounded-md h-95 overflow-hidden outline-none focus:outline-none dark:bg-gray-900 flex items-center justify-center">
<p class="text-base leading-6 text-gray-500 font-medium dark:text-gray-400">
Mapbox has not been activated, consult the <a href="https://docs.laravelshopper.io/docs/configuration#mapbox" class="text-blue-500 hover:text-blue-400">documentation</a> to setup the map
</p>
</div>
@endif
<p class="text-sm text-gray-500 leading-5 dark:text-gray-400">
Shopper uses <span class="font-medium">Mapbox</span> to make it easier to locate your store.
To learn more about mapbox, consult the <a href="https://docs.mapbox.com/mapbox-gl-js/api" target="_blank" rel="noopener noreferrer" class="text-blue-600 hover:text-blue-500 mr-1 dark:text-blue-500">documentation</a>
Expand Down
6 changes: 3 additions & 3 deletions src/Console/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ class PublishCommand extends Command
public function handle()
{
$this->call('vendor:publish', [
'--tag' => 'shopper',
'--tag' => 'shopper-config',
'--force' => $this->option('force'),
]);

$this->call('vendor:publish', [
'--tag' => 'shopper-assets',
'--force' => true,
'--tag' => 'shopper-seeders',
'--force' => $this->option('force'),
]);

$this->call('vendor:publish', [
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Livewire/Products/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Create extends AbstractBaseComponent

public array $collection_ids = [];

public ?Channel $defaultChannel;
public ?Channel $defaultChannel = null;

protected $listeners = ['productAdded'];

Expand Down
25 changes: 14 additions & 11 deletions src/Http/Livewire/Settings/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ class General extends Component
{
use WithFileUploads;

public string $shop_name = '';
public string $shop_legal_name = '';
public string $shop_email = '';
public string $shop_phone_number = '';
public string $shop_about = '';
public string $shop_street_address = '';
public string $shop_zipcode = '';
public string $shop_city = '';
public string $shop_facebook_link = '';
public string $shop_instagram_link = '';
public string $shop_twitter_link = '';
public string $shop_name;
public ?string $shop_legal_name = null;
public string $shop_email;
public ?string $shop_phone_number = null;
public ?string $shop_about = null;
public string $shop_street_address;
public string $shop_zipcode;
public string $shop_city;

public ?string $shop_facebook_link = null;
public ?string $shop_instagram_link = null;
public ?string $shop_twitter_link = null;

public $shop_country_id;
public $shop_currency_id;

public $shop_logo;
public $logo;
public $shop_cover;
Expand Down
2 changes: 1 addition & 1 deletion src/Shopper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function version(): string
*/
public static function prefix(): string
{
return config('shopper.routes.prefix');
return config('shopper.routes.prefix', 'shopper');
}

/**
Expand Down
21 changes: 14 additions & 7 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@ const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
mode: 'jit',
darkMode: 'class',
purge: [
'./resources/js/**/*.js',
'./resources/views/**/*.php',
'./resources/lang/**/*.php',
'./src/**/*.php',
'./vendor/livewire-ui/modal/resources/views/*.blade.php',
],
purge: {
content: [
'./resources/js/**/*.js',
'./resources/views/**/*.php',
'./resources/lang/**/*.php',
'./src/**/*.php',
'./vendor/livewire-ui/modal/resources/views/*.blade.php',
],
options: {
safelist: [
'sm:max-w-2xl'
]
}
},
theme: {
extend: {
inset: {
Expand Down

0 comments on commit 3e3a18e

Please sign in to comment.