Compare commits

...
Sign in to create a new pull request.

26 commits

Author SHA1 Message Date
bf8b96e99b added extra (info) buttons 2025-10-30 20:58:15 +01:00
24c747dda3 janusXR works 2025-10-30 13:13:32 +01:00
fe779a9a97 introduce .xrforge folder 2025-10-30 09:13:46 +01:00
af9e36e14f fixed hooks by using filename, not dirname 2025-10-29 21:36:14 +01:00
299ddaf253 improved hook-runner (ttl + duplicate-check) 2025-10-29 21:20:29 +01:00
c78dc87575 simplify hooks (wip) 2025-10-29 17:57:16 +01:00
0913b8eab9 wip: initializer 2025-10-29 15:05:18 +01:00
e904c0733b added locale file 2025-10-29 10:48:11 +01:00
2228c8035d rework notify system (wip) 2025-10-29 10:47:55 +01:00
2d558bf6f0 added hooks with order-sorting 2025-10-28 17:57:34 +01:00
ac0e1aeb0e disable godot web 2025-10-27 15:03:29 +01:00
5e0bfbf799 update hooks 2025-10-27 15:03:17 +01:00
34f6e052da added ruby hook package_xrf.rb 2025-10-27 14:05:07 +01:00
a19c45cea7 fix: auto-trigger hooks at first run 2025-10-24 21:09:41 +02:00
26a3d22882 added janusxr export 2025-10-24 18:42:55 +02:00
89bf973a18 nix/docker.nix: added specific assimp-version 2025-10-24 18:40:54 +02:00
556a9158eb added viewer 2025-10-23 19:21:56 +02:00
3422005b82 added manyfold templates 2025-10-22 17:16:55 +02:00
28e4082844 wip: clicking experience launches webxr client 2025-10-03 17:21:58 +02:00
ef5368a5a8 wip: webxr client 2025-10-03 13:41:51 +02:00
5f05ed03b6 added package.json 2025-10-03 12:47:27 +02:00
702be832e2 show extra menuitem in production 2025-10-03 12:16:01 +02:00
f1eb5dbf19 update docs 2025-10-03 12:10:17 +02:00
6f009ed13e clickable nlnet logo + tweaks 2025-10-03 11:55:53 +02:00
2b43fa2681 milestone 1b. xrforge: create documentation index.html + devlog 2025-10-02 14:06:54 +02:00
936c29d121 added clients/webxr 2025-09-30 13:23:30 +02:00
33 changed files with 5375 additions and 50 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
manyfold/usr
node_modules
manyfold/.env
manyfold/usr/public/webxr/node_modules

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "godot"]
path = godot
url = ../xrforge-godot.git

View file

@ -4,7 +4,8 @@
![](https://i.imgur.com/0NA7MMg.png)
Click [here](manyfold/README.md) for backend-installation instructions.
* View [index.html](https://coderofsalvation.codeberg.page/xrforge) for the official docs
* Click [here](manyfold/README.md) for backend-installation instructions.
Powered by:

1
godot

@ -1 +0,0 @@
Subproject commit 79e8669ca609782aa6fa9eeed259d9621697f460

3836
index.html Normal file

File diff suppressed because one or more lines are too long

View file

@ -51,6 +51,7 @@ $ manyfold/cli/manyfold run -v ./experiences:/mnt/experiences
| `APPNAME` | `manyfold` | manyfold instance name |
| `HOMEPAGE` | `/models` | show '/models' URL as homepage (use `/` for manyfold default) |
| `THEME` | `default` | bootstrap theme |
| `AFRAME_VERSION` | `1.7.0` | AFRAME version |
| `GODOT_VERSION` | `4.4.1-stable`| godot editor version |
| `GODOT_TEMPLATE_ZIP` | `` | godot template zip URL or file (default is empty godot project) |
| `RUNTESTS` | `0` | set to `1` to run XRForge related [/test](test) scripts |

View file

@ -1,10 +1,10 @@
#!/bin/sh
oci=$(which podman || which docker)
test -n "$APPNAME" || APPNAME=xrforge
test -n "$UPLOAD_PATH" || UPLOAD_PATH=/mnt/experiences
test -n "$THEME" || THEME=slate
test -n "$HOMEPAGE" || HOMEPAGE=/models
test -n "$GODOT_VERSION" || GODOT_VERSION=4.4.1-stable
test -n "$APPNAME" || export APPNAME=xrforge
test -n "$UPLOAD_PATH" || export UPLOAD_PATH=/mnt/experiences
test -n "$THEME" || export THEME=slate
test -n "$HOMEPAGE" || export HOMEPAGE=/models
test -n "$GODOT_VERSION" || export GODOT_VERSION=4.4.1-stable
db=/config/manyfold.sqlite3
# utility funcs
@ -71,7 +71,7 @@ hook(){
cmd=$1
shift
test -d ~/hook.d/$cmd && {
find -L ~/hook.d/$cmd/ -type f -executable -maxdepth 1 | while read hook; do
find -L ~/hook.d/$cmd/ -type f -executable -maxdepth 1 | sort -V | while read hook; do
logger " |+ hook $hook $*"
{ $hook "$@" || true; } 2>&1 | awk '{ gsub(/\/root\/\//,"",$1); $1 = sprintf("%-40s", $1)} 1' | logger
done
@ -83,11 +83,16 @@ start_hook_daemon(){
# 86400 secs = 1 day 3600 = 1 hour
$0 infinite 86400 hook daily &
$0 infinite 3600 hook hourly &
# trigger hooks when files change in /mnt/experiences
find /mnt -type d -mindepth 1 -maxdepth 1 | while read dir; do
echocolor "[$APPNAME]" "listening to inotify events in $dir"
inotifywait -r -m $dir | awk '$2 ~ /(CREATE|MODIFY|MOVED_TO|DELETE)/ { system("'$0' hook inotify_"$2" "$1""$3) }' &
done
# trigger hooks when files change in /mnt
#find /mnt -type d -mindepth 1 -maxdepth 1 | while read dir; do
# echocolor "[$APPNAME]" "listening to inotify events in $dir"
# # scan for '/mnt/experiences/creatorname/#234/ MODIFY foo.glb' e.g.
# # scan for '/mnt/experiences/creatorname/#234/ MOVED_TO foo.glb' e.g.
# inotifywait -r -m $dir | awk '/.*/ { print $0 }; $2 ~ /(CREATE|MODIFY|MOVED_TO|DELETE)/ && $3 ~ /datapackage/ { system("'$0' hook datapackage_"$2" "$1""$3) }' &
#done
## force-trigger processing hooks in /mnt
#find /mnt | grep datapackage | xargs -n1 $0 hook inotify_MODIFY
}
@ -125,7 +130,6 @@ mount_dir(){
find /mnt -type d -mindepth 1 -maxdepth 1 | while read dir; do
echocolor "[$APPNAME]" "mounting $dir as library"
add_lib_to_db "$dir"
ln -s "$dir" /usr/src/app/public/.
done
}
@ -231,9 +235,9 @@ boot(){
mount_rclone
set_upload_path
force_public
start_hook_daemon
get_xrfragment_assets
mount_dir
start_hook_daemon
scan_libraries &
hook boot # emit unixy hook-event (/root/hook.d/boot/* scripts)

View file

@ -0,0 +1,20 @@
#!/bin/sh
test -z "$AFRAME_VERSION" && exit 0 # nothing to do
mkdir /usr/src/app/public/aframe || true
wget "https://aframe.io/releases/${AFRAME_VERSION}/aframe.min.js" -O /usr/src/app/public/aframe/aframe.min.js
test -f /usr/src/app/public/aframe/index.html || echo '<html>
<head>
<script src="/aframe/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9"></a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E"></a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D"></a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4"></a-plane>
<a-sky color="#ECECEC"></a-sky>
</a-scene>
</body>
</html>
' > /usr/src/app/public/aframe/index.html

View file

@ -17,5 +17,5 @@ test -n "$FEDERATE_DRIVE_CERT" && test -m "$FEDERATE_DRIVE_KEY" && {
set -x
rclone serve http \
--poll-interval $FEDERATE_DRIVE_CACHE \
--exclude .xrforge --poll-interval $FEDERATE_DRIVE_CACHE \
--addr 0.0.0.0:$FEDERATE_DRIVE_PORT ${AUTH} ${SSL} $FEDERATE_DRIVE_PATH &> /var/log/rclone.log &

View file

@ -0,0 +1,3 @@
#!/bin/sh
# remove succesful tasks
ts | awk '$4 == 0 { print $1 }' | xargs -n1 ts -r

View file

@ -0,0 +1,6 @@
#!/bin/sh
dir="$(dirname $1)/.xrforge"
mkdir -p "$dir" || true
cd "$dir"
echo "[v] reset log.txt"
date > log.txt

View file

@ -0,0 +1,5 @@
#!/bin/sh
cd "$(dirname $1)"
echo "[v] scan (new) files of model"
id="$(basename "$dir" | sed 's/\#//g')"
#echo "Model.find(id).add_new_files_later()" | /usr/src/app/bin/rails console

View file

@ -0,0 +1,5 @@
#!/bin/sh
dir="$(dirname $1)"
cd "$dir"
echo "[package_experience.sh] zipping experience.zip"
zip -D ".xrforge/experience.zip * | tee -a .xrforge/log.txt

View file

@ -1,11 +1,10 @@
#!/bin/sh
echo "$1" | grep datapackage || exit 0 # nothing to do
dir=$(dirname $1)
dir="$(dirname $1)"
cd "$dir"
echo "[package_experience.sh] zipping $dir.zip"
echo "[package_godot_zip.sh] zipping godot.zip"
# overwrite empty godot template project-zip with given URL
test -n "$GODOT_TEMPLATE_ZIP" && timeout 50 wget "$GODOT_TEMPLATE_ZIP" -O ~/template_godot.zip
cp ~/template_godot.zip package_godot.zip
zip package_godot.zip *.glb *.usdz *.obj
zip .xrforge/godot.zip *.glb *.usdz *.obj

View file

@ -0,0 +1,100 @@
#!/usr/bin/env ruby
require 'json'
require_relative './../../xrforge.rb'
# Check if a filename is provided
if ARGV.length != 1
puts "Usage: #{$0} <path/to/experience/somefile.xxx>"
exit 1
end
filename = ARGV[0]
begin
# Change the directory
dir = File.dirname(filename)
Dir.chdir( File.dirname(filename) )
# Read and parse the JSON file
data = JSON.parse( File.read( "datapackage.json" ) )
logfile = File.join( File.dirname(filename), ".xrforge/log.txt" )
XRForge.log("✅ starting build janusXR XR scene", logfile)
# Extract the desired field (assuming the field is named 'model_file')
thumb_file = data['image']
XRForge.log("✅ thumbnail sidecar-file '#{thumb_file}' detected", logfile)
# Get the base name of the thumbnail file without its extension
base_name = File.basename(thumb_file, File.extname(thumb_file))
model_file = nil # Initialize model_file to nil
# Loop over the list of extensions
XRForge::MODEL_EXT.each do |ext|
# Construct the filename with the current extension
filename = "#{base_name}#{ext}"
# Check if the file exists
if File.exist?(filename)
XRForge.log("✅ 3D file '#{filename}' detected", logfile)
model_file = "#{dir.gsub("/mnt/","")}/#{filename}" # Store the found filename
break # Stop the loop once a file is found
else
# Log a message for the file that was not found, but don't stop
XRForge.log("⚠️ 3D file '#{filename}' not detected", logfile)
end
end
# Check if a model file was found after the loop
if model_file
XRForge.log("✅ Final model file: '#{model_file}'", logfile)
else
XRForge.log("❌ No suitable 3D file found for XR Fragments- / JanusXR-compatible experience", logfile)
end
# Get the value of the environment variable FEDERATE_DRIVE_HOST
federate_drive_host = ENV['FEDERATE_DRIVE_HOST']
# Define the HTML content using a multi-line string (heredoc)
# Ruby's heredoc allows for variable interpolation (using #{})
jml = <<~HTML
<!DOCTYPE html>
<html>
<head>
<title>janusxr room</title>
</head>
<body>
<script src="https://web.janusvr.com/janusweb.js"></script>
<janus-viewer>
<FireBoxRoom>
<Assets>
<assetobject id="experience" src="#{federate_drive_host}/#{model_file.gsub("#","%23")}"/>
</Assets>
<Room>
<object pos="0 0 0" collision_id="experience" id="experience" />
</Room>
</FireBoxRoom>
</janus-viewer>
</body>
</html>
HTML
# Write the content to the specified file
# File.write is the concise equivalent of 'echo "$jml" > filename'
File.write('.xrforge/janusxr.html', jml)
XRForge.log("✅ written janusxr.html", logfile)
XRForge.log(" ", logfile)
rescue Errno::ENOENT
puts "File #{filename} not found"
rescue JSON::ParserError
puts "Error parsing JSON from #{filename}"
rescue => e
puts "An error occurred: #{e.message}"
end

View file

@ -0,0 +1,69 @@
#!/usr/bin/env ruby
require 'json'
require_relative './../../xrforge.rb'
# Check if a filename is provided
if ARGV.length != 1
puts "Usage: #{$0} <path/to/experience/somefile.xxx>"
exit 1
end
filename = ARGV[0]
begin
# Change the directory
Dir.chdir( File.dirname(filename) )
# Read and parse the JSON file
data = JSON.parse( File.read( "datapackage.json" ) )
XRForge.log("✅ starting XR fragments check", logfile)
# Extract the desired field (assuming the field is named 'model_file')
thumb_file = data['image']
XRForge.log("✅ thumbnail sidecar-file '#{thumb_file}' detected", logfile)
# Get the base name of the thumbnail file without its extension
base_name = File.basename(thumb_file, File.extname(thumb_file))
model_file = nil # Initialize model_file to nil
# Loop over the list of extensions
XRForge::MODEL_EXT.each do |ext|
# Construct the filename with the current extension
filename = "#{base_name}#{ext}"
# Check if the file exists
if File.exist?(filename)
XRForge.log("✅ 3D file '#{filename}' detected", logfile)
model_file = filename # Store the found filename
break # Stop the loop once a file is found
else
# Log a message for the file that was not found, but don't stop
XRForge.log("⚠️ 3D file '#{filename}' not detected", logfile)
end
end
# Check if a model file was found after the loop
if model_file
XRForge.log("✅ Final model file: '#{model_file}'", logfile)
else
XRForge.log("❌ No suitable 3D file found for XR Fragments-compatible experience", logfile)
end
# Construct the output filename
output_file = "#{File.basename(model_file, File.extname(model_file))}.blend"
# Execute the system call
puts("assimp", model_file, output_file)
system("assimp", model_file, output_file)
XRForge.log(" ", logfile)
rescue Errno::ENOENT
puts "File #{filename} not found"
rescue JSON::ParserError
puts "Error parsing JSON from #{filename}"
rescue => e
puts "An error occurred: #{e.message}"
end

View file

@ -1 +0,0 @@
../hourly/placeholder.sh

View file

@ -1,3 +0,0 @@
#!/bin/sh
test -f "$1".zip && rm "$1".zip
echo "[cleanup_package.sh] deleting $dir.zip"

View file

@ -1,6 +0,0 @@
#!/bin/sh
echo "$1" | grep datapackage || exit 0 # nothing to do
dir=$(dirname $1)
cd "$dir"
echo "[package_experience.sh] zipping $dir.zip"
zip -r "$dir".zip $dir/*

View file

@ -1 +0,0 @@
inotify_MODIFY

13
manyfold/root/xrforge.rb Normal file
View file

@ -0,0 +1,13 @@
module XRForge
MODEL_EXT = ['.glb', '.gltf', '.blend', '.usdz', '.obj', '.dae']
def self.log(message, filename)
# Append the log entry to the log file
File.open(filename, 'a') do |file|
file.write("#{message}\n")
end
puts("#{message}\n")
end
end

View file

@ -111,8 +111,14 @@ class Components::ModelCard < Components::Base
status_badges @model
end
div class: "col col-auto" do
i class: "bi bi-telephone"
whitespace
link_to "meeting", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/janusxr.html", {
target:"_blank",
}
whitespace
BurgerMenu do
DropdownItem(icon: "app", label: "Open in Godot Web" , path: "/godot/?url="+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/package_godot.zip", aria_label: translate("components.model_card.edit_button.label", name: @model.name), target: "_blank" )
#DropdownItem(icon: "app", label: "Open in Godot Web" , path: "/godot/?url="+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/package_godot.zip", aria_label: translate("components.model_card.edit_button.label", name: @model.name), target: "_blank" )
DropdownItem(icon: "pencil", label: t("components.model_card.edit_button.text"), path: model_path(@model), aria_label: translate("components.model_card.edit_button.label", name: @model.name))
DropdownItem(icon: "trash", label: t("components.model_card.delete_button.text"), path: model_path(@model), method: :delete, aria_label: translate("components.model_card.delete_button.label", name: @model.name), confirm: translate("models.destroy.confirm")) if policy(@model).destroy?

View file

@ -0,0 +1,86 @@
# frozen_string_literal: true
class Components::PreviewFrame < Components::Base
include Phlex::Rails::Helpers::ImageTag
register_value_helper :policy_scope
def initialize(object:)
@object = object
end
def before_template
@file = @object.is_a?(Model) ? @object.preview_file : policy_scope(@object.models).first&.preview_file
end
def view_template
a href: "/view?#{model_model_file_path(@file.model, @file, format: @file.extension)}", target:"_blank" do
if @file
local
elsif @object.remote?
remote
else
empty
end
end
end
private
def local
if @file.is_image?
image model_model_file_path(@file.model, @file, format: @file.extension, derivative: "preview"), @file.name
elsif @file.is_renderable?
div class: "card-img-top #{"sensitive" if needs_hiding?}" do
Renderer file: @file
end
else
empty
end
end
def remote
preview_data = @object.federails_actor&.extensions&.dig("preview")
case preview_data&.dig("type")
when "Image"
image preview_data["url"], preview_data["summary"]
when "Document"
div class: "card-img-top #{"sensitive" if needs_hiding?}" do
iframe(
scrolling: "no",
srcdoc: safe([
"<html><body style=\"margin: 0; padding: 0; aspect-ratio: 1\">",
preview_data["content"],
"</body></html>"
].join),
title: preview_data["summary"]
)
end
else
empty
end
end
def needs_hiding?
return false unless current_user.nil? || current_user.sensitive_content_handling.present?
case @object.class
when Model
@object.sensitive
when Collection
@file.model.sensitive
else
false
end
end
def empty
div class: "preview-empty" do
p { t("components.model_card.no_preview") }
end
end
def image(url, alt)
div class: "card-img-top card-img-top-background", style: "background-image: url(#{url})"
image_tag url, class: "card-img-top image-preview #{"sensitive" if needs_hiding?}", alt: alt, style: "position:absolute; top:0"
end
end

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="<%= I18n.locale %>" data-controller="i18n">
<head>
<title><%= @title || site_name %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= tag.meta name: "csp-nonce", content: content_security_policy_nonce if content_security_policy_nonce %>
<%= favicon_link_tag "roundel.svg" %>
<%= tag.link rel: "apple-touch-icon", href: asset_path("square-180.png") %>
<%= tag.meta name: "apple-mobile-web-app-title", content: site_name %>
<%= javascript_include_tag "application", nonce: true, defer: true %>
<%= stylesheet_link_tag "themes/#{SiteSettings.theme}", nonce: true %>
<%= stylesheet_link_tag "/assets/xrforge.css" %>
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
<%= tag.meta name: "robots", content: @indexing_directives if @indexing_directives.presence %>
<%= yield :head %>
</head>
<body>
<%= skip_link "content", t(".skip_to_content") %>
<%= render "application/navbar" %>
<%= yield :breadcrumbs %>
<main class="container-fluid" id="content">
<div>
<% if notice %>
<p class="alert alert-info">
<%= icon "info-circle-fill", t(".alert.info") %>
<%= notice %>
</p>
<% end %>
<% if alert %>
<p class="alert alert-danger">
<%= icon "x-octagon-fill", t(".alert.danger") %>
<%= alert %>
</p>
<% end %>
</div>
<div class="pt-3">
<%= yield %>
</div>
</main>
<%= render "application/footer" %>
</body>
</html>

View file

@ -59,7 +59,19 @@
<%= @model.federails_actor.short_at_address %>
<%= render Components::CopyButton.new(text: @model.federails_actor.at_address) %>
</small>
<% end %></td>
<% end %>
<label for="toggle_activitypub"><i class="bi bi-info-circle"></i></label>
<div class="toggle-box">
<input type="checkbox" id="toggle_activitypub" hidden>
<div class="hidden-tooltip">
<i class="bi bi-arrow-90deg-up"></i>&nbsp;
<small>
This is the <a href="https://en.wikipedia.org/wiki/Fediverse" target="_blank">fediverse</a> activitypub address of this experience.<br>
Follow updates by copy/pasting it into ActivityPub <a href="https://codeberg.org/fediverse/delightful-fediverse-clients" target="_blank">clients</a>.
</small>
</div>
</div>
</td>
</tr>
<% end %>
<% if @model.creator %>
@ -68,18 +80,87 @@
<td><%= link_to @model.creator.name, @model.creator, itemprop: "author" %></td>
</tr>
<% end %>
<% if ENV['FEDERATE_DRIVE_HOST'].present? %>
<tr>
<td>
<i class="bi bi-file-zip" role="img"></i>
<i class="bi bi-people" role="img"></i>
</td>
<td><%= link_to "zip archive", "/"+@model.library.name+"/"+@model.path.gsub("#","%23")+".zip" %></td>
</tr>
<tr>
<td>
<i class="bi bi-controller" role="img"></i>
<%= link_to "JanusXR Metaverse", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/janusxr.html" %>
<label for="toggle_janusxr"><i class="bi bi-info-circle"></i></label>
<div class="toggle-box">
<input type="checkbox" id="toggle_janusxr" hidden>
<div class="hidden-tooltip">
<i class="bi bi-arrow-90deg-up"></i>&nbsp;
<small>
This is the JanusXR address.<br>
<a href="https://janusxr.org/" target="_blank">JanusXR</a> is an established Metaverse since 2015.<br>
It is Free and Opensource, and allows you to meet others in this experience (avatars, chat and voice etc).
</small>
</div>
</div>
</td>
<td><%= link_to "Godot project", "/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/package_godot.zip" %></td>
</tr>
<tr>
<td>
<i class="bi bi-file-zip" role="img"></i>
</td>
<td><%= link_to "zip archive", "/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/experience.zip" %></td>
</tr>
<tr>
<td>
<i class="bi bi-journal-check" role="img"></i>
</td>
<td>
<%= link_to "build log", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/log.txt", target: "_blank" %>
<label for="toggle_log"><i class="bi bi-info-circle"></i></label>
<div class="toggle-box">
<input type="checkbox" id="toggle_log" hidden>
<div class="hidden-tooltip" style="max-height:400px">
<i class="bi bi-arrow-90deg-up"></i>&nbsp;
<small>
This is the build log of XR Forge.<br>
When you add files, they are processed, validated (for <a href="https://xrfragment.org" target="_blank">XR Fragment</a> compliance).<br>
But also features can be toggled via tags:<br>
<br>
<table class="table">
<tr>
<td>
<a class="badge rounded-pill bg-secondary tag">menu</a>
</td>
<td>
This will generate a navigator-menu <b>into</b> your main 3D file.<br>
The links can be edited <%= link_to "here", edit_model_path(@model) %>
</td>
</tr>
</table>
</small>
</div>
</div>
</td>
</tr>
<tr>
<td>
<i class="bi bi-controller" role="img"></i>
</td>
<td>
<%= link_to "Godot project", ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/godot.zip" %>
<label for="toggle_godot"><i class="bi bi-info-circle"></i></label>
<div class="toggle-box">
<input type="checkbox" id="toggle_godot" hidden>
<div class="hidden-tooltip">
<i class="bi bi-arrow-90deg-up"></i>&nbsp;
<small>
This is a Godot project which wraps your (3D file) experience.<br>
<a href="https://godot.org" target="_blank">Godot</a> is a Free and Opensource Game engine.<br>
The Godot project is basically its own XR Fragment browser (which you can extend).<br><br>
<b>WARNING</b>: use <a href="https://en.wikipedia.org/wiki/Progressive_enhancement" target="_blank">progressive enhancement</a> so your 3D file experience will always run in other <a href="https://xrfragment.org" target="_blank">XR Fragment</a> viewers.
</small>
</div>
</div>
</td>
</tr>
<% end %>
<% if @model.collection %>
<tr>
<td><%= icon "collection", Collection.model_name.human(count: 100) %></td>

View file

@ -0,0 +1,7 @@
# always allow cors so remote XR viewers can load content
Rails.application.config.middleware.insert_after Rack::Head, Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: [:get, :options, :head]
end
end

View file

@ -0,0 +1,44 @@
# this calls the xrforge unix file-hooks in /root/hook.d/experience_updated (but in a safe way)
# why: the database-write are sometimes chatty/duplicated.
# therefore it ratelimits and prevents processing unchanged files.
require 'pp'
require 'digest'
Rails.application.config.to_prepare do
Model # Zeitwerk autoload model
ModelFile
class ModelFile
# The macro is now run within the context of the existing Model class.
after_save :run_cli_hooks
def run_cli_hooks
file = "#{self.model.library.path}/#{self.path_within_library()}"
if File.exist?(file)
cache_key = "ttl:file:cli_hook:#{self.id}#{Digest::MD5.file(file).hexdigest}"
ttl = 60.0 # dont trigger hook twice for the same file within 60 seconds
now = Time.current
# 1. Read the last run time from the shared cache
last_run_time_str = Rails.cache.read(cache_key)
last_run_time = last_run_time_str ? Time.parse(last_run_time_str) : nil
if last_run_time.nil? || (now - last_run_time) > ttl
# 2. Write the new execution time to the shared cache
# Use `write` to set the new time. Caching a string representation is often safer/easier.
Rails.cache.write(cache_key, now.to_s, expires_in: ttl + 1.minute)
puts "[app/config/initializers/xrforge.rb] runnin hook\n"
command = "TS_SLOTS=5 ts /manyfold/cli/manyfold.sh hook experience_updated #{file} &"
system(command)
else
puts "[app/config/initializers/xrforge.rb] skipping hook\n"
end
end
end
end
end

View file

@ -0,0 +1,802 @@
---
en:
activerecord:
attributes:
collection:
ai_indexable: Allow use for AI training
caption: Caption
collection: Parent Collection
indexable: Allow search indexing
models: Experiences
name: Name
notes: Description
creator:
ai_indexable: Allow use for AI training
caption: Tagline
indexable: Allow search indexing
name: Creator Name
notes: Description
slug: Handle
doorkeeper/application:
access_token: Access Token
confidential: Confidential
created_at: Created
name: Name
owner: Owner
redirect_uri: Redirect URI
scopes: Scopes
secret: Client Secret
uid: Client ID
federails/moderation/domain_block:
created_at: Created at
domain: Domain
federails/moderation/report:
content: Comment
created_at: Received at
federails_actor: Reported by
object: Object
library:
caption: Caption
create_path_if_not_on_disk: Auto-create folder
default: Default
icon: Icon
name: Name
notes: Notes
path: Path
s3_access_key_id: Access Key ID
s3_bucket: Bucket Name
s3_endpoint: Endpoint URL
s3_path_style: Use path-style URLs
s3_region: Region
s3_secret_access_key: Secret Access Key
storage_service: Storage Service
tag_regex: Required Tags
link:
url: Link
model:
ai_indexable: Allow use for AI training
caption: Caption
collection: Collection
collection_id: Collection
creator: Creator
creator_id: Creator
images: Images
indexable: Allow search indexing
library_id: Library
license: License
model_files: Files
name: Name
notes: Description
path: Path
preview_file: Preview File
sensitive: Sensitive Content
tags: Tags
model_file:
caption: Caption
digest: Digest
filename: Filename
model_id: Model
notes: Notes
presupported: Presupported
presupported_version: Presupported version
printed: Printed
size: File Size
unsupported_version: Unsupported version
y_up: Y Up
problem:
category: Category
ignored: Hidden
note: Note
problematic_type: Object Type
severity: Severity
user:
approved: Account pending
confirmation_sent_at: Confirmation sent at
confirmation_token: Confirmation token
confirmed_at: Confirmed at
created_at: Created at
current_password: Current password
current_sign_in_at: Current sign in at
current_sign_in_ip: Current sign in IP
email: Email
encrypted_password: Encrypted password
failed_attempts: Failed attempts
last_sign_in_at: Last sign in at
last_sign_in_ip: Last sign in IP
locked_at: Locked at
password: Password
password_confirmation: Confirm password
remember_created_at: Remember created at
remember_me: Remember me
reset_password_sent_at: Reset password sent at
reset_password_token: Reset password token
sign_in_count: Sign in count
unconfirmed_email: Unconfirmed email
unlock_token: Unlock token
updated_at: Updated at
username: Account name
errors:
models:
collection:
attributes:
collection:
private: must be public
creator:
private: must be public
doorkeeper/application:
attributes:
redirect_uri:
forbidden_uri: is forbidden by the server.
fragment_present: cannot contain a fragment.
invalid_uri: must be a valid URI.
relative_uri: must be an absolute URI.
secured_uri: must be an HTTPS/SSL URI.
unspecified_scheme: must specify a scheme.
scopes:
not_match_configured: doesn't match configured on the server.
library:
attributes:
path:
cannot_be_contained: cannot be inside another library
cannot_contain: cannot contain other libraries
non_writable: must be writable
not_found: could not be found on disk
unsafe: cannot be a privileged system path
model:
attributes:
creator:
private: must be public
library:
nested: can't be changed, model contains other models
license:
invalid_spdx: is not a valid license
path:
destination_exists: already exists
nested: can't be changed, model contains other models
model_file:
attributes:
filename:
cannot_change_type: is not the same file type
case_change_only: cannot be a case-only change
presupported_version:
already_presupported: cannot be set on a presupported file
not_supported: is not a presupported file
models:
acts_as_taggable_on/tag:
few: Tags
many: Tags
one: Tag
other: Tags
two: Tags
zero: Tags
collection:
few: Collections
many: Collections
one: Collection
other: Collections
two: Collections
zero: Collections
creator:
few: Creators
many: Creators
one: Creator
other: Creators
two: Creators
zero: Creators
federails/moderation/domain_block:
few: Domain Blocks
many: Domain Blocks
one: Domain Block
other: Domain Blocks
two: Domain Blocks
zero: Domain Blocks
federails/moderation/report:
few: Reports
many: Reports
one: Report
other: Reports
two: Reports
zero: Reports
library:
few: Libraries
many: Libraries
one: Library
other: Libraries
two: Libraries
zero: Libraries
link:
few: Links
many: Links
one: Link
other: Links
two: Links
zero: Links
model:
few: Experiences
many: Experiences
one: Experience
other: Experiences
two: Experiences
zero: Experiences
model_file:
few: Files
many: Files
one: File
other: Files
two: Files
zero: Files
problem:
few: Problems
many: Problems
one: Problem
other: Problems
two: Problems
zero: Problems
user:
few: Accounts
many: Accounts
one: Account
other: Accounts
two: Accounts
zero: Accounts
activity:
index:
description: Entries are discard after %{retention_period}.
message: Message
name: Name
time: When
title: Recent Activity
activity_helper:
status_icon:
completed: Complete
error: Errored
queued: Queued
working: Working
application:
caber_relation_fields:
delete: Delete
permissions:
edit: Can edit
own: Owner (can view, edit, delete, and share)
preview: 'Preview: specific previewable files only'
view: View only
subject:
placeholder: Email address, account name, or role
role:
member: Any logged-in local account
public: Everyone (without login)
you: "(you)"
caber_relations_form:
add: add another permission
permissions: Sharing
demo_mode: This instance is in demo mode. You cannot add or remove models, but you can do everything else.
filters_card:
missing_tags: Missing tags
remove_collection_filter: Remove collection filter
remove_creator_filter: Remove creator filter
remove_library_filter: Remove library filter
remove_missing_tag_filter: Remove missing tag filter
remove_search_filter: Remove search filter
remove_tag_filter: Remove tag filter
search: Search
title: Filters
unknown: Unknown
footer:
about: About this instance
api: Explore our API
by_html: Designed and built by <a href="https://floppy.org.uk" target="_blank" rel="noreferrer">James</a> with help from <a href="https://github.com/manyfold3d/manyfold/graphs/contributors" target="_blank" rel="noreferrer">our contributors</a>.
community: Join the community
instance_heading: Instance Details
issues: Report a problem
open_source_html: <a href="https://github.com/manyfold3d/manyfold" target="_blank" rel="noreferrer">Open Source</a> under the <a href="https://github.com/manyfold3d/manyfold/blob/main/LICENSE.md" target="_blank" rel="noreferrer" rel="license">MIT license</a>.
powered_by_html: Powered by <a href="https://forgejo.isvery.ninja/coderofsalvation/xrforge">XR Forge</a>, <a href="https://manifold.app" target="_blank">Manyfold</a>, <a href="https://xrfragment.org">XR Fragments</a> and <a href="https://nixos.org" target="_blank">NIX</a>
sponsor: Sponsor development
support: Support this instance
version: Version
link_fields:
url:
delete: Delete
placeholder: Any related web page
links_form:
add: add another link
navbar:
account: My Settings
activity: Activity
check_existing: Rescan all models
check_results: Rescan filtered models
home: Homepage
log_in: Sign in
log_out: Sign out
moderator_settings: Moderator Settings
navbar:
toggler:
label: Toggle navigation
scan: Scan
scan_changes: Scan for new files
scanning: Scanning
search: Search
settings: Site Settings
upload: Upload
order_buttons:
sort:
name: Sort by Name
time: Sort by Time
search_error: Error in search syntax. Please check and try again!
tag_list:
unrelated_tag_count:
one: "%{count} unrelated tag hidden"
other: "%{count} unrelated tags hidden"
tagline: Helping you keep track of your 3d print files
tags_card:
skip_tags: Skip tag list
title: xrforge
application_helper:
ai_indexable_select_options:
always_no: Always no
always_yes: Always yes
inherit: Inherit from parent object or default site setting; currently '%{inherited}'
indexable_select_options:
always_no: Always no
always_yes: Always yes
inherit: Inherit from parent object or default site setting; currently '%{inherited}'
'no': 'No'
'yes': 'Yes'
components:
altcha_widget:
help: privacy-friendly spam protection by ALTCHA
copy_button:
copy: Copy to Clipboard
display_user_quota:
request_increase: To request a quota increase, contact your site administrator.
download_button:
download:
missing: Request download
preparing: Preparing download, please wait
ready: Ready to download
file_type: "%{type} Files Only"
label: Download All
menu_header: Download Options
supported: Supported Files Only
unsupported: Unsupported Files Only
follow_button:
follow: Follow %{name}
pending: Requested
unfollow: Unfollow %{name}
link_list:
sync: Synchronize
modal:
close: Close
model_card:
delete_button:
label: Delete model %{name}
text: Delete
edit_button:
label: Edit model %{name}
text: Edit
no_preview: No preview available
open_button:
label: Open model %{name}
text: Open
search_help:
boolean: Use "or" to find models that match any of the terms.
federation: Search for any Fediverse username to follow it.
filename: You can search within filenames by explicitly specifying the field.
intro: 'Find what you need with our powerful search syntax:'
more_details_html: For more information, read the full documentation for <a href="https://github.com/wvanbergen/scoped_search/wiki/Query-language">scoped_search's query language</a>.
negation: To exclude terms, use "not", "!", or "-".
parentheses: Group terms with parentheses for more complex logic combinations.
path: Search within model folder paths by explicitly specifying it; use `~` for a partial match.
quotes: To look for multiple words in a single term, use quotes; only models with the exact text will be shown.
simple: By default, search will find models that match all terms.
specific_fields: You can look for terms in a few specific fields. Use "~" to match part of the field; "=" will try to match the whole thing. Model descriptions and library names are only searched if you explicitly specify the fields.
tag: Finds models with a specific tag
title: Search Syntax
unset: Use "set?" to query if a particular field is set, and add "not" to find the opposite.
without_tag: Use "!=" to find models without a certain tag
concerns:
linkable:
sync:
bad_request: 'Synchronization failed: missing link ID'
success: Synchronization requested successfully
doorkeeper:
applications:
buttons:
authorize: Authorize
cancel: Cancel
destroy: Destroy
edit: Edit
submit: Submit
confirmations:
destroy: Are you sure?
edit:
title: Edit application
form:
error: Whoops! Check your form for possible errors
help:
blank_redirect_uri: Leave it blank if you configured your provider to use Client Credentials, Resource Owner Password Credentials or any other grant type that doesn't require redirect URI.
confidential: Application will be used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential.
redirect_uri: Use one line per URI
scopes: Separate scopes with spaces. Leave blank to use the default scopes.
index:
actions: Actions
callback_url: Callback URL
confidential: Confidential?
confidentiality:
'no': 'No'
'yes': 'Yes'
name: Name
new: New Application
title: Your applications
new:
title: New Application
show:
actions: Actions
application_id: UID
callback_urls: Callback urls
confidential: Confidential
not_defined: Not defined
scopes: Scopes
secret: Secret
secret_hashed: Secret hashed
title: 'Application: %{name}'
authorizations:
buttons:
authorize: Authorize
deny: Deny
error:
title: An error has occurred
form_post:
title: Submit this form
new:
able_to: This application will be able to
prompt: Authorize %{client_name} to use your account?
title: Authorization required
show:
title: Authorization code
authorized_applications:
buttons:
revoke: Revoke
confirmations:
revoke: Are you sure?
index:
application: Application
created_at: Created At
date_format: "%Y-%m-%d %H:%M:%S"
title: Your authorized applications
errors:
messages:
access_denied: The resource owner or authorization server denied the request.
admin_authenticator_not_configured: Access to admin panel is forbidden due to Doorkeeper.configure.admin_authenticator being unconfigured.
credential_flow_not_configured: Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured.
forbidden_token:
missing_scope: Access to this resource requires scope "%{oauth_scopes}".
invalid_client: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
invalid_code_challenge_method:
one: The code_challenge_method must be %{challenge_methods}.
other: The code_challenge_method must be one of %{challenge_methods}.
zero: The authorization server does not support PKCE as there are no accepted code_challenge_method values.
invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.
invalid_redirect_uri: The requested redirect uri is malformed or doesn't match client redirect URI.
invalid_request:
invalid_code_challenge: Code challenge is required.
missing_param: 'Missing required parameter: %{value}.'
request_not_authorized: Request need to be authorized. Required parameter for authorizing request is missing or invalid.
unknown: The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.
invalid_scope: The requested scope is invalid, unknown, or malformed.
invalid_token:
expired: The access token expired
revoked: The access token was revoked
unknown: The access token is invalid
resource_owner_authenticator_not_configured: Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfigured.
revoke:
unauthorized: You are not authorized to revoke this token
server_error: The authorization server encountered an unexpected condition which prevented it from fulfilling the request.
temporarily_unavailable: The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.
unauthorized_client: The client is not authorized to perform this request using this method.
unsupported_grant_type: The authorization grant type is not supported by the authorization server.
unsupported_response_mode: The authorization server does not support this response mode.
unsupported_response_type: The authorization server does not support this response type.
flash:
applications:
create:
notice: Application created.
destroy:
notice: Application deleted.
update:
notice: Application updated.
authorized_applications:
destroy:
notice: Application revoked.
layouts:
admin:
nav:
applications: Applications
home: Home
oauth2_provider: OAuth2 Provider
title: Doorkeeper
application:
title: OAuth authorization required
pre_authorization:
status: Pre-authorization
doorkeeper_applications:
create:
failure: An error occurred, and the application could not be created.
success: Application created successfully.
destroy:
success: Application deleted successfully.
edit:
title: Edit application
form:
confidential:
help: A confidential application can hold secrets securely (e.g. a web server backend, or machine-to-machine script).
redirect_uri:
help: Use "urn:ietf:wg:oauth:2.0:oob" if your application does not need a redirect URI (e.g. machine-to-machine apps).
scopes:
label: Scopes
submit: Save application
index:
description: OAuth applications allow you to access Manyfold resources from other services via our API.
new: New application
title: OAuth Applications
new:
title: New application
show:
destroy: Delete
edit: Edit
title: Application details
update:
failure: An error occurred, and the application could not be saved.
success: Application saved successfully.
errors:
messages:
already_confirmed: was already confirmed, please try signing in
confirmation_period_expired: needs to be confirmed within %{period}, please request a new one
expired: has expired, please request a new one
not_found: not found
not_locked: was not locked
not_saved:
one: '1 error prohibited this %{resource} from being saved:'
other: "%{count} errors prohibited this %{resource} from being saved:"
weak_password: not strong enough. Consider adding a number, symbols or more letters to make it stronger.
follows:
actor_table:
actions: Actions
address: Fediverse Address
name: Name
non_manyfold_account: This is not a Manyfold account; you can follow it, but probably nothing interesting will happen, at least for now.
follow_remote_actor:
followed: Followed %{actor} successfully
index:
followers: Followers
following: Following
title: Connections
new:
help: You can follow public creators, collections or models on another Manyfold server, in fact any public account in the Fediverse! Just enter the account name in the search box!
no_results: Sorry, couldn't find anything for "%{query}". Is it a valid ActivityPub account or URL?
results: Search Results
title: Follow the Fediverse
remote_follow:
help: You don't need an account on this server to follow %{name}; enter your own account name here, and we'll send you home to complete the process.
no_results_html: We couldn't find your home account; did you enter it correctly?
placeholder: Your Fediverse handle, e.g. @manyfold@3dp.chat
submit: Take me home
title: Follow %{name}
search_form:
placeholder: Enter a Fediverse account or URL, e.g. @admin@try.manyfold.app
submit: Search
unfollow_remote_actor:
unfollowed: Unfollowed %{actor}
general:
delete: Delete
download: Download
edit: Edit
expand: Expand
followers:
few: "%{count} Followers"
many: "%{count} Followers"
one: "%{count} Follower"
other: "%{count} Followers"
two: "%{count} Followers"
zero: "%{count} Followers"
menu: Menu
new: New
private: Private
public: Publicly visible
report: Report %{type}
save: Save
shared: Shared with local users
view: View
home:
activity:
created: added %{time} ago
updated: updated %{time} ago
browsing:
content: You can explore models by clicking the links in the menu bar; browse a complete list and filter by tag, or browse by collection or creator. Alternatively just type into the search box to find what you want!
manual_link: User guide
more_access: Currently you have read-only access to this instance; to get more permissions, such as uploading, contact your instance administrator.
title: Browsing
federation:
content_html: This Manyfold instance is part of the <a href="https://jointhefediverse.net">Fediverse</a>, a network of social media sites that all work together. That means that if you have an account here, you can follow content on other Manyfold instances, or people can follow your content from other platforms like Mastodon.
creator_handle_html: 'The fediverse handle of your creator profile is: <code>%{handle}</code>.'
following: If you know the handle of someone or something you want to follow, just enter it in the search box; otherwise, enter your personal handle above when you follow something on another instance.
handle_html: 'Your fediverse handle is: <code>%{handle}</code>'
title: Federation
index:
no_activities: There are no activities to display for now.
open_search_help: Search syntax
recent_activity: Recent Activity
search:
placeholder: What are you looking for?
submit: Search
publishing:
content: You can publish content publicly by giving "view" or "preview" permission to the "public" role on the item's edit page. Creators for public models will automatically be made public, but collections need to be expicitly published if you want them to be visible.
existing_creator:
button: Edit your creator profile
content: 'If you''re publishing your own work, you will probably want to customise your creator profile:'
new_creator:
button: Set up a new creator profile
content: 'If you''re publishing your own work, you will probably want to set up your own creator profile:'
title: Publishing
support:
content: Manyfold instances are run by people like you! If you find this instance useful, you can help keep it running by clicking below.
manyfold_html: To support development of the Manyfold software itself, you can do so at <a href="https://opencollective.com/manyfold">OpenCollective</a>.
support_link: Support this instance
title: Support
uploading:
how_to_upload: You can add models by clicking the upload button in the menu bar. To upload lots of files as a single model, compress them in a single archive file (e.g. ZIP or RAR).
permissions:
edit: You can grant additional permissions on the item's edit page.
member: By default, uploaded content will be visible to any local logged-in user.
private: By default, uploaded content will not be visible to any other users.
quota: You can upload up to %{quota} of content, and you can always view your current quota usage on your settings page.
title: Uploading
upload: Upload
welcome:
lead: This site is running Manyfold, software for managing and sharing 3D models; here's a quick guide...
title: Welcome to %{site_name}!
imports:
create:
success: Imported requested; the results should appear shortly.
new:
description: From some sites, Manyfold can download models for you with just a link!
heading: Import from a link
import: Import this link
import_type_html: "<code>%{url}</code> will be added as a new %{object_type}. The following data can be imported automatically:"
jobs:
activity:
collection_published:
comment: A new collection of 3D models, ["%{name}"](%{url}), was just published!
model_collected:
comment: '["%{model_name}"](%{model_url}) was just added to the ["%{collection_name}"](%{collection_url}) collection.'
model_published:
comment: A new 3D model, ["%{name}"](%{url}), was just published!
updated_model:
comment: The 3D model ["%{name}"](%{url}), was just updated!
analysis:
analyse_model_file:
detect_duplicates: Detecting duplicate files
detect_ineffiency: Detecting inefficient formats
file_statistics: Calculating file statistics
matching: Matching supported files
file_conversion:
exporting: Exporting new file
loading_mesh: Loading mesh
geometric_analysis:
direction_check: Checking surface orientation
loading_mesh: Loading mesh
manifold_check: Checking that mesh is manifold
scan:
detect_filesystem_changes:
building_filename_list: Building file list
building_folder_list: Building changed folder list
creating_models: Creating models
kaminari:
first_page:
label: Go to first page
last_page:
label: Go to last page
next_page:
label: Go to next page
page:
current_page: Current page
label: Go to page %{page}
paginator:
label: Page navigation
prev_page:
label: Go to previous page
layouts:
application:
alert:
danger: Danger
info: Info
skip_to_content: Skip to main content
card_list_page:
actions_heading: Actions
settings:
activeadmin: Advanced Administration
appearance: Appearance
downloads: Downloads
libraries: Libraries
moderation_settings_title: Moderation Settings
organization: Organization
performance: Performance Dashboard
pghero: PgHero
sidekiq: Sidekiq
site_settings_title: Site Settings
tools_heading: Advanced Tools
licenses:
0BSD: BSD Zero Clause License
CC-BY-40: Creative Commons Attribution
CC-BY-NC-40: Creative Commons Attribution NonCommercial
CC-BY-NC-ND-40: Creative Commons Attribution NonCommercial NoDerivatives
CC-BY-NC-SA-40: Creative Commons Attribution NonCommercial ShareAlike
CC-BY-ND-40: Creative Commons Attribution NoDerivatives
CC-BY-SA-40: Creative Commons Attribution ShareAlike
CC-PDDC: Creative Commons Public Domain Declaration
CC0-10: Creative Commons Zero
GPL-20-only: GNU General Public License v2.0
GPL-30-only: GNU General Public License v3.0
LGPL-20-only: GNU Lesser General Public License v2
LGPL-30-only: GNU Lesser General Public License v3
LicenseRef-Commercial: Commercial; private use only
MIT: MIT
moderator_mailer:
new_approval:
greeting: Hi!
message: Someone new has signed up for an account, and requires approval. Approve the account at %{link}
subject: New account needs approval
new_report:
greeting: Hi!
message: Someone has reported content which needs moderations. Review the report at %{link}
subject: New report received
renderer:
errors:
canvas: 'Could not find #webgl canvas!'
load: Load Error
webglrenderer: Could not create renderer!
load: Load
processing: Reticulating splines...
reports:
create:
success: Report submitted. Thank you!
new:
description: If this item violates any laws or server policies, you can report it to our moderators. Add a comment to let us know why!
submit: Send report
title: 'Report %{type}: "%{name}"'
scans:
create:
success: Scan started.
security:
running_as_root_html: Manyfold is running as root, which is a security risk. Run as a different system user by setting the <code>PUID</code> and <code>PGID</code> environment variables. See <a href='https://manyfold.app/sysadmin/configuration.html#required'>the configuration documentation</a> for details.
sites:
cgtrader: CGTrader
comicsgamesandthings: Comics, Games, and Things
cults3d: Cults3D
github: GitHub
makerworld: MakerWorld
manyfold: Manyfold
myminifactory: MyMiniFactory
printables: Printables
thangs: Thangs
theminiindex: The Mini Index
thingiverse: Thingiverse
yeggi: yeggi
user_mailer:
account_approved:
greeting: Hi!
message: Your account has been approved; you may now sign in at %{link}
subject: Account approved
test_email:
subject: Test email
test_email_message: Test email
users:
registrations:
create:
altcha_failed: ALTCHA verification failed
views:
pagination:
first: "« First"
last: Last »
next: Next
previous: " Prev"
truncate: "…"

View file

@ -0,0 +1,105 @@
---
en:
models:
bulk_edit:
description: 'Select models to change:'
form_subtitle: 'Select changes to make:'
merge: Merge selected models
needs_organizing: Needs organizing
remove_tags: Remove tags
select: Select model '%{name}'
select_all: Select all models
submit: Update Selected Experiences
title: Bulk Edit Experiences
update_all: Update All %{count} Experiences
bulk_fields:
add_tags: Add tags
bulk_update:
success: Experiences updated successfully.
configure_merge:
common_root:
description: The models will be combined into a single one in the shared root folder
title: New model in common root folder
description: Select one of the models to merge the others into, or create a new one.
heading: Merge models
new_model:
description: A new model will be created from the combined data, and automatically organised on disk.
title: New model
create:
success: File(s) uploaded successfully.
destroy:
confirm: This will delete associated files if they exist on disk. Are you sure you want to continue?
success: Model deleted!
file:
delete: Delete file
edit: Edit file
open_button:
label: View details for %{name}
text: Open
presupported: Presupported Version
set_as_preview: Set as preview
form:
notes:
help_html: You can use <a href="https://www.markdownguide.org/cheat-sheet/" target="markdown">Markdown</a>.
preview_file:
help: The file displayed as a model preview in library pages
tags: Tags
general:
edit: Edit Model
image_carousel:
next: Next
play_pause: Play or pause images
previous: Previous
select_slide: Choose image to display
slide_label: "%{name} (%{index} of %{count})"
list:
bulk_edit: Edit All Experiences
no_results_html: Sorry, we couldn't find anything to show you! Try changing your filters or search terms, or uploading some models.
no_results_signed_out_html: Sorry, we couldn't find anything to show you! There might be more to see if you <a href="%{link}">sign in</a>.
skip_models: Skip model list
merge:
success: Experiences merged successfully.
new:
description: Add new models by uploading files! If you upload a compressed archive, it will be extracted and become a single model containing all the files. If you upload individual files, they will each become a separate model.
files:
label: Select Files
free_space: "(%{available} free)"
library:
help: The library to upload to.
submit: Create models
title: Upload
problem:
merge_all: Merge all
scan:
success: Model scan started
show:
download_preparing: Download is being prepared, please wait.
download_requested: Download requested and will be ready soon, please wait.
files: Files
files_card:
bulk_edit: Edit all files
heading: Files
followers: Followers
license: License
merge:
heading: Merge
warning: Merging moves all files from this model to the target, and removes this model. File metadata is preserved, but any model metadata will be lost!
with: Merge with
model_details: Model Details
organize:
button_text: Organize files
confirm:
are_you_sure: Are you sure you want to do this?
'no': No, cancel
summary_html: The folder and files that make up this model will be moved from:<br> <code>%{from}</code><br> to<br> <code>%{to}</code>
'yes': Yes, move the files
path: Path
preview: This is just a preview of the complete model, which contains %{count} more files. Contact the model owner to get full access.
rescan: Rescan files
search: Search the Internet for models with this name
submit: Upload Files
tags: Tags
upload_card:
heading: Upload
update:
success: Model details saved.

View file

@ -0,0 +1,23 @@
#sidebar td > label > i {
opacity:0.4;
}
#toggle:checked + .detail-tooltip {
display: block;
}
.hidden-tooltip {
display: none;
margin-top:7px;
max-height: 230px;
overflow-y:scroll;
background: var(--bs-body-bg);
padding: 12px;
border-radius: 6px;
}
/* Show the tooltip when the corresponding checkbox is checked */
input[type="checkbox"]:checked + .hidden-tooltip {
display: block;
}

File diff suppressed because one or more lines are too long

View file

@ -22,14 +22,36 @@ let
# generate the reproducable blob below via:
# $ nix-shell -p nix-prefetch-docker --run 'nix-prefetch-docker ghcr.io/manyfold3d/manyfold-solo 0.120.0'
#manyfoldImage = pkgs.dockerTools.pullImage {
# imageName = "ghcr.io/manyfold3d/manyfold-solo";
# imageDigest = "sha256:6250e562a05bf9476ddcfdc897a7b03cbf2090c727d9fe051afde486579b54a6";
# sha256 = "sha256-V5y1N0l4JQjVDQbboGYX15MQaImXtP/HpNwPjDtxeJQ=";
# finalImageName = "ghcr.io/manyfold3d/manyfold-solo";
# finalImageTag = "0.121.0";
#};
manyfoldImage = pkgs.dockerTools.pullImage {
imageName = "ghcr.io/manyfold3d/manyfold-solo";
imageDigest = "sha256:6250e562a05bf9476ddcfdc897a7b03cbf2090c727d9fe051afde486579b54a6";
sha256 = "sha256-V5y1N0l4JQjVDQbboGYX15MQaImXtP/HpNwPjDtxeJQ=";
imageDigest = "sha256:465399a2d296034ef84dba18a13744b567694c652387bd17fe97d51c672d1fa9";
hash = "sha256-j7YSUGRFUDh6FJ1CrIQEzGU/0B8uPO8y1kd9lYLad4w=";
finalImageName = "ghcr.io/manyfold3d/manyfold-solo";
finalImageTag = "0.121.0";
finalImageTag = "latest";
};
# generate the reproducable blob below via:
# $ nix-shell -p nix-prefetch-github --command 'nix-prefetch-github assimp assimp --rev e778c84cd62bc8b38d8e491ad3d2c27cb8ed37d5'
assimpSrc = pkgs.fetchFromGitHub {
"owner" = "assimp";
"repo" = "assimp";
"rev" = "e778c84cd62bc8b38d8e491ad3d2c27cb8ed37d5";
"hash" = "sha256-ja5pFwpnzLT2MDIR8ISwC6+eA5UXyqRZW2CMCCrF1Q0=";
};
myAssimp = pkgs.pkgsStatic.assimp.overrideAttrs (oldAttrs: {
inherit assimpSrc; # Set the source to the fetched commit
src = assimpSrc;
});
in
rec
{
@ -44,7 +66,7 @@ rec
# add nix pkgs + local files
contents = pkgs.buildEnv {
name = "image-root";
pathsToLink = ["/manyfold" "/bin"];
pathsToLink = ["/manyfold" "/bin" ];
paths = [
pkgs.pkgsStatic.rsync
pkgs.pkgsStatic.sqlite
@ -54,6 +76,7 @@ rec
pkgs.pkgsStatic.inotify-tools # inotifywait e.g.
pkgs.pkgsStatic.zip # inotifywait e.g.
pkgs.pkgsStatic.ts # job management
myAssimp # cli 3D editing/conversion
./..
];
};

View file

@ -55,6 +55,11 @@
echo " $ # copy image to other server
echo " $ docker save xrforge | bzip2 | ssh user@host docker load"
echo ""
echo "Development:"
echo ""
echo "" $ cd xrforge-webxr && bun run build && cp dist/xrforge.html ../manyfold/usr/src/app/public/view/index.html
echo "" $ manyfold/cli/manyfold.sh run -e DEV=1 -v ./manyfold/usr/src/app/public/view:/usr/src/app/public/view
echo ""
'';
};