Removed the domain transition notification from the compatibility client.

This commit is contained in:
flash 2024-02-20 21:56:51 +00:00
parent 3d6e2a58db
commit c2159598c9
6 changed files with 2 additions and 231 deletions

View file

@ -1,136 +0,0 @@
.domaintrans {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9001;
font-family: Verdana, Tahoma, Geneva, Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 20px;
background-color: #222;
color: #ddd;
text-shadow: 0 0 5px #000;
box-shadow: inset 0 0 1em #000;
overflow-y: auto;
overflow-x: hidden;
}
.domaintrans-body {
max-width: 500px;
margin: 20px auto;
}
.domaintrans-domain {
margin: 10px 0;
width: 100%;
}
.domaintrans-domain-main {
font-size: 1.2em;
line-height: 1.5em;
}
.domaintrans-domain-compat {
font-size: .8em;
line-height: 1.5em;
opacity: .8;
}
.domaintrans-domain-header {
font-size: 1.4em;
line-height: 1.5em;
text-align: center;
}
.domaintrans-domain-display {
width: 100%;
font-size: 1.2em;
line-height: 1.4em;
text-align: center;
}
.domaintrans-domain-display div {
margin: 2px;
display: block;
}
.domaintrans-domain-text div {
display: inline-block;
border: 1px solid #444;
background: #333;
border-radius: 5px;
padding: 2px 5px;
}
.domaintrans-text {
font-size: .8em;
line-height: 1.3em;
margin: 10px auto;
}
.domaintrans-text p {
margin: 1em 10px;
}
.domaintrans-options {
text-align: center;
}
.domaintrans-options > div {
margin: 2px;
display: inline-block;
max-width: 300px;
width: 100%;
}
.domaintrans-option {
display: block;
width: 100%;
color: #fff;
background: #333;
border-radius: 5px;
font-size: 16px;
text-shadow: initial;
text-align: left;
font-family: Verdana, Tahoma, Geneva, Arial, Helvetica, sans-serif;
padding: 7px 15px;
border: 1px solid #444;
box-sizing: border-box;
transition: background .2s;
}
.domaintrans-option .sprite {
margin: 2px;
}
.domaintrans-option-icon {
display: inline-block;
border: 2px solid #aaa;
border-radius: 100%;
vertical-align: middle;
transform: scale(1);
transition: transform .2s;
}
.domaintrans-option-text {
display: inline-block;
vertical-align: middle;
margin-left: 10px;
}
.domaintrans-option:focus {
outline: 2px solid #9475b2;
}
.domaintrans-option:hover,
.domaintrans-option:focus {
background: #3d3d3d;
text-decoration: none;
}
.domaintrans-option:hover .domaintrans-option-icon,
.domaintrans-option:focus .domaintrans-option-icon {
transform: scale(1.2);
}
.domaintrans-option:active {
background: #383838;
}
.domaintrans-option:active .domaintrans-option-icon {
transform: scale(.9);
}

View file

@ -518,8 +518,6 @@ body {
@include colpick.css; @include colpick.css;
@include domaintrans.css;
@include themes/beige.css; @include themes/beige.css;
@include themes/black.css; @include themes/black.css;
@include themes/blue.css; @include themes/blue.css;

View file

@ -49,8 +49,6 @@ var AmiContext = function(title, auth, loading) {
settings.define('bbPersistSjis', 'boolean'); settings.define('bbPersistSjis', 'boolean');
settings.define('bbPersistColour', 'string'); settings.define('bbPersistColour', 'string');
settings.define('tmpSkipDomainPopUpThing', 'boolean', false);
settings.define('migrated', 'boolean', false); settings.define('migrated', 'boolean', false);
if(!settings.get('migrated')) { if(!settings.get('migrated')) {

View file

@ -6,7 +6,6 @@
#include loadoverlay.js #include loadoverlay.js
#include mszauth.js #include mszauth.js
#include ts_chat.js #include ts_chat.js
#include mami/domaintrans.jsx
#include mami/settings.js #include mami/settings.js
(function() { (function() {
@ -36,26 +35,12 @@
var ami = new AmiContext(futami.get('title'), auth, loading); var ami = new AmiContext(futami.get('title'), auth, loading);
window.ami = ami; window.ami = ami;
const actuallyLoadChat = function() { setInterval(refreshInfo, 600000);
refreshInfo(function() {
Chat.Main(auth); Chat.Main(auth);
ami.sockChat.open(); ami.sockChat.open();
window.addEventListener('beforeunload', () => ami.sockChat.close()); window.addEventListener('beforeunload', () => ami.sockChat.close());
};
setInterval(refreshInfo, 600000);
refreshInfo(function() {
if(!ami.settings.get('tmpSkipDomainPopUpThing')) {
const adt = AmiDomainTransition(
MamiSettings.isSupported() ? () => MamiSettings.exportFile() : undefined,
() => {
ami.settings.set('tmpSkipDomainPopUpThing', true);
adt.remove();
actuallyLoadChat();
}
);
adt.appendTo(document.body);
} else actuallyLoadChat();
}); });
}); });
})(); })();

View file

@ -1,69 +0,0 @@
#include common.js
#include utility.js
const AmiDomainTransition = function(onExport, onDismiss) {
if(typeof onDismiss !== 'function')
throw 'onDismiss must be a function';
let exportTidbit, modernButton, exportButton;
let arrowsTarget1, arrowsTarget2;
const html = <div class="domaintrans">
<div class="domaintrans-body">
<div class="domaintrans-domain domaintrans-domain-main">
<div class="domaintrans-domain-header">
Compatibility Chat
</div>
<div class="domaintrans-domain-display">
<div class="domaintrans-domain-text domaintrans-domain-orig"><div>sockchat.flashii.net/legacy</div></div>
{arrowsTarget1 = <div class="domaintrans-domain-arrow" />}
<div class="domaintrans-domain-text domaintrans-domain-new"><div>sockchat.flashii.net</div></div>
</div>
</div>
<div class="domaintrans-domain domaintrans-domain-compat">
<div class="domaintrans-domain-header">
Flashii Chat
</div>
<div class="domaintrans-domain-display">
<div class="domaintrans-domain-text domaintrans-domain-orig"><div>sockchat.flashii.net</div></div>
{arrowsTarget2 = <div class="domaintrans-domain-arrow" />}
<div class="domaintrans-domain-text domaintrans-domain-new"><div>chat.flashii.net</div></div>
</div>
</div>
<div class="domaintrans-text">
<p>At long last, modern chat is being moved back to its proper subdomain. This means the original client can have the sockchat subdomain all to itself like the AJAX Chat!</p>
{exportTidbit = <p>You can use this screen to export your settings for the modern client. Pressing "Export settings" will let you save your settings for the modern client, you can then import this file using the "Import settings" button within the modern client.</p>}
<p>This screen won't show up again after you press "Continue to chat".</p>
</div>
<div class="domaintrans-options">
{modernButton = <div><a class="domaintrans-option" href={MAMI_URL} target="_blank">
<div class="domaintrans-option-icon"><div class="sprite sprite-autoscroll" /></div>
<div class="domaintrans-option-text">Open modern client</div>
</a></div>}
{exportButton = <div><button class="domaintrans-option" onclick={onExport}>
<div class="domaintrans-option-icon"><div class="sprite sprite-autoscroll" /></div>
<div class="domaintrans-option-text">Export settings</div>
</button></div>}
<div><button class="domaintrans-option" onclick={onDismiss}>
<div class="domaintrans-option-icon"><div class="sprite sprite-autoscroll" /></div>
<div class="domaintrans-option-text">Continue to chat</div>
</button></div>
</div>
</div>
</div>;
for(let i = 0; i < 5; ++i)
arrowsTarget1.appendChild(<span></span>);
for(let i = 0; i < 5; ++i)
arrowsTarget2.appendChild(<span></span>);
if(typeof onExport !== 'function') {
$r(exportTidbit);
$r(modernButton);
$r(exportButton);
}
return {
appendTo: parent => parent.appendChild(html),
remove: () => $r(html),
};
};

View file

@ -102,11 +102,6 @@ var Chat = (function () {
name: 'bbAutoEmbedV1', name: 'bbAutoEmbedV1',
type: "checkbox", type: "checkbox",
}, },
{
id: "skipdomainpopupthing",
name: 'tmpSkipDomainPopUpThing',
type: "checkbox",
},
]; ];
var userMenu = [ var userMenu = [