From 68941063f9ab148972cd08fc392debbe1bfdd95a Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:01:34 -0700 Subject: [PATCH 01/15] Styled CLI --- packages/backend/src/server/web/cli.css | 82 ++++++++++++++++--- packages/backend/src/server/web/views/cli.pug | 5 +- 2 files changed, 75 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index 07cd27830b..a59f2b7e97 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -1,19 +1,81 @@ -* { - font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace; -} - html { - background: #ffb4e1; + background: #222; } - main { - background: #dedede; + background: #333; + border-radius: 10px; } - #tl > div { padding: 16px; - border-bottom: solid 1px #c3c3c3; + border-bottom: 1px solid #c3c3c3; } #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: 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:hover { + background: rgb(153, 204, 0); +} + +.button-label-small { + color: rgb(153, 204, 0); + font-size: 16px; + padding: 12px; +} +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; } diff --git a/packages/backend/src/server/web/views/cli.pug b/packages/backend/src/server/web/views/cli.pug index d2cf7c4335..423804b1b2 100644 --- a/packages/backend/src/server/web/views/cli.pug +++ b/packages/backend/src/server/web/views/cli.pug @@ -13,9 +13,10 @@ html body header - h1 Misskey Cli #{version} + h1 Misskey Cli v#{version} main div#form textarea#text - button#submit submit + br + button#submit Post div#tl From 7fb09407bb38b9698ff460882291e90b4a5c31ec Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:10:31 -0700 Subject: [PATCH 02/15] Add bios style --- packages/backend/src/server/web/bios.css | 137 ++++++++++++++++-- packages/backend/src/server/web/cli.css | 6 - .../backend/src/server/web/views/bios.pug | 2 +- 3 files changed, 122 insertions(+), 23 deletions(-) diff --git a/packages/backend/src/server/web/bios.css b/packages/backend/src/server/web/bios.css index b0da3ee39b..679a3cb779 100644 --- a/packages/backend/src/server/web/bios.css +++ b/packages/backend/src/server/web/bios.css @@ -1,23 +1,11 @@ -* { - font-family: Fira code, Fira Mono, Consolas, Menlo, Courier, monospace; -} - -html { - background: #ffb4e1; -} - -main { - background: #dedede; -} main > .tabs { padding: 16px; - border-bottom: solid 4px #c3c3c3; + border-bottom: 4px solid #c3c3c3; } - #lsEditor > .adder { margin: 16px; padding: 16px; - border: solid 2px #c3c3c3; + border: 2px solid #c3c3c3; } #lsEditor > .adder > textarea { display: block; @@ -27,10 +15,10 @@ main > .tabs { } #lsEditor > .record { padding: 16px; - border-bottom: solid 1px #c3c3c3; + border-bottom: 1px solid #c3c3c3; } #lsEditor > .record > header { - font-weight: bold; + font-weight: 700; } #lsEditor > .record > textarea { display: block; @@ -38,3 +26,120 @@ main > .tabs { min-height: 5em; 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: 12px; +} +button:hover { + background: #555; +} +#ls { + 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; +} +#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: 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; +} diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index a59f2b7e97..9239aeb2d6 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -44,12 +44,6 @@ button { button:hover { background: rgb(153, 204, 0); } - -.button-label-small { - color: rgb(153, 204, 0); - font-size: 16px; - padding: 12px; -} a { color: rgb(134, 179, 0); text-decoration: none; diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 39a151a29b..91cfbcd395 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -16,5 +16,5 @@ html h1 Misskey Repair Tool #{version} main div.tabs - button#ls edit local storage + button#ls Edit local storage div#content From 787d593b8fc82cd347766714a3032ed74f2fc383 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:13:32 -0700 Subject: [PATCH 03/15] Adjust cli --- packages/backend/src/server/web/cli.css | 24 +++++++++---------- packages/backend/src/server/web/views/cli.pug | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index 9239aeb2d6..e762b3dc6e 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -29,18 +29,18 @@ html { 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; -} + 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); } diff --git a/packages/backend/src/server/web/views/cli.pug b/packages/backend/src/server/web/views/cli.pug index 423804b1b2..ee3525e980 100644 --- a/packages/backend/src/server/web/views/cli.pug +++ b/packages/backend/src/server/web/views/cli.pug @@ -13,7 +13,7 @@ html body header - h1 Misskey Cli v#{version} + h1 Misskey Simple Client v#{version} main div#form textarea#text From 189b1bff38e5645c95f23c57a882d213329d6a04 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:15:47 -0700 Subject: [PATCH 04/15] Tweak bios --- packages/backend/src/server/web/bios.js | 12 +- .../backend/src/server/web/views/bios.pug | 151 +++++++++++++++--- 2 files changed, 137 insertions(+), 26 deletions(-) diff --git a/packages/backend/src/server/web/bios.js b/packages/backend/src/server/web/bios.js index d06dee801a..1acdafd1d5 100644 --- a/packages/backend/src/server/web/bios.js +++ b/packages/backend/src/server/web/bios.js @@ -8,7 +8,7 @@ window.onload = async () => { const promise = new Promise((resolve, reject) => { // Append a credential if (i) data.i = i; - + // Send request fetch(endpoint.indexOf('://') > -1 ? endpoint : `/api/${endpoint}`, { method: 'POST', @@ -17,7 +17,7 @@ window.onload = async () => { cache: 'no-cache' }).then(async (res) => { const body = res.status === 204 ? null : await res.json(); - + if (res.status === 200) { resolve(body); } else if (res.status === 204) { @@ -27,7 +27,7 @@ window.onload = async () => { } }).catch(reject); }); - + return promise; }; @@ -44,7 +44,7 @@ window.onload = async () => { const addKeyInput = document.createElement('input'); const addValueTextarea = document.createElement('textarea'); const addButton = document.createElement('button'); - addButton.textContent = 'add'; + addButton.textContent = 'Add'; addButton.addEventListener('click', () => { localStorage.setItem(addKeyInput.value, addValueTextarea.value); location.reload(); @@ -64,13 +64,13 @@ window.onload = async () => { const textarea = document.createElement('textarea'); textarea.textContent = localStorage.getItem(k); const saveButton = document.createElement('button'); - saveButton.textContent = 'save'; + saveButton.textContent = 'Save'; saveButton.addEventListener('click', () => { localStorage.setItem(k, textarea.value); location.reload(); }); const removeButton = document.createElement('button'); - removeButton.textContent = 'remove'; + removeButton.textContent = 'Remove'; removeButton.addEventListener('click', () => { localStorage.removeItem(k); location.reload(); diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 91cfbcd395..1dc2604797 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -1,20 +1,131 @@ -doctype html - -html - - head - meta(charset='utf-8') - meta(name='application-name' content='Misskey') - title Misskey Repair Tool - style - include ../bios.css - script - include ../bios.js - - body - header - h1 Misskey Repair Tool #{version} - main - div.tabs - button#ls Edit local storage - div#content +main>.tabs { + padding:16px; + border-bottom:4px solid #c3c3c3 +} +#lsEditor>.adder { + margin:16px; + padding:16px; + border:2px solid #c3c3c3 +} +#lsEditor>.adder>textarea { + display:block; + width:100%; + min-height:5em; + box-sizing:border-box +} +#lsEditor>.record { + padding:16px; + border-bottom:1px solid #c3c3c3 +} +#lsEditor>.record>header { + font-weight:700 +} +#lsEditor>.record>textarea { + display:block; + width:100%; + min-height:5em; + 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 { + background:linear-gradient(90deg,#86b300,#4ab300); + line-height:50px; + color:#222; + font-weight:700; + font-size:20px; + border-radius:999px; + padding:0 20px; + margin-left: 5px; + margin-right: 5px; + border:none; + cursor:pointer; + margin-bottom:12px; + background:#444; + line-height:40px; + color:#9c0; + font-size:16px; +} +button:hover { + background:#555 +} +#ls { + background:linear-gradient(90deg,#86b300,#4ab300); + line-height:50px; + color:#222; + font-weight:700; + font-size:20px; + padding:12px +} +#ls:hover { + background:#9c0 +} +a { + color:#86b300; + text-decoration:none +} +li, +p { + 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:7rem; + padding:.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:.5rem +} +input:focus { + border:solid #eee +} From 0789fd3ae1351db0b7a12859ce989391aafff789 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:24:39 -0700 Subject: [PATCH 05/15] Flush style --- packages/backend/src/server/web/error.css | 98 ------------------- packages/backend/src/server/web/flush.css | 16 +++ .../backend/src/server/web/views/flush.pug | 76 +++++++------- 3 files changed, 55 insertions(+), 135 deletions(-) delete mode 100644 packages/backend/src/server/web/error.css create mode 100644 packages/backend/src/server/web/flush.css diff --git a/packages/backend/src/server/web/error.css b/packages/backend/src/server/web/error.css deleted file mode 100644 index 9f8f905017..0000000000 --- a/packages/backend/src/server/web/error.css +++ /dev/null @@ -1,98 +0,0 @@ -* { - font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; -} - -body, -html { - background-color: #222; - color: #dfddcc; - justify-content: center; - margin: auto; - width: 80%; - padding: 10px; - text-align: center; -} - -button { - border-radius: 999px; - padding: 0px 12px 0px 12px; - border: none; - cursor: pointer; - margin-bottom: 12px; -} - -.button-big { - background: linear-gradient(90deg, rgb(134, 179, 0), rgb(74, 179, 0)); - line-height: 50px; -} - -.button-big:hover { - background: rgb(153, 204, 0); -} - -.button-small { - background: #444; - line-height: 40px; -} - -.button-small:hover { - background: #555; -} - -.button-label-big { - color: #222; - font-weight: bold; - font-size: 20px; - padding: 12px; -} - -.button-label-small { - color: rgb(153, 204, 0); - font-size: 16px; - padding: 12px; -} - -a { - color: rgb(134, 179, 0); - text-decoration: none; -} - -p, -li { - font-size: 16px; -} - -.dont-worry, -#msg { - font-size: 18px; -} - -.icon-warning { - color: #dec340; - height: 4rem; -} - -h1 { - font-size: 32px; -} - -code { - font-family: Fira, FiraCode, monospace; -} - -details { - background: #333; - margin-bottom: 2rem; - padding: 0.5rem 1rem; - border-radius: 5px; - justify-content: center; - margin: auto; -} - -summary { - cursor: pointer; -} - -summary > * { - display: inline; -} diff --git a/packages/backend/src/server/web/flush.css b/packages/backend/src/server/web/flush.css new file mode 100644 index 0000000000..6610eb4665 --- /dev/null +++ b/packages/backend/src/server/web/flush.css @@ -0,0 +1,16 @@ +* { + font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; +} +body, +html { + background-color: #222; + color: #dfddcc; + justify-content: center; + margin: auto; + padding: 10px; + text-align: center; +} +a { + color: rgb(134, 179, 0); + text-decoration: none; +} diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index b08f61c73a..4aa5700b44 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -6,48 +6,50 @@ html meta(name='application-name' content='Misskey') title Flushing Misskey style - include ../error.css - #msg - script. - const msg = document.getElementById('msg'); - const successText = `\nSuccess Flush! Back to Misskey\n成功しました。Misskeyを開き直してください。`; + include ../flush.css - message('Start flushing.'); + body + #msg + script. + const msg = document.getElementById('msg'); + const successText = `\nSuccess Flush! Back to Misskey\n成功しました。Misskeyを開き直してください。`; - (async function() { - try { - localStorage.clear(); - message('localStorage cleared.'); + message('Start flushing.'); - 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) - })); + (async function() { + try { + localStorage.clear(); + message('localStorage cleared.'); - await Promise.all(idbPromises); + 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) + })); - 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) }); + 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. Please retry.\n失敗しました。もう一度試してみてください。`); + 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) } + })(); - message(successText); - } catch (e) { - message(`\n${e}\n\nFlush Failed. Please retry.\n失敗しました。もう一度試してみてください。`); - 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', `

[${(new Date()).toString()}] ${text.replace(/\n/g,'
')}

`) } - })(); - - function message(text) { - msg.insertAdjacentHTML('beforeend', `

[${(new Date()).toString()}] ${text.replace(/\n/g,'
')}

`) - } From e92b279c15530097ca0a93665096061febbbcf21 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:32:03 -0700 Subject: [PATCH 06/15] Typo --- .../backend/src/server/web/views/bios.pug | 151 +++--------------- 1 file changed, 20 insertions(+), 131 deletions(-) diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 1dc2604797..91cfbcd395 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -1,131 +1,20 @@ -main>.tabs { - padding:16px; - border-bottom:4px solid #c3c3c3 -} -#lsEditor>.adder { - margin:16px; - padding:16px; - border:2px solid #c3c3c3 -} -#lsEditor>.adder>textarea { - display:block; - width:100%; - min-height:5em; - box-sizing:border-box -} -#lsEditor>.record { - padding:16px; - border-bottom:1px solid #c3c3c3 -} -#lsEditor>.record>header { - font-weight:700 -} -#lsEditor>.record>textarea { - display:block; - width:100%; - min-height:5em; - 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 { - background:linear-gradient(90deg,#86b300,#4ab300); - line-height:50px; - color:#222; - font-weight:700; - font-size:20px; - border-radius:999px; - padding:0 20px; - margin-left: 5px; - margin-right: 5px; - border:none; - cursor:pointer; - margin-bottom:12px; - background:#444; - line-height:40px; - color:#9c0; - font-size:16px; -} -button:hover { - background:#555 -} -#ls { - background:linear-gradient(90deg,#86b300,#4ab300); - line-height:50px; - color:#222; - font-weight:700; - font-size:20px; - padding:12px -} -#ls:hover { - background:#9c0 -} -a { - color:#86b300; - text-decoration:none -} -li, -p { - 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:7rem; - padding:.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:.5rem -} -input:focus { - border:solid #eee -} +doctype html + +html + + head + meta(charset='utf-8') + meta(name='application-name' content='Misskey') + title Misskey Repair Tool + style + include ../bios.css + script + include ../bios.js + + body + header + h1 Misskey Repair Tool #{version} + main + div.tabs + button#ls Edit local storage + div#content From e4459dada4a611312d5d9060500a99fb6230eec0 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:34:57 -0700 Subject: [PATCH 07/15] Change script location --- packages/backend/src/server/web/views/flush.pug | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index 4aa5700b44..ca1cc821a2 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -7,9 +7,6 @@ html title Flushing Misskey style include ../flush.css - - body - #msg script. const msg = document.getElementById('msg'); const successText = `\nSuccess Flush! Back to Misskey\n成功しました。Misskeyを開き直してください。`; @@ -52,4 +49,6 @@ html function message(text) { msg.insertAdjacentHTML('beforeend', `

[${(new Date()).toString()}] ${text.replace(/\n/g,'
')}

`) - } + + body + #msg From 1a366293f7a7e5054b2d5fe348e8e368842a30ad Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:36:25 -0700 Subject: [PATCH 08/15] Formatting error --- packages/backend/src/server/web/views/flush.pug | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index ca1cc821a2..2f65891330 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -49,6 +49,7 @@ html function message(text) { msg.insertAdjacentHTML('beforeend', `

[${(new Date()).toString()}] ${text.replace(/\n/g,'
')}

`) + } body #msg From 2ae42b58240f5d6cd62c48e31ff6c32e49c14629 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:39:41 -0700 Subject: [PATCH 09/15] :art: --- packages/backend/src/server/web/bios.css | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/bios.css b/packages/backend/src/server/web/bios.css index 679a3cb779..318fc3e28b 100644 --- a/packages/backend/src/server/web/bios.css +++ b/packages/backend/src/server/web/bios.css @@ -82,17 +82,20 @@ button { line-height: 40px; color: rgb(153, 204, 0); font-size: 16px; - padding: 12px; + 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: 50px; + line-height: 30px; color: #222; font-weight: bold; - font-size: 20px; + font-size: 18px; padding: 12px; } #ls:hover { @@ -121,7 +124,7 @@ textarea { margin-top: 1rem; margin-bottom: 1rem; width: 20rem; - height: 5rem; + height: 7.5rem; padding: 0.5rem; } From 3e9a6d07d20d7c814f9fa347aa3b6f835ba0661c Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:46:04 -0700 Subject: [PATCH 10/15] Fix flush --- packages/backend/src/server/web/views/flush.pug | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index 2f65891330..f5ef609ca0 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -4,9 +4,12 @@ html head meta(charset='utf-8') meta(name='application-name' content='Misskey') - title Flushing Misskey + title Misskey Repair Tool style include ../flush.css + + body + #msg script. const msg = document.getElementById('msg'); const successText = `\nSuccess Flush! Back to Misskey\n成功しました。Misskeyを開き直してください。`; @@ -50,6 +53,3 @@ html function message(text) { msg.insertAdjacentHTML('beforeend', `

[${(new Date()).toString()}] ${text.replace(/\n/g,'
')}

`) } - - body - #msg From 38048208ed0c29b9818f879ec794333d21c7b8db Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:47:01 -0700 Subject: [PATCH 11/15] Typo --- packages/backend/src/server/web/views/flush.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index f5ef609ca0..521946be2c 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -4,7 +4,7 @@ html head meta(charset='utf-8') meta(name='application-name' content='Misskey') - title Misskey Repair Tool + title Flush Misskey style include ../flush.css From 1c15e127a75c7bbc018b357e98b568c722790073 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 21:50:48 -0700 Subject: [PATCH 12/15] Actually fix :godmode: --- packages/backend/src/server/web/flush.css | 16 ---------------- .../backend/src/server/web/views/flush.pug | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 18 deletions(-) delete mode 100644 packages/backend/src/server/web/flush.css diff --git a/packages/backend/src/server/web/flush.css b/packages/backend/src/server/web/flush.css deleted file mode 100644 index 6610eb4665..0000000000 --- a/packages/backend/src/server/web/flush.css +++ /dev/null @@ -1,16 +0,0 @@ -* { - font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; -} -body, -html { - background-color: #222; - color: #dfddcc; - justify-content: center; - margin: auto; - padding: 10px; - text-align: center; -} -a { - color: rgb(134, 179, 0); - text-decoration: none; -} diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index 521946be2c..81d034d820 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -5,8 +5,23 @@ html meta(charset='utf-8') meta(name='application-name' content='Misskey') title Flush Misskey - style - include ../flush.css + style. + * { + font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; + } + body, + html { + background-color: #222; + color: #dfddcc; + justify-content: center; + margin: auto; + padding: 10px; + text-align: center; + } + a { + color: rgb(134, 179, 0); + text-decoration: none; + } body #msg From e51af57fb759f94116022be80b0794b39837fb97 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 23:16:15 -0700 Subject: [PATCH 13/15] Responsive --- packages/backend/src/server/web/views/bios.pug | 1 + packages/backend/src/server/web/views/cli.pug | 1 + packages/backend/src/server/web/views/flush.pug | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 91cfbcd395..6da9839af3 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -5,6 +5,7 @@ html head meta(charset='utf-8') meta(name='application-name' content='Misskey') + meta(name='viewport' content='width=device-width, initial-scale=1.0') title Misskey Repair Tool style include ../bios.css diff --git a/packages/backend/src/server/web/views/cli.pug b/packages/backend/src/server/web/views/cli.pug index ee3525e980..ad532b37d7 100644 --- a/packages/backend/src/server/web/views/cli.pug +++ b/packages/backend/src/server/web/views/cli.pug @@ -5,6 +5,7 @@ html head meta(charset='utf-8') meta(name='application-name' content='Misskey') + meta(name='viewport' content='width=device-width, initial-scale=1.0') title Misskey Cli style include ../cli.css diff --git a/packages/backend/src/server/web/views/flush.pug b/packages/backend/src/server/web/views/flush.pug index 81d034d820..987e37dc34 100644 --- a/packages/backend/src/server/web/views/flush.pug +++ b/packages/backend/src/server/web/views/flush.pug @@ -4,6 +4,7 @@ html head meta(charset='utf-8') meta(name='application-name' content='Misskey') + meta(name='viewport' content='width=device-width, initial-scale=1.0') title Flush Misskey style. * { From e53a5baa3609ae1360597a523466c22aff88087b Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 6 Jul 2022 23:23:37 -0700 Subject: [PATCH 14/15] =?UTF-8?q?=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/web/cli.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index e762b3dc6e..63e8ca6f2f 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -73,3 +73,9 @@ code { #text:focus { border: solid #eee; } + +@media screen and (max-width: 500px) { + #text { + width: 80% + } +} From b355c21e36a6318d689fae2d6e9bd33f7f9ce870 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter <44733677+ThatOneCalculator@users.noreply.github.com> Date: Fri, 8 Jul 2022 12:57:59 -0700 Subject: [PATCH 15/15] v --- packages/backend/src/server/web/views/bios.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/web/views/bios.pug b/packages/backend/src/server/web/views/bios.pug index 6da9839af3..2918246f8f 100644 --- a/packages/backend/src/server/web/views/bios.pug +++ b/packages/backend/src/server/web/views/bios.pug @@ -14,7 +14,7 @@ html body header - h1 Misskey Repair Tool #{version} + h1 Misskey Repair Tool v#{version} main div.tabs button#ls Edit local storage