You've already forked AstralRinth
forked from didirus/AstralRinth
Merge pull request #32 from DIDIRUS4/feature-clean
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@modrinth/app-frontend",
|
"name": "@modrinth/app-frontend",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.8.502",
|
"version": "0.8.503",
|
||||||
"development_build": false,
|
"development_build": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ export default defineConfig({
|
|||||||
port: 1420,
|
port: 1420,
|
||||||
strictPort: true,
|
strictPort: true,
|
||||||
},
|
},
|
||||||
// to make use of `TAURI_DEBUG` and other env variables
|
// to make use of `TAURI_ENV_DEBUG` and other env variables
|
||||||
// https://tauri.studio/v1/api/config#buildconfig.beforedevcommand
|
// https://v2.tauri.app/reference/environment-variables/#tauri-cli-hook-commands
|
||||||
envPrefix: ['VITE_', 'TAURI_'],
|
envPrefix: ['VITE_', 'TAURI_'],
|
||||||
build: {
|
build: {
|
||||||
// Tauri supports es2021
|
// Tauri supports es2021
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Before you begin, ensure you have the following installed on your machine:
|
|||||||
- [Node.js](https://nodejs.org/en/)
|
- [Node.js](https://nodejs.org/en/)
|
||||||
- [pnpm](https://pnpm.io/)
|
- [pnpm](https://pnpm.io/)
|
||||||
- [Rust](https://www.rust-lang.org/tools/install)
|
- [Rust](https://www.rust-lang.org/tools/install)
|
||||||
- [Tauri](https://tauri.app/v1/guides/getting-started/prerequisites/#installing)
|
- [Tauri](https://v2.tauri.app/start/prerequisites/)
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
|
|||||||
@@ -299,6 +299,69 @@
|
|||||||
},
|
},
|
||||||
"Identifier": {
|
"Identifier": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"description": "ads:default -> Default plugin permissions.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:default"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:allow-hide-ads-window -> Enables the hide_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:allow-hide-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:allow-init-ads-window -> Enables the init_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:allow-init-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:allow-scroll-ads-window -> Enables the scroll_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:allow-scroll-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:allow-show-ads-window -> Enables the show_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:allow-show-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:deny-hide-ads-window -> Denies the hide_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:deny-hide-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:deny-init-ads-window -> Denies the init_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:deny-init-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:deny-scroll-ads-window -> Denies the scroll_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:deny-scroll-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "ads:deny-show-ads-window -> Denies the show_ads_window command without any pre-configured scope.",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"ads:deny-show-ads-window"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "auth:default -> Default plugin permissions.",
|
"description": "auth:default -> Default plugin permissions.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2785,10 +2848,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "jre:allow-set-java-versions -> Enables the set_java_versions command without any pre-configured scope.",
|
"description": "jre:allow-set-java-version -> Enables the set_java_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"jre:allow-set-java-versions"
|
"jre:allow-set-java-version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -2834,10 +2897,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "jre:deny-set-java-versions -> Denies the set_java_versions command without any pre-configured scope.",
|
"description": "jre:deny-set-java-version -> Denies the set_java_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
"jre:deny-set-java-versions"
|
"jre:deny-set-java-version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
],
|
],
|
||||||
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost blob: data:",
|
"img-src": "https: 'unsafe-inline' 'self' asset: http://asset.localhost blob: data:",
|
||||||
"style-src": "'unsafe-inline' 'self'",
|
"style-src": "'unsafe-inline' 'self'",
|
||||||
"script-src": "https://cmp.inmobi.com https://*.cloudflare.com 'self'",
|
"script-src": "https://cmp.inmobi.com https://*.cloudflare.com https://*.posthog.com 'self'",
|
||||||
"frame-src": "https://*.cloudflare.com https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self'"
|
"frame-src": "https://*.cloudflare.com https://www.youtube.com https://www.youtube-nocookie.com https://discord.com 'self'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -567,6 +567,7 @@
|
|||||||
:show-labels="false"
|
:show-labels="false"
|
||||||
:limit="6"
|
:limit="6"
|
||||||
:hide-selected="true"
|
:hide-selected="true"
|
||||||
|
:custom-label="(version) => version"
|
||||||
placeholder="Choose versions..."
|
placeholder="Choose versions..."
|
||||||
/>
|
/>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|||||||
@@ -845,7 +845,7 @@ pub async fn create_mrpack_json(
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let files = projects
|
let mut files = projects
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|(path, version_id)| {
|
.filter_map(|(path, version_id)| {
|
||||||
if let Some(version) = versions.iter().find(|x| x.id == version_id)
|
if let Some(version) = versions.iter().find(|x| x.id == version_id)
|
||||||
@@ -890,6 +890,8 @@ pub async fn create_mrpack_json(
|
|||||||
})
|
})
|
||||||
.collect::<crate::Result<Vec<PackFile>>>()?;
|
.collect::<crate::Result<Vec<PackFile>>>()?;
|
||||||
|
|
||||||
|
files.sort_by(|a, b| a.path.cmp(&b.path));
|
||||||
|
|
||||||
Ok(PackFormat {
|
Ok(PackFormat {
|
||||||
game: "minecraft".to_string(),
|
game: "minecraft".to_string(),
|
||||||
format_version: 1,
|
format_version: 1,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use crate::event::{
|
|||||||
};
|
};
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
#[cfg(feature = "tauri")]
|
#[cfg(feature = "tauri")]
|
||||||
use tauri::Emitter;
|
use tauri::{Emitter, Manager};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[cfg(feature = "cli")]
|
#[cfg(feature = "cli")]
|
||||||
@@ -228,7 +228,7 @@ pub async fn emit_warning(message: &str) -> crate::Result<()> {
|
|||||||
|
|
||||||
// emit_command(CommandPayload::Something { something })
|
// emit_command(CommandPayload::Something { something })
|
||||||
// ie: installing a pack, opening an .mrpack, etc
|
// ie: installing a pack, opening an .mrpack, etc
|
||||||
// Generally used for url deep links and file opens that we we want to handle in the frontend
|
// Generally used for url deep links and file opens that we want to handle in the frontend
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
pub async fn emit_command(command: CommandPayload) -> crate::Result<()> {
|
pub async fn emit_command(command: CommandPayload) -> crate::Result<()> {
|
||||||
@@ -240,6 +240,10 @@ pub async fn emit_command(command: CommandPayload) -> crate::Result<()> {
|
|||||||
.app
|
.app
|
||||||
.emit("command", command)
|
.emit("command", command)
|
||||||
.map_err(EventError::from)?;
|
.map_err(EventError::from)?;
|
||||||
|
|
||||||
|
if let Some(window) = event_state.app.get_window("main") {
|
||||||
|
let _ = window.set_focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
5303
patches/initial-ar-setup.patch
Normal file
5303
patches/initial-ar-setup.patch
Normal file
File diff suppressed because one or more lines are too long
22
patches/modrinth-index-ordering.patch
Normal file
22
patches/modrinth-index-ordering.patch
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/packages/app-lib/src/api/profile/mod.rs b/packages/app-lib/src/api/profile/mod.rs
|
||||||
|
index aaa2864a..7addca68 100644
|
||||||
|
--- a/packages/app-lib/src/api/profile/mod.rs
|
||||||
|
+++ b/packages/app-lib/src/api/profile/mod.rs
|
||||||
|
@@ -845,7 +845,7 @@ pub async fn create_mrpack_json(
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
- let files = projects
|
||||||
|
+ let mut files = projects
|
||||||
|
.into_iter()
|
||||||
|
.filter_map(|(path, version_id)| {
|
||||||
|
if let Some(version) = versions.iter().find(|x| x.id == version_id)
|
||||||
|
@@ -890,6 +890,8 @@ pub async fn create_mrpack_json(
|
||||||
|
})
|
||||||
|
.collect::<crate::Result<Vec<PackFile>>>()?;
|
||||||
|
|
||||||
|
+ files.sort_by(|a, b| a.path.cmp(&b.path));
|
||||||
|
+
|
||||||
|
Ok(PackFormat {
|
||||||
|
game: "minecraft".to_string(),
|
||||||
|
format_version: 1,
|
||||||
Reference in New Issue
Block a user