Skip to content

Commit

Permalink
[Fix, Update, New] - Pull request
Browse files Browse the repository at this point in the history
Merge pull request #130 from AN0NCER/develop
  • Loading branch information
AN0NCER authored Nov 8, 2024
2 parents 9ccd864 + bcbbfbe commit 0d0a347
Show file tree
Hide file tree
Showing 35 changed files with 2,636 additions and 805 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
/.vscode/
/.vscode/
/jsconfig.json
23 changes: 20 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,13 @@

<span class="windowed window-update hide">
<span class="hide-window"></span>
<span class="list-tags scroll-none unselectable">
</span>
<!--Окно с обновлением-->
<span class="window-content content-update hide">
<span class="window-content content-update unselectable hide">
<div class="filter-hide">
<span class="loader"></span>
</div>
<span class="content-wraper">
<div class="title-content">
<span class="title">Обновление</span>
Expand All @@ -262,9 +267,21 @@
</svg>
</span>
</div>
<div class="update-content-wraper">
<div class="update-content-wraper scroll-none">
</div>

<div class="btn-wrapper content-buttons">
<div class="btn-submit">
<div class="type-1">Принять</div>
<div class="type-2"><span class="loader"></span>Применяеться</div>
</div>
<div class="restart-script">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z" />
</svg>
</div>
</div>
<div class="btn-submit">Принять</div>
</span>
</span>
</span>
Expand Down
5 changes: 4 additions & 1 deletion javascript/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,10 @@ const IntercatMenu = {
text: "Обновления",
type: "page",
icon: `<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><path d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"/></svg>`,
disabled: () => { return true }
disabled: () => { return false },
event: function () {
window.location.href = "index.html?update=show";
}
},
line: {
type: "line",
Expand Down
5 changes: 5 additions & 0 deletions javascript/modules/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ export class SHIKIURL {
static suburl(sub) {
return `${this.protocol}${sub}.${this.domain}`;
}
}

export const AppStorageKeys = {
"lastUpdate": 'dialog-update', //{"show":false,"ver":"2.5.1","hash":"69c3d","update":"2024-10-27T23:32:24.597Z"}
"gitVersion": 'github-version'
}
15 changes: 13 additions & 2 deletions javascript/modules/Windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class WindowManagement {
this.element = el;
this.target = target;
this.target.init();
$(`${this.element} > .hide-window`).click(() => {
$(`${this.element} > .hide-window`).on('click.basic', () => {
this.hide();
this.target.hide();
});
Expand Down Expand Up @@ -96,4 +96,15 @@ export class WindowManagement {
$(`${this.element}>.window-content`).removeClass('border-hide');
}
}
}
}

export function PullToClose(scrollElement, callback = () => { }) {
const $element = $(scrollElement);
$element.on('scroll.closeWindow', function () {
const scrollTop = $(this).scrollTop();
if (scrollTop < 0 && scrollTop < -80) {
callback();
}
})

}
24 changes: 15 additions & 9 deletions javascript/pages/anime/34599.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { History } from "../watch/mod_history.js";
import { Screenshots } from "../watch/mod_resource.js";
import { LTransition } from "../watch/mod_transition.js";

let load_image = "https://image.tmdb.org/t/p/original/uzp513qTcHsAavlCJ58x5d73bzy.jpg";

Expand All @@ -10,7 +11,10 @@ if (/Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent)) {
const url = "https://image.tmdb.org/t/p/original/uzp513qTcHsAavlCJ58x5d73bzy.jpg";
const bg = "https://image.tmdb.org/t/p/original/qIJZpiKZfGYC9GpfX2jBSTOW1Dl.jpg";

$(`.page-loading`).css("--image", `url(${load_image})`);
LTransition.Loading.Parameters([
{ name: "image", value: `url(${load_image})` },
{ name: "progress-color", value: `#a1685e` }
]);

const callback = (screenshots) => {
try {
Expand All @@ -29,14 +33,16 @@ const callback = (screenshots) => {
};

export default {
OnLoad: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
on: {
load: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}

$('img.main').attr('src', bg);
$('img.bg').attr('src', bg);
}

$('img.main').attr('src', bg);
$('img.bg').attr('src', bg);
}
}
19 changes: 13 additions & 6 deletions javascript/pages/anime/36862.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { History } from "../watch/mod_history.js";
import { Screenshots } from "../watch/mod_resource.js";
import { LTransition } from "../watch/mod_transition.js";

const url = "https://image.tmdb.org/t/p/original/4tywUV3ptrAbgVlVuxCpaY7xYvI.jpg";

$(`.page-loading`).css("--image", `url(${url})`);
LTransition.Loading.Parameters([
{ name: "image", value: `url(${url})` },
{ name: "progress-color", value: `#9a5acf` }
]);


const callback = (screenshots) => {
try {
Expand All @@ -21,11 +26,13 @@ const callback = (screenshots) => {
};

export default {
OnLoad: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
on: {
load: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}
}
}
}
18 changes: 12 additions & 6 deletions javascript/pages/anime/40748.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { History } from "../watch/mod_history.js";
import { Screenshots } from "../watch/mod_resource.js";
import { LTransition } from "../watch/mod_transition.js";

const url = "https://image.tmdb.org/t/p/original/wwTjrRb0HG9sd87EDAn6ZbvxQGX.jpg";

$(`.page-loading`).css("--image", `url(${url})`);
LTransition.Loading.Parameters([
{ name: "image", value: `url(${url})` },
{ name: "progress-color", value: `#a9575b` }
]);

const callback = (screenshots) => {
try {
Expand All @@ -22,11 +26,13 @@ const callback = (screenshots) => {
};

export default {
OnLoad: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
on: {
load: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}
}
}
}
133 changes: 123 additions & 10 deletions javascript/pages/anime/41084.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,120 @@
import { History } from "../watch/mod_history.js";
import { Screenshots } from "../watch/mod_resource.js";
import { LTransition } from "../watch/mod_transition.js";

let animatedBG = false;
let imageAnimation;

const url = "https://image.tmdb.org/t/p/original/3mcuhxMVQdDJifXwnQklR3Db68Y.jpg";
const bg = "https://image.tmdb.org/t/p/original/9u7l9e66evlo9XM9LYkYkJNUUT5.jpg";

$(`.page-loading`).css("--image", `url(${url})`);
LTransition.Loading.Parameters([
{ name: "image-size", value: `cover` },
{ name: "image-postion", value: `center top` },
{ name: "animation-display", value: `block` },
{ name: "animation-background", value: `linear-gradient(180deg, rgba(1, 1, 1, 0.85) 50 %, transparent)` }
]);

if (screen.width <= 400 && screen.orientation.angle == 0) {
LTransition.Loading.Parameters("image-size", "auto 230%");
}

screen.orientation.addEventListener("change", (event) => {
if (event.target.angle !== 0) {
LTransition.Loading.Parameters("image-size", "cover");
} else if (screen.width <= 400) {
LTransition.Loading.Parameters("image-size", "auto 230%");
}
});

LTransition.Image.Load(`https://i.imgur.com/XiBOM9W.jpg`, (url) => {
LTransition.Loading.Parameters([
{ name: "image", value: `url(${url})` },
{ name: "progress-color", value: `#19140e` },
{ name: "background", value: `rgba(0, 0, 0, 0)` }
]);

imageAnimation = anime({
targets: '.page-loading > .background > .image',
backgroundPosition: ['50% 0%', '50% 100%'], // Начальная и конечная позиции
easing: 'linear', // Линейная анимация для плавного движения
duration: 35000, // Длительность анимации в миллисекундах
// loop: true // Зацикливание анимации
complete: () => {
animatedBG = true;
}
});
});

const animation = (resolve) => {
try {
imageAnimation.pause();
if (!animatedBG) {
const target = {
translateY: 0 // Начальное значение translateY
};

const tl = anime.timeline({
easing: 'easeInOutCubic',
duration: 1000,
complete: () => {
return resolve(true);
},
});

tl.add({
targets: '.page-loading > .background > .image',
backgroundPosition: [$('.page-loading > .background > .image').css('backgroundPosition'), '50% 100%'],
duration: 800,
});

tl.add({
targets: '.page-loading > .background',
top: ['0%', '-100%'],
duration: 500,
}, 400);

tl.add({
targets: target,
translateY: -100,
update: function (anim) {
const currentTranslateY = target.translateY + 'dvh';
$('.page-loading > .load-content > .loader').css({ transform: `translateY(${currentTranslateY})` });
$('.page-loading > .load-content > .wrapper').css({ transform: `translateY(${currentTranslateY})` });
},
duration: 850,
}, 0);

tl.add({
targets: '.page-loading > .load-content > .wrapper',
opacity: 0,
duration: 850,
}, 0);

tl.add({
targets: '.page-loading > .animation',
translateY: ['50%', '-100%'],
duration: 500,
begin: () => {
LTransition.Loading.Parameters("point-events", `none`);
$("body").removeClass("loading");
}
}, 500);
} else {
anime({
targets: '.page-loading',
opacity: 0,
easing: 'linear',
duration: 500,
complete: () => {
return resolve(true);
}
});
}
} catch {
return resolve(true);
}
}

const callback = (screenshots) => {
try {
Expand All @@ -23,14 +133,17 @@ const callback = (screenshots) => {
};

export default {
OnLoad: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}
on: {
load: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}

$('img.main').attr('src', bg);
$('img.bg').attr('src', bg);
}
$('img.main').attr('src', bg);
$('img.bg').attr('src', bg);
}
},
animation
}
18 changes: 12 additions & 6 deletions javascript/pages/anime/48561.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { History } from "../watch/mod_history.js";
import { Screenshots } from "../watch/mod_resource.js";
import { LTransition } from "../watch/mod_transition.js";

const url = "https://image.tmdb.org/t/p/original/7uxQQUnHvPKc2LmvDXRszgfBka8.jpg";

$(`.page-loading`).css("--image", `url(${url})`);
LTransition.Loading.Parameters([
{ name: "image", value: `url(${url})` },
{ name: "progress-color", value: `#50bce1` }
]);

const callback = (screenshots) => {
try {
Expand All @@ -22,11 +26,13 @@ const callback = (screenshots) => {
};

export default {
OnLoad: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
on: {
load: () => {
const screenshots = Screenshots.Init();
screenshots.on("init", callback);
if (screenshots.init) {
callback(screenshots);
}
}
}
}
Loading

0 comments on commit 0d0a347

Please sign in to comment.