new icons for web workflow with actual emojis

This commit is contained in:
Neradoc 2022-08-04 18:39:21 +02:00
parent 59b4353282
commit 9f4e8efd2e
2 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<h1><a href="/"><img src="/favicon.ico"/></a>&nbsp;<span id="path"></span></h1> <h1><a href="/"><img src="/favicon.ico"/></a>&nbsp;<span id="path"></span></h1>
<div id="usbwarning" style="display: none;">🛈 USB is using the storage. Only allowing reads. See <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage">the CircuitPython Essentials: Storage guide</a> for details.</div> <div id="usbwarning" style="display: none;"> USB is using the storage. Only allowing reads. See <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage">the CircuitPython Essentials: Storage guide</a> for details.</div>
<template id="row"><tr><td></td><td></td><td><a></a></td><td></td><td><button class="delete">🗑️</button></td><td><a class="edit_link" href="">Edit</a></td></tr></template> <template id="row"><tr><td></td><td></td><td><a></a></td><td></td><td><button class="delete">🗑️</button></td><td><a class="edit_link" href="">Edit</a></td></tr></template>
<table> <table>
<thead><tr><th>Type</th><th>Size</th><th>Path</th><th>Modified</th><th></th></tr></thead> <thead><tr><th>Type</th><th>Size</th><th>Path</th><th>Modified</th><th></th></tr></thead>
@ -18,5 +18,5 @@
<hr> <hr>
<input type="file" id="files" multiple><button type="submit" id="upload">Upload</button> <input type="file" id="files" multiple><button type="submit" id="upload">Upload</button>
<hr> <hr>
+🗀&nbsp;<input type="text" id="name"><button type="submit" id="mkdir">Create Directory</button> +📁&nbsp;<input type="text" id="name"><button type="submit" id="mkdir">Create Directory</button>
</body></html> </body></html>

View File

@ -46,7 +46,7 @@ async function refresh_list() {
if (window.location.path != "/fs/") { if (window.location.path != "/fs/") {
var clone = template.content.cloneNode(true); var clone = template.content.cloneNode(true);
var td = clone.querySelectorAll("td"); var td = clone.querySelectorAll("td");
td[0].textContent = "🗀"; td[0].textContent = "📁";
var path = clone.querySelector("a"); var path = clone.querySelector("a");
let parent = new URL("..", "file://" + current_path); let parent = new URL("..", "file://" + current_path);
path.href = "#" + parent.pathname; path.href = "#" + parent.pathname;
@ -60,7 +60,7 @@ async function refresh_list() {
// Clone the new row and insert it into the table // Clone the new row and insert it into the table
var clone = template.content.cloneNode(true); var clone = template.content.cloneNode(true);
var td = clone.querySelectorAll("td"); var td = clone.querySelectorAll("td");
var icon = "⬇"; var icon = "⬇";
var file_path = current_path + f.name; var file_path = current_path + f.name;
let api_url = new URL("/fs" + file_path, url_base); let api_url = new URL("/fs" + file_path, url_base);
let edit_url = "/edit/#" + file_path; let edit_url = "/edit/#" + file_path;
@ -72,12 +72,12 @@ async function refresh_list() {
} }
if (f.directory) { if (f.directory) {
icon = "🗀"; icon = "📁";
} else if(f.name.endsWith(".txt") || } else if(f.name.endsWith(".txt") ||
f.name.endsWith(".py") || f.name.endsWith(".py") ||
f.name.endsWith(".js") || f.name.endsWith(".js") ||
f.name.endsWith(".json")) { f.name.endsWith(".json")) {
icon = "🖹"; icon = "📄";
} else if (f.name.endsWith(".html")) { } else if (f.name.endsWith(".html")) {
icon = "🌐"; icon = "🌐";
} }