text stringlengths 1 2.83M | id stringlengths 16 152 | metadata dict | __index_level_0__ int64 0 949 |
|---|---|---|---|
<template>
<span :id="`files-role-${roleName}`" class="roles-select-role-item">
<span
class="oc-text-bold oc-display-block oc-width-1-1"
v-text="$gettext((role as ShareRole).displayName)"
/>
<span
class="oc-m-rm oc-text-small oc-display-block"
v-text="$gettext((role as ShareRole).d... | owncloud/web/packages/web-app-files/src/components/SideBar/Shares/Shared/RoleItem.vue/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/components/SideBar/Shares/Shared/RoleItem.vue",
"repo_id": "owncloud",
"token_count": 703
} | 793 |
import { onBeforeUnmount, onMounted, unref, Ref, watchEffect } from 'vue'
import { QueryValue, FolderViewModeConstants, useResourcesStore } from '@ownclouders/web-pkg'
import { eventBus } from '@ownclouders/web-pkg'
import { KeyboardActions } from '@ownclouders/web-pkg'
import { Resource } from '@ownclouders/web-client... | owncloud/web/packages/web-app-files/src/composables/keyboardActions/useKeyboardTableMouseActions.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/composables/keyboardActions/useKeyboardTableMouseActions.ts",
"repo_id": "owncloud",
"token_count": 1362
} | 794 |
export { default as SDKSearch } from './sdk'
| owncloud/web/packages/web-app-files/src/search/index.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/search/index.ts",
"repo_id": "owncloud",
"token_count": 14
} | 795 |
<template>
<app-loading-spinner v-if="loading" />
<div
v-else
id="files-drop-container"
class="oc-height-1-1 oc-flex oc-flex-column oc-flex-between"
>
<div v-if="dragareaEnabled" class="dragarea" />
<h1 class="oc-invisible-sr">{{ pageTitle }}</h1>
<div class="oc-p oc-height-1-1 oc-text-cen... | owncloud/web/packages/web-app-files/src/views/FilesDrop.vue/0 | {
"file_path": "owncloud/web/packages/web-app-files/src/views/FilesDrop.vue",
"repo_id": "owncloud",
"token_count": 3508
} | 796 |
import CreateSpace from '../../../../src/components/AppBar/CreateSpace.vue'
import { mockDeep } from 'vitest-mock-extended'
import { Resource } from '@ownclouders/web-client'
import { Drive } from '@ownclouders/web-client/src/generated'
import { defaultPlugins, mount, defaultComponentMocks, mockAxiosResolve } from 'web... | owncloud/web/packages/web-app-files/tests/unit/components/AppBar/CreateSpace.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/AppBar/CreateSpace.spec.ts",
"repo_id": "owncloud",
"token_count": 975
} | 797 |
import FileDetails from '../../../../../src/components/SideBar/Details/FileDetails.vue'
import { ShareResource, ShareTypes } from '@ownclouders/web-client/src/helpers/share'
import { defaultComponentMocks, defaultPlugins, RouteLocation } from 'web-test-helpers'
import { mock, mockDeep } from 'vitest-mock-extended'
impo... | owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Details/FileDetails.spec.ts",
"repo_id": "owncloud",
"token_count": 3313
} | 798 |
import SharesPanel from 'web-app-files/src/components/SideBar/Shares/SharesPanel.vue'
import { defaultPlugins, shallowMount } from 'web-test-helpers'
const ocLoaderStubSelector = 'oc-loader-stub'
describe('SharesPanel', () => {
describe('when loading is set to true', () => {
it('should show the oc loader', () =... | owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Shares/SharesPanel.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/components/SideBar/Shares/SharesPanel.spec.ts",
"repo_id": "owncloud",
"token_count": 522
} | 799 |
import Favorites from '../../../src/views/Favorites.vue'
import { useResourcesViewDefaults } from 'web-app-files/src/composables'
import { useResourcesViewDefaultsMock } from 'web-app-files/tests/mocks/useResourcesViewDefaultsMock'
import { h, ref } from 'vue'
import { mockDeep, mock } from 'vitest-mock-extended'
impor... | owncloud/web/packages/web-app-files/tests/unit/views/Favorites.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-app-files/tests/unit/views/Favorites.spec.ts",
"repo_id": "owncloud",
"token_count": 1272
} | 800 |
import { storeToRefs } from 'pinia'
import {
useThemeStore,
useModals,
useUserStore,
useAuthStore,
useResourcesStore
} from '@ownclouders/web-pkg'
import { useGettext } from 'vue3-gettext'
import { useService } from '@ownclouders/web-pkg'
import { computed, nextTick, unref } from 'vue'
import type { UppyServi... | owncloud/web/packages/web-app-importer/src/extensions.ts/0 | {
"file_path": "owncloud/web/packages/web-app-importer/src/extensions.ts",
"repo_id": "owncloud",
"token_count": 1762
} | 801 |
{
"name": "pdf-viewer",
"version": "0.0.0",
"private": true,
"description": "ownCloud web PDF viewer",
"license": "AGPL-3.0",
"devDependencies": {
"web-test-helpers": "workspace:*"
},
"peerDependencies": {
"@ownclouders/web-pkg": "workspace:*",
"vue3-gettext": "2.4.0"
}
}
| owncloud/web/packages/web-app-pdf-viewer/package.json/0 | {
"file_path": "owncloud/web/packages/web-app-pdf-viewer/package.json",
"repo_id": "owncloud",
"token_count": 139
} | 802 |
[main]
host = https://www.transifex.com
[o:owncloud-org:p:owncloud-web:r:search]
file_filter = locale/<lang>/LC_MESSAGES/app.po
minimum_perc = 0
source_file = template.pot
source_lang = en
type = PO
| owncloud/web/packages/web-app-search/l10n/.tx/config/0 | {
"file_path": "owncloud/web/packages/web-app-search/l10n/.tx/config",
"repo_id": "owncloud",
"token_count": 83
} | 803 |
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Text editor app > shows the editor 1`] = `
"<div class="oc-text-editor oc-width-1-1 oc-height-1-1">
<!---->
</div>"
`;
| owncloud/web/packages/web-app-text-editor/tests/unit/__snapshots__/app.spec.ts.snap/0 | {
"file_path": "owncloud/web/packages/web-app-text-editor/tests/unit/__snapshots__/app.spec.ts.snap",
"repo_id": "owncloud",
"token_count": 82
} | 804 |
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can... | owncloud/web/packages/web-client/src/generated/.openapi-generator-ignore/0 | {
"file_path": "owncloud/web/packages/web-client/src/generated/.openapi-generator-ignore",
"repo_id": "owncloud",
"token_count": 300
} | 805 |
import { Capabilities, GetCapabilitiesFactory } from './capabilities'
import { AxiosInstance } from 'axios'
import { UrlSign } from './urlSign'
import { Ref } from 'vue'
import { User } from '../generated'
export type { Capabilities } from './capabilities'
export interface OCS {
getCapabilities: () => Promise<Capab... | owncloud/web/packages/web-client/src/ocs/index.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/ocs/index.ts",
"repo_id": "owncloud",
"token_count": 322
} | 806 |
import { Headers } from 'webdav'
import { urlJoin } from '../utils'
import { isPublicSpaceResource, SpaceResource } from '../helpers'
import { WebDavOptions } from './types'
import { buildPublicLinkAuthHeader, DAV } from './client'
import { HttpError } from '../errors'
export type GetFileContentsResponse = {
body: a... | owncloud/web/packages/web-client/src/webdav/getFileContents.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/webdav/getFileContents.ts",
"repo_id": "owncloud",
"token_count": 776
} | 807 |
import { CreateFolderFactory } from './createFolder'
import { GetFileContentsFactory } from './getFileContents'
import { GetFileInfoFactory } from './getFileInfo'
import { GetFileUrlFactory } from './getFileUrl'
import { GetPublicFileUrlFactory } from './getPublicFileUrl'
import { ListFilesFactory } from './listFiles'
... | owncloud/web/packages/web-client/src/webdav/types.ts/0 | {
"file_path": "owncloud/web/packages/web-client/src/webdav/types.ts",
"repo_id": "owncloud",
"token_count": 791
} | 808 |
<template>
<oc-button
id="new-space-menu-btn"
v-oc-tooltip="$gettext('Request new project')"
type="a"
href="https://cern.service-now.com/service-portal?id=sc_cat_item&name=request-storage-space&se=CERNBox-Service"
target="_blank"
appearance="filled"
variation="primary"
>
<oc-icon nam... | owncloud/web/packages/web-pkg/src/cern/components/CreateSpace.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/cern/components/CreateSpace.vue",
"repo_id": "owncloud",
"token_count": 165
} | 809 |
<template>
<div>
<oc-list
id="oc-appbar-batch-actions"
:class="{ 'oc-appbar-batch-actions-squashed': limitedScreenSpace }"
>
<action-menu-item
v-for="(action, index) in actions"
:key="`action-${index}`"
:action="action"
:action-options="actionOptions"
... | owncloud/web/packages/web-pkg/src/components/BatchActions.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/BatchActions.vue",
"repo_id": "owncloud",
"token_count": 751
} | 810 |
<template>
<div id="tiles-view" class="oc-px-m oc-pt-l">
<div v-if="sortFields.length" class="oc-tile-sorting oc-border-b oc-mb-m oc-pb-s">
<span class="oc-mr-xs" v-text="$gettext('Sort by: ')" />
<oc-button id="oc-tiles-sort-btn" appearance="raw" gap-size="none">
<span v-text="$gettext(curren... | owncloud/web/packages/web-pkg/src/components/FilesList/ResourceTiles.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/FilesList/ResourceTiles.vue",
"repo_id": "owncloud",
"token_count": 7330
} | 811 |
<template>
<div>
<oc-select
ref="select"
:model-value="selectedOption"
:selectable="optionSelectable"
taggable
push-tags
:clearable="false"
:options="options"
:create-option="createOption"
option-label="displayValue"
v-bind="$attrs"
@update:model-v... | owncloud/web/packages/web-pkg/src/components/QuotaSelect.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/QuotaSelect.vue",
"repo_id": "owncloud",
"token_count": 2347
} | 812 |
<template>
<tr>
<th scope="col" class="oc-pr-s oc-font-semibold" v-text="$gettext('WebDAV path')" />
<td class="oc-flex oc-flex-middle">
<div
v-oc-tooltip="resource.webDavPath"
class="oc-text-truncate"
v-text="resource.webDavPath"
/>
<oc-button
v-oc-tooltip="$... | owncloud/web/packages/web-pkg/src/components/SideBar/WebDavDetails.vue/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/components/SideBar/WebDavDetails.vue",
"repo_id": "owncloud",
"token_count": 1144
} | 813 |
import {
Resource,
SpaceResource,
extractNameWithoutExtension
} from '@ownclouders/web-client/src/helpers'
import { computed, unref } from 'vue'
import { useClientService } from '../../clientService'
import { useRouter } from '../../router'
import { FileAction, FileActionOptions } from '../types'
import { useGett... | owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsCreateNewFile.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsCreateNewFile.ts",
"repo_id": "owncloud",
"token_count": 2398
} | 814 |
import { dirname } from 'path'
import { isLocationTrashActive } from '../../../router'
import {
Resource,
isProjectSpaceResource,
extractExtensionFromFile,
SpaceResource
} from '@ownclouders/web-client/src/helpers'
import {
ResolveStrategy,
ResolveConflict,
resolveFileNameDuplicate,
ConflictDialog
} fr... | owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsRestore.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/files/useFileActionsRestore.ts",
"repo_id": "owncloud",
"token_count": 3503
} | 815 |
import { Drive } from '@ownclouders/web-client/src/generated'
import { computed, unref } from 'vue'
import { SpaceAction, SpaceActionOptions } from '../types'
import { useRoute } from '../../router'
import { useAbility } from '../../ability'
import { useClientService } from '../../clientService'
import { useGettext } f... | owncloud/web/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsEditDescription.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/actions/spaces/useSpaceActionsEditDescription.ts",
"repo_id": "owncloud",
"token_count": 969
} | 816 |
import { Ref, computed, unref } from 'vue'
import { basename } from 'path'
import { FileContext } from './types'
import { useAppMeta } from './useAppMeta'
import { useDocumentTitle } from './useDocumentTitle'
import { RouteLocationNormalizedLoaded } from 'vue-router'
import { MaybeRef } from 'vue'
import { useGettext }... | owncloud/web/packages/web-pkg/src/composables/appDefaults/useAppDocumentTitle.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/appDefaults/useAppDocumentTitle.ts",
"repo_id": "owncloud",
"token_count": 393
} | 817 |
import { useClipboard as _useClipboard } from '@vueuse/core'
export const useClipboard = () => {
// doCopy creates the requested link and copies the url to the clipboard,
// the copy action uses the clipboard // clipboardItem api to work around the webkit limitations.
//
// https://developer.apple.com/forums/t... | owncloud/web/packages/web-pkg/src/composables/clipboard/useClipboard.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/clipboard/useClipboard.ts",
"repo_id": "owncloud",
"token_count": 339
} | 818 |
export * from './ability'
export * from './actions'
export * from './appDefaults'
export * from './archiverService'
export * from './authContext'
export * from './breadcrumbs'
export * from './clientService'
export * from './clipboard'
export * from './download'
export * from './driveResolver'
export * from './embedMod... | owncloud/web/packages/web-pkg/src/composables/index.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/index.ts",
"repo_id": "owncloud",
"token_count": 328
} | 819 |
import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useAuthStore = defineStore('auth', () => {
const accessToken = ref<string>()
const idpContextReady = ref(false)
const userContextReady = ref(false)
const publicLinkToken = ref<string>()
const publicLinkPassword = ref<string>()
const... | owncloud/web/packages/web-pkg/src/composables/piniaStores/auth.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/piniaStores/auth.ts",
"repo_id": "owncloud",
"token_count": 581
} | 820 |
import { setUser as sentrySetUser } from '@sentry/vue'
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { User } from '@ownclouders/web-client/src/generated'
export const useUserStore = defineStore('user', () => {
const user = ref<User>()
const setUser = (data: User) => {
user.value = data... | owncloud/web/packages/web-pkg/src/composables/piniaStores/user.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/piniaStores/user.ts",
"repo_id": "owncloud",
"token_count": 169
} | 821 |
import { computed, ComputedRef, unref } from 'vue'
import { useRoute } from './useRoute'
export const useRouteName = (): ComputedRef<string> => {
const route = useRoute()
return computed(() => {
return unref(route).name as string
})
}
| owncloud/web/packages/web-pkg/src/composables/router/useRouteName.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/router/useRouteName.ts",
"repo_id": "owncloud",
"token_count": 81
} | 822 |
export enum SideBarEventTopics {
open = 'sidebar.open',
close = 'sidebar.close',
toggle = 'sidebar.toggle',
openWithPanel = 'sidebar.openWithPanel',
setActivePanel = 'sidebar.setActivePanel'
}
| owncloud/web/packages/web-pkg/src/composables/sideBar/eventTopics.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/composables/sideBar/eventTopics.ts",
"repo_id": "owncloud",
"token_count": 68
} | 823 |
export const EVENT_TROW_MOUNTED = 'rowMounted'
export const EVENT_FILE_DROPPED = 'fileDropped'
export const EVENT_TROW_CONTEXTMENU = 'contextmenuClicked'
export abstract class ImageDimension {
static readonly Thumbnail: [number, number] = [36, 36]
static readonly Tile: [number, number] = [1000, 1000]
static read... | owncloud/web/packages/web-pkg/src/constants.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/constants.ts",
"repo_id": "owncloud",
"token_count": 179
} | 824 |
export const getLocaleFromLanguage = (currentLanguage: string) => {
return (currentLanguage || '').split('_')[0]
}
| owncloud/web/packages/web-pkg/src/helpers/locale.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/helpers/locale.ts",
"repo_id": "owncloud",
"token_count": 35
} | 825 |
import { isShareSpaceResource, Resource, SpaceResource } from '@ownclouders/web-client/src/helpers'
import { ConfigStore, LocationQuery, useConfigStore } from '../../composables'
import { RouteParams } from 'vue-router'
import { isUndefined } from 'lodash-es'
/**
* Creates route options for routing into a file locati... | owncloud/web/packages/web-pkg/src/helpers/router/routeOptions.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/helpers/router/routeOptions.ts",
"repo_id": "owncloud",
"token_count": 390
} | 826 |
import { RouteRecordRaw } from 'vue-router'
import {
buildRoutes as buildCommonRoutes,
isLocationCommonActive,
createLocationCommon
} from './common'
import { buildRoutes as buildDeprecatedRoutes, isLocationActive } from './deprecated'
import {
buildRoutes as buildPublicRoutes,
createLocationPublic,
isLoca... | owncloud/web/packages/web-pkg/src/router/index.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/router/index.ts",
"repo_id": "owncloud",
"token_count": 581
} | 827 |
import { Language } from 'vue3-gettext'
import {
AtLeastCharactersRule,
AtLeastDigitsRule,
AtLeastLowercaseCharactersRule,
AtLeastUppercaseCharactersRule,
AtMostCharactersRule,
MustContainRule,
MustNotBeEmptyRule
} from './rules'
import { PasswordPolicyCapability } from '@ownclouders/web-client/src/ocs/ca... | owncloud/web/packages/web-pkg/src/services/passwordPolicy/passwordPolicy.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/src/services/passwordPolicy/passwordPolicy.ts",
"repo_id": "owncloud",
"token_count": 1767
} | 828 |
import { useScrollTo } from '../../src/composables/scrollTo'
export const useScrollToMock = (
options: Partial<ReturnType<typeof useScrollTo>> = {}
): ReturnType<typeof useScrollTo> => {
return {
scrollToResource: vi.fn(),
scrollToResourceFromRoute: vi.fn(),
...options
}
}
| owncloud/web/packages/web-pkg/tests/mocks/useScrollToMock.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/mocks/useScrollToMock.ts",
"repo_id": "owncloud",
"token_count": 102
} | 829 |
import CreateShortcutModal from '../../../src/components/CreateShortcutModal.vue'
import {
defaultComponentMocks,
defaultPlugins,
mockAxiosReject,
RouteLocation,
shallowMount
} from 'web-test-helpers'
import { SpaceResource } from '@ownclouders/web-client'
import { mock } from 'vitest-mock-extended'
import { ... | owncloud/web/packages/web-pkg/tests/unit/components/CreateShortcutModal.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/CreateShortcutModal.spec.ts",
"repo_id": "owncloud",
"token_count": 1196
} | 830 |
import ItemFilterToggle from '../../../src/components/ItemFilterToggle.vue'
import { defaultComponentMocks, defaultPlugins, mount } from 'web-test-helpers'
import { queryItemAsString } from '../../../src/composables/appDefaults'
import { unref } from 'vue'
vi.mock('../../../src/composables/appDefaults', () => ({
app... | owncloud/web/packages/web-pkg/tests/unit/components/ItemFilterToggle.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/ItemFilterToggle.spec.ts",
"repo_id": "owncloud",
"token_count": 780
} | 831 |
import CompareSaveDialog from '../../../../src/components/SideBar/CompareSaveDialog.vue'
import { defaultPlugins, shallowMount } from 'web-test-helpers'
describe('CompareSaveDialog', () => {
describe('computed method "unsavedChanges"', () => {
it('should be false if objects are equal', () => {
const { wrap... | owncloud/web/packages/web-pkg/tests/unit/components/sidebar/CompareSaveDialog.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/components/sidebar/CompareSaveDialog.spec.ts",
"repo_id": "owncloud",
"token_count": 488
} | 832 |
import { mock } from 'vitest-mock-extended'
import { unref } from 'vue'
import {
useFileActionsDeleteResources,
useFileActionsDelete
} from '../../../../../src/composables/actions'
import { Resource, SpaceResource } from '@ownclouders/web-client'
import { defaultComponentMocks, RouteLocation, getComposableWrapper }... | owncloud/web/packages/web-pkg/tests/unit/composables/actions/files/useFileActionsDelete.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/actions/files/useFileActionsDelete.spec.ts",
"repo_id": "owncloud",
"token_count": 2417
} | 833 |
import {
useOpenWithDefaultApp,
useSpaceActionsEditReadmeContent
} from '../../../../../src/composables/actions'
import { SpaceResource, buildSpace } from '@ownclouders/web-client/src/helpers'
import { getComposableWrapper } from 'web-test-helpers'
import { unref } from 'vue'
import { mock, mockDeep } from 'vitest-... | owncloud/web/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsEditReadmeContent.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/actions/spaces/useSpaceActionsEditReadmeContent.spec.ts",
"repo_id": "owncloud",
"token_count": 1580
} | 834 |
import { getComposableWrapper } from 'web-test-helpers'
import { useCapabilityStore } from '../../../../src/composables/piniaStores'
import { createPinia, setActivePinia } from 'pinia'
import { Capabilities } from '@ownclouders/web-client/src/ocs'
describe('useCapabilityStore', () => {
beforeEach(() => {
setActi... | owncloud/web/packages/web-pkg/tests/unit/composables/piniaStores/capabilities.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/composables/piniaStores/capabilities.spec.ts",
"repo_id": "owncloud",
"token_count": 663
} | 835 |
import { displayPositionedDropdown } from '../../../src/helpers'
describe('displayPositionedDropdown', () => {
it('shows the dropdown', () => {
const dropdown = { setProps: vi.fn(), show: vi.fn() }
const ctxMenuBtn = { $el: { getBoundingClientRect: vi.fn() } }
displayPositionedDropdown(dropdown, {}, ctxM... | owncloud/web/packages/web-pkg/tests/unit/helpers/contextMenuDropdown.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/helpers/contextMenuDropdown.spec.ts",
"repo_id": "owncloud",
"token_count": 1099
} | 836 |
import {
isLocationActive,
isLocationActiveDirector,
createLocation
} from '../../../src/router/utils'
import { RouteLocation, Router } from 'vue-router'
import { mock } from 'vitest-mock-extended'
import { ref } from 'vue'
describe('utils', () => {
describe('isLocationActive', () => {
it('returns true if ... | owncloud/web/packages/web-pkg/tests/unit/router/utils.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-pkg/tests/unit/router/utils.spec.ts",
"repo_id": "owncloud",
"token_count": 1292
} | 837 |
{
"name": "web-runtime",
"version": "0.0.0",
"private": true,
"description": "ownCloud web runtime",
"license": "AGPL-3.0",
"dependencies": {
"@casl/ability": "^6.3.3",
"@casl/vue": "^2.2.1",
"@fortawesome/fontawesome-free": "6.5.1",
"@ownclouders/web-client": "workspace:*",
"@ownclouder... | owncloud/web/packages/web-runtime/package.json/0 | {
"file_path": "owncloud/web/packages/web-runtime/package.json",
"repo_id": "owncloud",
"token_count": 892
} | 838 |
<template>
<oc-button
id="files-toggle-sidebar"
v-oc-tooltip="buttonLabel"
:aria-label="buttonLabel"
appearance="raw-inverse"
variation="brand"
class="oc-my-s"
@click.stop="toggleSideBar"
>
<oc-icon name="side-bar-right" :fill-type="buttonIconFillType" />
</oc-button>
</template>
... | owncloud/web/packages/web-runtime/src/components/Topbar/SideBarToggle.vue/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/components/Topbar/SideBarToggle.vue",
"repo_id": "owncloud",
"token_count": 477
} | 839 |
import { NextApplication } from './application'
/**
* main purpose of this is to keep a reference to all announced applications.
* this is used for example in the mounted hook outside container module
*/
export const applicationStore = new Map<string, NextApplication>()
| owncloud/web/packages/web-runtime/src/container/store.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/container/store.ts",
"repo_id": "owncloud",
"token_count": 61
} | 840 |
<template>
<div
class="loading-overlay oc-flex oc-flex-middle oc-flex-center"
:style="{
backgroundImage: 'url(' + currentTheme.loginPage.backgroundImg + ')'
}"
>
<oc-spinner size="xlarge" :aria-label="$gettext('Loading')" />
</div>
</template>
<script lang="ts">
import { useThemeStore } from... | owncloud/web/packages/web-runtime/src/layouts/Loading.vue/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/layouts/Loading.vue",
"repo_id": "owncloud",
"token_count": 372
} | 841 |
import { UserManager } from './userManager'
import { PublicLinkManager } from './publicLinkManager'
import {
AuthStore,
ClientService,
UserStore,
CapabilityStore,
ConfigStore
} from '@ownclouders/web-pkg'
import { RouteLocation, Router } from 'vue-router'
import {
extractPublicLinkToken,
isAnonymousContex... | owncloud/web/packages/web-runtime/src/services/auth/authService.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/src/services/auth/authService.ts",
"repo_id": "owncloud",
"token_count": 4406
} | 842 |
import SkipTo from 'web-runtime/src/components/SkipTo.vue'
import { shallowMount } from 'web-test-helpers'
;(document as any).getElementById = vi.fn(() => ({
setAttribute: vi.fn(),
focus: vi.fn(),
scrollIntoView: vi.fn()
}))
const selectors = {
skipButton: '.skip-button'
}
describe('SkipTo component', () => {... | owncloud/web/packages/web-runtime/tests/unit/components/SkipTo.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/tests/unit/components/SkipTo.spec.ts",
"repo_id": "owncloud",
"token_count": 404
} | 843 |
import { useCapabilityStore } from '@ownclouders/web-pkg'
import { getBackendVersion, getWebVersion } from '../../../src/container/versions'
import { createTestingPinia } from 'web-test-helpers'
describe('collect version information', () => {
describe('web version', () => {
beforeEach(() => {
process.env.P... | owncloud/web/packages/web-runtime/tests/unit/container/versions.spec.ts/0 | {
"file_path": "owncloud/web/packages/web-runtime/tests/unit/container/versions.spec.ts",
"repo_id": "owncloud",
"token_count": 782
} | 844 |
diff --git a/package.json b/package.json
index eddbb0a8f9ca9d022d7257d3c9428ae71e3be54c..04f790375ef36f03457c047f9cb0aba24ac0888f 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,6 @@
"version": "15.0.1",
"description": "Cancelable Async Flows: a wrapper to treat generators as cancelable async functions",
... | owncloud/web/patches/caf@15.0.1.patch/0 | {
"file_path": "owncloud/web/patches/caf@15.0.1.patch",
"repo_id": "owncloud",
"token_count": 204
} | 845 |
const path = require('path')
const events = require('events')
const archiver = require('archiver')
const _ = require('lodash')
class UploadRemote extends events.EventEmitter {
/**
* UploadRemote is responsible for using webdriver protocol to upload a local
* file to a remote Selenium server for use in testing ... | owncloud/web/tests/acceptance/customCommands/uploadRemote.js/0 | {
"file_path": "owncloud/web/tests/acceptance/customCommands/uploadRemote.js",
"repo_id": "owncloud",
"token_count": 808
} | 846 |
Feature: move folders
As a user
I want to move folders
So that I can organise my data structure
Background:
Given user "Alice" has been created with default attributes and without skeleton files in the server
And user "Alice" has created folder "simple-folder" in the server
And user "Alice" has cre... | owncloud/web/tests/acceptance/features/webUIMoveFilesFolders/moveFolders.feature/0 | {
"file_path": "owncloud/web/tests/acceptance/features/webUIMoveFilesFolders/moveFolders.feature",
"repo_id": "owncloud",
"token_count": 1581
} | 847 |
@mailhog @public_link_share-feature-required
Feature: Public link share management
As a user
I want to check different options available in public shares
So that I can manage and organize the shares
Background:
Given user "Alice" has been created with default attributes and without skeleton files in the se... | owncloud/web/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature/0 | {
"file_path": "owncloud/web/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature",
"repo_id": "owncloud",
"token_count": 2059
} | 848 |
const join = require('join-path')
const fs = require('fs')
const _ = require('lodash/fp')
const assert = require('assert')
const normalize = _.replace(/^\/+|$/g, '')
const parts = _.pipe(normalize, _.split('/'))
const relativeTo = function (basePath, childPath) {
basePath = normalize(basePath)
childPath = normalize... | owncloud/web/tests/acceptance/helpers/path.js/0 | {
"file_path": "owncloud/web/tests/acceptance/helpers/path.js",
"repo_id": "owncloud",
"token_count": 431
} | 849 |
/* eslint-disable no-unused-expressions */
const util = require('util')
module.exports = {
commands: {
isQuickActionVisible: function (action) {
const className = action === 'collaborators' ? 'show-shares' : 'copy-quicklink'
const actionSelector = util.format(this.elements.quickAction.selector, class... | owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesRow.js/0 | {
"file_path": "owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesRow.js",
"repo_id": "owncloud",
"token_count": 232
} | 850 |
module.exports = {
commands: [
{
/**
* Wait for the password input section of public link page to appear
*/
waitForVisible: async function () {
await this.waitForElementVisible('@publicLinkPasswordSection')
},
/**
*
* @param {string} password
*/
... | owncloud/web/tests/acceptance/pageObjects/publicLinkPasswordPage.js/0 | {
"file_path": "owncloud/web/tests/acceptance/pageObjects/publicLinkPasswordPage.js",
"repo_id": "owncloud",
"token_count": 892
} | 851 |
const { After, Before, Given } = require('@cucumber/cucumber')
const fetch = require('node-fetch')
const { client } = require('nightwatch-api')
function handler(statement1, statement2, table = undefined) {
let statement = ''
if (statement1) {
statement = statement + statement1.trim()
}
if (statement1 && s... | owncloud/web/tests/acceptance/stepDefinitions/middlewareContext.js/0 | {
"file_path": "owncloud/web/tests/acceptance/stepDefinitions/middlewareContext.js",
"repo_id": "owncloud",
"token_count": 777
} | 852 |
Feature: Search
As a user
I want to search for resources
So that I can find them quickly
Scenario: Search in personal spaces
Given "Admin" creates following users using API
| id |
| Alice |
| Brian |
| Carol |
And "Brian" logs in
And "Brian" creates the following folder i... | owncloud/web/tests/e2e/cucumber/features/search/search.feature/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/features/search/search.feature",
"repo_id": "owncloud",
"token_count": 4195
} | 853 |
Feature: rename
As a user
I want to rename resources
So I can rename resources from different locations
Scenario: rename resources
Given "Admin" creates following user using API
| id |
| Alice |
| Brian |
And "Alice" logs in
And "Alice" creates the following folders in personal... | owncloud/web/tests/e2e/cucumber/features/smoke/rename.feature/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/features/smoke/rename.feature",
"repo_id": "owncloud",
"token_count": 677
} | 854 |
import { Given, DataTable } from '@cucumber/cucumber'
import { World } from '../environment'
import { api } from '../../support'
import fs from 'fs'
import { Space } from '../../support/types'
Given(
'{string} creates following user(s) using API',
async function (this: World, stepUser: string, stepTable: DataTable... | owncloud/web/tests/e2e/cucumber/steps/api.ts/0 | {
"file_path": "owncloud/web/tests/e2e/cucumber/steps/api.ts",
"repo_id": "owncloud",
"token_count": 3175
} | 855 |
import join from 'join-path'
import { getUserIdFromResponse, request, realmBasePath } from './utils'
import { deleteUser as graphDeleteUser } from '../graph'
import { checkResponseStatus } from '../http'
import { User, KeycloakRealmRole } from '../../types'
import { UsersEnvironment } from '../../environment'
import { ... | owncloud/web/tests/e2e/support/api/keycloak/user.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/api/keycloak/user.ts",
"repo_id": "owncloud",
"token_count": 1260
} | 856 |
import { createdTokenStore, keycloakTokenStore } from '../store/token'
import { Token, User } from '../types'
export type TokenProviderType = 'keycloak' | null | undefined
export type TokenEnvironmentType = KeycloakTokenEnvironment | IdpTokenEnvironment
export function TokenEnvironmentFactory(type?: TokenProviderType... | owncloud/web/tests/e2e/support/environment/token.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/environment/token.ts",
"repo_id": "owncloud",
"token_count": 391
} | 857 |
import { Page } from '@playwright/test'
import * as po from './actions'
import { SpacesEnvironment } from '../../../environment'
import { Space } from '../../../types'
export class Spaces {
#page: Page
#spacesEnvironment: SpacesEnvironment
constructor({ page }: { page: Page }) {
this.#spacesEnvironment = ne... | owncloud/web/tests/e2e/support/objects/app-admin-settings/spaces/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/app-admin-settings/spaces/index.ts",
"repo_id": "owncloud",
"token_count": 785
} | 858 |
import { Page } from '@playwright/test'
import util from 'util'
const searchResultMessageSelector = '//p[@class="oc-text-muted"]'
const selectTagDropdownSelector =
'//div[contains(@class,"files-search-filter-tags")]//button[contains(@class,"oc-filter-chip-button")]'
const tagFilterChipSelector = '//button[contains(@... | owncloud/web/tests/e2e/support/objects/app-files/search/actions.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/app-files/search/actions.ts",
"repo_id": "owncloud",
"token_count": 980
} | 859 |
export { Application } from './application'
export { Session } from './session'
| owncloud/web/tests/e2e/support/objects/runtime/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/objects/runtime/index.ts",
"repo_id": "owncloud",
"token_count": 20
} | 860 |
export * as locatorUtils from './locator'
| owncloud/web/tests/e2e/support/utils/index.ts/0 | {
"file_path": "owncloud/web/tests/e2e/support/utils/index.ts",
"repo_id": "owncloud",
"token_count": 14
} | 861 |
<?php
//db connect
function connect($host=DBHOST,$username=DBUSER,$password=DBPW,$databasename=DBNAME,$port=DBPORT){
$link=@mysqli_connect($host, $username, $password, $databasename, $port);
if(mysqli_connect_errno()){
// exit(mysqli_connect_error());
exit('数据库连接失败,请检查config.inc.php配置文件');
}
mysqli_set_chars... | zhuifengshaonianhanlu/pikachu/inc/mysql.inc.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/inc/mysql.inc.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 575
} | 862 |
<html>
<head>
<script>
window.onload = function() {
document.getElementById("postsubmit").click();
}
</script>
</head>
<body>
<form method="post" action="http://192.168.1.4/pikachu/vul/xss/xsspost/xss_reflected_post.php">
<input id="xssr_in" type="text" name="message" value=
"<script>
document.location = 'htt... | zhuifengshaonianhanlu/pikachu/pkxss/xcookie/post.html/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/pkxss/xcookie/post.html",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 318
} | 863 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "csrf_get_edit.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','active open','','active','... | zhuifengshaonianhanlu/pikachu/vul/csrf/csrfget/csrf_get_edit.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/csrf/csrfget/csrf_get_edit.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1924
} | 864 |
<?php
$html.=<<<A
<img class=player src="include/kobe.png" />
<p class=nabname>
Kobe Bryant is one of the NBA's best scorer, breakthrough, shooting, free throws, three-pointers he chameleonic, almost no offensive blind area, single-game 81 points of personal record is powerful to prove it.In addition to crazy to points... | zhuifengshaonianhanlu/pikachu/vul/fileinclude/include/file1.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/fileinclude/include/file1.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 149
} | 865 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "op2_admin.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','... | zhuifengshaonianhanlu/pikachu/vul/overpermission/op2/op2_admin.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/overpermission/op2/op2_admin.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 2346
} | 866 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "sqli_insert.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''... | zhuifengshaonianhanlu/pikachu/vul/sqli/sqli_iu/sqli_mem.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/sqli/sqli_iu/sqli_mem.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1592
} | 867 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "unsafere.php"){
$ACTIVE = array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''... | zhuifengshaonianhanlu/pikachu/vul/urlredirect/unsafere.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/urlredirect/unsafere.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1255
} | 868 |
<?php
/**
* Created by runner.han
* There is nothing new under the sun
*/
$SELF_PAGE = substr($_SERVER['PHP_SELF'],strrpos($_SERVER['PHP_SELF'],'/')+1);
if ($SELF_PAGE = "xss_reflected_get.php"){
$ACTIVE = array('','','','','','','','active open','','','active','','','','','','','','','','','','','','','','',... | zhuifengshaonianhanlu/pikachu/vul/xss/xsspost/xss_reflected_post.php/0 | {
"file_path": "zhuifengshaonianhanlu/pikachu/vul/xss/xsspost/xss_reflected_post.php",
"repo_id": "zhuifengshaonianhanlu",
"token_count": 1687
} | 869 |
# 8th Wall Web Examples - AFrame - Art Gallery
This example uses image targets to show information about paintings in AR. This showcases image target tracking, as well as loading dynamic content and using the xrextras-generate-image-targets component.
 2021 8th Wall, Inc.
/* globals AFRAME THREE */
/**
* @param {Array<THREE.Material>|THREE.Material} material
* @return {Array<THREE.Material>}
*/
const ensureMaterialArray = (material) => {
if (!material) {
return []
} else if (Array.isArray(material)) {
return material
} else if (mat... | 8thwall/web/examples/aframe/portal/cubemap-static.js/0 | {
"file_path": "8thwall/web/examples/aframe/portal/cubemap-static.js",
"repo_id": "8thwall",
"token_count": 1530
} | 1 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="8th Wall React App... | 8thwall/web/examples/aframe/reactapp/public/index.html/0 | {
"file_path": "8thwall/web/examples/aframe/reactapp/public/index.html",
"repo_id": "8thwall",
"token_count": 879
} | 2 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>8th Wall: Sky Effects</title>
<!-- We've included a slightly modified version of A-Frame, which fixes some polish concerns -->
<script src="//cdn.8thwall.com/web/aframe/8frame-1.4.1.min.js"></script>
<!-- XR Extras - provides utilities ... | 8thwall/web/examples/aframe/sky/index.html/0 | {
"file_path": "8thwall/web/examples/aframe/sky/index.html",
"repo_id": "8thwall",
"token_count": 914
} | 3 |
// Copyright (c) 2018 8th Wall, Inc.
const onxrloaded = () => {
XR8.addCameraPipelineModules([ // Add camera pipeline modules.
// Existing pipeline modules.
XR8.GlTextureRenderer.pipelineModule(), // Draws the camera feed.
XRExtras.AlmostThere.pipelineModule(), // Detects unsupported browsers... | 8thwall/web/examples/camerapipeline/camerafeed/index.js/0 | {
"file_path": "8thwall/web/examples/camerapipeline/camerafeed/index.js",
"repo_id": "8thwall",
"token_count": 326
} | 4 |
/*
Ported to JavaScript by Lazar Laszlo 2011
lazarsoft@gmail.com, www.lazarsoft.info
*/
/*
*
* Copyright 2007 ZXing authors
*
* Licensed 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
*
* ... | 8thwall/web/examples/camerapipeline/qrcode/jsqrcode/src/findpat.js/0 | {
"file_path": "8thwall/web/examples/camerapipeline/qrcode/jsqrcode/src/findpat.js",
"repo_id": "8thwall",
"token_count": 7832
} | 5 |
// Made with teamwork between 8i and 8thWall, 2019
const applicationName = "8thWall-8i"
const version = "0.1"
/*
* URL's to other holograms (update the "assetFile" variable below)
*
* Alpaca:
* https://cdn.8thwall.com/web/assets/8i/Web600_ANIMALS2-S16-T02-SOf1187029.hvrs
*
* Fire Breather:
* https://d24wgmntpyb... | 8thwall/web/examples/threejs/8i-hologram/index.js/0 | {
"file_path": "8thwall/web/examples/threejs/8i-hologram/index.js",
"repo_id": "8thwall",
"token_count": 3012
} | 6 |
// Copyright (c) 2021 8th Wall, Inc.
// Returns a pipeline module that initializes the threejs scene when the camera feed starts, and
// handles subsequent spawning of a glb model whenever the scene is tapped.
/* globals XR8 XRExtras THREE TWEEN */
const placegroundScenePipelineModule = () => {
const modelFile = '... | 8thwall/web/examples/threejs/placeground/index.js/0 | {
"file_path": "8thwall/web/examples/threejs/placeground/index.js",
"repo_id": "8thwall",
"token_count": 2406
} | 7 |
/*jshint esversion: 6, asi: true, laxbreak: true*/
// layerscontroller.js: Opens the browser's web camera and runs AR. Attach this to an entity in the
// PlayCanvas scene.
var layerscontroller = pc.createScript('layerscontroller')
const PLAYCANVAS_LAYER_NAMES = ["Sky"]
const INVERT_SKY_MASK = false;
const EDGE_SMOOT... | 8thwall/web/gettingstarted/playcanvas/scripts/layerscontroller.js/0 | {
"file_path": "8thwall/web/gettingstarted/playcanvas/scripts/layerscontroller.js",
"repo_id": "8thwall",
"token_count": 789
} | 8 |
import type {ComponentDefinition} from 'aframe'
declare const XRExtras: any
declare const XR8: any
interface AFrameElement extends HTMLElement {
object3D: THREE.Object3D
}
// Show or hide sub-elements if the user has an opaque background session.
const opaqueBackgroundComponent: ComponentDefinition = {
schema: {... | 8thwall/web/xrextras/src/aframe/components/lifecycle-components.ts/0 | {
"file_path": "8thwall/web/xrextras/src/aframe/components/lifecycle-components.ts",
"repo_id": "8thwall",
"token_count": 3444
} | 9 |
const attachListenerGen = () => {
const callbacks = new Set()
let attached_ = false
let attachState_ = null
let {XR8} = window
const pipelineModule = () => ({
name: 'xrextraslifecycle',
onAttach: (attachState) => {
attachState_ = attachState
attached_ = true
callbacks.forEach(callba... | 8thwall/web/xrextras/src/lifecyclemodule/lifecycle.js/0 | {
"file_path": "8thwall/web/xrextras/src/lifecyclemodule/lifecycle.js",
"repo_id": "8thwall",
"token_count": 608
} | 10 |
# PWA Installer API
|Functions | Description|
|------------------|------------|
|[configure](#configure)| Configures the default behavior used to display the install prompt. |
|[pipelineModule](#pipelineModule)| Provides a pipeline module which will handle when a PWA install prompt is displayed in the given ap... | 8thwall/web/xrextras/src/pwainstallermodule/README.md/0 | {
"file_path": "8thwall/web/xrextras/src/pwainstallermodule/README.md",
"repo_id": "8thwall",
"token_count": 2151
} | 11 |
const path = require('path')
module.exports = {
entry: './src/index.js',
output: {
filename: 'xrextras.js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
],
}, {
tes... | 8thwall/web/xrextras/webpack.config.js/0 | {
"file_path": "8thwall/web/xrextras/webpack.config.js",
"repo_id": "8thwall",
"token_count": 461
} | 12 |
## 1、携程网首页
**需求**:页面无横向滚动条,页面随着宽度的改变自动伸缩。
**代码**:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
header {
width: 100%;
display: flex;
}
... | Daotin/Web/02-CSS/02-CSS3/08-CSS3三个案例.md/0 | {
"file_path": "Daotin/Web/02-CSS/02-CSS3/08-CSS3三个案例.md",
"repo_id": "Daotin",
"token_count": 9560
} | 13 |
## 一、DOM概念
DOM 的全称为:**Document Object Model 文档对象模型**
我们把 html 文件看成一个文档,因为万物皆对象,所以这个文档也是一个对象。这个文档中所有的标签都可以看成一个对象,比如 div 标签,p 标签等。
### 1、相关概念
- html 页面有一个根标签 html 标签。
- 标签也叫元素,也叫对象。
- 页面中的顶级对象:document。
**节点(node)**:页面中所有的内容都是节点。包括标签,属性,文本等
xml 文件也可以看成一个文档。
html:侧重于展示数据。
xml:侧重于存储数据。
### 2、DOM树
文档下面有根标签 ht... | Daotin/Web/03-JavaScript/02-DOM/01-DOM的概念,对标签的操作.md/0 | {
"file_path": "Daotin/Web/03-JavaScript/02-DOM/01-DOM的概念,对标签的操作.md",
"repo_id": "Daotin",
"token_count": 4645
} | 14 |
## 内容更新
最新内容已更新至博客:[一文搞懂JavaScript中各种宽高位置(全)](https://daotin.github.io/2021/08/08/%E4%B8%80%E6%96%87%E6%90%9E%E6%87%82JavaScript%E4%B8%AD%E5%90%84%E7%A7%8D%E5%AE%BD%E9%AB%98%E4%BD%8D%E7%BD%AE.html)
> 更新日期 *(added in 2021-08-13)*
以下内容为旧的,可以不必查看。
---
## 一、问题由来
刚开始学 DOM 操作中对于元素距离元素的距离问题总是迷迷糊糊的,虽然有万能的 getCurrentSt... | Daotin/Web/03-JavaScript/03-BOM/06-一文搞懂DOM相关距离问题.md/0 | {
"file_path": "Daotin/Web/03-JavaScript/03-BOM/06-一文搞懂DOM相关距离问题.md",
"repo_id": "Daotin",
"token_count": 4335
} | 15 |
## 一、原型链
原型链表示的是实例对象与原型对象之间的一种关系,这种关系是通过` __proto__ `原型来联系的。
### 1、原型的指向改变
实例对象的原型 `__proto__` 指向的是该对象的构造函数中的原型对象 prototype,如果该对象的构造函数的 prototype 指向改变了,那么实例对象中的原型 `__proto__` 的指向也会跟着改变。
例如:
```js
Person.prototype = new Cat();
```
> 因为 Person.prototype = {}; 可以是一个对象,所以传入另一个对象的实例函数是可以的,这时候 Person 的实例对象可以访问 Cat 原型 ... | Daotin/Web/03-JavaScript/04-JavaScript高级知识/04-原型链,继承.md/0 | {
"file_path": "Daotin/Web/03-JavaScript/04-JavaScript高级知识/04-原型链,继承.md",
"repo_id": "Daotin",
"token_count": 5379
} | 16 |
## 一、操作元素的width和height
### 1、方法一
```js
元素.css("width"); // 获取元素的宽度(无论是css样式还是行内样式都可以获取到)
元素.css("height");
```
> 最后得到的是字符串类型的,比如 `200px`。
如果我们在设置为原来宽高2倍的时候,就要先把获取的宽高转换成数字类型,再乘以2,这样操作比较麻烦,有没有简单的方法呢?
### 2、方法二
```js
元素.width(属性值或者数字);
元素.height(属性值或者数字);
```
> 1、jQuery中用以上方式可以获取和设置元素的宽高。
>
> 2、当没有参数的时候是获取元... | Daotin/Web/04-jQuery/05-元素宽高距离相关.md/0 | {
"file_path": "Daotin/Web/04-jQuery/05-元素宽高距离相关.md",
"repo_id": "Daotin",
"token_count": 2028
} | 17 |
这个聊天室的案例是:
填写用户名和发送的消息,点击发送按钮,就会在textarea中显示出来。
node后台:
```js
var http=require("http"); // 导入http.js文件
var msgList=[];
// 创建server服务
// req:接收前端的数据
// res:发送给前端的数据
var server=http.createServer(function (req,res) {
var data="";
// post请求接收数据的函数
// post接收到的数据就在函数的参数d里面
req.on("data",function (d) {
... | Daotin/Web/06-Ajax/案例02:Ajax聊天室Node版.md/0 | {
"file_path": "Daotin/Web/06-Ajax/案例02:Ajax聊天室Node版.md",
"repo_id": "Daotin",
"token_count": 2122
} | 18 |
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }
.#{$fa-css-prefix}-music:before { content: $fa-var-music; }
.#{$fa-css-prefix}-search:before { content: $fa-var-searc... | Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/scss/_icons.scss/0 | {
"file_path": "Daotin/Web/07-移动Web开发/案例源码/03-微金所/lib/font-awesome-4.7.0/scss/_icons.scss",
"repo_id": "Daotin",
"token_count": 21492
} | 19 |
## ES6模块化
### 方式一
导出导入匿名函数,字符串,对象等。
```js
// 导出 sayHi.js
export default function() { console.log('Daotin') }
export default "Daotin"
export default {name:"Daotin"}
// 对应的导入
import xxx from './sayHi'
```
> 导入时,xxx名称可以随便起。
### 方式二
导出导入有名函数,字符串,对象等。导出时需要声明变量。该种导出方式 在导出一个值时 必须同时在此处声明该变量。即必须有关键字 let var const func... | Daotin/Web/09-模块化规范/05-ES6模块化教程.md/0 | {
"file_path": "Daotin/Web/09-模块化规范/05-ES6模块化教程.md",
"repo_id": "Daotin",
"token_count": 2333
} | 20 |
## 一、Vue的动画
为什么要有动画:动画能够提高用户的体验,帮助用户更好的理解页面中的功能;
Vue 中也有动画,不过远没有 css3 中的那么炫酷。只能有一些简单的变换,但是却可以配合第三方css动画库完成炫酷的变换。
### 1、过渡的类名
在进入/离开的过渡中,会有 6 个 class 切换。
- `v-enter`:定义**进入过渡的开始状态。**在元素被插入之前生效,在元素被插入之后的下一帧移除。
- `v-enter-active`:定义**进入过渡生效时的状态**。在整个进入过渡的阶段中应用,在元素被插入之前生效,在过渡/动画完成之后移除。这个类可以被用来定义进入过渡的过程时间,延迟和曲线函数。
- ... | Daotin/Web/12-Vue/04-动画.md/0 | {
"file_path": "Daotin/Web/12-Vue/04-动画.md",
"repo_id": "Daotin",
"token_count": 7665
} | 21 |
## 事件修饰符
### 常用的事件修饰符
+ `.stop` : 阻止冒泡
+ `.prevent` : 阻止默认事件(比如点击超链接,阻止跳转到默认网页)
+ `.capture` : 添加事件侦听器时使用事件捕获模式(与冒泡模式相反)
+ `.self` :只当事件在该元素本身(比如不是子元素)触发时触发回调
+ `.once` :事件只触发一次,之后还原标签本身的行为。
示例:
```html
<div id="app">
<!-- 使用 .stop 阻止冒泡 -->
<div class="inner" @click="div1Handle... | Daotin/Web/12-Vue/事件修饰符.md/0 | {
"file_path": "Daotin/Web/12-Vue/事件修饰符.md",
"repo_id": "Daotin",
"token_count": 2945
} | 22 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.