1
0
Fork 0

Compare commits

...

25 commits

Author SHA1 Message Date
Jo Wroten
4f46f34f51 Add LICENSE 2019-08-07 03:38:10 +00:00
Joe Wroten
7213f44192 Play store badge 2019-01-26 18:09:31 -06:00
sharpshark28
6d4ab9423e v2.0.5 2017-08-18 00:10:14 -05:00
Joe L Wroten
6d188edef3 Merge pull request #27 from sharpshark28/26
Sorting by level works as expected
2017-08-18 00:07:11 -05:00
Joe L Wroten
ba63c28e01 Merge branch 'master' into 26 2017-08-17 22:37:45 -05:00
sharpshark28
5c73ec1c9d Sorting by level works as expected 2017-08-17 22:37:18 -05:00
Joe L Wroten
b98b515564 Merge pull request #25 from sharpshark28/9
Same large/small spell visual, scroll fix
2017-08-17 07:51:35 -05:00
sharpshark28
8c89c6b5fa Same large/small spell visual, scroll fix 2017-08-17 07:46:33 -05:00
sharpshark28
a30d0db4e4 [Documentation]: Badges and Play Store Link 2017-08-13 07:13:31 -05:00
Joe L Wroten
cdcd9c19e9 Merge pull request #22 from sharpshark28/4
[ENHANCEMENT]: Android native
2017-08-12 19:36:39 -05:00
sharpshark28
b95bb89066 [ENHANCEMENT]: Android native 2017-08-12 19:35:34 -05:00
sharpshark28
52f7a2eed2 [FIX]: Undefined var errors 2017-08-11 20:42:50 -05:00
Joe L Wroten
5c7e0adabb Merge pull request #21 from sharpshark28/14
[FIX]: Cordova css lag fix for chosen spells
2017-08-11 20:26:31 -05:00
sharpshark28
bd9e0ee283 [FIX]: Cordova css lag fix for chosen spells 2017-08-11 08:18:56 -05:00
sharpshark28
b5b24a46f8 Spell list links center and take full height 2017-07-28 13:32:08 -05:00
sharpshark28
05683d77fd Fixed production build index generation 2017-07-28 13:11:23 -05:00
Joe Wroten
a38f787eda 2.0.3 2017-07-13 23:35:13 -05:00
Joe Wroten
7f20f8b300 [FIX] Anchor links instead of actions spell list 2017-07-13 23:33:51 -05:00
Joe L Wroten
37f915e6d6 Merge pull request #20 from sharpshark28/fix/scrolltotop
[FIX]: Scroll To Top and mobile scroll fix
2017-06-24 14:56:44 -05:00
sharpshark28
60900b2295 [FIX]: Scroll To Top and mobile scroll fix 2017-06-24 14:56:06 -05:00
Joe L Wroten
865e5cf34d Merge pull request #19 from sharpshark28/fix/dupespellantilife
[FIX]: Fixed duplicate spell Antilife Shell
2017-06-24 14:16:26 -05:00
sharpshark28
36cd5a021e [FIX]: Fixed duplicate spell Antilife Shell 2017-06-24 14:14:19 -05:00
Joe L Wroten
17f669f2d2 Merge pull request #18 from sharpshark28/enhancement/spellids
[FIX]: Spells now identified by IDs, fixes #17
2017-06-24 14:09:41 -05:00
sharpshark28
f0a80e3beb [FIX]: Spells now identified by IDs, fixes #17 2017-06-24 14:08:35 -05:00
sharpshark28
4bf53c5174 [VERSION]: Bump v2.0.2 2017-05-28 20:30:47 -05:00
36 changed files with 646 additions and 107 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -1,3 +1,4 @@
build/*.js
config/*.js
dist/*.js
src/tmp/*.js

2
.gitignore vendored
View file

@ -1,6 +1,8 @@
.DS_Store
src/tmp/
node_modules/
dist/
src/statics/spells.json
npm-debug.log
npm-debug.log.*
selenium-debug.log

24
LICENSE Normal file
View file

@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>

View file

@ -2,6 +2,8 @@
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
[![PlayStore](https://play.google.com/intl/en_us/badges/images/badge_new.png)](https://play.google.com/store/apps/details?id=io.cordova.myspells)
## License
Open Game License v1.0a Copyright 2000, Wizards of the Coast, Inc.
@ -21,10 +23,16 @@ App contains content from the SRD and is restricted and covered by the OGL. You
$ npm install
# serve with hot reload at localhost:8080
$ npm run dev
$ npm run dev_web
# build for production with minification
$ npm run build
$ npm run build_web # or build_app
# build cordova (android, iOS potentially in future) release
$ npm run build_app_cordova
# sign apk with android studio or jarsigner
# install on device
$ adp install cordova/platforms/android/build/apk/<BUILT-FILE.apk>
# lint code
$ npm run lint

53
build/process_spells.js Normal file
View file

@ -0,0 +1,53 @@
'use strict'
const args = require('yargs').argv
const fs = require('fs')
const spells = require('../src/spells_original.json')
const hashCode = function (str) {
let hash = 0, i, chr
if (str.length === 0) return hash
for (i = 0; i < str.length; i++) {
chr = str.charCodeAt(i)
hash = ((hash << 5) - hash) + chr
hash |= 0
}
return hash
}
console.log('Processing spells...', args.web ? 'for web!' : 'for apps!')
let spellsWithIDs = spells.map(spell => {
spell.id = hashCode(spell.name).toString()
return spell
})
let indexedSpells = spellsWithIDs.map(spell => {
return {
id: spell.id,
name: spell.name,
classes: spell.classes,
level: spell.level.toLowerCase() === 'cantrip' ? 0 : parseInt(spell.level),
link: '/spell/' + spell.id,
}
})
let dirs = ['dist', 'dist/statics', 'src/tmp']
dirs.forEach(dir => {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir)
}
})
fs.writeFileSync('./src/tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
if (args.web) {
fs.writeFileSync('./dist/statics/spells.json', JSON.stringify(spellsWithIDs));
fs.writeFileSync('./src/tmp/spells.js', `export default []; // Will fetch from web`)
}
else {
fs.writeFileSync('./src/tmp/spells.js', `export default ${JSON.stringify(spellsWithIDs)};`)
}
console.log('Processed spells')

View file

@ -2,5 +2,5 @@ var
shell = require('shelljs'),
path = require('path')
shell.rm('-rf', path.resolve(__dirname, '../dist'))
shell.rm('-rf', path.resolve(__dirname, '../dist ../src/tmp'))
console.log(' Cleaned build artifacts.\n')

22
cordova/.idea/compiler.xml generated Normal file
View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View file

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

24
cordova/.idea/cordova.iml generated Normal file
View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/../gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/../gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/../../cordova/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/../../cordova/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/../../cordova/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/../../cordova/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/../../cordova/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

14
cordova/.idea/misc.xml generated Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" assert-keyword="false" jdk-15="false" />
</project>

8
cordova/.idea/modules.xml generated Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cordova.iml" filepath="$PROJECT_DIR$/.idea/cordova.iml" />
</modules>
</component>
</project>

291
cordova/.idea/workspace.xml generated Normal file
View file

@ -0,0 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
<ignored path="cordova.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="cordova" />
</component>
<component name="GenerateSignedApkSettings">
<option name="KEY_STORE_PATH" value="$USER_HOME$/android/keystore/sharpshark28-keystore.jks" />
<option name="KEY_ALIAS" value="key0" />
</component>
<component name="GradleLocalSettings">
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="ProjectFrameBounds">
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="873" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectView">
<navigator currentView="AndroidView" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="AndroidView">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="cordova" />
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="ProjectPane" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
<property name="settings.editor.selected.configurable" value="android.sdk-updates" />
<property name="settings.editor.splitter.proportion" value="0.2" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/platforms/android/build/outputs/apk/android-release-unsigned.apk" />
<property name="ExportedModule" value="cordova" />
<property name="ExportedApkPath" value="$PROJECT_DIR$/cordova.apk" />
<property name="AndroidRunProguardForReleaseBuild" value="false" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
</component>
<component name="RunManager">
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
<method />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<method />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<envs />
<properties />
<listeners />
<method />
</configuration>
<configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
</configuration>
<configuration name="&lt;template&gt;" type="JUnit" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
</configuration>
<configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
<created>1502571896668</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1502571896668</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
<editor active="false" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24892704" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Android Model" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>Android</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>Android|cordova</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

2
cordova/.npmignore Normal file
View file

@ -0,0 +1,2 @@
# OS X
.DS_Store

31
cordova/config.xml Normal file
View file

@ -0,0 +1,31 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.myspells" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>My Spells DnD5e</name>
<description>
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
</description>
<author email="joe@wroten.me" href="https://www.wroten.me/">
Joe Wroten
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="android">
<icon density="ldpi" src="res/android/ldpi.png" />
<icon density="mdpi" src="res/android/mdpi.png" />
<icon density="hdpi" src="res/android/hdpi.png" />
<icon density="xhdpi" src="res/android/xhdpi.png" />
<icon density="xxhdpi" src="res/android/xxhdpi.png" />
<icon density="xxxhdpi" src="res/android/xxxhdpi.png" />
</platform>
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
</widget>

23
cordova/hooks/README.md Normal file
View file

@ -0,0 +1,23 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks
Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.

24
cordova/package.json Normal file
View file

@ -0,0 +1,24 @@
{
"name": "my_spells_app",
"displayName": "My Spells - Cordova",
"version": "1.0.0",
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Joe Wroten <joe@wroten.me>",
"license": "ISC",
"dependencies": {
"cordova-android": "^6.2.3",
"cordova-plugin-whitelist": "^1.3.2"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
},
"platforms": [
"android"
]
}
}

29
cordova/res/README.md Normal file
View file

@ -0,0 +1,29 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
Note that these image resources are not copied into a project when a project
is created with the CLI. Although there are default image resources in a
newly-created project, those come from the platform-specific project template,
which can generally be found in the platform's `template` directory. Until
icon and splashscreen support is added to the CLI, these image resources
aren't used directly.
See https://issues.apache.org/jira/browse/CB-5145

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

1
cordova/www Symbolic link
View file

@ -0,0 +1 @@
../dist

View file

@ -1,13 +1,16 @@
{
"name": "my_spells",
"version": "2.0.1",
"version": "2.0.5",
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
"author": "Joe Wroten <joe@wroten.me>",
"license": "ISC",
"scripts": {
"clean": "node build/script.clean.js",
"dev": "node build/script.dev.js",
"build": "node build/script.build.js",
"dev_web": "node build/process_spells.js --web && node build/script.dev.js ",
"dev_app_cordova": "cd cordova && cordova run --device android",
"build_web": "node build/process_spells.js --web && node build/script.build.js",
"build_app": "node build/process_spells.js && node build/script.build.js",
"build_app_cordova": "cd cordova && cordova build --release",
"lint": "eslint --ext .js,.vue src"
},
"dependencies": {
@ -47,6 +50,7 @@
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"file-loader": "^0.11.1",
"friendly-errors-webpack-plugin": "^1.1.3",
"fs": "0.0.1-security",
"html-webpack-plugin": "^2.8.1",
"http-proxy-middleware": "^0.17.0",
"json-loader": "^0.5.4",
@ -66,6 +70,7 @@
"webpack-dev-middleware": "^1.8.4",
"webpack-hot-middleware": "^2.17.0",
"webpack-merge": "^4.0.0",
"whatwg-fetch": "^2.0.3"
"whatwg-fetch": "^2.0.3",
"yargs": "^8.0.2"
}
}

View file

@ -25,6 +25,7 @@ import 'whatwg-fetch'
import { state, dispatch } from './store'
import Header from './components/Header'
import Footer from './components/Footer'
import bakedInSpells from './tmp/spells'
Vue.component('nav-header', Header)
Vue.component('nav-footer', Footer)
@ -37,10 +38,6 @@ function fetchSuccess (data) {
loaded: true
}
})
dispatch({
type: 'SPELLS_CREATE_INDEX',
data
})
}
function fetchFailure (reason) {
@ -54,11 +51,18 @@ function fetchFailure (reason) {
}
function fetchSpells () {
fetch('./statics/dnd5e.json')
.then(response => response.json())
.then(fetchSuccess)
.catch(fetchFailure)
.then(() => { Loading.hide() })
console.log('WOW DATA', bakedInSpells)
if (bakedInSpells.length) {
fetchSuccess(bakedInSpells)
Loading.hide()
}
else {
fetch('./statics/spells.json')
.then(response => response.json())
.then(fetchSuccess)
.catch(fetchFailure)
.then(() => { Loading.hide() })
}
}
export default {
@ -71,8 +75,6 @@ export default {
}
if (!this.state.spells.loaded) {
Loading.show()
fetchSpells()
}
}

View file

@ -24,13 +24,13 @@
>{{state.chosen.length}}</span>
</q-tab>
<q-tab
hidden="true"
hidden
route="/spell"
>
Spell
</q-tab>
<q-tab
hidden="true"
hidden
route="/about"
>
About
@ -52,4 +52,6 @@ export default {
<style scoped lang="stylus">
footer .q-tabs
width: 100%
.pointing-left:before
transform: translateX(-50%) translateY(-50%) rotate(225deg)
</style>

View file

@ -35,7 +35,7 @@ export default {
return this.state.chosen.map(chosen => {
return this.state.indexedSpells.find(spell => {
return spell.name === chosen
return spell.id === chosen
})
})
}

View file

@ -8,13 +8,6 @@
Back
</button>
<button
v-go-back=" '/' "
class="page-back-big primary circular big shadow-2"
>
<i>arrow_back</i>
</button>
<div class="card bg-white">
<div class="card-title bg-pink text-white">
{{spell.name}}
@ -82,6 +75,7 @@
</template>
<script>
import { Loading } from 'quasar'
import { dispatch, state } from '../store'
import { capitalize } from '../utils'
import Marked from 'marked'
@ -91,14 +85,21 @@ export default {
return { state }
},
mounted () {
this.state.lastSpell = this.spell.name
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTop = 0
if (this.state.spells.loaded === false) {
Loading.show()
}
this.state.lastSpell = this.spell.id
},
computed: {
checked () {
return this.state.chosen.indexOf(this.spell.name) >= 0
return this.state.chosen.indexOf(this.spell.id) >= 0
},
spell () {
return this.state.spells.data.find(spell => spell.name === this.$route.params.name)
return this.state.spells.data.find(spell => spell.id === this.$route.params.id)
},
level () {
return this.spell.level.toLowerCase() === 'cantrip' ? 'C' : this.spell.level
@ -124,7 +125,7 @@ export default {
type: 'CHANGE_CHOSEN',
data: {
want,
name: this.spell.name
id: this.spell.id
}
})
}
@ -162,17 +163,4 @@ export default {
.bookmark
font-size: 1.25em
line-height: 1em
@media screen and (min-height: 800px)
.card
position: relative
top: 50%
transform: translateY(-50%)
.page-back-big
display: block
position: absolute
top: 1rem
left: 1rem
z-index: 1
.page-back-small
display: none
</style>

View file

@ -1,15 +1,20 @@
<template>
<div v-bind:class="{'checked': checked}">
<div class="item-primary">
{{level}}
{{spell.level}}
</div>
<div class="item-content has-secondary" v-on:click="openSpell">
<div>
{{spell.name}}
</div>
<div>
{{classes}}
</div>
<div class="item-content has-secondary">
<router-link :to="spell.link">
<span class="spell-link-alignment">
<span class="spell-name">
{{spell.name}}
</span>
<br />
<span class="spell-classes">
{{classes}}
</span>
</span>
</router-link>
</div>
<div class="item-secondary" v-on:click="toggle">
<i
@ -30,9 +35,6 @@ import { capitalize } from '../utils'
export default {
computed: {
level () {
return this.spell.level.toLowerCase() === 'cantrip' ? '0' : this.spell.level.charAt(0)
},
school () {
return capitalize(this.spell.school)
},
@ -40,7 +42,7 @@ export default {
return this.spell.classes.map(cla => capitalize(cla)).join(', ')
},
checked () {
return this.state.chosen.indexOf(this.spell.name) >= 0
return this.state.chosen.indexOf(this.spell.id) >= 0
}
},
data () {
@ -50,15 +52,12 @@ export default {
'spell'
],
methods: {
openSpell (event) {
this.$router.push('/spell/' + this.spell.name)
},
toggle () {
dispatch({
type: 'CHANGE_CHOSEN',
data: {
want: !this.checked,
name: this.spell.name
id: this.spell.id
}
})
}
@ -67,6 +66,19 @@ export default {
</script>
<style scoped lang="stylus">
.spell-classes
color: rgba(0, 0, 0, .54)
.item.two-lines > .item-content
height: 100%
padding: 0
a
color: black
display: table
height: 100%
width: 100%
.spell-link-alignment
display: table-cell
vertical-align: middle
.item-secondary
width: 50px
height: 50px

View file

@ -9,8 +9,8 @@
is="spell-item"
class="item two-lines item-link"
v-for="spell in filteredSpells"
:key="spell.name"
:ref="spell.name"
:key="spell.id"
:ref="spell.id"
:spell="spell"
>
</label>
@ -34,9 +34,11 @@ export default {
},
props: [ 'spells' ],
mounted () {
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTo(0, lastSpellPosition)
if (this.state.lastSpell) {
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
scrollingPageElement.scrollTop = lastSpellPosition
}
},
computed: {
filteredSpells () {

View file

@ -23,7 +23,7 @@ export default new VueRouter({
routes: [
{ path: '/', component: load('Index') }, // Default
{ path: '/my', component: load('Myspells') },
{ path: '/spell/:name', component: load('Spell') },
{ path: '/spell/:id', component: load('Spell') },
{ path: '/about', component: load('About') },
{ path: '*', component: load('Error404') } // Not found
]

View file

@ -6178,7 +6178,7 @@
"description": "Objects come to life at your command. Choose up to ten nonmagical objects within range that are not being worn or carried. Medium targets count as two objects, Large targets count as four objects, Huge targets count as eight objects. You can't animate any object larger than Huge. Each target animates and becomes a creature under your control until the spell ends or until reduced to 0 hit points.\n\nAs a bonus action, you can mentally command any creature you made with this spell if the creature is within 500 feet of you (if you control multiple creatures, you can command any or all of them at the same time, issuing the same command to each one). You decide what action the creature will take and where it will move during its next turn, or you can issue a general command, such as to guard a particular chamber or corridor. If you issue no commands, the creature only defends itself against hostile creatures. Once given an order, the creature continues to follow it until its task is complete.\n\n| Size | HP | AC | Attack | Str | Dex |\n\n| Tiny | 20 | 18 | +8 to hit, 1d4+4 damage | 4 | 18 |\n\n| Small | 25 | 16 | +6 to hit, 1d8+2 damage | 6 | 14 |\n\n| Medium | 40 | 13 | +5 to hit, 2d6+1 damage | 10 | 12 |\n\n| Large | 50 | 10 | +6 to hit, 2d10+2 damage | 14 | 10 |\n\n| Huge | 80 | 10 | +8 to hit, 2d12+2 damage | 18 | 6 |\n\nAn animated object is a construct with AC, hit points, attacks, Strength, and Dexterity determined by its size. Its Constitution is 10 and its Intelligence and Wisdom are 3, and its Charisma is 1. Its speed is 30 feet; if the object lacks legs or other appendages it can use for locomotion, it instead has a flying speed of 30 feet and can hover. If the object is securely attached to a surface or a larger object, such as a chain bolted to a wall, its speed is 0. It has blindsight with a radius of 30 feet and is blind beyond that distance. When the animated object drops to 0 hit points, it reverts to its original object form, and any remaining damage carries over to its original object form.\n\nIf you command an object to attack, it can make a single melee attack against a creature within 5 feet of it. It makes a slam attack with an attack bonus and bludgeoning damage determined by its size. The DM might rule that a specific object inflicts slashing or piercing damage based on its form.",
"duration": "Concentration, up to 1 minute",
"higher_levels": "If you cast this spell using a spell slot of 6th level or higher, you can animate two additional objects for each slot level above 5th.",
"level": "animated",
"level": "5",
"name": "Animate Objects",
"range": "120 feet",
"ritual": false,
@ -6202,7 +6202,7 @@
"somatic": true,
"verbal": true
},
"description": "A shimmering barrier extends out from you in a 10-foot-radius and moves with you, remaining centered on you and hedging out creatures other than undead and constructs. The barrier lasts for the duration.\n\nThe barrier prevents an affected creature from passing or reaching through. An affected creature can cast spells or make attacks with ranged or reach weapons through the barrier.\n\nIf you move so an affected creature is forced to pass through the barrier, the spell ends.",
"description": "A shimmering barrier extends out from you in a 10-foot radius and moves with you, remaining centered on you and hedging out creatures other than undead and constructs. The barrier lasts for the duration.\n\nThe barrier prevents an affected creature from passing or reaching through. An affected creature can cast spells or make attacks with ranged or reach weapons through the barrier.\n\nIf you move so an affected creature is forced to pass through the barrier, the spell ends.",
"duration": "Concentration, up to 1 hour",
"level": "5",
"name": "Antilife Shell",
@ -6211,7 +6211,7 @@
"school": "abjuration",
"tags": [
"druid",
"level6"
"level5"
],
"type": "5th-level abjuration"
},
@ -6243,30 +6243,6 @@
],
"type": "6th-level conjuration"
},
{
"casting_time": "1 action",
"classes": [
"druid"
],
"components": {
"material": false,
"raw": "V, S",
"somatic": true,
"verbal": true
},
"description": "A shimmering barrier extends out from you in a 10-foot radius and moves with you, remaining centered on you and hedging out creatures other than undead and constructs. The barrier lasts for the duration.\n\nThe barrier prevents an affected creature from passing or reaching through. An affected creature can cast spells or make attacks with ranged or reach weapons through the barrier.\n\nIf you move so that an affected creature is forced to pass through the barrier, the spell ends.",
"duration": "Concentration, up to 1 hour",
"level": "5",
"name": "Antilife Shell",
"range": "Self (10-foot radius)",
"ritual": false,
"school": "abjuration",
"tags": [
"druid",
"level5"
],
"type": "5th-level abjuration"
},
{
"casting_time": "8 hours",
"classes": [

View file

@ -1,11 +1,12 @@
import { LocalStorage } from 'quasar'
import indexedSpells from './tmp/spells_index'
export let state = {
indexedSpells,
spells: {
loaded: false,
data: []
},
indexedSpells: [],
chosen: [],
search: '',
sortBy: 'name',
@ -18,15 +19,6 @@ export function dispatch (action) {
case 'SPELLS_RESOLVED':
state.spells = action.data
break
case 'SPELLS_CREATE_INDEX':
state.indexedSpells = action.data.map(spell => {
return {
name: spell.name,
classes: spell.classes,
level: spell.level
}
})
break
case 'LOAD_LOCAL_CHOSEN' :
state.chosen = LocalStorage.get.item('chosen').split(',')
break
@ -36,10 +28,10 @@ export function dispatch (action) {
break
case 'CHANGE_CHOSEN':
if (action.data.want) {
state.chosen.push(action.data.name)
state.chosen.push(action.data.id)
}
else {
let index = state.chosen.indexOf(action.data.name)
let index = state.chosen.indexOf(action.data.id)
if (index >= 0) state.chosen.splice(index, 1)
}

View file

@ -1 +1 @@
export let capitalize = str => str.charAt(0).toUpperCase() + str.slice(1)
export const capitalize = str => str.charAt(0).toUpperCase() + str.slice(1)