mirror of
https://github.com/typemill/typemill.git
synced 2025-01-17 05:18:19 +01:00
2.3.0 Stop session if user deletes own account
This commit is contained in:
parent
ea6ed06c69
commit
11fd72a645
@ -26,7 +26,11 @@ app.component('tab-demo', {
|
||||
</component>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<div :class="messageClass" class="block w-full h-8 px-3 py-1 my-1 text-white transition duration-100">{{ $filters.translate(message) }}</div>
|
||||
<div class="block w-full h-8 my-1">
|
||||
<transition name="fade">
|
||||
<div v-if="message" :class="messageClass" class="text-white px-3 py-1 transition duration-100">{{ $filters.translate(message) }}</div>
|
||||
</transition>
|
||||
</div>
|
||||
<input type="submit" @click.prevent="saveInput()" :value="$filters.translate('save')" class="w-full p-3 my-1 bg-stone-700 dark:bg-stone-600 hover:bg-stone-900 hover:dark:bg-stone-900 text-white cursor-pointer transition duration-100">
|
||||
</div>
|
||||
</form>
|
||||
|
@ -7,6 +7,7 @@ use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Typemill\Models\Validation;
|
||||
use Typemill\Models\User;
|
||||
use Typemill\Static\Translations;
|
||||
use Typemill\Static\Session;
|
||||
|
||||
class ControllerApiSystemUsers extends Controller
|
||||
{
|
||||
@ -351,13 +352,13 @@ class ControllerApiSystemUsers extends Controller
|
||||
|
||||
return $response->withHeader('Content-Type', 'application/json')->withStatus(500);
|
||||
}
|
||||
/*
|
||||
|
||||
# if user deleted his own account
|
||||
if(isset($_SESSION['user']) && $_SESSION['user'] == $username)
|
||||
{
|
||||
session_destroy();
|
||||
Session::stopSession();
|
||||
}
|
||||
*/
|
||||
|
||||
$response->getBody()->write(json_encode([
|
||||
'message' => Translations::translate('User deleted.'),
|
||||
]));
|
||||
|
@ -119,6 +119,8 @@ const app = Vue.createApp({
|
||||
saveForm: function()
|
||||
{
|
||||
this.saved = false;
|
||||
self.message = false;
|
||||
self.messageClass = 'bg-stone-50';
|
||||
|
||||
self = this;
|
||||
tmaxios.post('/api/v1/meta',{
|
||||
@ -221,7 +223,11 @@ app.component('tab-meta', {
|
||||
</component>
|
||||
</div>
|
||||
<div class="my-5">
|
||||
<div :class="messageClass" class="block w-full h-8 px-3 py-1 my-1 text-white transition duration-100">{{ $filters.translate(message) }}</div>
|
||||
<div class="block w-full h-8 my-1">
|
||||
<transition name="fade">
|
||||
<div v-if="message" :class="messageClass" class="text-white px-3 py-1 transition duration-100">{{ $filters.translate(message) }}</div>
|
||||
</transition>
|
||||
</div>
|
||||
<input type="submit" @click.prevent="saveInput()" :value="$filters.translate('save')" class="w-full p-3 my-1 bg-stone-700 dark:bg-stone-600 hover:bg-stone-900 hover:dark:bg-stone-900 text-white cursor-pointer transition duration-100">
|
||||
</div>
|
||||
</form>
|
||||
@ -229,6 +235,7 @@ app.component('tab-meta', {
|
||||
mounted: function()
|
||||
{
|
||||
if(this.item.slug != '')
|
||||
|
||||
{
|
||||
this.slug = this.item.slug;
|
||||
this.originalSlug = this.item.slug;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% if flash.info %}
|
||||
|
||||
<div class="w-full text-center text-white p-2 bg-teal-600 border-b border-white" id="flash-message">
|
||||
<div class="w-full text-center text-white p-2 bg-stone-700" id="flash-message">
|
||||
{{ flash.info | first }}
|
||||
</div>
|
||||
|
||||
|
@ -2,8 +2,13 @@
|
||||
{% block title %}{{ translate('Plugin Settings') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="text-3xl font-bold mb-4">{{ translate('Plugins') }} </h1>
|
||||
|
||||
<div class="flex justify-between">
|
||||
<h1 class="text-3xl font-bold mb-4">{{ translate('Plugins') }}</h1>
|
||||
<div class="text-center">
|
||||
<a href="https://plugins.typemill.net" target="_blank" class="p-3 border border-teal-500 hover:bg-teal-500 hover:text-white transition duration-100">{{ translate('Visit the Plugin Directory') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="plugins" v-cloak></div>
|
||||
|
||||
|
@ -3,7 +3,12 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="text-3xl font-bold mb-4">{{ translate('Themes') }} </h1>
|
||||
<div class="flex justify-between">
|
||||
<h1 class="text-3xl font-bold mb-4">{{ translate('Themes') }} </h1>
|
||||
<div class="text-center">
|
||||
<a href="https://themes.typemill.net" target="_blank" class="p-3 border border-teal-500 hover:bg-teal-500 hover:text-white transition duration-100">{{ translate('Visit the Theme Directory') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="themes" v-cloak></div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user