Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 879f3b217d | |||
| 07cb1ad8ef | |||
| 2979b5d781 | |||
| 14736169d4 | |||
| f2e4d78fd9 | |||
| 439a6b51a2 | |||
| 1eee6ed199 | |||
| 0c14b918a4 | |||
| f9075b4fe3 | |||
| 54118b80a5 | |||
| 715f825840 |
@@ -0,0 +1,125 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Build Linux release binary
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # needed so build.rs can run `git describe`
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Cache Cargo registry and build artefacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index
|
||||
~/.cargo/registry/cache
|
||||
~/.cargo/git/db
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Build release binary
|
||||
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Rename binary
|
||||
run: |
|
||||
cp target/x86_64-unknown-linux-gnu/release/mikebase \
|
||||
mikebase-${{ github.ref_name }}-x86_64-linux
|
||||
|
||||
- name: Create Gitea release and upload binary
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITEA_URL: ${{ github.server_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
# Gitea may not have finished processing the tag ref by the time the
|
||||
# workflow runner starts, so retry a few times before giving up.
|
||||
RELEASE_ID=""
|
||||
for attempt in 1 2 3 4 5; do
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
"${GITEA_URL}/api/v1/repos/${REPO}/releases" \
|
||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"draft\":false,\"prerelease\":false}")
|
||||
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
||||
BODY=$(echo "$RESPONSE" | head -1)
|
||||
|
||||
if [ "$HTTP_CODE" -eq 201 ]; then
|
||||
RELEASE_ID=$(echo "$BODY" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
||||
break
|
||||
fi
|
||||
|
||||
echo "Attempt $attempt failed (HTTP $HTTP_CODE): $BODY"
|
||||
if [ "$attempt" -lt 5 ]; then
|
||||
sleep $((attempt * 5))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$RELEASE_ID" ]; then
|
||||
echo "Failed to create release after 5 attempts"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload binary asset
|
||||
BINARY="mikebase-${TAG}-x86_64-linux"
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
"${GITEA_URL}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${BINARY}" \
|
||||
--data-binary @"${BINARY}"
|
||||
|
||||
docker:
|
||||
name: Build and push Docker image
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.open3dlab.com
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: git.open3dlab.com/${{ github.repository }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=latest
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -1,51 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Build Linux release binary
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # needed so build.rs can run `git describe`
|
||||
|
||||
- name: Install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Cache Cargo registry and build artefacts
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index
|
||||
~/.cargo/registry/cache
|
||||
~/.cargo/git/db
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Build release binary
|
||||
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Rename binary for upload
|
||||
run: |
|
||||
cp target/x86_64-unknown-linux-gnu/release/mikebase \
|
||||
mikebase-${{ github.ref_name }}-x86_64-linux
|
||||
|
||||
- name: Upload binary to GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: mikebase-${{ github.ref_name }}-x86_64-linux
|
||||
generate_release_notes: true
|
||||
@@ -0,0 +1,65 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.2.4] - 2026-04-11
|
||||
|
||||
### Fixed
|
||||
- Gitea release workflow: remove `target_commitish` from release creation API
|
||||
call to fix 409 conflict when creating releases for existing tags.
|
||||
|
||||
## [0.2.3] - 2026-04-11
|
||||
|
||||
### Fixed
|
||||
- Gitea release workflow: retry release creation with backoff to handle timing
|
||||
between tag push and tag availability in the API.
|
||||
|
||||
## [0.2.2] - 2026-04-09
|
||||
|
||||
### Fixed
|
||||
- Updated Gitea container registry token in CI.
|
||||
|
||||
## [0.2.1] - 2026-04-09
|
||||
|
||||
### Removed
|
||||
- Deleted old GitHub Actions workflows (superseded by Gitea workflows).
|
||||
|
||||
## [0.2.0] - 2026-04-09
|
||||
|
||||
### Added
|
||||
- Emotes listing HTML page at `GET /` with styled table (accent colors, drop
|
||||
shadow, glow effects).
|
||||
- `GET /` health check endpoint (returns 200 OK).
|
||||
- Dockerfile and Docker build/push workflow targeting the Gitea container
|
||||
registry.
|
||||
|
||||
### Fixed
|
||||
- Error handling added to the client-side emotes fetch call on the HTML page.
|
||||
|
||||
## [0.1.0] - 2026-03-18
|
||||
|
||||
### Added
|
||||
- Rust/Axum HTTP server with SQLite and PostgreSQL support via `sqlx::AnyPool`.
|
||||
- `EmoteRow` DB model and `EmoteResponse` JSON API response type.
|
||||
- `POST /emotes` — create emote (multipart: `name`, `alias?`, `file`).
|
||||
- `PUT /emotes/{uuid}` — update emote metadata.
|
||||
- `DELETE /emotes/{uuid}` — delete emote from DB and S3.
|
||||
- `GET /json` — list all emotes as JSON.
|
||||
- `GET /version` — git commit hash and tag baked in at build time via
|
||||
`build.rs`.
|
||||
- S3/Wasabi storage backend with configurable endpoint and public URL.
|
||||
- Database migrations run automatically on startup.
|
||||
- GitHub Actions release workflow building a Linux binary on `v*` tag push.
|
||||
|
||||
[Unreleased]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.4...HEAD
|
||||
[0.2.4]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.3...v0.2.4
|
||||
[0.2.3]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.2...v0.2.3
|
||||
[0.2.2]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.1...v0.2.2
|
||||
[0.2.1]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://git.open3dlab.com/Open3DLab/mikebase/compare/v0.1.0...v0.2.0
|
||||
[0.1.0]: https://git.open3dlab.com/Open3DLab/mikebase/releases/tag/v0.1.0
|
||||
@@ -0,0 +1,84 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Build
|
||||
cargo build
|
||||
cargo build --release
|
||||
|
||||
# Run (requires config.toml or APP__ env vars)
|
||||
cargo run
|
||||
|
||||
# Check without building
|
||||
cargo check
|
||||
|
||||
# Run tests
|
||||
cargo test
|
||||
|
||||
# Run a single test
|
||||
cargo test <test_name>
|
||||
|
||||
# Lint
|
||||
cargo clippy
|
||||
|
||||
# Format
|
||||
cargo fmt
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy `config.example.toml` to `config.toml` and fill in the values. All config fields can be overridden with `APP__` prefixed environment variables using `__` as separator (e.g. `APP__DATABASE__URL`, `APP__S3__BUCKET`).
|
||||
|
||||
Supports both SQLite (`sqlite://mikebase.db`) and PostgreSQL (`postgresql://user:pass@host/db`) via `sqlx::AnyPool`.
|
||||
|
||||
## Architecture
|
||||
|
||||
The app is an Axum HTTP server with shared state (`AppState`) containing two components:
|
||||
- **`Database`** (`src/db.rs`): Thin wrapper around `sqlx::AnyPool` supporting SQLite and PostgreSQL. Runs migrations from `migrations/` on startup. All timestamps are stored as ISO 8601 strings (not native DB types) because `sqlx::Any` lacks a blanket chrono `Encode`/`Decode` impl.
|
||||
- **`S3Storage`** (`src/storage.rs`): AWS SDK S3 client pointed at a configurable endpoint (Wasabi by default). Images are uploaded under the key `emoji/<filename>` and public URLs are built from the configured `public_url` base.
|
||||
|
||||
**Data flow for emote creation:** multipart form → upload bytes to S3 → insert row into DB → return `EmoteResponse` JSON.
|
||||
|
||||
**Models** (`src/models.rs`):
|
||||
- `EmoteRow` — raw DB row (timestamps as strings)
|
||||
- `EmoteResponse` — JSON API response (timestamps as `DateTime<Utc>`)
|
||||
|
||||
**Routes** (`src/routes/`):
|
||||
- `GET /` — health check
|
||||
- `GET /version` — git commit hash and tag (baked in at build time via `build.rs`)
|
||||
- `GET /json` — list all emotes
|
||||
- `POST /emotes` — create emote (multipart: `name`, `alias?`, `file`)
|
||||
- `PUT /emotes/{uuid}` — update emote metadata (JSON: `name?`, `alias?`, `image_key?`)
|
||||
- `DELETE /emotes/{uuid}` — delete emote from DB and S3 (S3 delete is best-effort)
|
||||
|
||||
## Releases
|
||||
|
||||
Pushing a `v*` tag triggers the Gitea Actions release workflow, which builds a
|
||||
Linux binary, uploads it to a Gitea Release, and pushes a Docker image to the
|
||||
Gitea container registry.
|
||||
|
||||
### Cutting a release
|
||||
|
||||
1. Move the `[Unreleased]` entries in `CHANGELOG.md` to a new versioned section:
|
||||
```markdown
|
||||
## [0.x.y] - YYYY-MM-DD
|
||||
```
|
||||
2. Add a new empty `## [Unreleased]` section at the top.
|
||||
3. Update the comparison links at the bottom of `CHANGELOG.md`:
|
||||
- Change the `[Unreleased]` link to compare the new tag against `HEAD`.
|
||||
- Add a new link for the new version comparing it against the previous tag.
|
||||
4. Commit: `git commit -m "Release v0.x.y"`
|
||||
5. Tag and push:
|
||||
```bash
|
||||
git tag v0.x.y
|
||||
git push origin main v0.x.y
|
||||
```
|
||||
|
||||
### Changelog conventions
|
||||
|
||||
`CHANGELOG.md` follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
Group entries under: `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed`, `Security`.
|
||||
Record notable changes in `[Unreleased]` as you make them, not only at release time.
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
# ── Build stage ──────────────────────────────────────────────────────────────
|
||||
FROM rust:1-slim AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# Cache dependency compilation separately from application code.
|
||||
COPY Cargo.toml Cargo.lock build.rs ./
|
||||
# Dummy source so `cargo build` can compile dependencies without the real code.
|
||||
RUN mkdir src && echo 'fn main(){}' > src/main.rs \
|
||||
&& cargo build --release \
|
||||
&& rm src/main.rs
|
||||
|
||||
# Build the real application.
|
||||
COPY src ./src
|
||||
COPY migrations ./migrations
|
||||
# Touch main.rs so Cargo detects the change and recompiles.
|
||||
RUN touch src/main.rs \
|
||||
&& cargo build --release
|
||||
|
||||
# ── Runtime stage ─────────────────────────────────────────────────────────────
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/target/release/mikebase ./mikebase
|
||||
COPY migrations ./migrations
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:3000/health || exit 1
|
||||
|
||||
ENTRYPOINT ["./mikebase"]
|
||||
@@ -54,6 +54,7 @@ async fn main() {
|
||||
|
||||
let app = Router::new()
|
||||
.route("/", get(routes::emotes::root))
|
||||
.route("/health", get(routes::health::health))
|
||||
.route("/version", get(routes::version::version))
|
||||
.route("/json", get(routes::emotes::list_emotes))
|
||||
.route("/emotes", post(routes::emotes::create_emote))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use axum::{
|
||||
extract::{Multipart, Path, State},
|
||||
http::StatusCode,
|
||||
response::{IntoResponse, Json},
|
||||
response::{Html, IntoResponse, Json},
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
@@ -11,9 +11,9 @@ use crate::{
|
||||
};
|
||||
|
||||
/// GET /
|
||||
/// Returns a simple health-check message.
|
||||
/// Serves an HTML page that dynamically loads and displays emotes from /json.
|
||||
pub async fn root() -> impl IntoResponse {
|
||||
Json(json!({"status": "ok", "message": "mikebase server is running"}))
|
||||
Html(include_str!("../templates/index.html"))
|
||||
}
|
||||
|
||||
/// GET /json
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
use axum::response::{IntoResponse, Json};
|
||||
use serde_json::json;
|
||||
|
||||
/// GET /health
|
||||
/// Returns a simple health-check response for liveness probes.
|
||||
pub async fn health() -> impl IntoResponse {
|
||||
Json(json!({"status": "ok"}))
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
pub mod emotes;
|
||||
pub mod health;
|
||||
pub mod version;
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>MIKEBASE</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body { font-family: system-ui, -apple-system, sans-serif; background: #222222; color: #ffffff; }
|
||||
nav {
|
||||
height: 60px; display: flex; align-items: center; padding: 0 24px;
|
||||
background: #171717; border-bottom: 2px solid #4a0000;
|
||||
box-shadow: 0 2px 12px rgba(74, 0, 0, 0.5);
|
||||
position: relative; z-index: 10;
|
||||
}
|
||||
nav .logo { font-size: 1.5rem; letter-spacing: 0.08em; color: #ffffff; }
|
||||
nav .logo strong { font-weight: 700; color: #ff4d4d; text-shadow: 0 0 8px rgba(74, 0, 0, 0.8); }
|
||||
nav .logo span { font-weight: 300; }
|
||||
@keyframes fadeInUp {
|
||||
from { opacity: 0; transform: translateY(12px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
.grid { display: flex; flex-wrap: wrap; gap: 14px; padding: 24px; justify-content: center; }
|
||||
.emote {
|
||||
display: flex; flex-direction: column; align-items: center;
|
||||
cursor: pointer; padding: 10px; border-radius: 10px;
|
||||
border: 1px solid transparent;
|
||||
transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
|
||||
animation: fadeInUp 0.4s ease both;
|
||||
}
|
||||
.emote:hover {
|
||||
background: rgba(74, 0, 0, 0.15);
|
||||
border-color: #4a0000;
|
||||
box-shadow: 0 0 14px rgba(74, 0, 0, 0.6);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.emote:active {
|
||||
transform: scale(0.95);
|
||||
box-shadow: 0 0 20px rgba(74, 0, 0, 0.9);
|
||||
}
|
||||
.emote img {
|
||||
width: 64px; height: 64px; object-fit: contain;
|
||||
transition: filter 0.25s ease, transform 0.25s ease;
|
||||
}
|
||||
.emote:hover img {
|
||||
filter: drop-shadow(0 0 6px rgba(74, 0, 0, 0.7));
|
||||
transform: scale(1.08);
|
||||
}
|
||||
.emote .code {
|
||||
font-size: 0.7rem; margin-top: 6px; color: #999;
|
||||
max-width: 80px; overflow: hidden; text-overflow: ellipsis;
|
||||
white-space: nowrap; text-align: center;
|
||||
transition: color 0.25s ease;
|
||||
}
|
||||
.emote:hover .code { color: #ff4d4d; }
|
||||
.toast {
|
||||
position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px);
|
||||
background: #4a0000; color: #ffffff; padding: 10px 20px; border-radius: 8px;
|
||||
font-size: 0.85rem; opacity: 0;
|
||||
box-shadow: 0 0 16px rgba(74, 0, 0, 0.7);
|
||||
transition: opacity 0.3s ease, transform 0.3s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<nav>
|
||||
<div class="logo"><strong>MIKE</strong><span>BASE</span></div>
|
||||
</nav>
|
||||
<div class="grid" id="grid"></div>
|
||||
<div class="toast" id="toast">Copied!</div>
|
||||
<script>
|
||||
(function(){
|
||||
var toast = document.getElementById('toast');
|
||||
var timer;
|
||||
|
||||
function showToast(text) {
|
||||
toast.textContent = text;
|
||||
toast.classList.add('show');
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function(){ toast.classList.remove('show'); }, 1500);
|
||||
}
|
||||
|
||||
function copyCode(code) {
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
navigator.clipboard.writeText(code).then(function(){
|
||||
showToast('Copied ' + code);
|
||||
});
|
||||
} else {
|
||||
var ta = document.createElement('textarea');
|
||||
ta.value = code;
|
||||
ta.style.position = 'fixed';
|
||||
ta.style.opacity = '0';
|
||||
document.body.appendChild(ta);
|
||||
ta.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(ta);
|
||||
showToast('Copied ' + code);
|
||||
}
|
||||
}
|
||||
|
||||
fetch('/json')
|
||||
.then(function(r){
|
||||
if (!r.ok) throw new Error('HTTP ' + r.status);
|
||||
return r.json();
|
||||
})
|
||||
.then(function(data){
|
||||
var grid = document.getElementById('grid');
|
||||
var emotes = data.emotes || [];
|
||||
emotes.forEach(function(emote){
|
||||
var code = ':' + emote.name + ':';
|
||||
var card = document.createElement('div');
|
||||
card.className = 'emote';
|
||||
card.title = code;
|
||||
card.addEventListener('click', function(){ copyCode(code); });
|
||||
|
||||
var img = document.createElement('img');
|
||||
img.alt = emote.name;
|
||||
img.loading = 'lazy';
|
||||
img.width = 64;
|
||||
img.height = 64;
|
||||
img.src = emote.url;
|
||||
|
||||
var span = document.createElement('span');
|
||||
span.className = 'code';
|
||||
span.textContent = code;
|
||||
|
||||
card.appendChild(img);
|
||||
card.appendChild(span);
|
||||
grid.appendChild(card);
|
||||
});
|
||||
})
|
||||
.catch(function(err){
|
||||
var grid = document.getElementById('grid');
|
||||
grid.textContent = 'Failed to load emotes: ' + err.message;
|
||||
grid.style.color = '#f66';
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user