Compare commits

...

18 commits

Author SHA1 Message Date
Kainoa Kanter
b355c21e36
v 2022-07-08 12:57:59 -07:00
Kainoa Kanter
eebdb35dda
Merge branch 'misskey-dev:develop' into repair-style 2022-07-08 12:57:21 -07:00
ThatOneCalculator
e53a5baa36 🎨 2022-07-06 23:23:37 -07:00
ThatOneCalculator
e51af57fb7 Responsive 2022-07-06 23:16:15 -07:00
ThatOneCalculator
1c15e127a7 Actually fix :godmode: 2022-07-06 21:50:48 -07:00
ThatOneCalculator
38048208ed Typo 2022-07-06 21:47:01 -07:00
ThatOneCalculator
decea5e7f5 Merge branch 'repair-style' of https://github.com/ThatOneCalculator/misskey into repair-style 2022-07-06 21:46:28 -07:00
ThatOneCalculator
3e9a6d07d2 Fix flush 2022-07-06 21:46:04 -07:00
Kainoa Kanter
a162526539
Merge branch 'develop' into repair-style 2022-07-06 21:40:18 -07:00
ThatOneCalculator
2ae42b5824 🎨 2022-07-06 21:39:41 -07:00
ThatOneCalculator
1a366293f7 Formatting error 2022-07-06 21:36:25 -07:00
ThatOneCalculator
e4459dada4 Change script location 2022-07-06 21:34:57 -07:00
ThatOneCalculator
e92b279c15 Typo 2022-07-06 21:32:03 -07:00
ThatOneCalculator
0789fd3ae1 Flush style 2022-07-06 21:24:39 -07:00
ThatOneCalculator
189b1bff38 Tweak bios 2022-07-06 21:15:47 -07:00
ThatOneCalculator
787d593b8f Adjust cli 2022-07-06 21:13:32 -07:00
ThatOneCalculator
7fb09407bb Add bios style 2022-07-06 21:10:31 -07:00
ThatOneCalculator
68941063f9 Styled CLI 2022-07-06 21:01:34 -07:00
6 changed files with 275 additions and 78 deletions

View file

@ -1,23 +1,11 @@
* {
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
}
html {
background: #ffb4e1;
}
main {
background: #dedede;
}
main > .tabs { main > .tabs {
padding: 16px; padding: 16px;
border-bottom: solid 4px #c3c3c3; border-bottom: 4px solid #c3c3c3;
} }
#lsEditor > .adder { #lsEditor > .adder {
margin: 16px; margin: 16px;
padding: 16px; padding: 16px;
border: solid 2px #c3c3c3; border: 2px solid #c3c3c3;
} }
#lsEditor > .adder > textarea { #lsEditor > .adder > textarea {
display: block; display: block;
@ -27,10 +15,10 @@ main > .tabs {
} }
#lsEditor > .record { #lsEditor > .record {
padding: 16px; padding: 16px;
border-bottom: solid 1px #c3c3c3; border-bottom: 1px solid #c3c3c3;
} }
#lsEditor > .record > header { #lsEditor > .record > header {
font-weight: bold; font-weight: 700;
} }
#lsEditor > .record > textarea { #lsEditor > .record > textarea {
display: block; display: block;
@ -38,3 +26,123 @@ main > .tabs {
min-height: 5em; min-height: 5em;
box-sizing: border-box; box-sizing: border-box;
} }
html {
background: #222;
}
main {
background: #333;
border-radius: 10px;
}
#tl > div {
padding: 16px;
border-bottom: 1px solid #c3c3c3;
}
#tl > div > header {
font-weight: 700;
}
* {
font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif;
}
#misskey_app {
display: none !important;
}
body,
html {
background-color: #222;
color: #dfddcc;
justify-content: center;
margin: auto;
padding: 10px;
text-align: center;
}
button {
border-radius: 999px;
padding: 0px 12px 0px 12px;
border: none;
cursor: pointer;
margin-bottom: 12px;
background: linear-gradient(90deg, rgb(134, 179, 0), rgb(74, 179, 0));
line-height: 50px;
color: #222;
font-weight: bold;
font-size: 20px;
padding: 12px;
}
button {
border-radius: 999px;
padding: 0px 12px 0px 12px;
border: none;
cursor: pointer;
margin-bottom: 12px;
}
button {
background: #444;
line-height: 40px;
color: rgb(153, 204, 0);
font-size: 16px;
padding: 0 20px;
margin-right: 5px;
margin-left: 5px;
}
button:hover {
background: #555;
}
#ls {
background: linear-gradient(90deg, rgb(134, 179, 0), rgb(74, 179, 0));
line-height: 30px;
color: #222;
font-weight: bold;
font-size: 18px;
padding: 12px;
}
#ls:hover {
background: rgb(153, 204, 0);
}
a {
color: rgb(134, 179, 0);
text-decoration: none;
}
p,
li {
font-size: 16px;
}
h1 {
font-size: 32px;
}
code {
font-family: Fira, FiraCode, monospace;
}
textarea {
background-color: #444;
border: solid #aaa;
border-radius: 10px;
color: #dfddcc;
margin-top: 1rem;
margin-bottom: 1rem;
width: 20rem;
height: 7.5rem;
padding: 0.5rem;
}
textarea:focus {
border: solid #eee;
}
input {
background-color: #666;
border: solid #aaa;
border-radius: 10px;
color: #dfddcc;
margin-top: 1rem;
margin-bottom: 1rem;
width: 10rem;
height: 1rem;
padding: 0.5rem;
}
input:focus {
border: solid #eee;
}

View file

@ -44,7 +44,7 @@ window.onload = async () => {
const addKeyInput = document.createElement('input'); const addKeyInput = document.createElement('input');
const addValueTextarea = document.createElement('textarea'); const addValueTextarea = document.createElement('textarea');
const addButton = document.createElement('button'); const addButton = document.createElement('button');
addButton.textContent = 'add'; addButton.textContent = 'Add';
addButton.addEventListener('click', () => { addButton.addEventListener('click', () => {
localStorage.setItem(addKeyInput.value, addValueTextarea.value); localStorage.setItem(addKeyInput.value, addValueTextarea.value);
location.reload(); location.reload();
@ -64,13 +64,13 @@ window.onload = async () => {
const textarea = document.createElement('textarea'); const textarea = document.createElement('textarea');
textarea.textContent = localStorage.getItem(k); textarea.textContent = localStorage.getItem(k);
const saveButton = document.createElement('button'); const saveButton = document.createElement('button');
saveButton.textContent = 'save'; saveButton.textContent = 'Save';
saveButton.addEventListener('click', () => { saveButton.addEventListener('click', () => {
localStorage.setItem(k, textarea.value); localStorage.setItem(k, textarea.value);
location.reload(); location.reload();
}); });
const removeButton = document.createElement('button'); const removeButton = document.createElement('button');
removeButton.textContent = 'remove'; removeButton.textContent = 'Remove';
removeButton.addEventListener('click', () => { removeButton.addEventListener('click', () => {
localStorage.removeItem(k); localStorage.removeItem(k);
location.reload(); location.reload();

View file

@ -1,19 +1,81 @@
* {
font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace;
}
html { html {
background: #ffb4e1; background: #222;
} }
main { main {
background: #dedede; background: #333;
border-radius: 10px;
} }
#tl > div { #tl > div {
padding: 16px; padding: 16px;
border-bottom: solid 1px #c3c3c3; border-bottom: 1px solid #c3c3c3;
} }
#tl > div > header { #tl > div > header {
font-weight: bold; font-weight: 700;
}
* {
font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif;
}
#misskey_app {
display: none !important;
}
body,
html {
background-color: #222;
color: #dfddcc;
justify-content: center;
margin: auto;
padding: 10px;
text-align: center;
}
button {
border-radius:999px;
padding:0 40px;
margin-top: 1rem;
border:none;
cursor:pointer;
margin-bottom:12px;
background:linear-gradient(90deg,#86b300,#4ab300);
line-height:50px;
color:#222;
font-weight:700;
font-size:20px;
}
button:hover {
background: rgb(153, 204, 0);
}
a {
color: rgb(134, 179, 0);
text-decoration: none;
}
p,
li {
font-size: 16px;
}
h1 {
font-size: 32px;
}
code {
font-family: Fira, FiraCode, monospace;
}
#text {
background-color: #444;
border: solid #aaa;
border-radius: 10px;
color: #dfddcc;
margin-top: 3rem;
width: 20rem;
height: 5rem;
padding: 0.5rem;
}
#text:focus {
border: solid #eee;
}
@media screen and (max-width: 500px) {
#text {
width: 80%
}
} }

View file

@ -5,6 +5,7 @@ html
head head
meta(charset='utf-8') meta(charset='utf-8')
meta(name='application-name' content='Misskey') meta(name='application-name' content='Misskey')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
title Misskey Repair Tool title Misskey Repair Tool
style style
include ../bios.css include ../bios.css
@ -13,8 +14,8 @@ html
body body
header header
h1 Misskey Repair Tool #{version} h1 Misskey Repair Tool v#{version}
main main
div.tabs div.tabs
button#ls edit local storage button#ls Edit local storage
div#content div#content

View file

@ -5,6 +5,7 @@ html
head head
meta(charset='utf-8') meta(charset='utf-8')
meta(name='application-name' content='Misskey') meta(name='application-name' content='Misskey')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
title Misskey Cli title Misskey Cli
style style
include ../cli.css include ../cli.css
@ -13,9 +14,10 @@ html
body body
header header
h1 Misskey Cli #{version} h1 Misskey Simple Client v#{version}
main main
div#form div#form
textarea#text textarea#text
button#submit submit br
button#submit Post
div#tl div#tl

View file

@ -1,47 +1,71 @@
doctype html doctype html
html html
#msg head
script. meta(charset='utf-8')
const msg = document.getElementById('msg'); meta(name='application-name' content='Misskey')
const successText = `\nSuccess Flush! <a href="/">Back to Misskey</a>\n成功しました。<a href="/">Misskeyを開き直してください。</a>`; meta(name='viewport' content='width=device-width, initial-scale=1.0')
title Flush Misskey
message('Start flushing.'); style.
* {
(async function() { font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif;
try { }
localStorage.clear(); body,
message('localStorage cleared.'); html {
background-color: #222;
const idbPromises = ['MisskeyClient', 'keyval-store'].map((name, i, arr) => new Promise((res, rej) => { color: #dfddcc;
const delidb = indexedDB.deleteDatabase(name); justify-content: center;
delidb.onsuccess = () => res(message(`indexedDB "${name}" cleared. (${i + 1}/${arr.length})`)); margin: auto;
delidb.onerror = e => rej(e) padding: 10px;
})); text-align: center;
}
await Promise.all(idbPromises); a {
color: rgb(134, 179, 0);
if (navigator.serviceWorker.controller) { text-decoration: none;
navigator.serviceWorker.controller.postMessage('clear');
await navigator.serviceWorker.getRegistrations()
.then(registrations => {
return Promise.all(registrations.map(registration => registration.unregister()));
})
.catch(e => { throw Error(e) });
}
message(successText);
} catch (e) {
message(`\n${e}\n\nFlush Failed. <a href="/flush">Please retry.</a>\n失敗しました。<a href="/flush">もう一度試してみてください。</a>`);
message(`\nIf you retry more than 3 times, clear the browser cache or contact to instance admin.\n3回以上試しても失敗する場合、ブラウザのキャッシュを消去し、それでもだめならインスタンス管理者に連絡してみてください。\n`)
console.error(e);
setTimeout(() => {
location = '/';
}, 10000)
} }
})();
function message(text) { body
msg.insertAdjacentHTML('beforeend', `<p>[${(new Date()).toString()}] ${text.replace(/\n/g,'<br>')}</p>`) #msg
} script.
const msg = document.getElementById('msg');
const successText = `\nSuccess Flush! <a href="/">Back to Misskey</a>\n成功しました。<a href="/">Misskeyを開き直してください。</a>`;
message('Start flushing.');
(async function() {
try {
localStorage.clear();
message('localStorage cleared.');
const idbPromises = ['MisskeyClient', 'keyval-store'].map((name, i, arr) => new Promise((res, rej) => {
const delidb = indexedDB.deleteDatabase(name);
delidb.onsuccess = () => res(message(`indexedDB "${name}" cleared. (${i + 1}/${arr.length})`));
delidb.onerror = e => rej(e)
}));
await Promise.all(idbPromises);
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.controller.postMessage('clear');
await navigator.serviceWorker.getRegistrations()
.then(registrations => {
return Promise.all(registrations.map(registration => registration.unregister()));
})
.catch(e => { throw Error(e) });
}
message(successText);
} catch (e) {
message(`\n${e}\n\nFlush Failed. <a href="/flush">Please retry.</a>\n失敗しました。<a href="/flush">もう一度試してみてください。</a>`);
message(`\nIf you retry more than 3 times, clear the browser cache or contact to instance admin.\n3回以上試しても失敗する場合、ブラウザのキャッシュを消去し、それでもだめならインスタンス管理者に連絡してみてください。\n`)
console.error(e);
setTimeout(() => {
location = '/';
}, 10000)
}
})();
function message(text) {
msg.insertAdjacentHTML('beforeend', `<p>[${(new Date()).toString()}] ${text.replace(/\n/g,'<br>')}</p>`)
}