added singlemode tag feature
This commit is contained in:
parent
7760fd3f96
commit
37ab0ced6f
7 changed files with 24 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
cd "$(dirname $1)"
|
||||
dir="$(dirname $1)"
|
||||
cd "$dir"
|
||||
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
|
||||
cd /usr/src/app
|
||||
echo "Model.find($id).add_new_files_later()" | /usr/src/app/bin/rails console
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ begin
|
|||
# tag it!
|
||||
if ! data['keywords'].include?('janusxr')
|
||||
data['keywords'].push('janusxr')
|
||||
File.write(file_path, JSON.pretty_generate(data) )
|
||||
File.write("datapackage.json", JSON.pretty_generate(data) )
|
||||
end
|
||||
|
||||
rescue Errno::ENOENT
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ begin
|
|||
# tag it!
|
||||
if ! data['keywords'].include?('mml')
|
||||
data['keywords'].push('mml')
|
||||
File.write(file_path, JSON.pretty_generate(data) )
|
||||
File.write("datapackage.json", JSON.pretty_generate(data) )
|
||||
end
|
||||
|
||||
rescue Errno::ENOENT
|
||||
|
|
|
|||
|
|
@ -108,9 +108,12 @@ class Components::ModelCard < Components::Base
|
|||
div class: "col" do
|
||||
#open_button
|
||||
#whitespace
|
||||
a alt: "start a meeting at this location", href: ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/janusxr.html", target: "_blank", class: "btn btn-secondary btn-sm" do
|
||||
i class: "bi bi-telephone"
|
||||
end
|
||||
if ! @model.tags.where(name: "singleuser" ).any?
|
||||
a alt: "start a meeting at this location", href: ENV['FEDERATE_DRIVE_HOST']+"/"+@model.library.name+"/"+@model.path.gsub("#","%23")+"/.xrforge/janusxr.html", target: "_blank", class: "btn btn-secondary btn-sm" do
|
||||
i class: "bi bi-telephone"
|
||||
img src: "/assets/janusxr.svg", style: "width: 16px; margin-left: 7px; transform: translate(0px,-2px);"
|
||||
end
|
||||
end
|
||||
whitespace
|
||||
status_badges @model
|
||||
end
|
||||
|
|
|
|||
|
|
@ -29,4 +29,13 @@
|
|||
Metaverse Markup Language (<a href="https://mml.io" target="_blank">MML</a>) is an open markup language used to define experiences.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="badge rounded-pill bg-secondary tag">singleuser</a>
|
||||
</td>
|
||||
<td>
|
||||
This disables multiuser mode (the <a alt="start a meeting at this location" href="#" class="btn btn-secondary btn-sm"><i class="bi bi-telephone"></i></a> button).<br>
|
||||
Set this tag for experiences (meditation, personal productivity space) which are better off without multiple users.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
<% if @model.tags.where(name: "janusxr" ).any? %>
|
||||
<tr>
|
||||
<td>
|
||||
<i class="bi bi-eye-fill" role="img"></i>
|
||||
<img src="/assets/janusxr.svg" style="width: 16px; transform: translate(0px,-2px);">
|
||||
</td>
|
||||
<td>
|
||||
<%
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
<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>
|
||||
<% render 'models/tags_info' %>
|
||||
<%= render 'models/tags_info' %>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
<div class="hidden-tooltip" style="max-height:400px">
|
||||
<i class="bi bi-arrow-90deg-up"></i>
|
||||
<small>
|
||||
<% render 'models/tags_info' %>
|
||||
<%= render 'models/tags_info' %>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue