Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat(auth): preserve and restore last visited page URL after quota modal or header login (v1.5.10)
This commit is contained in:
@@ -246,7 +246,53 @@ try {
|
||||
initSilentSSOProbe();
|
||||
}
|
||||
|
||||
function saveReturnUrlBeforeLogin() {
|
||||
try {
|
||||
var currentPath = window.location.pathname + window.location.search + window.location.hash;
|
||||
if (currentPath && !window.location.pathname.includes('/login')) {
|
||||
localStorage.setItem('yaktube_return_url', currentPath);
|
||||
localStorage.setItem('yaktube_return_url_time', String(Date.now()));
|
||||
sessionStorage.setItem('yaktube_return_url', currentPath);
|
||||
sessionStorage.setItem('redirect-url-after-login', currentPath);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
function checkPendingPostLoginRedirect() {
|
||||
try {
|
||||
if (window.location.pathname.includes('/login')) return false;
|
||||
var token = localStorage.getItem('access_token');
|
||||
if (!token) return false;
|
||||
var savedUrl =
|
||||
localStorage.getItem('yaktube_return_url') ||
|
||||
sessionStorage.getItem('yaktube_return_url') ||
|
||||
sessionStorage.getItem('redirect-url-after-login');
|
||||
if (!savedUrl) return false;
|
||||
var savedTime = parseInt(localStorage.getItem('yaktube_return_url_time') || '0', 10);
|
||||
localStorage.removeItem('yaktube_return_url');
|
||||
localStorage.removeItem('yaktube_return_url_time');
|
||||
sessionStorage.removeItem('yaktube_return_url');
|
||||
sessionStorage.removeItem('redirect-url-after-login');
|
||||
if (savedTime && Date.now() - savedTime > 15 * 60 * 1000) return false;
|
||||
var currentFull = window.location.pathname + window.location.search + window.location.hash;
|
||||
if (
|
||||
typeof savedUrl === 'string' &&
|
||||
savedUrl.startsWith('/') &&
|
||||
!savedUrl.startsWith('//') &&
|
||||
!savedUrl.startsWith('/login') &&
|
||||
savedUrl !== currentFull
|
||||
) {
|
||||
window.location.replace(savedUrl);
|
||||
return true;
|
||||
}
|
||||
} catch (e) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
checkPendingPostLoginRedirect();
|
||||
|
||||
function triggerYakNetOAuth() {
|
||||
saveReturnUrlBeforeLogin();
|
||||
sessionStorage.removeItem('yaknet_manual_logout');
|
||||
var callbackUrl = 'https://yaktube.yakhub.com.tr/plugins/peertube-plugin-auth-yaknet/router/auth-callback';
|
||||
window.location.href =
|
||||
@@ -2966,10 +3012,7 @@ try {
|
||||
}
|
||||
|
||||
function redirectToPeerTubeLogin() {
|
||||
try {
|
||||
// Save current URL in sessionStorage just as PeerTube's LoginComponent does
|
||||
sessionStorage.setItem('redirect-url-after-login', window.location.pathname + window.location.search);
|
||||
} catch (e) {}
|
||||
saveReturnUrlBeforeLogin();
|
||||
|
||||
// 1. Check PeerTube's native login link in header (handles redirectOnSingleExternalAuth / YakNet SSO automatically)
|
||||
var loginLink = document.querySelector(
|
||||
@@ -5146,6 +5189,10 @@ try {
|
||||
// 10. Unified Debounced MutationObserver & Reactive SPA Engine (v1.5.0)
|
||||
var unifiedTimer = null;
|
||||
function runUnifiedCycle(isNav) {
|
||||
try {
|
||||
if (checkPendingPostLoginRedirect()) return;
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
autoFixDOM();
|
||||
} catch (e) {}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-yaktube-ondemand",
|
||||
"version": "1.5.9",
|
||||
"version": "1.5.10",
|
||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
||||
"main": "main.js",
|
||||
"library": "./main.js",
|
||||
|
||||
Reference in New Issue
Block a user