Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Jan 25, 2024
1 parent b0fd208 commit 5bcaea5
Show file tree
Hide file tree
Showing 14 changed files with 1,752 additions and 13,807 deletions.
3 changes: 2 additions & 1 deletion app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Middleware;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Inertia\Middleware;
use Storage;

Expand Down Expand Up @@ -48,7 +49,7 @@ public function share(Request $request)
], $request->user()->only('name', 'email'));
}
return array_merge(parent::share($request), [
'user' => $user,
'user' => Route::is('auth.login.view') ? null : $user,
'flash' => [
'message' => fn() => $request->session()->get('message')
],
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Hydra/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function acceptLoginRequest(string $userId, string $loginChallenge, int $
try {
return Http::hydraAdmin()->put('/admin/oauth2/auth/requests/login/accept?challenge='.$loginChallenge, [
'subject' => $userId,
'remember' => ($remember === 0) ? false : true,
'remember' => !($remember === 0),
'remember_for' => $remember,
])->json();

Expand Down
15,283 changes: 1,633 additions & 13,650 deletions package-lock.json

Large diffs are not rendered by default.

45 changes: 15 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix resources/js",
"format": "prettier . --write"
"build": "vite build"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.6",
"@vue/compiler-sfc": "^3.2.45",
"autoprefixer": "^10.4.13",
"axios": "^1.1.2",
"browser-sync": "^2.27.5",
"browser-sync-webpack-plugin": "^2.3.0",
"chokidar": "^3.5.2",
"dotenv": "^16.0.3",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.20.1",
"laravel-vite-plugin": "^0.8.1",
"lodash": "^4.17.19",
"postcss": "^8.4.4",
"postcss-import": "^12.0.1",
"prettier": "^2.8",
"tailwindcss": "^3.4.1",
"tippy.js": "^6.3.7",
"vite": "^4.5.1",
"vue": "^3.4",
"vue-loader": "^16.1.2"
},
"dependencies": {
"@headlessui/vue": "^1.7.7",
"@heroicons/vue": "^1.0.4",
"@inertiajs/vue3": "^1.0.2",
"@inertiajs/vue3": "^1.0.0",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@vitejs/plugin-vue": "^5.0.0",
"autoprefixer": "^10.4.12",
"axios": "^1.6.4",
"dayjs": "^1.11.10",
"laravel-vite-plugin": "^1.0.0",
"lodash": "^4.17.19",
"matice": "^1.1.0",
"primevue": "^3.44.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.4",
"vite": "^5.0.0",
"vue": "^3.4.0",
"vue-cookie-accept-decline": "^6.1.0",
"vue-cookies": "^1.8.2",
"vue-cropperjs": "^5.0.0"
"vue-cropperjs": "^5.0.0",
"vue-cookies": "^1.8.3"
}
}
13 changes: 6 additions & 7 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer')
]
}
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
6 changes: 3 additions & 3 deletions resources/js/Components/Auth/AuthFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ const visibleNavigation = computed(() => {
aria-label="Footer"
class="-mx-5 -my-2 flex flex-wrap items-center justify-center"
>
<div v-for="item in visibleNavigation" :key="item.name" class="px-5 py-2">
<div v-for="item in visibleNavigation" :key="item.name" class="p-4">
<Link
v-if="item.href == null"
:href="item.link"
:target="[item.newTab ? '_blank' : '_top']"
class="text-base text-gray-500 hover:text-gray-900 dark:hover:text-gray-400"
class="text-sm text-gray-500 hover:text-gray-900 dark:hover:text-gray-400"
>
{{ item.name }}
</Link>
<a
v-else
:href="item.href"
:target="[item.newTab ? '_blank' : '_top']"
class="text-base text-gray-500 hover:text-gray-900 dark:hover:text-gray-400"
class="text-sm text-gray-500 hover:text-gray-900 dark:hover:text-gray-400"
>
{{ item.name }}
</a>
Expand Down
7 changes: 7 additions & 0 deletions resources/js/Components/Auth/AuthHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const goBackOnePage = () => {
window.history.length > 1 ? router.visit(window.history.go(-1)) : router.visit('/dashboard');
}
const hideNavigationButtons = () => {
// check if current window.location.href contains /dashboard then hide
return !window.location.href.includes('/dashboard')
}
function logout() {
window.location.href = '/auth/logout'
}
Expand All @@ -41,13 +46,15 @@ function logout() {
<Menu as="div">
<div class="flex justify-between items-center gap-3">
<div
v-if="hideNavigationButtons()"
@click="goBackOnePage"
class="flex items-center gap-1 cursor-pointer dark:text-primary-200 dark:hover:text-primary-400 text-primary-600 hover:text-primary-800 rounded">
<ChevronLeftIcon class="w-4 pt-1"></ChevronLeftIcon>
<div>
Back
</div>
</div>
<div v-else></div>
<div class="flex items-center gap-3">
<div class="text-gray-800 dark:text-primary-200">{{ user.name }}</div>
<MenuButton>
Expand Down
45 changes: 24 additions & 21 deletions resources/js/Layouts/AuthLayout.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<template>
<div>
<VueCookieAcceptDecline
:disable-decline="true"
:show-postpone-button="false"
element-id="cookies"
position="top"
transition-name="slideFromTop"
type="bar"
>
<VueCookieAcceptDecline
:disable-decline="true"
:show-postpone-button="false"
element-id="cookies"
position="top"
transition-name="slideFromTop"
type="bar"
>

<!-- Optional -->
<template #message>
{{ $trans('cookie_notice') }}
</template>
<!-- Optional -->
<template #message>
{{ $trans('cookie_notice') }}
</template>

<!-- Optional -->
<template #acceptContent>OK</template>
</VueCookieAcceptDecline>
<div class="min-h-screen bg-white flex page" :class="{ dark: darkMode }">
<!-- Optional -->
<template #acceptContent>OK</template>
</VueCookieAcceptDecline>
<div :class="{ dark: darkMode }">
<div class="bg-white flex page dark:text-primary-300 dark:bg-primary-900">
<!-- Logo -->
<ArtistNotice url="https://rudzik.art" name="Rudzik"/>
<!-- Page Content -->
<div
class="flex-1 flex flex-col dark:text-primary-300 dark:bg-primary-900 items-center p-2 sm:px-6 lg:flex-none lg:px-20 xl:px-12">
<!-- Spacer -->
<div class="h-[25%]"></div>
class="!min-h-[calc(100dvh)] min-h-screen
mx-auto w-full max-w-md
flex-1 flex flex-col items-center justify-center lg:flex-none
px-6 sm:px-12
pt-8 pb-8">
<!-- Slot Content -->
<div class="flex-auto mx-auto w-full max-w-sm lg:w-96">
<div class="flex-1 w-full lg:mt-[25vh]">
<transition name="page">
<div v-if="animated">
<AuthHeader class="mb-8" v-if="user"></AuthHeader>
Expand Down Expand Up @@ -99,6 +101,7 @@ export default {
},
mounted() {
this.animated = true;
this.dark = 'dark:text-primary-300 dark:bg-primary-900';
},
methods: {
toggleDarkMode() {
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="flex cursor-pointer drop-shadow items-center bg-gray-50 hover:bg-gray-100 dark:bg-primary-600 hover:dark:bg-primary-500 rounded-lg shadow p-2 gap-3">
<div>
<component :is="loadIconComponent(app.icon)"
class='mx-auto h-16 min-w-[72px] fill-current text-primary-600 dark:text-primary-300'/>
class='mx-auto h-12 min-w-[72px] fill-current text-primary-600 dark:text-primary-300'/>
</div>
<div>
<div>
Expand Down
100 changes: 51 additions & 49 deletions resources/js/Pages/Settings/UpdatePassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,82 @@
$trans('update_your_password')
}}
</SettingsHeader>
<div v-if="success">
<div
class="bg-primary-200 px-4 py-2 rounded mt-4 font-semibold"
>
Your password has been updated.
<form @submit.prevent="submitForm">
<div v-if="success">
<div
class="bg-primary-200 px-4 py-2 rounded mt-4 font-semibold"
>
Your password has been updated.
</div>
</div>
</div>
<div v-else>
<div class="my-4">
<div>
<label class="font-semibold text-xs" for="username">Current password</label>
<div v-else>
<div class="my-4">
<div>
<label class="font-semibold text-xs" for="username">Current password</label>
<BaseInput
id="currentPassword"
v-model="form.current_password"
:error="errors.current_password"
autocomplete="password"
autofocus
name="currentPassword"
type="password"
></BaseInput>
</div>
</div>

<div class="mb-4">
<label class="font-semibold text-xs" for="username">New password</label>
<BaseInput
id="currentPassword"
v-model="form.current_password"
:error="errors.current_password"
id="newPassword"
v-model="form.password"
:error="errors.password"
autocomplete="password"
autofocus
name="currentPassword"
name="newPassword"
type="password"
></BaseInput>
</div>

<PasswordInfoBox
:password="form.password"
class="sm:col-span-2 sm:col-start-2 mt-2"
class="sm:col-span-2 sm:col-start-2 mt-2 mb-2"
></PasswordInfoBox>
</div>

<div class="mb-4">
<label class="font-semibold text-xs" for="username">New password</label>
<BaseInput
id="newPassword"
v-model="form.password"
:error="errors.password"
autocomplete="password"
name="newPassword"
type="password"
></BaseInput>
</div>

<div class="mb-4">
<label class="font-semibold text-xs" for="username">Confirm new password</label>
<BaseInput
id="confirmNewPassword"
v-model="form.password_confirmation"
:error="errors.password_confirmation"
autocomplete="password"
name="confirmNewPassword"
type="password"
></BaseInput>
</div>
<div class="mb-4">
<label class="font-semibold text-xs" for="username">Confirm new password</label>
<BaseInput
id="confirmNewPassword"
v-model="form.password_confirmation"
:error="errors.password_confirmation"
autocomplete="password"
name="confirmNewPassword"
type="password"
></BaseInput>
</div>

<div
class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-startsm:pt-5 pt-5"
>
<div
class="max-w-lg flex justify-end sm:col-start-2 sm:col-span-2"
class="sm:grid sm:grid-cols-3 sm:gap-4 sm:items-startsm:pt-5 pt-5"
>
<PrimaryButton class="" @click="submitForm()"
>Change password
</PrimaryButton
<div
class="max-w-lg flex justify-end sm:col-start-2 sm:col-span-2"
>
<PrimaryButton class="" type="submit"
>Change password
</PrimaryButton
>
</div>
</div>
</div>
</div>
</form>
</div>
</template>

<script setup>
import {useForm} from "@inertiajs/vue3";
import SettingsHeader from "@/Components/Settings/SettingsHeader.vue";
import BaseInput from "@/Components/BaseInput.vue";
import PasswordInfoBox from "@/Auth/PasswordInfoBox.vue";
import PrimaryButton from "@/Components/PrimaryButton.vue";
import PasswordInfoBox from "../../Auth/PasswordInfoBox.vue";
defineProps({
errors: Object,
Expand Down
15 changes: 2 additions & 13 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import {createApp, h} from 'vue'
import {createInertiaApp} from '@inertiajs/vue3'
import {ZiggyVue} from '../../vendor/tightenco/ziggy/dist/vue.m'
import {__, getLocale, locales, setLocale, trans, transChoice} from 'matice'
import {resolvePageComponent} from "laravel-vite-plugin/inertia-helpers";
import VueCookies from 'vue-cookies'
import AppLayout from "./Layouts/AppLayout.vue";
import PrimeVue from "primevue/config";
import Lara from '../assets/presets/lara'

import.meta.glob([
'../assets/**',
Expand All @@ -19,12 +17,7 @@ const appName = window.document.getElementsByTagName('title')[0]?.innerText || '

createInertiaApp({
title: (title) => `${title} - ${appName}`,
resolve: name => {
const pages = import.meta.glob('./Pages/**/*.vue', {eager: true})
let page = pages[`./Pages/${name}.vue`]
page.default.layout = page.default.layout || AppLayout
return page
},
resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')),
progress: {
color: '#4B5563',
},
Expand All @@ -33,10 +26,6 @@ createInertiaApp({
.use(plugin)
.use(ZiggyVue)
.use(VueCookies, {})
.use(PrimeVue, {
unstyled: true,
pt: Lara
})
.mixin({methods: {route}})
.mixin({
methods: {
Expand Down
Loading

0 comments on commit 5bcaea5

Please sign in to comment.