feat: add integrations and mobile-ready setup

Add bundled JSON quote fallback, responsive UI, Discord slash commands, Android setup documentation, and complete integration installation instructions. Set the Tauri application version to 1.1.0 for the release.
This commit is contained in:
2026-09-16 17:03:27 -04:00
parent 4e24e2d989
commit 84fd2da49c
9 changed files with 217 additions and 138 deletions

View File

@@ -0,0 +1,12 @@
[
"Courage begins where certainty ends.",
"The patient mind finds patterns in the noise.",
"A clear question can unlock a hidden door.",
"Wisdom grows when curiosity survives the first mistake.",
"The map is useful, but the journey teaches the terrain.",
"Small clues become powerful when connected with care.",
"The strongest key is often the question nobody thought to ask.",
"A secret loses its power when a brave mind learns how to read it.",
"Every complex puzzle becomes smaller when its rules are made visible.",
"Knowledge is not a locked room; it is a path made by patient footsteps."
]

View File

@@ -1,4 +1,5 @@
use rand::seq::SliceRandom;
use rand::seq::IteratorRandom;
use rand::Rng;
use serde::{Deserialize, Serialize};
use std::collections::{HashMap, HashSet};
@@ -39,6 +40,11 @@ struct OllamaResponse {
response: String,
}
fn bundled_quotes() -> Vec<String> {
serde_json::from_str(include_str!("../data/quotes.json"))
.expect("bundled quote data must be valid JSON")
}
#[tauri::command(rename_all = "snake_case")]
fn generate_cipher_challenge(
cipher_type: String,
@@ -143,16 +149,21 @@ fn get_ai_quote(length_choice: usize) -> String {
}
fn fallback_quote(length_choice: usize) -> String {
let topics = ["VIKINGS", "KNOWLEDGE", "FORTUNE", "STRATEGY", "FREEDOM"];
let actions = ["SAILED ACROSS THE UNKNOWN", "DISCOVERED HIDDEN TRUTHS", "FAVORED THE BRAVE MINDS", "PROTECTED LIBERTY WITH SECRETS"];
let quotes = bundled_quotes();
let target_range = match length_choice {
1 => 5..=10,
2 => 11..=20,
_ => 21..=40,
};
let mut rng = rand::thread_rng();
let base = format!("{} {}", topics.choose(&mut rng).unwrap(), actions.choose(&mut rng).unwrap());
if length_choice > 1 {
format!("{} AND UNLOCKED THE SECRETS OF THE ANCIENT RUNES", base)
} else {
base
}
quotes
.iter()
.filter(|quote| target_range.contains(&quote.split_whitespace().count()))
.choose(&mut rng)
.or_else(|| quotes.choose(&mut rng))
.expect("quote fallback data must not be empty")
.to_uppercase()
}
fn get_desktop_path() -> PathBuf {

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Cipher Master",
"version": "1.0.0",
"version": "1.1.0",
"identifier": "com.xvoet.ciphermaster",
"build": {
"frontendDist": "../public"