mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Implemented Visitor View -- kinda betaish still
This commit is contained in:
		@@ -48,6 +48,19 @@
 | 
			
		||||
                Enable
 | 
			
		||||
              </label>
 | 
			
		||||
            </div>
 | 
			
		||||
            
 | 
			
		||||
            <br>
 | 
			
		||||
 | 
			
		||||
            <p class="flow-text">Toggle Visitor Mode</p>
 | 
			
		||||
            <p>Visitors are able to view the channels that @everyone has access to. However, they are not able to send messages until they login using the usual methods.</p>
 | 
			
		||||
            <div class="switch">
 | 
			
		||||
              <label>
 | 
			
		||||
                Disable
 | 
			
		||||
                <input type="checkbox" id="visitor_view" name="visitor_view" {% if guild['visitor_view'] %}checked{% endif %}  >
 | 
			
		||||
                <span class="lever"></span>
 | 
			
		||||
                Enable
 | 
			
		||||
              </label>
 | 
			
		||||
            </div>
 | 
			
		||||
 | 
			
		||||
            <br>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -151,7 +151,10 @@
 | 
			
		||||
          <div class="left"><img id="currentuserimage" src="" class="circle left currentuserimage" style="display: none;"></div>
 | 
			
		||||
          <div id="currentusername" class="currentusername left"><span id="curuser_name">Titan</span><span id="curuser_discrim">#0001</span></div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div id="messageboxouter" class="input-field inline"><textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea" rows="1"></textarea></div>
 | 
			
		||||
        <div id="messageboxouter" class="input-field inline">
 | 
			
		||||
          <textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea" rows="1"></textarea>
 | 
			
		||||
          <span id="visitor_mode_message" style="display:none;">Please login to post a message. <a id="visitor_login_btn" class="waves-effect waves-light btn">Login</a></span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </footer>
 | 
			
		||||
 | 
			
		||||
@@ -188,6 +191,7 @@
 | 
			
		||||
    <script>
 | 
			
		||||
        const guild_id = "{{ guild_id }}";
 | 
			
		||||
        const bot_client_id = "{{ client_id }}";
 | 
			
		||||
        const visitors_enabled = {% if visitors_enabled %}true{% else %}false{% endif %};
 | 
			
		||||
    </script>
 | 
			
		||||
 | 
			
		||||
    <script type="text/javascript" src="{{ url_for('static', filename='js/embed.js') }}"></script>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user