diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index f2e7e0f..d3188cd 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -3,10 +3,13 @@ contact_links:
- name: Feature Request
url: https://github.com/orgs/LinkStackOrg/discussions/categories/feature-requests
about: Requests regarding new features, enhancements, or changes
+ - name: Commission Custom Features
+ url: https://linkstack.org/contact/
+ about: Accelerate feature implementation with our commissioned services. Reach out to us for a personalized quote and fast-track the features you need.
- name: Button requests
url: https://github.com/orgs/LinkStackOrg/discussions/categories/predefined-links
about: Requests regarding new buttons, brands, updated styling or changes
- name: Docker Issues
url: https://github.com/LinkStackOrg/linkstack-docker/issues
about: Issues regarding the Docker version exclusively or reverse proxy issues related to the Docker instance
-
\ No newline at end of file
+
diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php
index ef6f839..43aeba2 100755
--- a/app/Http/Controllers/AdminController.php
+++ b/app/Http/Controllers/AdminController.php
@@ -27,6 +27,7 @@ use App\Models\Admin;
use App\Models\Button;
use App\Models\Link;
use App\Models\Page;
+use App\Models\UserData;
class AdminController extends Controller
{
@@ -113,13 +114,31 @@ public function SendTestMail(Request $request)
return redirect('admin/users/all');
}
+ //Verify user
+ public function verifyCheckUser(request $request)
+ {
+ $id = $request->id;
+ $status = $request->verify;
+
+ if ($status == 'vip') {
+ $verify = 'vip';
+ UserData::saveData($id, 'checkmark', true);
+ } elseif ($status == 'user') {
+ $verify = 'user';
+ }
+
+ User::where('id', $id)->update(['role' => $verify]);
+
+ return redirect(url('u')."/".$id);
+ }
+
//Verify or un-verify users emails
public function verifyUser(request $request)
{
$id = $request->id;
$status = $request->verify;
- if ($status == '-') {
+ if ($status == "true") {
$verify = '0000-00-00 00:00:00';
} else {
$verify = NULL;
@@ -147,9 +166,25 @@ public function SendTestMail(Request $request)
return implode('', $pieces);
}
+ $names = User::pluck('name')->toArray();
+
+ $adminCreatedNames = array_filter($names, function($name) {
+ return strpos($name, 'Admin-Created-') === 0;
+ });
+
+ $numbers = array_map(function($name) {
+ return (int) str_replace('Admin-Created-', '', $name);
+ }, $adminCreatedNames);
+
+ $maxNumber = !empty($numbers) ? max($numbers) : 0;
+ $newNumber = $maxNumber + 1;
+
+ $domain = parse_url(url(''), PHP_URL_HOST);
+ $domain = ($domain == 'localhost') ? 'example.com' : $domain;
+
$user = User::create([
- 'name' => 'Admin-Created-' . random_str(8),
- 'email' => random_str(8) . '@example.com',
+ 'name' => 'Admin-Created-' . $newNumber,
+ 'email' => strtolower(random_str(8)) . '@' . $domain,
'password' => Hash::make(random_str(32)),
'role' => 'user',
'block' => 'no',
diff --git a/app/Http/Controllers/Auth/RegisteredUserController.php b/app/Http/Controllers/Auth/RegisteredUserController.php
index d9f1512..4b0b700 100755
--- a/app/Http/Controllers/Auth/RegisteredUserController.php
+++ b/app/Http/Controllers/Auth/RegisteredUserController.php
@@ -11,33 +11,36 @@ use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Mail;
+use Illuminate\Support\Facades\Validator;
class RegisteredUserController extends Controller
{
- /**
- * Display the registration view.
- *
- * @return \Illuminate\View\View
- */
+
public function create()
{
return view('auth.register');
}
- /**
- * Handle an incoming registration request.
- *
- * @param \Illuminate\Http\Request $request
- * @return \Illuminate\Http\RedirectResponse
- *
- * @throws \Illuminate\Validation\ValidationException
- */
+ public function validateHandle(Request $request)
+ {
+ $validator = Validator::make($request->all(), [
+ 'littlelink_name' => 'required|string|max:50|unique:users',
+ ]);
+
+ if ($validator->fails()) {
+ return response()->json(['valid' => false]);
+ }
+
+ return response()->json(['valid' => true]);
+ }
+
public function store(Request $request)
{
$request->validate([
'name' => 'required|string|max:255',
+ 'littlelink_name' => 'required|string|max:50|unique:users',
'email' => 'required|string|email|max:255|unique:users',
- 'password' => 'required|string|confirmed|min:8',
+ 'password' => 'required|string|min:8',
]);
$name = $request->input('name');
@@ -48,23 +51,13 @@ class RegisteredUserController extends Controller
$block = 'no';
}
- if(DB::table('users')->where('littlelink_name', $request->name)->exists())
- {
- Auth::login($user = User::create([
- 'name' => $request->name,
- 'email' => $request->email,
- 'password' => Hash::make($request->password),
- 'role' => 'user',
- ]));
- } else {
- Auth::login($user = User::create([
- 'name' => $request->name,
- 'email' => $request->email,
- 'littlelink_name' => $request->name,
- 'password' => Hash::make($request->password),
- 'role' => 'user',
- ]));
- }
+ Auth::login($user = User::create([
+ 'name' => $request->name,
+ 'email' => $request->email,
+ 'littlelink_name' => $request->littlelink_name,
+ 'password' => Hash::make($request->password),
+ 'role' => 'user',
+ ]));
$user->block = $block;
$user->save();
diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php
index fd80544..26d3ca1 100755
--- a/app/Http/Controllers/UserController.php
+++ b/app/Http/Controllers/UserController.php
@@ -789,6 +789,7 @@ class UserController extends Controller
$name = $request->name;
$checkmark = $request->checkmark;
$sharebtn = $request->sharebtn;
+ $tablinks = $request->tablinks;
if(env('HOME_URL') !== '' && $pageName != $littlelink_name && $littlelink_name == env('HOME_URL')){
EnvEditor::editKey('HOME_URL', $pageName);
@@ -816,6 +817,12 @@ class UserController extends Controller
} else {
UserData::saveData($userId, 'disable-sharebtn', true);
}
+
+ if ($tablinks == "on") {
+ UserData::saveData($userId, 'links-new-tab', true);
+ } else {
+ UserData::saveData($userId, 'links-new-tab', false);
+ }
return Redirect('/studio/page');
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 0c06ba2..c5d5fb2 100755
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -54,6 +54,7 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
+ 'disableCookies' => \App\Http\Middleware\DisableCookies::class,
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
diff --git a/app/Http/Livewire/UserTable.php b/app/Http/Livewire/UserTable.php
index d5e6b80..2e3dd9c 100644
--- a/app/Http/Livewire/UserTable.php
+++ b/app/Http/Livewire/UserTable.php
@@ -23,6 +23,10 @@ class UserTable extends DataTableComponent
public function columns(): array
{
return [
+ // Column::make("", "id")
+ // ->format(function ($value, $row, Column $column) {
+ // return view('components.table-components.select', ['user' => $row]);
+ // }),
Column::make(__('messages.ID'), "id")
->sortable()
->searchable(),
@@ -37,7 +41,7 @@ class UserTable extends DataTableComponent
->searchable()
->format(function ($value, $row, Column $column) {
if (!$row->littlelink_name == NULL) {
- return "littlelink_name . "' target='_blank' class='text-info'> " . $row->littlelink_name . " ";
+ return "littlelink_name) . "' target='_blank' class='text-info'> " . $row->littlelink_name . " ";
} else {
return 'N/A';
}
@@ -61,20 +65,25 @@ class UserTable extends DataTableComponent
->format(function ($value, $row, Column $column) {
if (env('REGISTER_AUTH') !== 'auth') {
if ($row->role == 'admin' && $row->email_verified_at != '') {
- return '
-';
+ return '-
';
} else {
+ if($row->email_verified_at == ''){
+ $verifyLinkBool = 'true';
+ } else {
+ $verifyLinkBool = 'false';
+ }
$verifyLink = route('verifyUser', [
- 'verify' => '-' . $row->email_verified_at,
+ 'verify' => $verifyLinkBool,
'id' => $row->id
]);
if ($row->email_verified_at == '') {
- return '' . __('messages.Pending') . '';
+ return '';
} else {
- return '' . __('messages.Verified') . '';
+ return '';
}
}
} else {
- return '-';
+ return '-
';
}
return '';
})->html(),
@@ -82,13 +91,13 @@ class UserTable extends DataTableComponent
->sortable()
->format(function ($value, $row, Column $column) {
if ($row->role === 'admin' && $row->id === 1) {
- return '-';
+ return '-
';
} else {
$route = route('blockUser', ['block' => $row->block, 'id' => $row->id]);
if ($row->block === 'yes') {
- $badge = ''.__('messages.Pending').'';
+ $badge = '';
} elseif ($row->block === 'no') {
- $badge = ''.__('messages.Approved').'';
+ $badge = '';
}
return "$badge";
}
diff --git a/app/Http/Middleware/DisableCookies.php b/app/Http/Middleware/DisableCookies.php
new file mode 100644
index 0000000..a5f593f
--- /dev/null
+++ b/app/Http/Middleware/DisableCookies.php
@@ -0,0 +1,29 @@
+hasCookie(strtolower(config('app.name')).'_session') || $request->hasCookie('XSRF-TOKEN');
+
+ if ($cookiesAlreadySet) {
+ return $next($request);
+ }
+
+ Cookie::queue(Cookie::forget(strtolower(config('app.name')).'_session'));
+ Cookie::queue(Cookie::forget('XSRF-TOKEN'));
+ config(['session.driver' => 'array']);
+
+ $response = $next($request);
+ $response->headers->remove('Set-Cookie');
+
+ return $response;
+ }
+}
diff --git a/assets/linkstack/icons/bluesky.svg b/assets/linkstack/icons/bluesky.svg
index c21441e..59e1f0f 100644
--- a/assets/linkstack/icons/bluesky.svg
+++ b/assets/linkstack/icons/bluesky.svg
@@ -1,14 +1,3 @@
-