mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 15:31:16 +00:00
remove old files
This commit is contained in:
parent
a1f9bf60fb
commit
de7ae2203f
12 changed files with 0 additions and 1232 deletions
|
|
@ -1,96 +0,0 @@
|
|||
http = require 'http'
|
||||
path = require 'path'
|
||||
express = require 'express'
|
||||
gzippo = require 'gzippo'
|
||||
derby = require 'derby'
|
||||
racer = require 'racer'
|
||||
auth = require 'derby-auth'
|
||||
app = require '../app'
|
||||
serverError = require './serverError'
|
||||
MongoStore = require('connect-mongo')(express)
|
||||
priv = require './private'
|
||||
habitrpgStore = require './store'
|
||||
middleware = require './middleware'
|
||||
|
||||
## RACER CONFIGURATION ##
|
||||
|
||||
#racer.io.set('transports', ['xhr-polling'])
|
||||
racer.ioClient.set('reconnection limit', 300000) # max reconect timeout to 5 minutes
|
||||
racer.set('bundleTimeout', 40000)
|
||||
#unless process.env.NODE_ENV == 'production'
|
||||
# racer.use(racer.logPlugin)
|
||||
# derby.use(derby.logPlugin)
|
||||
|
||||
# Infinite stack trace
|
||||
Error.stackTraceLimit = Infinity if process.env.NODE_ENV is 'development'
|
||||
|
||||
## SERVER CONFIGURATION ##
|
||||
|
||||
expressApp = express()
|
||||
server = http.createServer expressApp
|
||||
module.exports = server
|
||||
|
||||
derby.use require('racer-db-mongo')
|
||||
module.exports.habitStore = store = derby.createStore
|
||||
db: {type: 'Mongo', uri: process.env.NODE_DB_URI, safe:true}
|
||||
listen: server
|
||||
|
||||
ONE_YEAR = 1000 * 60 * 60 * 24 * 365
|
||||
TWO_WEEKS = 1000 * 60 * 60 * 24 * 14
|
||||
root = path.dirname path.dirname __dirname
|
||||
publicPath = path.join root, 'public'
|
||||
|
||||
# Authentication setup
|
||||
strategies =
|
||||
facebook:
|
||||
strategy: require("passport-facebook").Strategy
|
||||
conf:
|
||||
clientID: process.env.FACEBOOK_KEY
|
||||
clientSecret: process.env.FACEBOOK_SECRET
|
||||
options =
|
||||
domain: process.env.BASE_URL || 'http://localhost:3000'
|
||||
allowPurl: true
|
||||
schema: require('../app/character').newUserObject()
|
||||
|
||||
# This has to happen before our middleware stuff
|
||||
auth.store(store, habitrpgStore.customAccessControl)
|
||||
|
||||
mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
|
||||
expressApp
|
||||
.use(middleware.allowCrossDomain)
|
||||
.use(express.favicon("#{publicPath}/favicon.ico"))
|
||||
# Gzip static files and serve from memory
|
||||
.use(gzippo.staticGzip(publicPath, maxAge: ONE_YEAR))
|
||||
# Gzip dynamically rendered content
|
||||
.use(express.compress())
|
||||
.use(express.bodyParser())
|
||||
.use(express.methodOverride())
|
||||
# Uncomment and supply secret to add Derby session handling
|
||||
# Derby session middleware creates req.session and socket.io sessions
|
||||
.use(express.cookieParser())
|
||||
.use(store.sessionMiddleware
|
||||
secret: process.env.SESSION_SECRET || 'YOUR SECRET HERE'
|
||||
cookie: { maxAge: TWO_WEEKS } # defaults to 2 weeks? aka, can delete this line?
|
||||
store: mongo_store
|
||||
)
|
||||
# Adds req.getModel method
|
||||
.use(store.modelMiddleware())
|
||||
# API should be hit before all other routes
|
||||
.use('/api/v1', require('./api').middleware)
|
||||
.use(require('./deprecated').middleware)
|
||||
# Show splash page for newcomers
|
||||
.use(middleware.splash)
|
||||
.use(priv.middleware)
|
||||
.use(middleware.view)
|
||||
.use(auth.middleware(strategies, options))
|
||||
# Creates an express middleware from the app's routes
|
||||
.use(app.router())
|
||||
.use(require('./static').middleware)
|
||||
.use(expressApp.router)
|
||||
.use(serverError(root))
|
||||
|
||||
priv.routes(expressApp)
|
||||
|
||||
# Errors
|
||||
expressApp.all '*', (req) ->
|
||||
throw "404: #{req.url}"
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
splash = (req, res, next) ->
|
||||
isStatic = req.url.split('/')[1] is 'static'
|
||||
unless req.query?.play? or req.getModel().get('_userId') or isStatic
|
||||
res.redirect('/static/front')
|
||||
else
|
||||
next()
|
||||
|
||||
view = (req, res, next) ->
|
||||
model = req.getModel()
|
||||
## Set _mobileDevice to true or false so view can exclude portions from mobile device
|
||||
model.set '_mobileDevice', /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(req.header 'User-Agent')
|
||||
model.set '_nodeEnv', model.flags.nodeEnv
|
||||
next()
|
||||
|
||||
#CORS middleware
|
||||
allowCrossDomain = (req, res, next) ->
|
||||
res.header "Access-Control-Allow-Origin", (req.headers.origin || "*")
|
||||
res.header "Access-Control-Allow-Methods", "OPTIONS,GET,POST,PUT,HEAD,DELETE"
|
||||
res.header "Access-Control-Allow-Headers", "Content-Type,Accept,Content-Encoding,X-Requested-With,x-api-user,x-api-key"
|
||||
|
||||
# wtf is this for?
|
||||
if req.method is 'OPTIONS'
|
||||
res.send(200);
|
||||
else
|
||||
next()
|
||||
|
||||
module.exports = { splash, view, allowCrossDomain }
|
||||
|
|
@ -1,263 +0,0 @@
|
|||
<modals:>
|
||||
{{#each _partyMembers as :profile}}
|
||||
<app:modals:modal modalId="avatar-modal-{{:profile.id}}">
|
||||
<app:avatar:profile profile={{:profile}} />
|
||||
<@footer>
|
||||
<button data-dismiss="modal" class="btn btn-success">{{t("ok")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
{{/}}
|
||||
|
||||
<avatar:>
|
||||
<figure class="herobox"
|
||||
data-name="{username(@profile.auth, @profile.profile.name)} - lvl {@profile.stats.lvl}"
|
||||
data-level="{@profile.stats.lvl}"
|
||||
data-checkpet="{#if @profile.items.pet}hasPet{/}"
|
||||
data-checkuser="{{#if @main}}isUser{{/}}"
|
||||
data-uid="{{@profile.id}}" x-bind="click:clickAvatar"
|
||||
rel="popover" data-placement="bottom" data-trigger="hover" data-html="true" data-content="{{#unless @main}}
|
||||
<div>
|
||||
<div class='progress progress-danger' style='height:5px;'>
|
||||
<div class='bar' style='height: 5px; width: {percent(@profile.stats.hp, 50)}%;'></div>
|
||||
</div>
|
||||
<div class='progress progress-warning' style='height:5px;'>
|
||||
<div class='bar' style='height: 5px; width: {percent(@profile.stats.exp, tnl(@profile.stats.lvl))}%;'></div>
|
||||
</div>
|
||||
<div>Level: {@profile.stats.lvl}</div>
|
||||
<div>GP: {floor(@profile.stats.gp)}</div>
|
||||
<div>{count(@profile.items.pets)} / 90 Pets Found</div>
|
||||
</div>
|
||||
{{/}}">
|
||||
<div class='character-sprites'>
|
||||
{#with @profile.preferences as :p}
|
||||
<span class='{#if @profile.flags.rest}zzz{/}'></span>
|
||||
<span class='{:p.gender}_skin_{:p.skin}'></span>
|
||||
<span class='{:p.gender}_hair_{:p.hair}'></span>
|
||||
<span class="{equipped('armor', @profile.items.armor, @profile.preferences, @profile.backer.tier)}"></span>
|
||||
{#if :p.showHelm}
|
||||
<span class="{equipped('head', @profile.items.head, @profile.preferences, @profile.backer.tier)}"></span>
|
||||
{else}
|
||||
<span class="{:p.gender}_head_0"></span>
|
||||
{/}
|
||||
<span class="{equipped('shield', @profile.items.shield, @profile.preferences, @profile.backer.tier)}"></span>
|
||||
<span class="{equipped('weapon', @profile.items.weapon, @profile.preferences, @profile.backer.tier)}"></span>
|
||||
{/}
|
||||
{#if and(@profile.items.currentPet, not(@minimal))}
|
||||
<span class="Pet-{@profile.items.currentPet.name}-{@profile.items.currentPet.modifier} current-pet" ></span>
|
||||
{/}
|
||||
</div>
|
||||
</figure>
|
||||
|
||||
<profile-stats:>
|
||||
<h3>{{t("items")}}</h3>
|
||||
<p><strong>{itemText('weapon',_user.items.weapon)}</strong>: {itemStat('weapon',_user.items.weapon)}% Exp gain</p>
|
||||
<p><strong>{itemText('armor',_user.items.armor)}</strong>: {itemStat('armor',_user.items.armor)}% Defense</p>
|
||||
<p><strong>{itemText('head',_user.items.head)}</strong>: {itemStat('head',_user.items.head)}% Defense</p>
|
||||
<p><strong>{itemText('shield',_user.items.shield)}</strong>: {itemStat('shield',_user.items.shield)}% Defense</p>
|
||||
|
||||
<h3>{{t("stats")}}</h3>
|
||||
<p><strong>HP</strong>: {floor(_user.stats.hp)} / 50</p>
|
||||
<p><strong>GP</strong>: {floor(_user.stats.gp)}</p>
|
||||
<p><strong>Lvl</strong>: {_user.stats.lvl}</p>
|
||||
<p><strong>Exp</strong>: {floor(_user.stats.exp)} / {tnl(_user.stats.lvl)}</p>
|
||||
<p><strong>{{t("strength")}}</strong>: {userStr(_user.stats.lvl)}</p>
|
||||
<p><strong>{{t("defense")}}</strong>: {userDef(_user.stats.lvl)}</p>
|
||||
<p><strong>{{t("petsFound")}}</strong>: {count(_user.items.pets)}</p>
|
||||
<hr/>
|
||||
<p><strong>{{t("totalStrength")}}</strong>: {totalStr(_user.stats.lvl, _user.items.weapon)} %</p>
|
||||
<p><strong>{{t("totalDefense")}}</strong>: {totalDef(_user.stats.lvl, _user.items.armor, _user.items.head, _user.items.shield)} %</p>
|
||||
|
||||
|
||||
<customize:>
|
||||
|
||||
<!-- customization options -->
|
||||
{#with _user.preferences as :p}
|
||||
<menu type="list">
|
||||
<!-- gender -->
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("head")}}>
|
||||
<button type="button" class="m_head_0 customize-option" data-value="m" x-bind="click:customizeGender"></button>
|
||||
<button type="button" class="f_head_0 customize-option" data-value="f" x-bind="click:customizeGender"></button>
|
||||
</menu>
|
||||
<label class="checkbox">
|
||||
<input type=checkbox checked="{_user.preferences.showHelm}" /> {{t("showHelm")}}
|
||||
</label>
|
||||
|
||||
</li>
|
||||
|
||||
<!-- hair -->
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("hair")}}>
|
||||
<button type="button" class="{:p.gender}_hair_blond customize-option" data-value="blond" x-bind="click:customizeHair"></button>
|
||||
<button type="button" class="{:p.gender}_hair_black customize-option" data-value="black" x-bind="click:customizeHair"></button>
|
||||
<button type="button" class="{:p.gender}_hair_brown customize-option" data-value="brown" x-bind="click:customizeHair"></button>
|
||||
<button type="button" class="{:p.gender}_hair_white customize-option" data-value="white" x-bind="click:customizeHair"></button>
|
||||
</menu>
|
||||
</li>
|
||||
|
||||
<!-- skin -->
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("skin")}}>
|
||||
<button type="button" class='{:p.gender}_skin_dead customize-option' data-value="dead" x-bind="click:customizeSkin"></button>
|
||||
<button type="button" class='{:p.gender}_skin_orc customize-option' data-value="orc" x-bind="click:customizeSkin"></button>
|
||||
<button type="button" class='{:p.gender}_skin_asian customize-option' data-value="asian" x-bind="click:customizeSkin"></button>
|
||||
<button type="button" class='{:p.gender}_skin_black customize-option' data-value="black" x-bind="click:customizeSkin"></button>
|
||||
<button type="button" class='{:p.gender}_skin_white customize-option' data-value="white" x-bind="click:customizeSkin"></button>
|
||||
</menu>
|
||||
</li>
|
||||
</menu>
|
||||
|
||||
{#if equal(_user.preferences.gender, 'f')} <!-- Sorry boys -->
|
||||
<menu type="list">
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("clothing")}}>
|
||||
<button type="button" class="f_armor_0_v1 customize-option" data-value="v1" x-bind="click:customizeArmorSet"></button>
|
||||
<button type="button" class="f_armor_0_v2 customize-option" data-value="v2" x-bind="click:customizeArmorSet"></button>
|
||||
</menu>
|
||||
</li>
|
||||
</menu>
|
||||
{/}
|
||||
{/}
|
||||
|
||||
<profile-edit:>
|
||||
<!--<a class='btn btn-success' x-bind="click:profileSave">Save</a>-->
|
||||
<!-- TODO use photo-upload instead: https://groups.google.com/forum/?fromgroups=#!topic/derbyjs/xMmADvxBOak -->
|
||||
<img class='pull-right' src="{_user.profile.imageUrl}" />
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileImageUrl">{{t("photoUrl")}}</label>
|
||||
<div class="controls">
|
||||
<input type="url" id="profileImageUrl" value="{_user.profile.imageUrl}" placeholder={{t("photoUrl")}}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileFullName">{{t("fullName")}}</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="profileFullName" placeholder="Full Name" value="{_user.profile.name}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileBlurb">{{t("blurb")}}</label>
|
||||
<div class="controls">
|
||||
<textarea id="profileBlurb" placeholder={{t("blurb")}} >{_user.profile.blurb}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="profileWebsite">{{t("websites")}}</label>
|
||||
<div class="controls">
|
||||
<form x-bind="submit:profileAddWebsite">
|
||||
<input type="url" id="profileWebsite" value="{_newProfileWebsite}" placeholder={{t("addWebsites")}}>
|
||||
</form>
|
||||
</div>
|
||||
<ul>
|
||||
<!-- would prefer if there were and index in #each, instead using data-website to search with indexOf -->
|
||||
{#each _user.profile.websites as :website}
|
||||
<li>{:website} <a data-website="{:website}" x-bind="click:profileRemoveWebsite"><i class='icon-remove'></i></a></li>
|
||||
{/}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<profile:>
|
||||
<div class='row-fluid'>
|
||||
<div class='span6'>
|
||||
<h3>{{username(@profile.auth, @profile.profile.name)}}</h3>
|
||||
{{#if @profile.profile.imageUrl}}
|
||||
<img src="{{@profile.profile.imageUrl}}" />
|
||||
{{/}}
|
||||
{{#if @profile.profile.blurb}}
|
||||
<p>{{@profile.profile.blurb}}</p>
|
||||
{{/}}
|
||||
{{#if @profile.profile.websites}}
|
||||
<ul>
|
||||
{{#each @profile.profile.websites as :website}}
|
||||
<li>{{:website}}</li>
|
||||
{{/}}
|
||||
</ul>
|
||||
{{/}}
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<h3>{{t("achievments")}}</h3>
|
||||
<app:avatar:achievements profile={{@profile}} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<achievements:>
|
||||
<div class='achievements-container'>
|
||||
<!--<div class='achievement achievement-sword'></div>-->
|
||||
<!--<div class='achievement achievement-tree'></div>-->
|
||||
<!--<div class='achievement achievement-comment'></div>-->
|
||||
<!--<div class='achievement achievement-cave'></div>-->
|
||||
<!--<div class='achievement achievement-sun'></div>-->
|
||||
<!--<div class='achievement achievement-boot'></div>-->
|
||||
<!--<div class='achievement achievement-coffin'></div>-->
|
||||
<!--<div class='achievement achievement-alien'></div>-->
|
||||
<!--<div class='achievement achievement-ninja'></div>-->
|
||||
<!--<div class='achievement achievement-cactus'></div>-->
|
||||
<!--<div class='achievement achievement-bow'></div>-->
|
||||
<!--<div class='achievement achievement-shield'></div>-->
|
||||
<!--<div class='achievement achievement-karaoke'></div>-->
|
||||
|
||||
<app:avatar:achievement unlocked={{@profile.backer.npc}} classes='achievement-helm' unlockable=false profile={{@profile}}>
|
||||
<h5><span class='label label-success'>{{@profile.backer.npc}} NPC</span></h5>
|
||||
<small>{{t("npcText")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={{@profile.backer.contributor}} classes='achievement-firefox' unlockable=true profile={{@profile}}>
|
||||
<h5>
|
||||
{{#if @profile.backer.contributor}}
|
||||
<span class='label label-inverse'>{{@profile.backer.contributor}}</span>
|
||||
{{else}}
|
||||
<span class='label'>{{t("contribName")}}</span>
|
||||
{{/}}
|
||||
</h5>
|
||||
<small>{{t("contribText")}} :)</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={{@profile.backer.tier}} classes='achievement-heart' unlockable=false profile={{@profile}}>
|
||||
<h5>{{t("kickstartName1")}} ${{@profile.backer.tier}} {{t("kickstartName2")}}</h5>
|
||||
<small>{{t("kickstartText")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={@profile.achievements.streak} classes='achievement-thermometer' unlockable=true profile={@profile}>
|
||||
<h5>{#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} {{t("streakName")}}</h5>
|
||||
<small>{{t("streakText1")}} {#if @profile.achievements.streak}{@profile.achievements.streak}{else}0{/} {{t("streakText2")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={@profile.achievements.originalUser} classes='achievement-cake' unlockable=false profile={@profile}>
|
||||
<h5>{{t("origUserName")}}</h5>
|
||||
<small>{{t("origUserText")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={@profile.achievements.ultimateGear} classes='achievement-armor' unlockable=true profile={@profile}>
|
||||
<h5>{{t("ultimGearName")}}</h5>
|
||||
<small>{{t("ultimGearText")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
<app:avatar:achievement unlocked={@profile.achievements.beastMaster} classes='achievement-rat' unlockable=true profile={@profile}>
|
||||
<h5>{{t("beastMastName")}}</h5>
|
||||
<small>{{t("beastMastName")}}</small>
|
||||
</app:avatar:achievement>
|
||||
|
||||
</div>
|
||||
|
||||
<achievement: nonvoid>
|
||||
{#if @unlocked}
|
||||
<div class='achievement {{@classes}}'></div>{@content}
|
||||
<hr/>
|
||||
{else if @unlockable} <!-- only show silhouettes on own tab -->
|
||||
{{#if equal(_user.id,@profile.id)}}
|
||||
<span class='muted'>
|
||||
{@content}
|
||||
</span>
|
||||
<hr/>
|
||||
{{/}}
|
||||
{/}
|
||||
|
||||
|
||||
<inventory:>
|
||||
<!-- we'll have other inventory here later too, like enchantments, quest scrolls, etc -->
|
||||
<app:pets:inventory/>
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
<filters:>
|
||||
<div class="filters">
|
||||
<div class="pull-left filter-description">
|
||||
{{t("tags")}}:
|
||||
</div>
|
||||
<ul class="nav nav-pills">
|
||||
<li>
|
||||
<a rel=tooltip title={{t("editTags")}} x-bind="click:toggleEditingTags"><i class='{#if _editingTags}icon-ok{else}icon-pencil{/}'></i></a>
|
||||
</li>
|
||||
{#each _user.tags as :tag}
|
||||
<li class="{#if _user.filters[:tag.id]}active{/}" style='position:relative;'>
|
||||
{#if _editingTags}
|
||||
<div class="input-append option-group tag-editing" >
|
||||
<input class="input input-small option-content tag-editing-pill" type="text" value='{:tag.name}' />
|
||||
<span class="add-on tag-editing-pill"><a class='pull-right' x-bind=click:filtersDeleteTag data-index="{$index}"><i class='icon-trash'></i></a></span>
|
||||
</div>
|
||||
{else}
|
||||
<a data-tag-id="{{:tag.id}}" x-bind="click:toggleFilterByTag">{:tag.name}</a>
|
||||
{/}
|
||||
</li>
|
||||
{/}
|
||||
<li>
|
||||
{#if _editingTags}
|
||||
<form class='form-inline' x-bind="submit:filtersNewTag">
|
||||
<div class="input-append tag-editing">
|
||||
<input class="span2 tag-editing-pill" type="text" value={_newTag} placeholder={{t("newTag")}} />
|
||||
<button class="add-on tag-editing-pill" type="submit">{{t("add")}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{/}
|
||||
</li>
|
||||
<!--<li class="{#unless activeFilters(_user.filters)}hidden{/}">-->
|
||||
<li>
|
||||
<a rel=tooltip title={{t("clearFilters")}} x-bind="click:clearFilters"><i class='icon-remove-sign'></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<applied-filters:>
|
||||
<i rel=tooltip title="{appliedTags(_user.tags, :task.tags)}" class='{#if noTags(:task.tags)}hidden{/} icon-tags'></i>
|
||||
|
||||
<!-- At first we showed all applied tags, but it gets really cluttered: http://gyazo.com/fce50f91fd0f1d64cab9774f755e95c1 -->
|
||||
<!-- There's a very strange bug where live-bound #each here loses model.at reference on _{type}List alter -->
|
||||
<!--
|
||||
{{#each _user.tags as :tag}}
|
||||
<small>
|
||||
{#if :task.tags[:tag.id]}
|
||||
<small data-tag-id="{{:tag.id}}" x-bind="click:toggleFilterByTag" class="label tag-label {#if _user.filters[:tag.id]}label-info{/}">{:tag.name}</small>
|
||||
{/}
|
||||
</small>
|
||||
{{/}}-->
|
||||
|
||||
<filter-fieldgroup:>
|
||||
<fieldset class='option-group'>
|
||||
<legend class="option-title">{{t("tags")}}</legend>
|
||||
<select multiple="multiple">
|
||||
{{#each _user.tags as :tag}}
|
||||
<option selected="{:task.tags[:tag.id]}">{:tag.name}</option>
|
||||
{{/}}
|
||||
</select>
|
||||
</fieldset>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
<footer:>
|
||||
<footer class=footer>
|
||||
<div class=container>
|
||||
<div class='row'>
|
||||
|
||||
<div class='span3'>
|
||||
<h4>{{t("footerCompany")}}</h4>
|
||||
<ul class='unstyled'>
|
||||
<li><a href="/static/about">{{t("companyAbout")}}</a></li>
|
||||
<li><a target="_blank" href="http://habitrpg.tumblr.com/">{{t("companyBlog")}}</a></li>
|
||||
<li><a href="/static/team">{{t("companyTeam")}}</a></li>
|
||||
<li><a href="/static/extensions">{{t("companyExtensions")}}</a></li>
|
||||
<li><a href="/static/faq">{{t("companyFAQ")}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='span3'>
|
||||
<h4>{{t("footerLegal")}}</h4>
|
||||
<ul class='unstyled'>
|
||||
<li><a href="/static/privacy">{{t("legalPrivacy")}}</a></li>
|
||||
<li><a href="/static/terms">{{t("legalTerms")}}</a></li>
|
||||
<li><strong>© 2013 OCDevel LLC</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='span3'>
|
||||
<h4>{{t("footerCommunity")}}</h4>
|
||||
<ul class='unstyled'>
|
||||
<li><a target="_blank" href="https://github.com/lefnire/habitrpg/issues?state=open">{{t("communityBugs")}}</a></li>
|
||||
<li><a target="_blank" href="https://trello.com/board/habitrpg/50e5d3684fe3a7266b0036d6">{{t("communityFeatures")}}</a></li>
|
||||
<li><a target="_blank" href="https://github.com/lefnire/habitrpg/wiki/API">API</a></li>
|
||||
<li><a href="/static/extensions">{{t("communityExtensions")}}</a></li>
|
||||
<li><a target="_blank" href="http://community.habitrpg.com/forum">{{t("communityForum")}}</a></li>
|
||||
<li><a target="_blank" href="http://www.kickstarter.com/projects/lefnire/habitrpg-mobile">Kickstarter</a></li>
|
||||
<li><a target="_blank" href="https://www.facebook.com/Habitrpg">Facebook</a></li>
|
||||
<li><a target="_blank" href="http://www.reddit.com/r/habitrpg/">Reddit</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class='span3'>
|
||||
{{#if equal(_nodeEnv, 'development')}}
|
||||
<h4>Cheat</h4>
|
||||
<ul class='unstyled'>
|
||||
<li><button class='btn' x-bind="click:emulateNextDay">Emulate Next Day</button></li>
|
||||
<li><button class='btn' x-bind="click:emulateTenDays">Emulate 10 Days</button></li>
|
||||
<li><button class='btn' x-bind="click:cheat">Insta Level</button></li>
|
||||
<li><button class='btn' x-bind='click:reset'>Reset Level</button></li>
|
||||
</ul>
|
||||
{{else}}
|
||||
<h4>{{t("footerSocial")}}</h4>
|
||||
<div class="addthis_toolbox addthis_default_style "
|
||||
addthis:url="https://habitrpg.com"
|
||||
addthis:title="HabitRPG - Gamify Your Life">
|
||||
<table>
|
||||
<tr><td><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a></td></tr>
|
||||
<tr><td><a class="addthis_button_tweet" tw:via="habitrpg"></a></td></tr>
|
||||
<tr><td align='left'>
|
||||
<iframe src="/vendor/github-buttons/github-btn.html?user=lefnire&repo=habitrpg&type=watch&count=true"
|
||||
allowtransparency="true" frameborder="0" scrolling="0" width="85px" height="20px" ></iframe>
|
||||
</td></tr>
|
||||
<tr><td><a class="addthis_button_google_plusone" g:plusone:size="medium"></a> </td></tr>
|
||||
</table>
|
||||
</div>
|
||||
{{/}}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
<main:>
|
||||
<div class="module full-width">
|
||||
|
||||
<span class='option-box pull-right wallet'>
|
||||
<app:rewards:user-gems />
|
||||
</span>
|
||||
|
||||
<ul class="nav nav-tabs game-tabs">
|
||||
<li class="active"><a data-toggle='tab' data-target="#profileCustomize"><i class='icon-user'></i> Profile</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileParty" id='party-tab-link'><i class='icon-heart'></i> Party</a></li>
|
||||
{#if _user.flags.dropsEnabled}
|
||||
<li><a data-toggle='tab' data-target="#profileInventory"><i class='icon-gift'></i> {{t("inventory")}}</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileStable"><i class='icon-leaf'></i> {{t("stable")}}</a></li>
|
||||
{/if}
|
||||
<li><a data-toggle='tab' data-target="#profileTavern"><i class='icon-eye-close'></i> {{t("tavern")}}</a></li>
|
||||
<li><a data-toggle='tab' data-target="#profileAchievements"><i class='icon-certificate'></i> {{t("achievements")}}</a></li>
|
||||
{{#if _loggedIn}}
|
||||
<li><a data-toggle='tab' data-target="#profileSettings"><i class='icon-wrench'></i> {{t("settings")}}</a></li>
|
||||
{{/}}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active" id="profileCustomize">
|
||||
<div class='row-fluid'>
|
||||
<div class='span4 border-right'>
|
||||
<app:avatar:customize />
|
||||
</div>
|
||||
<div class='span4 border-right'>
|
||||
<app:avatar:profile-stats />
|
||||
</div>
|
||||
<div class='span4'>
|
||||
<app:avatar:profile-edit />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileParty">
|
||||
<app:party:party />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileAchievements">
|
||||
<app:avatar:achievements profile="{{_user}}" />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileInventory">
|
||||
<div class='row-fluid'>
|
||||
<div class='span6 border-right'>
|
||||
<h2>{{t("inventory")}}</h2>
|
||||
<app:avatar:inventory />
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<h2>{{t("market")}}</h2>
|
||||
<app:game-pane:market />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileStable">
|
||||
<app:pets:stable />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileTavern">
|
||||
<app:game-pane:tavern />
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="profileSettings">
|
||||
{{#if _loggedIn}}
|
||||
<app:settings:settings-pane />
|
||||
{{/}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<tavern:>
|
||||
<div class='row-fluid'>
|
||||
<div class='span4 border-right'>
|
||||
<div class='tavern-pane'>
|
||||
<img src='/img/npcs/daniel.png' />
|
||||
<div class="popover fade right in" style="top: 0px; left: 135px; display: block;">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Daniel Johansson</h3>
|
||||
<div class="popover-content">
|
||||
{{t("NPCJohanssonText1")}} <a target="_blank" href="http://www.kickstarter.com/profile/2014640723">Daniel</a>, {{t("NPCJohanssonText2")}}
|
||||
<div><button x-bind="click:toggleResting" class='btn btn-large btn-success {#if _user.flags.rest}active{/}'>{#if _user.flags.rest}Check Out of Inn{else}Rest In The Inn{/}</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='alert alert-info {#unless _user.flags.rest}hidden{/}'>{{t("tavernRestingInfo")}}</div>
|
||||
|
||||
<div class=well>
|
||||
<h3>{{t("resources")}}</h3>
|
||||
<ul class=unstyled>
|
||||
<li><h4><a _target=blank href="http://community.habitrpg.com/forums/lfg">{{t("LFGPosts")}}</a></h4></li>
|
||||
<li><h4><a _target=blank href="http://www.youtube.com/watch?feature=player_embedded&v=cT5ghzZFfao">{{t("tutorials")}}</a></h4></li>
|
||||
<li><h4><a _target=blank href="http://community.habitrpg.com/faq-page">FAQ</a></h4></li>
|
||||
<li><h4><a _target=blank href="https://github.com/lefnire/habitrpg/issues?state=open">{{t("communityBugs")}}</a></h4></li>
|
||||
<li><h4><a _target=blank href="https://trello.com/board/habitrpg/50e5d3684fe3a7266b0036d6">{{t("communityFeatures")}}</a></h4></li>
|
||||
<li><h4><a _target=blank href="http://community.habitrpg.com/forum">{{t("communityForum")}}</a></h4></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class='span8'>
|
||||
<h3>{{t("tavernTalkTitle")}}</h3>
|
||||
<form x-bind='submit:tavernSendChat'>
|
||||
<textarea class="span6" rows="3"x-bind='keyup:tavernMessageKeyup'>{_tavernMessage}</textarea><br/>
|
||||
<input class=btn type=submit value={{t("submit")}} />
|
||||
</form>
|
||||
<ul class='unstyled tavern-chat'>
|
||||
{#each _tavern.chat.messages as :message}
|
||||
<app:party:chat-message message={{:message}} />
|
||||
{/}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<market:>
|
||||
|
||||
<!-- pets pane -->
|
||||
<div class="tab-pane pet-grid" id="market-tab">
|
||||
<img src='/img/npcs/alex.png' />
|
||||
<div class="popover fade right in" style="top: 0px; left: 170px; display: block;">
|
||||
<div class="arrow"></div>
|
||||
<h3 class="popover-title">Alexander Augustin</h3>
|
||||
<div class="popover-content">{{t("NPCAugustinText1")}} <a target="_blank" href="http://www.kickstarter.com/profile/523661924">Alexander</a>. {{t("NPCAugustinText2")}}</div>
|
||||
</div>
|
||||
|
||||
<h4>{{t("eggs")}}</h4>
|
||||
{#with _items.pets as :egg}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :egg[0]}<app:pets:egg />{/}
|
||||
{#with :egg[1]}<app:pets:egg />{/}
|
||||
{#with :egg[2]}<app:pets:egg />{/}
|
||||
{#with :egg[3]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[4]}<app:pets:egg />{/}
|
||||
{#with :egg[5]}<app:pets:egg />{/}
|
||||
{#with :egg[6]}<app:pets:egg />{/}
|
||||
{#with :egg[7]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :egg[8]}<app:pets:egg />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
<h4>{{t("hatchingPotions")}}</h4>
|
||||
{#with _items.hatchingPotions as :hatchingPotion}
|
||||
<table>
|
||||
<tr>
|
||||
{#with :hatchingPotion[0]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[1]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[2]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[3]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[4]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[5]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[6]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[7]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
<tr>
|
||||
{#with :hatchingPotion[8]}<app:pets:hatchingPotion />{/}
|
||||
{#with :hatchingPotion[9]}<app:pets:hatchingPotion />{/}
|
||||
</tr>
|
||||
</table>
|
||||
{/}
|
||||
</div>
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
<import: src="modals">
|
||||
<import: src="tasks">
|
||||
<import: src="header">
|
||||
<import: src="alerts">
|
||||
<import: src="avatar">
|
||||
<import: src="rewards">
|
||||
<import: src="footer">
|
||||
<import: src="settings">
|
||||
<import: src="party">
|
||||
<import: src="pets">
|
||||
<import: src="game-pane">
|
||||
<import: src="filters">
|
||||
|
||||
<Title:>
|
||||
HabitRPG | Gamify Your Life
|
||||
|
||||
<Head:>
|
||||
<!-- webfonts -->
|
||||
<link href='//fonts.googleapis.com/css?family=Lato:300,400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<Header:>
|
||||
<app:modals:modals />
|
||||
<ui:connectionAlert>
|
||||
<div class="header-wrap">
|
||||
|
||||
{#if _undo}<a x-bind="click:undo" class='label undo-button'>{{t("undo")}}</a>{/}
|
||||
|
||||
<app:settings:menu />
|
||||
<app:header:header />
|
||||
<app:alerts:hiding-bailey />
|
||||
</div>
|
||||
<span class='{#if _gamePane}hidden{/}'><app:filters:filters /></span>
|
||||
|
||||
<Body:>
|
||||
<br/>
|
||||
<div id="notification-area"></div>
|
||||
<div id="wrap">
|
||||
<app:alerts:flash />
|
||||
<div id="exp-chart" style="display:none;"></div>
|
||||
|
||||
<div id=main class="grid">
|
||||
<div class='{#if _gamePane}hidden{/}'>
|
||||
<app:tasks:task-lists
|
||||
habits={_habitList}
|
||||
dailys={_dailyList}
|
||||
todos={_todoList}
|
||||
rewards={_rewardList}
|
||||
main=true
|
||||
editable=true />
|
||||
</div>
|
||||
<div class='{#unless _gamePane}hidden{/}'>
|
||||
<app:game-pane:main />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<app:footer:footer />
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
<modals:>
|
||||
|
||||
<app:avatar:modals />
|
||||
<app:settings:modals />
|
||||
<app:pets:modals />
|
||||
<app:alerts:modals />
|
||||
<app:rewards:modals />
|
||||
<app:tasks:modals />
|
||||
|
||||
<!-- Game Over Modal -->
|
||||
<div style="{#unless lt(_user.stats.hp,1)}display:none;{/}">
|
||||
<app:modals:modal noDismiss=true modalId='dead-modal'>
|
||||
<div class='row-fluid'>
|
||||
<div class='span4'>
|
||||
<figure class="notification-character">
|
||||
<img src="/img/sprites/dead.png">
|
||||
</figure>
|
||||
</div>
|
||||
<div class='span8'>
|
||||
<h2>{{t("deathTitle")}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row-fluid'>
|
||||
<div class='span4'>
|
||||
<p><a x-bind=click:revive class="btn btn-danger btn-large notification-action">{{t("continue")}}</a></p>
|
||||
</div>
|
||||
<div class='span8'>
|
||||
<p>{{t("deathText")}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</app:modals:modal>
|
||||
</div>
|
||||
|
||||
<!-- Re-Roll modal -->
|
||||
<app:modals:modal modalId='reroll-modal' header={{t("rerollModelHeader")}}>
|
||||
<app:rewards:user-gems />
|
||||
<p>{{t("rerollNotes")}}</p> <br />
|
||||
<p> {{t("rerollModelText1")}} (<a target="_blank" href="https://github.com/lefnire/habitrpg#all-my-tasks-are-red-im-dying-too-fast">{{t("rerollModelText2")}}</a>). {{t("rerollModelText3")}}</p>
|
||||
<@footer>
|
||||
{#if lt(_user.balance,1)}
|
||||
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">{{t("buyMoreGems")}}</a><span class='gem-cost'>Not enough Gems</span>
|
||||
{else}
|
||||
<a data-dismiss="modal" x-bind=click:buyReroll class="btn btn-danger btn-large">{{t("rerollName")}}</a><span class='gem-cost'>4 {{t("gems")}}</span>
|
||||
{/}
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<!-- Buy more Gems modal -->
|
||||
<app:modals:modal modalId='more-gems-modal' header={{t("outOfGems")}}>
|
||||
<app:rewards:user-gems />
|
||||
<p>{{t("petsOutOfGems")}}</p>
|
||||
<@footer>
|
||||
<a data-dismiss="modal" x-bind="click:showStripe" class="btn btn-success btn-large">{{t("buyMoreGems")}}</a><span class='gem-cost'>{{t("notEnoughGems")}}</span>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<app:modals:modal modalId="why-ads-modal" header={{t("whyAds")}}>
|
||||
<p>{{t("whyAdsContent1")}}</p>
|
||||
<p>{{t("whyAdsContent2")}} <a target="_blank" href="http://community.habitrpg.com/node/22">{{t("whyAdsContent3")}}</a>.</p>
|
||||
<@footer>
|
||||
<button data-dismiss="modal" class="btn btn-success">{{t("ok")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
|
||||
|
||||
<!-- $modal-template -->
|
||||
<modal: nonvoid>
|
||||
{{#if @noDismiss}}
|
||||
<div data-action="backdrop" class="modal-backdrop"></div>
|
||||
{{/}}
|
||||
<div class="modal {{#unless @noDismiss}}hide{{/}}" id={{@modalId}} role="dialog">
|
||||
{#if @header}
|
||||
<div class="modal-header">
|
||||
{{#unless @noDismiss}}<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>{{/}}
|
||||
<h3>{unescaped @header}</h3>
|
||||
</div>
|
||||
{/}
|
||||
<div class="modal-body">{@content}</div>
|
||||
{{#if @footer}}
|
||||
<div class="modal-footer">{{@footer}}</div>
|
||||
{{/}}
|
||||
</div>
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
<party:>
|
||||
{#if _partyMembers}
|
||||
<div class='row-fluid'>
|
||||
<div class="span6 border-right">
|
||||
<h3>{{_party.name}}</h3>
|
||||
<table class="table table-striped">
|
||||
{{#each _partyMembers as :member}}
|
||||
<tr><td>{{username(:member.auth, :member.profile.name)}}</td><td>({{:member.id}})</td></tr>
|
||||
{{/}}
|
||||
</table>
|
||||
<form class=form-inline x-bind="submit: partyInvite">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<div class='control-group'>
|
||||
<input type="text" class="input-medium" placeholder={{t("userId")}} value="{_newPartyMember}">
|
||||
<input type="submit" class="btn" value={{t("invite")}} />
|
||||
</div>
|
||||
</form>
|
||||
<a class='btn btn-danger' x-bind="click: partyLeave">{{t("leave")}}</a>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h3>{{t("chat")}}</h3>
|
||||
<form x-bind='submit:partySendChat'>
|
||||
<textarea class="span6" rows="3" x-bind='keyup:partyMessageKeyup'>{_chatMessage}</textarea><br/>
|
||||
<input class=btn type=submit value={{t("submit")}} />
|
||||
</form>
|
||||
<ul class='party-chat unstyled'>
|
||||
{#each _party.chat as :message}
|
||||
<app:party:chat-message message={{:message}} />
|
||||
{/}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{else if _user.party.invitation}
|
||||
<!-- TODO show by whom -->
|
||||
<h2>{{t("invitedTo")}} {_party.name}</h2>
|
||||
<a class='btn btn-success' x-bind="click: partyAccept">{{t("accept")}}</a>
|
||||
<a class='btn btn-danger' x-bind="click: partyReject">{{t("reject")}}</a>
|
||||
|
||||
{else}
|
||||
<h2>{{t("createAParty")}}</h2>
|
||||
<!-- Not in a party , no invites - create a new one -->
|
||||
<p>{{t("noPartyText")}}</p>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
<form class=form-inline x-bind="submit: partyCreate">
|
||||
{#if _partyError}
|
||||
<div class='alert alert-danger'>{_partyError}</div>
|
||||
{/}
|
||||
<div class=control-group>
|
||||
<input type="text" class="input-medium" placeholder={{t("partyName")}} value="{_newParty}" />
|
||||
<input type="submit" class="btn" value={{t("create")}} />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{/}
|
||||
|
||||
|
||||
<chat-message:>
|
||||
<li class="{{#if indexOf(:message.text, username(_user.auth, _user.profile.name))}}highlight{{/if}}">
|
||||
<span
|
||||
class="label {{#if @message.npc}}label-success{{else if @message.contributor}}label-inverse{{else if equal(@message.uuid,_user.id)}}label-info{{/}} chat-message"
|
||||
rel='tooltip' title="{{@message.contributor}}{{@message.npc}}">
|
||||
{{@message.user}}</span> {{@message.text}} - <span class='muted time'>{relativeDate(@message.timestamp, _currentTime)}
|
||||
{{#if equal(@message.uuid,_user.id)}}{{#with @message}}<a x-bind="click:deleteChatMessage"><i rel=tooltip title=Delete class=icon-remove></i></a>{{/}}{{/}}
|
||||
</span>
|
||||
</li>
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
<modals:>
|
||||
|
||||
<app:modals:modal modalId='drops-enabled-modal' header={{t("dropsEnabled")}}>
|
||||
<p><span class="Pet_Egg_{_user.items.eggs.0.name} item-drop-icon"></span> {{t("dropsEnabledText1")}} <strong>{_user.items.eggs.0.text} {{t("dropsEnabledText2")}}</strong>! {_user.items.eggs.0.notes}</p>
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">{{t("close")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<app:modals:modal modalId='item-dropped-modal' header="{{t("itemDropped")}}">
|
||||
<p><span class="Pet_{_drop.type}_{_drop.name} item-drop-icon"></span>{_drop.dialog}</p>
|
||||
|
||||
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">{{t("close")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<app:modals:modal modalId='beastmaster-achievement-modal' header={{t("achievementUnlocked")}}>
|
||||
<p>
|
||||
<div class='achievement achievement-rat'></div>{{t("beastMastUnlocked")}}
|
||||
</p>
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">{{t("close")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<pet:>
|
||||
<td class="{#if _user.items.pets[.name]}active-pet{/}">
|
||||
<img rel=tooltip title="{.text} - {.value} Gems" x-bind="click:selectPet" data-pet='{.name}' src='img/sprites/{.icon}'/>
|
||||
</td>
|
||||
|
||||
<hatchingPotion:>
|
||||
<td class="active-hatchingPotion" x-bind="click:buyHatchingPotion" data-hatchingPotion='{.name}'>
|
||||
<div class="Pet_HatchingPotion_{.name}"></div>
|
||||
{.text}<br/><small>{.value} {{t("gems")}}<small>
|
||||
</td>
|
||||
|
||||
<egg:>
|
||||
<td class="active-egg" x-bind="click:buyEgg" data-egg='{.name}'>
|
||||
<div rel=tooltip class="Pet_Egg_{.name}"></div>
|
||||
{.text}<br/><small>{.value} {{t("gems")}}<small>
|
||||
</td>
|
||||
|
||||
<inventory:>
|
||||
<div class='row-fluid'>
|
||||
<div class='{#if _hatchEgg}span6{/}'>
|
||||
<menu type="list" class="inventory-list">
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("eggs")}} class='pets-menu'>
|
||||
{#if not(_user.items.eggs)}
|
||||
<p>{{t("noEggs")}}</p>
|
||||
{/if}
|
||||
{#each _user.items.eggs as :egg}
|
||||
<div>
|
||||
<button rel=tooltip title="{:egg.text}" class="customize-option Pet_Egg_{{:egg.name}}" x-bind="click: chooseEgg"></button>
|
||||
<p>{:egg.text}</p>
|
||||
</div>
|
||||
{/each}
|
||||
</menu>
|
||||
</li>
|
||||
<li class="customize-menu">
|
||||
<menu label={{t("hatchingPotions")}} class='hatchingPotion-menu'>
|
||||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>{{t("noHatchingPotions")}}</p>
|
||||
{/if}
|
||||
{#each _user.items.hatchingPotions as :hatchingPotion}
|
||||
<div>
|
||||
<button rel=tooltip title="{:hatchingPotion}" class="customize-option Pet_HatchingPotion_{{:hatchingPotion}}" x-bind="click: chooseHatching Potion"></button>
|
||||
<p>{:hatchingPotion}</p>
|
||||
</div>
|
||||
{/each}
|
||||
</menu>
|
||||
</li>
|
||||
</menu>
|
||||
</div>
|
||||
{#if _hatchEgg}
|
||||
<div class='span6'>
|
||||
<h3>{{t("hatchYourEgg")}}</h3>
|
||||
{#if not(_user.items.hatchingPotions)}
|
||||
<p>{{t("noHatchingPotions")}}</p>
|
||||
{else}
|
||||
<p>{{t("whichHatchingPotion1")}} {_hatchEgg.text} {{t("whichHatchingPotion2")}}</p>
|
||||
<form x-bind="submit:hatchEgg">
|
||||
<select>
|
||||
{#each _user.items.hatchingPotions as :hatchingPotion}
|
||||
<option>{:hatchingPotion}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<button type=submit>{{t("pour")}}</button>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<stable:>
|
||||
<div>{count(_user.items.pets)} / 90 {{t("petsFound")}}</div>
|
||||
<table>
|
||||
{{#each _items.pets as :pet}}
|
||||
<tr>
|
||||
{{#each _items.hatchingPotions as :potion}}
|
||||
<td>
|
||||
<app:pets:stable-pet tooltip="{{:potion.text}} {{:pet.text}}" pet="{{:pet.name}}-{{:potion.name}}" />
|
||||
</td>
|
||||
{{/}}
|
||||
</tr>
|
||||
{{/}}
|
||||
</table>
|
||||
<h4>{{t("rarePets")}}</h4>
|
||||
<table>
|
||||
<tr>
|
||||
<td><app:pets:stable-pet potion='Veteran Wolf' pet="Wolf-Veteran" /></td>
|
||||
{{#if gt(_user.backer.tier,79)}}<td><app:pets:stable-pet potion='Cerberus Pup' pet="Wolf-Cerberus" /></td>{{/}}
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--<menu type="list">
|
||||
<li class="customize-menu">
|
||||
<menu>
|
||||
|
||||
</menu>
|
||||
</li>
|
||||
</menu>-->
|
||||
|
||||
<stable-pet:>
|
||||
<div rel="tooltip" title="{{@tooltip}}">
|
||||
{#if ownsPet(@pet, _user.items.pets)}
|
||||
<button class="pet-button Pet-{{@pet}} {#if equal(_user.items.currentPet.name, @string)}active{/if}" data-pet="{{@pet}}" x-bind="click:choosePet"></button>
|
||||
{else}
|
||||
<button class="pet-button pet-not-owned" data-pet="{{@pet}}"><img src="/img/PixelPaw.png"/></button>
|
||||
{/}
|
||||
</div>
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<modals:>
|
||||
<app:modals:modal modalId='max-gear-achievement-modal' header={{t("achievementUnlocked")}}>
|
||||
<p>
|
||||
<div class='achievement achievement-armor'></div>{{t("ultimGearUnlocked")}}
|
||||
</p>
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">{{t("close")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<user-gems:>
|
||||
<a class="pull-right gem-wallet" rel='popover' data-trigger='hover' data-title='Gems' data-content={{t("gemsWhatFor")}} data-placement='bottom'>
|
||||
<span class="task-action-btn tile flush bright add-gems-btn" x-bind="click:showStripe">+</span>
|
||||
<span class="task-action-btn tile flush neutral"><div class="Gems"></div> {gems(_user.balance)} {{t("gems")}}
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<item:>
|
||||
<li class="task reward-item {#if @item.hide}hide{/}">
|
||||
<!-- right-hand side control buttons -->
|
||||
<div class="task-meta-controls">
|
||||
<span rel="popover" data-trigger="hover" data-placement="left" data-content="{@item.notes}" data-original-title="{@item.text}" class='task-notes'><i class="icon-comment"></i></span>
|
||||
</div>
|
||||
|
||||
<!-- left-hand size commands -->
|
||||
<div class="task-controls">
|
||||
{#if equal(@item.type,'reroll')}
|
||||
<a class="task-action-btn btn-reroll" data-toggle="modal" data-target="#reroll-modal"><i class='icon-repeat'></i></a>
|
||||
{else}
|
||||
<a class="money btn-buy item-btn" x-bind=click:buyItem data-type={@item.type} data-value={@item.value} data-index={@item.index}>
|
||||
<span class="reward-cost">{@item.value}</span>
|
||||
<span class='shop_gold'></span>
|
||||
</a>
|
||||
{/}
|
||||
</div>
|
||||
<!-- main content -->
|
||||
<span class="shop_{@item.classes} shop-sprite item-img"></span>
|
||||
<p class="task-text">{@item.text}</p>
|
||||
</li>
|
||||
|
|
@ -1,157 +0,0 @@
|
|||
<settings-pane:>
|
||||
<div class='row-fluid'>
|
||||
<div class="personal-options span6 border-right">
|
||||
<h2>{{t("settings")}}</h2>
|
||||
<h4>{{t("customDayStart")}}</h4>
|
||||
<div class="option-group option-short">
|
||||
<input class="option-content option-time" type="number" min=0 max=24 value={_user.preferences.dayStart}>
|
||||
<span class="input-suffix">:00 ({{t("24HrClock")}})</span>
|
||||
</div>
|
||||
<div>
|
||||
<small>{{t("clockInfo")}}</small>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
<h4>{{t("misc")}}</h4>
|
||||
<button x-bind="click:toggleHeader" class="btn">{#if _user.preferences.hideHeader}{{t("showHeader")}} {else} {{t("hideHeader")}}{/}</button>
|
||||
|
||||
{{#if _user.auth.local}}
|
||||
<hr/>
|
||||
<h4>{{t("changePass")}}</h4>
|
||||
<derby-auth:changePassword />
|
||||
{{/}}
|
||||
|
||||
<hr/>
|
||||
<h4>{{t("dangerZone")}}</h4>
|
||||
<a class='btn btn-danger' data-target="#reset-modal" data-toggle="modal" rel=tooltip title={{t("resetAltTest")}}>{{t("reset")}}</a>
|
||||
<a class='btn btn-danger' data-target="#restore-modal" data-toggle="modal" rel=tooltip title={{t("restoreAltText")}}>{{t("restore")}}</a>
|
||||
<a class='btn btn-danger' data-target="#delete-modal" data-toggle="modal" rel=tooltip title={{t("deleteAltText")}}>{{t("delete")}}</a>
|
||||
</div>
|
||||
<div class='span6'>
|
||||
<h2>API</h2>
|
||||
<small>{{t("APIText")}}</small>
|
||||
<h6>{{t("userId")}}</h6>
|
||||
<pre class=prettyprint>{_user.id}</pre>
|
||||
|
||||
<h6>{{t("APIToken")}}</h6>
|
||||
<pre class=prettyprint>{_user.apiToken}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modals:>
|
||||
{{#if _loggedIn}}
|
||||
<app:modals:modal modalId="reset-modal" header={{t("reset")}}>
|
||||
<p>{{t("resetText1")}}</p>
|
||||
<p>{{t("resetText2")}}</p>
|
||||
<@footer>
|
||||
<button class="btn" data-dismiss="modal" aria-hidden="true">{{t("close")}}</button>
|
||||
<button data-dismiss="modal" x-bind=click:reset class="btn btn-danger">{{t("reset")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<app:modals:modal modalId="restore-modal" header={{t("restore")}}>
|
||||
<p>{{t("restoreText1")}}</p>
|
||||
|
||||
{#with _user}
|
||||
<form id='restore-form' class="form-horizontal restore-options">
|
||||
<h3>{{t("stats")}}</h3>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='stats.hp' value="{{.stats.hp}}">
|
||||
<span class="input-suffix">HP</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='stats.exp' value="{{.stats.exp}}">
|
||||
<span class="input-suffix">Exp</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='stats.gp' value="{{.stats.gp}}">
|
||||
<span class="input-suffix">GP</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='stats.lvl' value="{{.stats.lvl}}">
|
||||
<span class="input-suffix">{{t("level")}}</span>
|
||||
</div>
|
||||
|
||||
<h3>{{t("items")}}</h3>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='items.weapon' value="{{.items.weapon}}">
|
||||
<span class="input-suffix">{{t("weapon")}}</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='items.armor' value="{{.items.armor}}">
|
||||
<span class="input-suffix">{{t("armor")}}</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='items.head' value="{{.items.head}}">
|
||||
<span class="input-suffix">{{t("helm")}}</span>
|
||||
</div>
|
||||
<div class="option-group option-medium">
|
||||
<input class="option-content" type="number" data-for='items.shield' value="{{.items.shield}}">
|
||||
<span class="input-suffix">{{t("shield")}}</span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/}
|
||||
|
||||
<@footer>
|
||||
<button class="btn" x-bind="click:restoreSave" data-dismiss="modal" aria-hidden="true">{{t("saveAndClose")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
<app:modals:modal modalId="delete-modal" header={{t("deleteHeader")}}>
|
||||
<p>{{t("deleteText1")}}<strong>{{t("deleteText2")}}</strong> {{t("deleteText3")}}</p>
|
||||
<p><input type="text" value="{_deleteAccount}" /></p>
|
||||
<@footer>
|
||||
<button class="btn btn-large" data-dismiss="modal" aria-hidden="true">Cancel</button>
|
||||
<button data-dismiss="modal" x-bind="click:deleteAccount" class="btn btn-danger btn-small {#unless equal(_deleteAccount,'DELETE')}disabled{/}">{{t("deleteHeader")}}</button>
|
||||
</@footer>
|
||||
</app:modals:modal>
|
||||
|
||||
{{else}}
|
||||
<app:modals:modal modalId="login-modal" header={{t("loginAndReg")}}>
|
||||
<a href="/auth/facebook"><img src='/img/facebook-login-register.jpeg' alt={{t("loginFacebookAlt")}}/></a>
|
||||
<h3>{{t("or")}}</h3>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#" data-toggle="tab" data-target="#login">{{t("login")}}</a></li>
|
||||
<li><a href="#" data-toggle="tab" data-target="#register">{{t("register")}}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="login"><derby-auth:login /></div>
|
||||
<div class="tab-pane" id="register"><derby-auth:register /></div>
|
||||
</div>
|
||||
</app:modals:modal>
|
||||
{{/}}
|
||||
|
||||
<menu:>
|
||||
<div class="user-menu">
|
||||
{{#unless _loggedIn}}
|
||||
<button class="task-action-btn tile solid" style='cursor:pointer' data-target="#login-modal" data-toggle="modal">{{t("loginAndRegister")}}</button>
|
||||
{{else}}
|
||||
<ul class="nav site-nav">
|
||||
<li class="flyout">
|
||||
<h1 class="task-action-btn tile solid user-reporter">{{username(_user.auth, _user.profile.name)}}</h1>
|
||||
<ul class="flyout-content nav stacked">
|
||||
<li>
|
||||
<a class="task-action-btn tile solid" x-bind='click:toggleGamePane'>
|
||||
{#if _gamePane}Tasks{else}Options{/}
|
||||
</a>
|
||||
</li>
|
||||
<li><a class="task-action-btn tile solid" href="/logout">{{t("logout")}}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{{/}}
|
||||
|
||||
<!-- party invitation notification -->
|
||||
{#if _user.party.invitation}
|
||||
<a style='cursor:pointer;' x-bind="click:gotoPartyChat"><i class='icon-user'></i></a>
|
||||
{/}
|
||||
|
||||
<!-- party chat notification -->
|
||||
{#if newChatMessages(_party.chat,_user.party.lastMessageSeen)}
|
||||
<a style='cursor:pointer;' x-bind="click:gotoPartyChat"><i class='icon-heart' rel='tooltip' title={{t("")}}></i></a>
|
||||
{/}
|
||||
|
||||
</div>
|
||||
Loading…
Reference in a new issue