Compare commits
No commits in common. "master" and "v2.0.3" have entirely different histories.
32 changed files with 59 additions and 581 deletions
|
@ -1,4 +1,4 @@
|
|||
build/*.js
|
||||
config/*.js
|
||||
dist/*.js
|
||||
src/tmp/*.js
|
||||
tmp/*.js
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
.DS_Store
|
||||
src/tmp/
|
||||
tmp/
|
||||
node_modules/
|
||||
dist/
|
||||
src/statics/spells.json
|
||||
|
|
24
LICENSE
24
LICENSE
|
@ -1,24 +0,0 @@
|
|||
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>
|
12
README.md
12
README.md
|
@ -2,8 +2,6 @@
|
|||
|
||||
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
|
||||
|
||||
[](https://play.google.com/store/apps/details?id=io.cordova.myspells)
|
||||
|
||||
## License
|
||||
|
||||
Open Game License v1.0a Copyright 2000, Wizards of the Coast, Inc.
|
||||
|
@ -23,16 +21,10 @@ 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_web
|
||||
$ npm run dev
|
||||
|
||||
# build for production with minification
|
||||
$ 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>
|
||||
$ npm run build
|
||||
|
||||
# lint code
|
||||
$ npm run lint
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
'use strict'
|
||||
|
||||
const args = require('yargs').argv
|
||||
|
||||
const fs = require('fs')
|
||||
const spells = require('../src/spells_original.json')
|
||||
|
||||
|
@ -16,8 +14,6 @@ const hashCode = function (str) {
|
|||
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
|
||||
|
@ -28,26 +24,16 @@ let indexedSpells = spellsWithIDs.map(spell => {
|
|||
id: spell.id,
|
||||
name: spell.name,
|
||||
classes: spell.classes,
|
||||
level: spell.level.toLowerCase() === 'cantrip' ? 0 : parseInt(spell.level),
|
||||
level: spell.level,
|
||||
link: '/spell/' + spell.id,
|
||||
}
|
||||
})
|
||||
|
||||
let dirs = ['dist', 'dist/statics', 'src/tmp']
|
||||
let dirs = ['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')
|
||||
fs.writeFileSync('./src/statics/spells.json', JSON.stringify(spellsWithIDs))
|
||||
fs.writeFileSync('./tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
|
|
@ -2,5 +2,5 @@ var
|
|||
shell = require('shelljs'),
|
||||
path = require('path')
|
||||
|
||||
shell.rm('-rf', path.resolve(__dirname, '../dist ../src/tmp'))
|
||||
shell.rm('-rf', path.resolve(__dirname, '../dist ../tmp'))
|
||||
console.log(' Cleaned build artifacts.\n')
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
process.env.NODE_ENV = 'development'
|
||||
|
||||
require('./generate_index')
|
||||
require('colors')
|
||||
|
||||
var
|
||||
|
|
22
cordova/.idea/compiler.xml
generated
22
cordova/.idea/compiler.xml
generated
|
@ -1,22 +0,0 @@
|
|||
<?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>
|
3
cordova/.idea/copyright/profiles_settings.xml
generated
3
cordova/.idea/copyright/profiles_settings.xml
generated
|
@ -1,3 +0,0 @@
|
|||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
24
cordova/.idea/cordova.iml
generated
24
cordova/.idea/cordova.iml
generated
|
@ -1,24 +0,0 @@
|
|||
<?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
14
cordova/.idea/misc.xml
generated
|
@ -1,14 +0,0 @@
|
|||
<?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
8
cordova/.idea/modules.xml
generated
|
@ -1,8 +0,0 @@
|
|||
<?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
291
cordova/.idea/workspace.xml
generated
|
@ -1,291 +0,0 @@
|
|||
<?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="<template>" 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="<template>" 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="<template>" 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>
|
|
@ -1,2 +0,0 @@
|
|||
# OS X
|
||||
.DS_Store
|
|
@ -1,31 +0,0 @@
|
|||
<?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>
|
|
@ -1,23 +0,0 @@
|
|||
<!--
|
||||
#
|
||||
# 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.
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
<!--
|
||||
#
|
||||
# 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.
Before Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
|
@ -1 +0,0 @@
|
|||
../dist
|
12
package.json
12
package.json
|
@ -1,16 +1,13 @@
|
|||
{
|
||||
"name": "my_spells",
|
||||
"version": "2.0.5",
|
||||
"version": "2.0.3",
|
||||
"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_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",
|
||||
"dev": "node build/script.dev.js",
|
||||
"build": "node build/script.build.js",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -70,7 +67,6 @@
|
|||
"webpack-dev-middleware": "^1.8.4",
|
||||
"webpack-hot-middleware": "^2.17.0",
|
||||
"webpack-merge": "^4.0.0",
|
||||
"whatwg-fetch": "^2.0.3",
|
||||
"yargs": "^8.0.2"
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
}
|
||||
}
|
||||
|
|
18
src/App.vue
18
src/App.vue
|
@ -25,7 +25,6 @@ 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)
|
||||
|
@ -51,18 +50,11 @@ function fetchFailure (reason) {
|
|||
}
|
||||
|
||||
function fetchSpells () {
|
||||
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() })
|
||||
}
|
||||
fetch('./statics/spells.json')
|
||||
.then(response => response.json())
|
||||
.then(fetchSuccess)
|
||||
.catch(fetchFailure)
|
||||
.then(() => { Loading.hide() })
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
>{{state.chosen.length}}</span>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
hidden
|
||||
hidden="true"
|
||||
route="/spell"
|
||||
>
|
||||
Spell
|
||||
</q-tab>
|
||||
<q-tab
|
||||
hidden
|
||||
hidden="true"
|
||||
route="/about"
|
||||
>
|
||||
About
|
||||
|
@ -52,6 +52,4 @@ export default {
|
|||
<style scoped lang="stylus">
|
||||
footer .q-tabs
|
||||
width: 100%
|
||||
.pointing-left:before
|
||||
transform: translateX(-50%) translateY(-50%) rotate(225deg)
|
||||
</style>
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
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}}
|
||||
|
@ -163,4 +170,17 @@ 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>
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
<template>
|
||||
<div v-bind:class="{'checked': checked}">
|
||||
<div class="item-primary">
|
||||
{{spell.level}}
|
||||
{{level}}
|
||||
</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>
|
||||
<div>
|
||||
{{spell.name}}
|
||||
</div>
|
||||
<div>
|
||||
{{classes}}
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
<div class="item-secondary" v-on:click="toggle">
|
||||
|
@ -35,6 +32,9 @@ 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)
|
||||
},
|
||||
|
@ -66,19 +66,10 @@ 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-content a
|
||||
color: black
|
||||
div:not(:first-of-type)
|
||||
color: rgba(0, 0, 0, .54)
|
||||
.item-secondary
|
||||
width: 50px
|
||||
height: 50px
|
||||
|
|
|
@ -34,11 +34,9 @@ export default {
|
|||
},
|
||||
props: [ 'spells' ],
|
||||
mounted () {
|
||||
if (this.state.lastSpell) {
|
||||
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
|
||||
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
|
||||
scrollingPageElement.scrollTop = lastSpellPosition
|
||||
}
|
||||
let lastSpellPosition = this.$refs[this.state.lastSpell][0].$el.offsetTop
|
||||
let scrollingPageElement = document.getElementsByClassName('layout-view')[0]
|
||||
scrollingPageElement.scrollTop = lastSpellPosition
|
||||
},
|
||||
computed: {
|
||||
filteredSpells () {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { LocalStorage } from 'quasar'
|
||||
import indexedSpells from './tmp/spells_index'
|
||||
import indexedSpells from '../tmp/spells_index'
|
||||
|
||||
export let state = {
|
||||
indexedSpells,
|
||||
|
|
Loading…
Add table
Reference in a new issue